Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Financial incentives for improving HoughLines for OpenCV 3.0

Being one of the fundamental types of global image features (straight lines), HoughLines is perhaps one of the most heavily used features of OpenCV.

However, the OpenCV implementation of HoughLines suffer from many shortcomings. A lot of research has been published, and some of these enhancements are even mentioned in the Wikipedia article for Hough Transform.


Most notably, two of the easiest to implement (and therefore the best return-on-investment for efforts) enhancements are:

As a researcher in document image analysis, I have several years of experience in implementing and fine-tuning my own implementation of the Hough Transform for line detection. I can attest that the two enhancements mentioned above will tremendously improve the accuracy of Hough Line Detection and its ability to reject random noise (isolated edge pixels or short edge fragments).


I understand the many reasons that the HoughLines implementation in OpenCV did not keep up with the latest research:

  • The current HoughLines implementation is highly valued for its speed;
  • It has been adapted to many different computational architectures (including a GPU version);
  • Backwards compatibility in behavior, to avoid invalidating the fine-tuning efforts of previously written algorithms that make use of HoughLines;
  • The huge effort needed to make a high-quality, robust, and generic implementation of the improvements of HoughLines

I also understand that it is being neglected:

  • Hough Transform has been known for decades, so people tend to think that much of the innovations had been incorporated into OpenCV;
  • Being a well-known algorithm (instead of a newly-discovered algorithm), it does not have enough glamour to attract GSoC candidates;
  • Knowing that it will be unable to gain any attractions from GSoC candidates, neither Google nor OpenCV had enough incentive to sponsor additional work on HoughLines or on its successor version.

Thus, I am pondering if there is enough interests from the commercial users of OpenCV to sponsor or provide financial incentives for the improvements on HoughLines.


To address the concerns about modifying the existing HoughLines, it is certainly the case that:

  • The new implementation will be given a new name, say, HoughLines3, which will exist side-by-side with the current HoughLines implementation.
    (The name HoughLines2 was already picked up by the C and Python API.)