How do I pick out pixels from an image and get the data from them?
2 次查看(过去 30 天)
显示 更早的评论
I have an image of a graph loaded onto a plot and scaled correctly but now I need to get the data from this plot in a matrix form. The line is quite thick but made up of red coloured pixels but I'm not sure what their exact colour is. I need to be able to get the data from these pixels by recognising the red pixels in the image and automatically plotting on top of those pixels or finding their x and y values. Any ideas on how to do this?
0 个评论
回答(1 个)
Image Analyst
2013-4-10
You could try this: http://www.mathworks.com/matlabcentral/fileexchange/36904-matlab-script-for-digitizing-a-published-graph
Another way would be to do color segmentation on it to find the red. You first have to get the graph as an image using getframe. See my color segmentation demos: Click here to visit my File Exchange
But I don't understand one thing. If you have this graph with your data plotted in red, why don't you already know what your data are? I mean, you plotted it after all. Why try to get it from an image of a plot when you have the original data used to create the plot?
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!