Finding a square pattern in an image



Hi All,

I am very new to the world of image processing. I am working on a
project that requires me to process image frames and locate the
position ( all the four corners) of a square in that image.

These are the steps I have followed till now
1) Convert the input image to grayscale.
2) I set an arbitrary threshold:
(max_intesity + min_intenisty) /2
3) I move horrizontally in the image, looking for edges.

Is there any known alogrithm that I can use that would allow me to
locate a square shape in the image ?

Appreciate your help. Thanks in advance

Punit

.