funtion: recognize the gears in the image, segment them and count the number of toothes.

input: an image

output: 
1. fourier analysis result for each connected component in the image, named by their labels.
2. image of segmented gears, with the number of toothes included in their names.

Algorithm:

1. transform the image into the desired input form (binary)
2. find the connected components.
3. for each component, construct an array containing the distance from the boundary points to the center point.

4. do fourier analysis to this array. find the fourier spectrums which have the following features:
    a.the circle -> the 1st magnitude is much larger than the other magnitudes
    b.the toothes -> in the rest magnitudes, there is one which is larger than the threshold after parameter transformation.

5. the number of toothes equals to the number of periods of the second largest magnitude (corresponding to the toothes). 

    
