thehapyone / NanoCamera

A simple to use camera interface for the Jetson Nano for working with USB and CSI cameras in Python.
MIT License
126 stars 20 forks source link

NanoCamera issue with USB IMX219 #9

Open raihan29s opened 3 years ago

raihan29s commented 3 years ago

Bug Description I have been using your nanocamera repository for interfacing my USB camera(Arducam IMX219) with Jetson nano. I checked if my OpenCV is correctly installed. It is correctly installed.

To Reproduce Steps to reproduce the behavior:

  1. Run and install setup.py
  2. go inside examples and run USB_camera .py. It shows an error.

Expected behavior

  1. Load the USB camera with the Jetson Nano
  2. It will read the camera image
  3. Display the camera frame

Screenshots Screenshot from 2021-04-18 18-50-20 (1)

Desktop (please complete the following information):

thehapyone commented 3 years ago

You need to ensure you use the right video camera. Run ls /dev/video* on your terminal to see the id of your video camera.

And then update the code to use your camera id # for usb camera /dev/video2, the device_id will be 2

raihan29s commented 3 years ago

Running the command /dev/video* shows, I have a USB camera connected. Running the nvgstcapture-1.0 --camsrc=0 --cap-dev-node=0 command open the camera. but when I run the code from the repository it shows an error.

thehapyone commented 3 years ago

Hmmm. The USB camera interface is through v4l2src. Also, I suspect the framerate. Some cameras only support limited framerate. Try running this on your terminal -

gst-launch-1.0 -v v4l2src device="/dev/video0" ! video/x-raw,width=1280,height=1024,format=GRAY16_BE,framerate=30/1 ! videoconvert ! xvimagesink

Also this one - gst-launch-1.0 -v v4l2src device="/dev/video0" ! video/x-raw, width=1280, height=1024, format=(string)YUY2, framerate=(fraction)30/1 ! videoconvert ! video/x-raw, format=RGB ! xvimagesink

jiangxiaogg commented 2 years ago

Thanks for the code you shared.I also encountered a problem when developing with a CSI camera (IMX219) recently, and the code you shared did not work correctly, and finally I found that the problem was that some versions of OPENCV did not support GSTREAMER, so I reinstalled OPENCV in JETSON NANO.If successful.I will reply again

bladetin commented 2 years ago

I have the same problem. Have you solve this?

dheerajluffy commented 1 month ago

Thanks for the code you shared.I also encountered a problem when developing with a CSI camera (IMX219) recently, and the code you shared did not work correctly, and finally I found that the problem was that some versions of OPENCV did not support GSTREAMER, so I reinstalled OPENCV in JETSON NANO.If successful.I will reply again

have you resolved this issue? its 2024 and its still haunting