Image segmentation at corner points

2 次查看(过去 30 天)
玥 曾
玥 曾 2023-3-16
回答: Sachin 2023-4-14
How to divide the white part in the first diagram into the red and blue parts in the second diagram? Thank you for your help.

回答(1 个)

Sachin
Sachin 2023-4-14
Hi
I understand that you want to segment an image at corner points.
One of the potential solutions can be following -
  1. First find the contour of the diagram in the image and this will generate the coordinates of the contour. You can use this function- ‘bwboundaries’
  2. Identify the rightmost point of the contour and locate the point where slope is not zero, which will serve as corner point.
  3. Apply the ‘Mask’ operation on both sides of the corner point using the desired color. https://www.mathworks.com/matlabcentral/answers/87708-how-to-mask-an-image
Please refer the following documentation for finding the contour and boundary coordinates:
Using MATLAB:
Using OpenCV:

类别

Help CenterFile Exchange 中查找有关 Image Processing Toolbox 的更多信息

产品


版本

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by