Comparing two images: The observed position vs the required position.
- Load your image and binarize it.
- Use cv2.findContours(thresh, 1, 2) to find the contour of interest object.
- Find the bounding rectangle using cv2.boundingRect(cnt) function.
- Using rectangle coordinates find its center as representative point.
- Compare the centre with your reference point by calculaing the euclidean distance.
OpenCV is python and C++ based library. But as a C# guy i whould use Emgu CV which is a Wrapper of OpenCV and has almost all the function of OpenCV with Speed and Performance (50 frames per second)