Recreating the curve from image graph as a matlab plot

11 views (last 30 days)
I have an .jpeg image of a graph. I have extracted the x,y coordinates of the black curve usng pixel intensity and would like to recreate the original graph as a matlab plot to extract data. I am not using any digitizer prebuilt functions because I dont want to manually click on the points in the curve to extract data. So my idea is to plot the x,y cooridnates of the black pixel graph as a plot with the origin x and y axis scale and get the data from it. Now I need help to understand how I can plot the x,y coordinates extracted from image to recreate the curve exactly as below? Any better ideas are also appreciated. Thank you!
  3 Comments

Sign in to comment.

Answers (1)

Image Analyst
Image Analyst on 22 Sep 2021
"I have extracted the x,y coordinates " So just sort by x and plot
% Scale
x = rescale(x, time1, time2);
y = rescale(y, 14.4, 23.4);
% Sort in order of increasing x.
[sortedX, sortOtder] = sort(x, 'ascend');
sortedY = y(sortOrder);
plot(sortedX, sortedY, 'b-');

Categories

Find more on Images in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!