Raspbeery pi camera module 2 connected with Jetson Nano

Sir
Im trying to capture images for object detection within docker container using jetson nano. im using a raspberry pi camera module 2. but when I tried simple test of camera it shows error. Also do you know the code for capturing images likr camera-capture /dev/video0 for webcam like the same for pi cam. please kindly reply as soon as possible
gst-launch-1.0 nvarguscamerasrc sensor_mode=0 ! ‘video/x-raw(memory:NVMM),width=3820, height=2464, framerate=21/1, format=NV12’ ! nvvidconv flip-method=0 ! ‘video/x-raw,width=960, height=616’ ! nvvidconv ! nvegltransform ! nveglglessink -e
Setting pipeline to PAUSED …

Using winsys: x11
Pipeline is live and does not need PREROLL …
Got context from element ‘eglglessink0’: gst.egl.EGLDisplay=context, display=(GstEGLDisplay)NULL;
Setting pipeline to PLAYING …
New clock: GstSystemClock
Error generated. /dvs/git/dirty/git-master_linux/multimedia/nvgstreamer/gst-nvarguscamera/gstnvarguscamerasrc.cpp, execute:725 No cameras available
Got EOS from element “pipeline0”.
Execution ended after 0:00:00.100186420
Setting pipeline to PAUSED …
Setting pipeline to READY …
Setting pipeline to NULL …
Freeing pipeline …
The error is shown above…

Hi @jino.joy.m

There is a typo in the pipeline set. Based on the pipeline, you want to use the sensor-mode nvarguscamerasrc property. Furthermore, you can use the sensor-id property to set the camera sensor to use.

To see the element properties you can compute in your terminal the following command:

gst-inspect-1.0 nvarguscamerasrc

For example, the properties that I mentioned will show up after computing the previous command as:


  sensor-id           : Set the id of camera sensor to use. Default 0.
                        flags: readable, writable
                        Integer. Range: 0 - 255 Default: 0 
  sensor-mode         : Set the camera sensor mode to use. Default -1 (Select the best match)
                        flags: readable, writable

Find attached a txt file with an example of the full gst-inspect-1.0 of the nvarguscamerasrc element
inspect_nvarguscamerasrc.txt (8.5 KB)

It is also important to mention that if you are trying to capture from the docker container, nvarguscamerasrc has to be exposed to the container. This can be done like so:

sudo docker run -ti --rm --runtime=nvidia \
    --privileged \
    --name <container-name> \
    -v /tmp/argus_socket:/tmp/argus_socket \
    <image-name>:<image-tag>

In the case of the pipeline for the WebCam, you can use a pipeline like this, for example:

gst-launch-1.0 -v v4l2src device=/dev/video0 ! video/x-raw,framerate=30/1,width=1280,height=720 ! nvvidconv ! xvimagesink

Hope this helps!

Embedded SW Engineer at RidgeRun
Contact us: support@ridgerun.com
Developers wiki: https://developer.ridgerun.com/
Website: www.ridgerun.com

let me moving this to Nano platform category.

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