0

My main goal is to detect the little line over the left of the image:

enter image description here

By detecting line I mean I want a line equation of this form: y = ax + b.

In order to find the line, I tried using this Hough Transform java class, which doesn't return the equation I want but at least supposed to find the line, but what happens is that it does not detect the line I want (it actually locates only the horizontal line in the image, and even this is not perfect. The y cord is located perfectly but the x is missed and started from 0, and as you see the line does not start at x=0).

I do not mind detecting all the lines in the image, but at least I have to detect the line I want, the sole line over the left.

I also don't mind using other method than Hough Transform...

P.S already tried this ImageJ code but it didn't work out for me as well. (I used it as is, maybe it needs to be changed, but I don't really understand what the ParticleAnalyzer does)

Community
  • 1
  • 1
Jjang
  • 11,250
  • 11
  • 51
  • 87
  • you can detect lines with an edge detection filter (http://en.wikipedia.org/wiki/Edge_detection) on the image... the rest is pure math... find a line which has the same slope and then move it either x or y until it matches.... (http://en.wikipedia.org/wiki/Slope) (yes, two answers for two questions) – Martin Frank Aug 18 '14 at 10:08
  • @MartinFrank I dont see how edge detection can help me here? if you have a complete answer with code could you please post it? – Jjang Aug 18 '14 at 10:15
  • if you know the edges from the image, you know the the lines drawn on it as well... – Martin Frank Aug 18 '14 at 10:18

0 Answers0