How can I rebuild arbitrary shape in binary matrix after detect corners.

2 views (last 30 days)
I have many different shapes as rectangle in binary matrix . I would like to detected based on a corner detections, hence creat a new binay matrix with connecting the corner pointe which have detected from the corner detection method and fill in side (i.e. Build the shape based on the corner detection points) as shown the easy shape is the rectangluar :
however if i have difrrents shapes and i have only the pointes. how can bulid the edge of shape based on corner dections points and then fill it by o value?
could someone help me to da that?
A=zeros(100,100);
A(40:60,30:70)=1;
corners = detectHarrisFeatures(~A,'FilterSize',3);
figure(50); clf;
imshow(~A); hold on;
plot(corners.selectStrongest(30));
detecting = ones(size(A));
points= round(corners.selectStrongest(30).Location);%

Answers (0)

Tags

Community Treasure Hunt

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

Start Hunting!