MATLAB: Rods and disk image

digital image processingimage processingImage Processing Toolbox

I have an image of rods and disk and i need to suppurate the rods only using morphological processing i need the mean steps only

Best Answer

You forgot to post your image. I don't know how you define "mean steps". Please explain.
If the image looks like what I'm imagining, something like pencils and coins, or this:
Then I'd threshold and call regionprops and look at the ratio of the major to minor axis. If the ratio is high, it's a rod. If the ratio is less than about 2, it's a disc.
Related Question