MATLAB: How to determine the coordinates of points coordinatespoints I want to determinate the coordinates of this points Best 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 Related SolutionsMATLAB: How to find coordinates of two corner points in an image without using ginput No need to crop, label, call regionprops. Why bother if all you want are the endpoints? Simply use bwmorph()skelImage = bwmorph(binaryImage, 'skel', inf);endPoints = bwmorph(skelImage, 'Endpoints');[rows, columns] = find(endPoints); MATLAB: Finding end points of lines in an image Use bwmorph('Endpoints') Related QuestionDetermine ExpressionDraw lines from one point to the all othersDetermine a point curveFind the third point
Best Answer