Hey all,
I want to get X and Y coordinates of an image, so that I can generate the graph in an Excel File with those coordinates. I used below code to process an binary image:
img = imread(app.SelectImageEditField.Value); Icomplement = imcomplement(img); Icomplement = rgb2gray(Icomplement); BW = imbinarize(Icomplement, 'adaptive'); out2 = bwskel(BW,'MinBranchLength',15); BW2 = bwperim(out2,8);
Then I used the following code lines to get a digital graph:
M = sparse(BW2); spy(M);
Now I want to grab the equivalent X and Y coordinates of this sparse matrix so that I can generate the same graph in Excel. Please suggest a solution. Thank you.
Best Answer