Reputation: 511
I want to build an program that can detect square shape object in a video. i used SURF algorithm for that. but that only detect key points.
Upvotes: 0
Views: 5695
Reputation: 52646
The code for square detection ( specifically rectangle, you can modify a little bit to work it for squares only) comes directly with opencv samples and you get it when you download the OpenCV library.
You didn't specify the language you work. But the code comes in Python and C++.
How it works:
It works pretty well. And if you have seen this, and this is not what you want, update your question with more specific details, including some test images.
Hope it helps!!!
Upvotes: 0
Reputation: 96109
The normal way would be to detect edges with a canny filter then a hough transform to find lines and then find pairs of lines with slopes that are 90deg different
Upvotes: 4