algorithmstraight-line-detection

algorithms to detect lines in an image?


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.


Solution

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