To find a square and calculate its center on a frame taken by a webcam, what openCV tools could be recommended? So many of them, diffucult to select the most suiatble for the purpose. The details: The real square to finde on the picture is about 80mm by 80mm, white color surrounded with 10mm black frame. Inside the white square, in its center could be some small black pattern like circle, rectangle, triangle etc.
Picture is taken with a 640x480, 30 fps webcam from 2 meters through a red filter.
On the picture the square is roughly 25 by 25 pixels, it looks light gray with black frame (see picture). image:! C:\origin.jpg
The square migh appear anywhere within the webcam viewing field ( it is about 55 degrees). It does not move but may appear slightly turned. I.e. its upper and bottom edges may by not exactly horisontal. The backgoung migh be noisy. Important is reliabibilty (no square should be missed and no false square shoudle be found) and precision (the coordinates of the square center) The speed of the code is not important.