/******************************************************************************** * CS 791E Programming Assignment # 2 * Hough Algorithm Implementation on Circles * * * Name: hough.c * Usage: 1). make * 2). hough * * Autor: Beifang Yi * Date: 3/23/03 * * ********************************************************************************/ 1.Download hough.c and houghMakefile. 2.Type: make -f houghMakefile. 3.To run the program, type: ./hough where rstart ---- the minimum radius in the object (in pixels) rend---- the maximum radius in the object (in pixels) 4.You will see on shell terminal the following messages and a GUI interface: -----------Welcome to Beifang's 'Houghing' program!!-------- This program interacts with you via key and mouse and terminal. ---------------------------------------------------------- FIRST: CLICK ON THE IMAGE/INTERFACE and then.... type 'B' or 'b'-----to do Sobel detection on the input image. type 'C' or 'c'-----to do Canny detection on the input image. type 'H' or 'h'-----to do Hough transform on the current image. type 'L' or 'l'-----to local maxima on the clussters of circles. type 'E' or 'e'-----to calculate the fitting errors. type 'S' or 's'-----to save the current image. type 'D' or 'd'-----to find and draw found circle(s). type 'N' or 'n'-----to create new image with a circle. type SPACEBAR -----to quit this program. And click/move the sliderbar to get new values. ----------------------------------------------------------- ALWAYS MAKE the image/interface the current environment. WHILE typing the above commands NOT in the shell window, BUT on the image/interface window!!!! Images saved in 'jpg' format. 5. Please TYPE THE ABOVE SUBCOMMAND IN THE GUI IMAGE INTERFACE NOT IN THE SHELL TERMINAL WINDOW!!!! 6.Use "X_Y_R_Quantum" sliderbar to choose the Hough parameter quantum size. 7.Edge detection: 1).you can type 'B' or 'b'and use "sobel ThresholdRationX100"sliderbar to do Sobel edget detection. 2)..you can type 'C' or 'c'and use the lowest two sliderbars to do Canny edget detection. (You can slide the bars to quickly get preferred edges) (Please USE Canny detection for BETTER effect). 8.Type 'H' or 'h' to implement Hough tranformation. 9.Use "No. of Circles (in clusters)" sliderbar to choose the number of the BEST circles we are going to find. 10. Type 'D' or 'd' to draw the found circles in clusters. 11. You can go to step 9 and 10 to make sure that all the "circle objects" in one of the cluster circles. 12. Type 'E' or 'e' to print the fitting errors for those found circles. 13. Type 'L' or 'l' to find the best circles for each "circle object": ONLY one circle will remain the others will be erased. 14. Type 'E' or 'e' to get the fitting errors for those best circles. 15. You can go to steps 6 to 14 to do Hough transformation if you want to change the Hough quantum size for comparing results. 16. You save the current image (occurred in GUI) any time if typing 'S' or 's'.