How to install imx477 driver in Jetson Orin

Hi Eveyone,

I have Jetson Orin NX 8GB from seeed studio link and it is not able to detect imx477 CSI camera.

I think driver is missing here and how do i install it?

Please configure it by jeston-io

Why SPI?

Just show how to launch jeton-io
Please check the camera

Hi @ShaneCCC

Please check if what i’m doing is correct,

Step 1: sudo /opt/nvidia/jetson-io/jetson-io.py

Step 2: image

Step 3: image

Also, i’m confused with the text why does it say Jetson Nano CSI connector and not Jetson Orin

Upadte:

I’m able to detect camera

$ v4l2-ctl --list-devices
NVIDIA Tegra Video Input Device (platform:tegra-camrtc-ca):
        /dev/media0

vi-output, imx477 10-001a (platform:tegra-capture-vi:2):
        /dev/video0

But camera fails to display anything but a green screen

with error [ WARN:0@15.422] global cap_v4l.cpp:1119 tryIoctl VIDEOIO(V4L2:/dev/video0): select() timeout. Failed to capture frame

Please use nvarguscamerasrc instead of v4l2 API.
You should able get example command by search in this forum.

Thanks

But i’m using cv2, if it works with nvarguscamerasrc how do i make it work via cv2?

Check below topic. If didn’t help try to search in this forum for reference.

Thanks

Hi @ShaneCCC,

I tried nvgstcapture and i’m getting below error

Using winsys: x11
Opening in BLOCKING MODE
** Message: 06:24:54.339: <main:4734> iterating capture loop ....
NvMMLiteOpen : Block : BlockType = 4
===== NVMEDIA: NVENC =====
NvMMLiteBlockCreate : Block : BlockType = 4
GST_ARGUS: Creating output stream
(Argus) Error BadParameter:  (propagating from src/eglstream/FrameConsumerImpl.cpp, function initialize(), line 89)
(Argus) Error BadParameter:  (propagating from src/eglstream/FrameConsumerImpl.cpp, function create(), line 44)
Error generated. /dvs/git/dirty/git-master_linux/multimedia/nvgstreamer/gst-nvarguscamera/gstnvarguscamerasrc.cpp, threadInitialize:320 Failed to create FrameConsumer
Error generated. /dvs/git/dirty/git-master_linux/multimedia/nvgstreamer/gst-nvarguscamera/gstnvarguscamerasrc.cpp, threadFunction:241 (propagating)
Error generated. /dvs/git/dirty/git-master_linux/multimedia/nvgstreamer/gst-nvarguscamera/gstnvarguscamerasrc.cpp, waitRunning:203 Invalid thread state 3
Error generated. /dvs/git/dirty/git-master_linux/multimedia/nvgstreamer/gst-nvarguscamera/gstnvarguscamerasrc.cpp, execute:806 (propagating)
ERROR on bus: by /GstPipeline:capture_native_pipeline: Output window was closed
debug info:
/dvs/git/dirty/git-master_linux/tests-multimedia/nvgstapps/nvgstcapture-1.0/nvgstcapture.c(4159): nvgst_handle_xevents (): /GstPipeline:capture_native_pipeline

Update: It is working fine when i ran the command in jetson terminal and not via SSH

Via ssh need export DISPLAY=:0 then run the gst-launch-1.0 command.

Thanks

Yes, i did that. Thank you

Hi @ShaneCCC,

Sorry to distrub again. I tried running this Example but it throws error saying not able to open camera what am i doing wrong here

Opencv is installed in virtualenv
opencv-python==4.8.0.74

What the error message?

Here’s the error message along the with the command

nvarguscamerasrc sensor-id=0 ! video/x-raw(memory:NVMM), width=(int)1920, height=(int)1080, framerate=(fraction)30/1 ! nvvidconv flip-method=0 ! video/x-raw, width=(int)960, height=(int)540, format=(string)BGRx ! videoconvert ! video/x-raw, format=(string)BGR ! appsink
Error: Unable to open camera

Looks like video_capture.isOpened() failed.
Does any other process running camera?

try restart the system.

I tried restarting and no other process is opening camera and i’m also able to see camera output via nvgstcapture-1.0 sensor-id=0
and
gst-launch-1.0 nvarguscamerasrc sensor-id=0 sensor-mode=0 ! 'video/x-raw(memory:NVMM),width=1920, height=1080, framerate=20/1, format=NV12' ! nvvidconv ! xvimagesink

Hi @ShaneCCC,

I think it is beacuse i was running opencv in virtual environment now i’m using pre-installed open_cv and i’m able to see images but when i try to write images into a folder using cv2.imwrite I’m getting the following error:

cv2.error: OpenCV(4.5.4) /home/ubuntu/build_opencv/opencv/modules/imgcodecs/src/loadsave.cpp:728: error: (-2:Unspecified error) could not find a writer for the specified extension in function 'imwrite_'

  • Is there any way i can solve the issue in reading image via opencv in virtualenv?

  • Can i install newest version of openvc in root and will it work?

It could be write permission cause the issue.
Try to write the file to your home folder(~) to try.