matlab - How to get co-ordinates of a contour of a binary image? -


this question has answer here:

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

Popular posts from this blog

java - Oracle EBS .ClassNotFoundException: oracle.apps.fnd.formsClient.FormsLauncher.class ERROR -

c# - how to use buttonedit in devexpress gridcontrol -

nvd3.js - angularjs-nvd3-directives setting color in legend as well as in chart elements -