Are there any opencv function like "cvHoughCircles()" for square detection?

c++, image-processing, opencv

Solution

You don't need any separate function for that. OpenCV comes with square detection sample( which actually detects rectangles, you can add constraint that all sides should be equal in length to get square).

Check this link : squares.cpp

There is a good explanation on how this code works in this SOF : How to identify square or rectangle with variable lengths and width by using javacv?

Below is the result you get when apply that code.

Problem

Are there any opencv function like "cvHoughCircles()" that can use for square detection programming for circle detection program that is CvSeq* circles = cvHoughCircles() but i couldn't find for square detection.

Original source

Related problems