Hi,
I'm processing an image (please see attachment).
I tried to full fill the white rectangle (which is currently covered by the water drop shaped black shadow).
How can I remove the shadow to get the fully rectange?
I have the Boundary polyshape of white shape.
This is the polyshape I have:
And the image:
Thanks

댓글 수: 2

rough93
rough93 2019년 9월 19일
Create a vector between two points on the left edge above and below the drop, create a for loop for every row between column to the right to color it your chosen color. You can set additional paramters to limit how much is colored.
Le Vu Bao
Le Vu Bao 2019년 9월 20일
Yes, I thought about this approach. I tried to detect 2 upper and lower points of the drop. But the corner detector in Matlab returned far more points (7 corners is the lowest). Not until I can detect these 2 points I think cannot continue this solution.
Could you give more detail way to detect these two points out of other corner points?
Although, I finally completed my goal using boundary function. I am really curious how to get it done in this way

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

 채택된 답변

darova
darova 2019년 9월 19일

0 개 추천

Use convhull or boundary to get contour of your figure
Then use inpolygon to fill this shape

댓글 수: 1

Le Vu Bao
Le Vu Bao 2019년 9월 20일
Thanks, I used boundary function and It worked like a charm

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

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Elementary Polygons에 대해 자세히 알아보기

질문:

2019년 9월 19일

댓글:

2019년 9월 20일

Community Treasure Hunt

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

Start Hunting!

Translated by