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