how to determine the coordinates of points

 Accepted Answer

I = imread('bwimage.jpg');
I = rgb2gray(I);
N = bwlabel(I);
s = regionprops(N, 'centroid');
XY=[s.Centroid];
XY(1:2:end);
XY(2:2:end);
The XY contains the coordinates the last two lines will give you two arrays of X and Y coordinates

More Answers (0)

Categories

Find more on Aerospace Blockset in Help Center and File Exchange

Asked:

on 28 Nov 2017

Answered:

on 28 Nov 2017

Community Treasure Hunt

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

Start Hunting!