Dawn
Dawn

Reputation: 3628

Matlab fit graph to bw image

I'm trying to convert images to graphs in Matlab.
The process is as follwing:

  1. Taking an RGB image
  2. Finding the axes and create the appropriate pixel-to-(x, y)-coordinates in graph
  3. Convert the image to BW with some customizable im2bw , and
  4. [That's the tricky part] Trying to come out with a line matching for the white pixels in the image.

I've been trying some snake and some grow-as-you-go algorithms to detect the graph from the white pixels in the BW image, but it seems weird that I can find no ready made Matlab algorithm which match all the white pixels in the BW image to an equation. Any help or ideas will be much appreciated.

[Edit] Here's an example for the BW image from the graph extracted: enter image description here

Upvotes: 3

Views: 2766

Answers (1)

Jonas Heidelberg
Jonas Heidelberg

Reputation: 5024

Does it have to be done with MATLAB?

There is a list with Digitizing programs for Converting Hard Copy Graphs and Plots back to Data on the CCP14 homepage; maybe you can use one of the tools found there? I haven't tried myself, but remember having come across the same issue...

Upvotes: 2

Related Questions