Object correct labeling when it is within another object
1 次查看(过去 30 天)
显示 更早的评论
I have an overlayed image, the first image contains the red boxes that I have labelled (here: 1 and 2) already. The second image contains the blue boxes but has different labels (here: 3 and 4). However, I would like to relabel these objects in a way, that whenever the blue box is completely inside the area of the red box they will share the same label.
I attached a short illustration to make it clear and hope you can help me with this problem.
0 个评论
回答(1 个)
Prashant Arora
2017-4-28
编辑:Prashant Arora
2017-4-28
You can use the function "inpolygon" to check if one polygon lies inside the other.
To extract polygons/squares from the images, you can use "regionprops" function.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Image Segmentation and Analysis 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!