I am using my OpenMV H7 Cam to assign a position to an object in space. I have it set up on my robot hand.
The problem is, the application needs to know where the center of the camera lens is.
I would assume that the center of the lens is at the center of the image I get back from my camera.
In testing that seams to not be the case. Bellow is a photo of my setup. The bright flashlight (on the chair) is at the center of the frame in the OpenIDE, but the robot hand is pointing slightly bellow that. Some 1 - 2° lower than it should. The resolution is set to QQVGA.
The thing is, the problem is present only on the vertical line. The horizontal one seams to be in perfect center always.
I don’t know how to crop the image, but i did try to define a new center by code (on the vertical line). It seams to fix the problem, but when I move the object further away from the camera or closer the problem repeats.
OFFSET = 10
sensor.reset()
sensor.set_pixformat(sensor.RGB565)
sensor.set_framesize(sensor.QVGA)
# if center is higher
sensor.set_windowing((0, 0, sensor.width(), sensor.height() - OFFSET))
# if center is lower
sensor.set_windowing((0, OFFSET, sensor.width(), sensor.height() ))