Calculate average size of circles in jpg
Hello!
I have pretty standart task to calculate average size of circles on variety of jpg files. So the whole application would have structure like this:
for-loop (from first image to the last) turn rgb image to binary one; calculate average raw of bubbles; end-loop
I have done common structure but starting stumbling on the step where I suppose to calculate size (see image). There is standard function regionprops() to find objects properties, but actually I do not understand what this function returns and even more I cannot execute example "Estimate Center and Radii of Circular Objects and Plot Circles" on this page: https://www.mathworks.com/help/images/image-processing-on-a-gpu.html because as far as I understand
regionprops('table',bw,'Centroid',... 'MajorAxisLength','MinorAxisLength')
need a scalar as an input, which I concluded from this error I am getting during execution:
Expected input number 1, L, to be one of these types:
double, single, uint8, uint16, uint32, uint64, int8, int16, int32, int64
Instead its type was char.
My image is
which is binary one, I have plenty of files like that which differ from each other by average size of black bubble and my question is how to calculate average size of bubbles..?
Is there a simple way to calculate size of every bubble on my picture..?
Thank you in advance!
댓글 수: 6
답변 (1개)
댓글 수: 2
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!