MATLAB: IMAGE ANALYSIS: Do I have to convert the grayscale AFM images into binary before doing edge detection/segmentation

image analysisimage processingimageanalysis

Is imbinarize(image) a necessary step to find connected objects and such?
Is it important to binarize grayscale images to do edge detection, segmentation of different foreground shapes, etc?
If not, then can someone point me to documentation where I can do all segmentation and object finding stuff without binarizing ?
thanks

Best Answer

"Is imbinarize(image) a necessary step to find connected objects and such?" Yes. Well, not necessarily imbinarize, but binarization from some method, like manual thresholding like
binaryImage = grayImage > someThreshold;
"Is it important to binarize grayscale images to do edge detection, segmentation of different foreground shapes, etc?" No Edge detection can be done on gray scale images. Segmentation is the process of applying various operations until you get to a point where you can threshold to produce a binary image. The binary image is the "segmented" image. If you then apply a label (ID number) to each connected blob, for example with the bwlabel() function, then that is now called a "labeled" image.
See my File Exchange for a variety of ways to segment gray scale and color images.