Similarity between two 2D-shapes
6 views (last 30 days)
Show older comments
Hello,
After proceeding to a segmentation of 2 consecutive (in time) images, I obtain 2 BW images, whose white regions are forming some 2D-patches. I would like to determine the change of position of each patch between the first and second image, and then calculate its velocity, in many points of the patch if possible, since its shape is gonna change a little bit. So, I'd need an algorithm which is able to determine that a given patch in image 1 corresponds to a patch in image 2, by comparing the shape of the contour of the patch. A difficulty I have to take into account is that it is possible that patches are not complete, cut by the border of the image, and so patch size is gonna be increased/decreased between the 2 images.
I hope my description of the problem is clear enough, so that someone will able to help me.
Thanks,
Sylvain
4 Comments
Rik
on 25 Oct 2017
With boundary condition I mean things like if the shapes can be assumed to have a relative small movement from frame to frame. If so, you can use regionprops to find the center, and use that as the seed for the next frame. As to how you would measure velocity for different parts of the patches, I don't have any ideas yet.
Answers (1)
Scott Weidenkopf
on 30 Oct 2017
This sounds like a good use case for the Computer System Vision Toolbox, which includes a BlockMatcher object that should be exactly what you need. The link below directs to its documentation page:
https://www.mathworks.com/help/vision/ref/vision.blockmatcher-system-object.html#bse8yed-6
BlockMatcher objects estimate motion between two images or video frames, and it should function properly even if your blobs are different sizes in the two images due to being 'chopped' by the image boundary.
0 Comments
See Also
Categories
Find more on Feature Detection and Extraction in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!