how to find coordinates of each brick corners using matlab
3 次查看(过去 30 天)
显示 更早的评论
How can i find the coordinates of the four corners of each brick in this figure?
I tried different functions like corner(), and regionprops('Extrema') with no benefits. Problem is the bricks is not usually a perfect rectangle, so i need some kind of sharpening-edge technique or a more "intelligent" find-corner-algorithm to find them.
0 个评论
回答(2 个)
Image Analyst
2020-10-9
I'd call imopen() or watershed() to separate the bricks so they don't touch. Then I'd call regionprops() to get the bounding box of each. If you need the actual pixel in the corner instead of the bounding box corner, then you need to get the boundary with bwboundaries() and find the peaks with findpeaks(). I do this in the attached demo on shape finding.
For fun, I'm also including a demo on how to find the average shape.
0 个评论
Matt J
2020-10-29
After applying imopen() like ImageAnalyst recommends, you could download pgonCorners and apply it as in this example in this example
0 个评论
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!