MATLAB: How to calculate distance between center of white pixels in an image

digital image processingdistanceimage acquisitionImage Acquisition Toolboximage analysisimage processingImage Processing Toolboximage segmentationMATLAB

In this iamge, I want to measure the distance between the center of area of white pixels marked below.
As these are not definite shapes, how do I find the center of these and then measure the distance in pixels between their centers.cmm_wo_circles.jpg

Best Answer

REad about imdistline; this will allow you to calculate the distance between the points interactively. For this you are supposed to have image toolbox.
[y,x] = find(I==1) ; % give the pixel value
The above line, gives you the coordinates/ points of the required pixel. YOu have the points in hand, you can do the process needed.
Related Question