1 | initial version |
In the first you have to increase resolution of image in the next stage for detect rectangle you need use edge of image because the edge detection insensitive to changes of illumination in the image you have to use a method robust to illumination in the next stage you have to use hough line for detection line & rectangle this link help you to detection rectangle.