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

5 ビュー (過去 30 日間)
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 件のコメント
John BG
John BG 2018 年 5 月 1 日
Hi Thomas
Indeed it is (possible).
Can you attach the image to your question so that readers can have a look?

サインインしてコメントする。

採用された回答

Walter Roberson
Walter Roberson 2018 年 5 月 1 日
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 件のコメント
Thomas Gunther
Thomas Gunther 2018 年 5 月 2 日
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.

サインインしてコメントする。

その他の回答 (3 件)

Thomas Gunther
Thomas Gunther 2018 年 5 月 1 日
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 2018 年 5 月 2 日
This is not inside MATLAB, but it might be helpful anyway: WebPlotDigitizer

James
James 2023 年 12 月 22 日
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);

カテゴリ

Help Center および File ExchangeLighting, Transparency, and Shading についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by