Jetson Nano CSI Camera is shifted/offseted

Hi everyone,

I need help with my camera setup on Jetson Nano. I have successfully connected a CSI camera to my Jetson Nano and I get a decent image from it via gstreamer. But if I align the camera to an object than the image is slightly shifted. Even the wide angle is different at the left and the right side of the image. The camera is an IMX219 160 degree camera module.

Here is my gstreamer pipeline:

def gstreamer_pipeline(
    sensor_id=0,
    capture_width=1920,
    capture_height=1080,
    display_width=720,
    display_height=480,
    framerate=30,
    flip_method=0,
):
    return (
        "nvarguscamerasrc sensor-id=%d sensor-mode=2 ! "
        "video/x-raw(memory:NVMM), width=(int)%d, height=(int)%d, framerate=(fraction)%d/1 ! "
        "nvvidconv flip-method=%d ! "
        "video/x-raw, width=(int)%d, height=(int)%d, format=(string)BGRx ! "
        "videoconvert ! "
        "video/x-raw, format=(string)BGR ! appsink drop=true sync=false"
        % (
            sensor_id,
            capture_width,
            capture_height,
            framerate,
            flip_method,
            display_width,
            display_height,
        )
    )

To show you that the camera is somehow not correctly centered I used a squared sheet. I aligned the backblate of the camera on it and faced the camera lens to the sheet, so we can see how the lines on the paper are displayed. Here is the result for the horizontal alignment:


If I rotate the camera 90 Degree and do this test again, we see one line in the center that mirrors both sites. I cant show you the picture about it, because I am a new user and I am only allowed to use one image. If I move the camera until the result image is like I want to have it (like in the first post), I must move it about 3mm to the right and rotate the camera around 15-20 degrees.
Another suspicious behavior is that the wide angle of the camera only works for the right side.

Maybe someone of you can help me.

Here the image of the rotated test:


It shows what I would expect from the first test as well.

How can I fix it?

PS: I tested this with another camera of the same type and an older Jetson Nano and the results are the same.

Sorry don’t understand the problem clear.
If the problem relative to the rotation that could be crop by scaler, I don’t think that could be a problem.

Thanks

It is really hard to explain. Let me explain it the other way around.
Here is the picture of my camera sitting on the squared paper:


You see, that the camera is not lined up with the lines and the lens dont look in the direction the lines run away from the camera. But this camera location gives me the the picture like the one in my second post.
If I align the camera with the lines on the paper, than I get the image of my first post.

I dont want to mount my camera on an angled frame, so my question is, why I have to rotate/offset my camera to get a straight looking picture?

Hi,
It is because the physical orientation of the camera sensor is 90 degree. If you would like to design a product, please consider the orientation of the camera sensor. And physically put it correctly.

For using developer kit, you can use nvvidconv to rotate to desired orientation.

The camera has a wide angle. I thought this is the correct orientation, because I can see the wide angle in my image.
But I will try it. Is it also possible to rotate with gstreamer with the flip operation, or does nviconv use anoser approach?

Hi,
Please set flip-method to nvvidconv plugin to get expected orientation.

If I flip the image, my image get stretched, so I assume the camera orientation is correct. I testet it with two cameras, botz bought on ebay and both have the same problem. So my next step was to buy the imx219 from an electronic store. Now i have the image I wanted to have.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.