Center of captured image is not the center of the lens

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.

Is this the limitation of my lens? Is maybe the global shutter lens more accurate?

The lens is mounted by set screws. It’s not calibrated or anything. You need to calibrate where the center of the camera lens is.

How do I calibrate? Is it even possible to get it to center?

Um, you crop your image such that it’s centered. Or, you move the lens around to fix.

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.

It doesn’t work well. something is not right.

# 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() ))

Tune offset until it’s centered.