Averaging the object in multiple images

I have a circular shape-like object in multiple images. The location of centroid of the objects are same but size (~radius) varies. How can I get an average of the size of all the objects and display it in a new image? The sum of the images divided by the number of images gives the average of the pixel values of the objects and not the pixel location (i.e. size of the object). Thank you for your help.

답변 (1개)

Image Analyst
Image Analyst 2021년 4월 19일

0 개 추천

Vinit, I have a demo that does exactly that.
The attached demo takes a pseudo-periodic array of shapes (a chain link fence) and determines the "Average" shape and identifies the one with the closest-to-average shape.

댓글 수: 5

Vinit Nagda
Vinit Nagda 2021년 4월 19일
Thank you very much for sharing the code.
Thanks Image Analyst! You are awesome!
Vinit Nagda
Vinit Nagda 2021년 4월 20일
Hello @Image Analyst , If I have numberOfShapes=2 in my case, it does not work well then. The result is smaller one of the two shapes instead of average shape. Could you please check? Or am I doing any mistake?
Thank you.
Vinit Nagda
Vinit Nagda 2021년 4월 20일
@Image Analyst Please have a look at the code attached along with the result output for reference.
Thank you
props = regionprops(mask, 'EquivDiameter');
allDiameters = [props.EquivDiameter]
Attach your images separately if you can't figure it out.
Vinit Nagda
Vinit Nagda 2021년 4월 21일
@Image Analyst I do not have circular-shaped objects, instead I have something similar to your blobs shape. So, 'EquivDiameter' properties won't be a good solution. Just to show that when number of shapes=2, the averaging does not work as in your code, I gave a simple example of circular objects.

댓글을 달려면 로그인하십시오.

카테고리

도움말 센터File Exchange에서 Image Segmentation and Analysis에 대해 자세히 알아보기

제품

릴리스

R2020b

질문:

2021년 4월 19일

댓글:

2021년 4월 21일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by