Ask Your Question

Revision history [back]

You can proceed like,

  1. Convert source to hsv color space using cvtColor().

  2. Now segment each line using inRange(), here you should give appropriate hsv color range each line in your chart.

  3. The inRange() result will give you binary image for each line. You may need to apply morphology as most of the lines in the chart lies on one another.

  4. Finally find contour will give you x-y co-ordinates for each line segment for the input binary.