How to detect square in a video using c++ and opencv?
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.i want to detect square shape objects which are situated near the road. As a example . the program simply check whether the frame that taken by camera (which is putting inside the vehicle) has square sign or not.(if that frame has square shape object then frame is sent to next function, else delete that)
Could you please attach examples of images? Should detection be robust to different scaling, rotations, affine and perspective distortions?
thank you very much for helping. i attached an example to this question.
Thank you, it helps to understand the problem better. Both Chamfer Matching and Line2D should work correctly with such images. Chamfer Matching is a classic algorithm for edge-based detection and Line2D is a state-of-the-art algorithm published at ICCV 2011. I would recommend to use Line2D because it is more robust but you can try both algorithms for this task.
Thank you very much.now on words i'm going to study about both Chamfer Matching and Line2D. i think i could find solution from them.