I'm working on a method for measuring the relative lengths of the objects, with the intention of showing that the objects are longer in the center of the image that at the top/bottom.
The image is binarized, with some small dots that look like noise. Measuring the object lengths is made more difficult by the fact that some are broken. (I can use dilation to fix this)
ImageTake[b, {390, 660}, {733, 1016}] // ColorNegate
TOP
BOTTOM
The original image is taken from the blue channel and looks almost identical to the above
A quick method I have tried is to use the ComponentsMeasurements[]
function that can return the longest axis of the best shape ellipse - but I'm not sure if that function works on the individual objects in the image.
Question 1 - Does the above method measure the best fit ellipse for each object (line) or does it do for groups of lines in the image instead?
Question 2 - I was going to use a iterative search in each row to identify the start end end locations for each object for measuring their relative lengths (longest axis in pixels). Doing this for all objects is not necessary, only to show that objects get longer towards the centre of the image. If you have a better idea then I would be very grateful if you would share your thoughts.
Regards,
Thanks Carmullion. I would prefer not to use ComponentMeasurements as I am not sure if it measures individuals or small groups of objects (used an image with different dimensions to get the following results):
test3 = ComponentMeasurements[MorphologicalComponents[bResize],
"Length"];
ListPlot[data, PlotRange -> {{0, 397}, {0, 35}},
AxesLabel -> {"Height/pxls", "Length"}]
Small objects (noise) accounts for the points that span the scatter plot close to the axes. I can get rid / minimize these by adjusting the Binarize
parameter
![enter image description here][2]
Colorize
were showing the objects - but are you looking for subdivisions of those? $\endgroup$