image - How to crop detected object given the edge points in Matlab -


i have 2d coordinates of edge points [x,y] of objects in gery image (img). x , y nx1 vectors. objects have irregular shapes.

my question how can crop (or extract image of object original image (img) using matlab.

the following sample of code:

input_grey = rgb2gray(input_rgb); [b,l] = bwboundaries(cc); % cc binary image edges of objects.  boundary = b{1}; % edge points of first object.  x = boundary(:, 2);  y = boundary(:, 1); 


Comments

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

ios - Change Storyboard View using Seague -