Is there any way of extracting raw data from scanned plots of charts with X and Y scales defined on graph paper?

5 vues (au cours des 30 derniers jours)
I want to use scanned image of a chart with plotted data. If I define the X/Y scaling and limits, is there a way to extract plotted data points from the scanned image using MATLAB without having the raw data available?
  1 commentaire
John BG
John BG le 1 Mai 2018
Hi Thomas
Indeed it is (possible).
Can you attach the image to your question so that readers can have a look?

Connectez-vous pour commenter.

Réponse acceptée

Walter Roberson
Walter Roberson le 1 Mai 2018
I went through and tagged a number of contributions for this purpose last year. There might also have been some newer ones added after I did the sweep.
  1 commentaire
Thomas Gunther
Thomas Gunther le 2 Mai 2018
Thank you Walter. The link you provided offers many different options to meet my needs and I'm sure this will be very helpful in the future.

Connectez-vous pour commenter.

Plus de réponses (3)

Thomas Gunther
Thomas Gunther le 1 Mai 2018
I have attached a simple graph showing Tue Airspeed vs. Pressure Altitude and I want to be able to extract data from one of the Mach(M) Speed lines depicted.

Jeff Miller
Jeff Miller le 2 Mai 2018
This is not inside MATLAB, but it might be helpful anyway: WebPlotDigitizer

James
James le 22 Déc 2023
I know this is an old question, but for those who don't want to use the WebPlotDigitizer online resource, the following code does the same for a simple 2D X-Y plot (linear scale).
%% Get Image
cd('Path to directory containing the image')
image_data = imread('Path to image of figure');
imshow(image_data);
% Set the scale by selecting two points on the x-axis (small to large)
x_values = [min_x, max_x]; % Replace with the numerical values of the points you will select
disp('Click on point (min_x, 0.00)');
[x_pixel1, ~] = ginput(1); % Click on the pixel position for the minimum x-axis value
disp('Click on point (max_x, 0.00)');
[x_pixel2, ~] = ginput(1); % Click on the pixel position for the maximum x-axis value
% Now select two points on the y-axis (large to small this time)
y_values = [max_y, min_y]; % Replace with the numerical values of the points you will select
disp('Click on point (0.00, max_y)');
[~, y_pixel1] = ginput(1); % Click on the pixel position for the maximum y-axis value
disp('Click on point (0.00, min_y');
[~, y_pixel2] = ginput(1); % Click on the pixel position for the minimum y-axis value
%% Get Data
% Calculate scales for x and y axes
x_axis_scale = diff([x_values(1), x_values(2)]) / diff([x_pixel1, x_pixel2]);
y_axis_scale = diff([y_values(1), y_values(2)]) / diff([y_pixel2, y_pixel1]);
disp('Click on the curve to select points. Press Enter when finished.');
[x, y] = ginput; % Select points using mouse clicks
% Normalize the coordinates using the scale of the axes
x = (x - x_pixel1) * x_axis_scale + x_values(1);
y = (y_pixel1 - y) * y_axis_scale + y_values(1);

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by