Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

like image 401
shahar_m Avatar asked Jan 29 '26 07:01

shahar_m


1 Answers

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...

like image 107
Jonas Heidelberg Avatar answered Jan 31 '26 05:01

Jonas Heidelberg



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!