home *** CD-ROM | disk | FTP | other *** search
/ The C Users' Group Library 1994 August / wc-cdrom-cusersgrouplibrary-1994-08.iso / listings / v_10_01 / 1001060a < prev    next >
Text File  |  1991-12-12  |  3KB  |  84 lines

  1.         case 8:  /* perform edge detection */
  2.            printf("\nCIPS>> Enter input image name\n");
  3.            get_image_name(name);
  4.            printf("\nCIPS>> Enter output image name\n");
  5.            get_image_name(name2);
  6.            get_parameters(&il, &ie, &ll, &le);
  7.            get_edge_options(&detect_type, &detect_threshold,
  8.                             &high, &size);
  9.            if(detect_type == 1  ||
  10.               detect_type == 2  ||
  11.               detect_type == 3)
  12.               detect_edges(name, name2, the_image, out_image,
  13.                            il, ie, ll, le, detect_type,
  14.                            detect_threshold, high);
  15.            if(detect_type == 4)
  16.               quick_edge(name, name2, the_image, out_image,
  17.                          il, ie, ll, le, detect_threshold,
  18.                          high);
  19.            if(detect_type == 5)
  20.                 homogeneity(name, name2, the_image, out_image,
  21.                          il, ie, ll, le, detect_threshold,
  22.                          high);
  23.            if(detect_type == 6)
  24.                 difference_edge(name, name2, the_image, out_image,
  25.                               il, ie, ll, le, detect_threshold,
  26.                               high);
  27.            if(detect_type == 7)
  28.                 contrast_edge(name, name2, the_image, out_image,
  29.                             il, ie, ll, le, detect_threshold,
  30.                             high);
  31.            if(detect_type == 8)
  32.                 gaussian_edge(name, name2, the_image, out_image,
  33.                              il, ie, ll, le, size, 
  34.                             detect_threshold, high);
  35.          break;
  36.  
  37.         case 9:  /* edge enhancement */
  38.            printf("\nCIPS>> Enter input image name\n");
  39.            get_image_name(name);
  40.            printf("\nCIPS>> Enter output image name\n");
  41.            get_image_name(name2);
  42.            get_parameters(&il, &ie, &ll, &le);
  43.            printf("\nCIPS>> Enter high threshold parameter");
  44.            printf(" \n\t___\b\b\b");
  45.            get_integer(&high);
  46.            enhance_edges(name, name2, the_image, out_image,
  47.                   il, ie, ll, le, high);
  48.          break;
  49.  
  50. .
  51. .
  52. .
  53.  
  54.    /******************************************************
  55.    *
  56.    *   show_menu(..
  57.    *
  58.  
  59.    *   This function displays the CIPS main menu.
  60.    *
  61.    *******************************************************/
  62. show_menu()
  63. {
  64.  
  65.         printf("\n\n\nWelcome to CIPS");
  66.         printf("\nThe C Image Processing System");
  67.         printf("\nThese are you choices:\n");
  68.         printf("\n\t1.  Display image header");
  69.         printf("\n\t2.  Show image numbers");
  70.         printf("\n\t3.  Print image numbers");
  71.         printf("\n\t4.  Display image (VGA & EGA only)");
  72.         printf("\n\t5.  Display or print image using halftoning");
  73.         printf("\n\t6.  Print graphics image using dithering");
  74.         printf("\n\t7.  Print or display histogram numbers");
  75.         printf("\n\t8.  Perform edge detection");
  76.         printf("\n\t9.  Perform edge enhancement");
  77.         printf("\n\t20. Exit system");
  78.         printf("\n\nEnter choice _\b");
  79.  
  80. }    /* ends show_menu */
  81.  
  82. /* End of File */ 
  83.  
  84.