home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The C Users' Group Library 1994 August
/
wc-cdrom-cusersgrouplibrary-1994-08.iso
/
listings
/
v_10_01
/
1001061a
< prev
next >
Wrap
Text File
|
1991-12-12
|
2KB
|
72 lines
/***********************************************
*
* get_edge_options(...
*
* This function queries the user for the
* parameters need to perform edge
* detection.
*
***********************************************/
get_edge_options(detect_type, threshold, high, size)
int *detect_type, *high, *size, *threshold;
{
int not_finished, response;
not_finished = 1;
while(not_finished){
printf("\nThe Edge Detector options are:\n");
printf("\n\t1. Type of edge detector is %d", *detect_type);
printf("\n\t (recall 1=Prewitt 2=Kirsch");
printf("\n\t 3=Sobel 4=quick");
printf("\n\t 5=homogeneity 6=difference");
printf("\n\t 7=contrast 8=gaussian");
printf("\n\t2. Threshold output is %d (0=off 1=on)",
*threshold);
printf("\n\t3. High threshold is %d", *high);
printf("\n\t4. Size is %d (gaussian only)", *size);
printf("\n\nEnter choice (0 = no change) _\b");
get_integer(&response);
if(response == 0){
not_finished = 0;
}
if(response == 1){
printf("\n\nEnter type of edge detector");
printf("\n\t (recall 1=Prewitt 2=Kirsch");
printf("\n\t 3=Sobel 4=quick");
printf("\n\t 5=homogeneity 6=difference");
printf("\n\t 7=contrast 8=gaussian");
printf("\n _\b");
get_integer(detect_type);
}
if(response == 2){
printf("\n\nEnter threshold output (0=off 1=on)");
printf("\n _\b");
get_integer(threshold);
}
if(response == 3){
printf("\n\nEnter high threshold");
printf("\n _\b");
get_integer(high);
}
if(response == 4){
printf("\n\nEnter size for gaussian (7 or 9)");
printf("\n _\b");
get_integer(size);
}
} /* ends while not_finished */
} /* ends get_edge_options */
/* End of File */