matlab - How to get co-ordinates of a contour of a binary image? -
this question has answer here:
- matlab - find contour of binary bit map? 3 answers
i have binary image , want extract co-ordinates of contour of binary image.the built in contour() functions resulted in double values, instead want array i.e. series of (x,y) of contour.it ok if co ordinates in polar (x+iy) form. can me please ?
you can contour mask eroding mask simple small structure element (disk/square)
con = bw & ~imerode( bw, [0 1 0; 1 1 1; 0 1 0] ); figure; imshow( con ); title('contour mask'); [cy cx] = find(con); %// coordinates of contour pixels
coming think it, there several (related) functions tracing boundaries of binary masks in image processing toolbox.
have tried bwtraceboundary
or bwboundaries
?
Comments
Post a Comment