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?

回答(1 个)

Image Analyst
Image Analyst 2013-4-10
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?
  1 个评论
Dan
Dan 2013-4-10
Thank you very much for your help. I shall give it a go.
I don't have the data, I just have a downloaded image of a graph that I have called onto a plot and scaled to the axes.

请先登录,再进行评论。

标签

Community Treasure Hunt

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

Start Hunting!

Translated by