1 | initial version |
You need to find the Homography and use perspective transformation of your camera. Have a look at this tutorial, which is using keypoints instead of a kind of manual detection.
If you want to detected colored dot in corners, see the inRange function and/or the HoughCircle transformation.