-4

Are there any (easy, quick, best) algorithms to detect lines from an image file?

Ideally, the image will be converted to a 2-dimensional array with 0's and 1's where 1 denotes the dots so the task is to use as few lines as possible that cover the dots.

hippietrail
  • 15,848
  • 18
  • 99
  • 158
justyy
  • 5,831
  • 4
  • 40
  • 73
  • There is so much information missing, I don't even know where to start. – wvdz Apr 15 '15 at 12:44
  • 1
    Have a look at this StackOverflow question: [Is there any super fast algorithm for finding LINES on picture?](http://stackoverflow.com/q/2596722/1364007). – Wai Ha Lee Apr 15 '15 at 12:45
  • 1
    I think the first sentence will give you responses you don't intend. (Like the last comment?) I would expand the second paragraph and change the title. I don't think you're looking for lines in the same sense that "everyone else" is looking for lines. – TravisJ Apr 15 '15 at 12:46
  • 1
    The [hough transform](http://en.m.wikipedia.org/wiki/Hough_transform) will give you the paramrters for lines in an image. From there you could draw the lines yourself. – eigenchris Apr 15 '15 at 12:51
  • Just a link that I came across today. It may be helpful: http://www.pyimagesearch.com/2015/04/06/zero-parameter-automatic-canny-edge-detection-with-python-and-opencv/?utm_content=buffer4eb7f&utm_medium=social&utm_source=twitter.com&utm_campaign=buffer – Juan Lopes Apr 16 '15 at 14:28

1 Answers1

1

Yes. Algorithms that do that exist. You need to use kernel or mask on an image in order to transform it: http://en.wikipedia.org/wiki/Kernel_%28image_processing%29

Many libraries have that built in, for example openCV.

Neithrik
  • 2,002
  • 2
  • 20
  • 33