如何从绘图图像中提取数据?

时间:2021-04-16 21:21:04

Below you will see an image of plot showing three curves.

您将在下面看到显示三条曲线的图表图像。

如何从绘图图像中提取数据?

I only have the image. How can I extract data points from the three curves? I need to use the original data.

我只有图像。如何从三条曲线中提取数据点?我需要使用原始数据。

1 个解决方案

#1


10  

this code produces the three lists of data that you want orange,blue and green

此代码生成您想要橙色,蓝色和绿色的三个数据列表

s = Import["https://i.stack.imgur.com/bR8Gg.gif"];
t = ImageData@s;
h = Union@Flatten[t, 1];
p = FindClusters@h;
F[x_] := (# - {22, 30}) {3/350, 3/100} & /@ 
Select[Flatten[PixelValuePositions[s, RGBColor[#]] & /@ p[[x]], 
1], #[[1]] > 20 && #[[2]] > 29 &]
orange = F[5];
blue = F[1];
green = F[2];


ListPlot[{blue, orange, green}]

如何从绘图图像中提取数据?

#1


10  

this code produces the three lists of data that you want orange,blue and green

此代码生成您想要橙色,蓝色和绿色的三个数据列表

s = Import["https://i.stack.imgur.com/bR8Gg.gif"];
t = ImageData@s;
h = Union@Flatten[t, 1];
p = FindClusters@h;
F[x_] := (# - {22, 30}) {3/350, 3/100} & /@ 
Select[Flatten[PixelValuePositions[s, RGBColor[#]] & /@ p[[x]], 
1], #[[1]] > 20 && #[[2]] > 29 &]
orange = F[5];
blue = F[1];
green = F[2];


ListPlot[{blue, orange, green}]

如何从绘图图像中提取数据?