NanoCamera icon indicating copy to clipboard operation
NanoCamera copied to clipboard

NanoCamera issue with USB IMX219

Open raihan29s opened this issue 3 years ago • 5 comments

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):

  • OS: Jetson Nano Developer Kit-jp451

raihan29s avatar Apr 19 '21 16:04 raihan29s

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

thehapyone avatar Apr 20 '21 10:04 thehapyone

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.

raihan29s avatar Apr 20 '21 17:04 raihan29s

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

thehapyone avatar Apr 21 '21 19:04 thehapyone

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

jiangxiaogg avatar Jun 09 '22 11:06 jiangxiaogg

I have the same problem. Have you solve this?

bladetin avatar Jul 16 '22 08:07 bladetin