Clear Filters
Clear Filters

How to get pixel coordinates that make up a curve in a graph?

6 views (last 30 days)
Hi,
I need help finding the coordinates of the pixels that make up the curve in the image which I have included the link to at the bottom of this message. I do not want to get the pixel coordinates of the axis or numbers on the axis; only of the plotted curve. I know that I should have a code that I wrote and go from there to ask for assistance. The thing is that I have never worked on image processing before, and I just need to get over this step to complete the project I'm working on.
Please if you have some time and can help me on at least getting started, I will be very appreciative. I have tried googling my issue, but it didn't help me build my own code to do the job I want. I guess it's because, as I said before, I have never worked on image processing prior to today really... and come on, don't ask me to go and read about it; just help me if you can.
I am familiar with Matlab.
Thanks.

Accepted Answer

Matt J
Matt J on 10 Mar 2013
If you read it in as an RGB image, it should just be a matter of searching for pixels that have a sufficiently large blue component.
rgb=imread('1z4ztl1.png');
locations = (rgb(:,:,3)>=threshold);
You would have to pick the threshold, obviously, but if you do imshow(A) and zoom in on the curve and probe it using the data tip, you should be able to get a good idea of its blue levels.
  4 Comments
Image Analyst
Image Analyst on 10 Mar 2013
Edited: Image Analyst on 10 Mar 2013
The image goes way outside the axes. How did you determine the row number of the x axis, and the column number of the y axis? I know how I'd do it but just wondered how you did it, or if you did it, because otherwise your coordinates will be relative to the outside of the image, not relative to the axes.

Sign in to comment.

More Answers (0)

Categories

Find more on Images in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!