# On board camera

**URL:** <https://forums.developer.nvidia.com/t/on-board-camera/176807>\
**Category:** Jetson TX2\
**Tags:** gstreamer\
**Created:** [May 1, 2021, 8:11pm UTC](https://forums.developer.nvidia.com/t/on-board-camera/176807 "2021-05-01T20:11:51Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![30216](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@30216](https://forums.developer.nvidia.com/u/30216)\
**Post date:** [May 1, 2021, 8:11pm UTC](https://forums.developer.nvidia.com/t/on-board-camera/176807/1 "2021-05-01T20:11:51Z")

</div>

dear sir,  
please can you help me to solve the problem below

i want to open on board camera for jetson tx2 in my python code but the following message appear:  
python3 tegra.py  
Called with args:  
Namespace(image\_height=1080, image\_width=1920, rtsp\_latency=200, rtsp\_uri=None, use\_rtsp=False, use\_usb=False, video\_dev=1)  
OpenCV version: 4.5.1  
Failed to open camera!

please help me  
best regards,

---

<div class="post-metadata">

**Author:** ![Honey\_Patouceul](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/honey_patouceul/32/389777_2.png) [@Honey\_Patouceul](https://forums.developer.nvidia.com/u/Honey_Patouceul)\
**Post date:** [May 1, 2021, 11:39pm UTC](https://forums.developer.nvidia.com/t/on-board-camera/176807/2 "2021-05-01T23:39:37Z")

</div>

You may try [this example](https://forums.developer.nvidia.com/t/onboard-camera-not-working-with-opencv/176617/4).

---

<div class="post-metadata">

**Author:** ![30216](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@30216](https://forums.developer.nvidia.com/u/30216)\
**Post date:** [May 2, 2021, 10:07am UTC](https://forums.developer.nvidia.com/t/on-board-camera/176807/3 "2021-05-02T10:07:26Z")

</div>

dear sir,  
thank you for your cooperation sorry the same problem  
python3 tegra-cam-rec.py  
Called with args:  
Namespace(fps=30, image\_height=480, image\_width=640, rec\_sec=5, rtsp\_latency=200, rtsp\_uri=None, text=‘TX2 DEMO’, ts\_file=‘output’, use\_rtsp=False, use\_usb=False, video\_dev=0)  
OpenCV version: 4.5.1  
Failed to open camera!

---

<div class="post-metadata">

**Author:** ![Honey\_Patouceul](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/honey_patouceul/32/389777_2.png) [@Honey\_Patouceul](https://forums.developer.nvidia.com/u/Honey_Patouceul)\
**Post date:** [May 2, 2021, 4:06pm UTC](https://forums.developer.nvidia.com/t/on-board-camera/176807/4 "2021-05-02T16:06:22Z")

</div>

No one can guess what is your problem from your previous posts.  
For onboard camera, there shouldn’t be any rtsp parameter.  
You would share a sample code and full execution log with error messages.  
Also tell if you’ve tried the example from my previous post and what was the result.

---

<div class="post-metadata">

**Author:** ![30216](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@30216](https://forums.developer.nvidia.com/u/30216)\
**Post date:** [May 2, 2021, 6:02pm UTC](https://forums.developer.nvidia.com/t/on-board-camera/176807/5 "2021-05-02T18:02:52Z")

</div>

dear sir,  
i tried the obove example and the result as follow  
nujet@nujet-desktop:~$ python3 realtt.py  
Failed to open camera

please can you help me to fix this problem?  
best regards

---

<div class="post-metadata">

**Author:** ![Honey\_Patouceul](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/honey_patouceul/32/389777_2.png) [@Honey\_Patouceul](https://forums.developer.nvidia.com/u/Honey_Patouceul)\
**Post date:** [May 2, 2021, 6:11pm UTC](https://forums.developer.nvidia.com/t/on-board-camera/176807/6 "2021-05-02T18:11:29Z")

</div>

First check that your CSI camera can be read from Argus in gstreamer:

```auto
gst-launch-1.0 -v nvarguscamerasrc ! 'video/x-raw(memory:NVMM), width=640, height=480, framerate=30/1' ! nvvidconv ! xvimagesink

```

This assumes you have a gui running with local display or through ssh with X forwarding. If you can’t see the camera feed, post the ouput of this command.

If ok, you may also post the ouput of these python commands for checking that your opencv version has gstreamer support:

```auto
import cv2
print(cv2.getBuildInformation())

```

---

<div class="post-metadata">

**Author:** ![tykmorikawa](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@tykmorikawa](https://forums.developer.nvidia.com/u/tykmorikawa)\
**Post date:** [May 2, 2021, 10:30pm UTC](https://forums.developer.nvidia.com/t/on-board-camera/176807/7 "2021-05-02T22:30:27Z")

</div>

> [@Honey\_Patouceul](#):
>
> `gst-launch-1.0 -v nvarguscamerasrc ! 'video/x-raw(memory:NVMM), width=640, height=480, framerate=30/1' ! nvvidconv ! xvimagesink`

Thank you for your comment. The following is the output to your first suggestion.

Setting pipeline to PAUSED …  
ERROR: Pipeline doesn’t want to pause.  
ERROR: from element /GstPipeline:pipeline0/GstXvImageSink:xvimagesink0: Could not initialise Xv output  
Additional debug info:  
xvimagesink.c(1773): gst\_xv\_image\_sink\_open (): /GstPipeline:pipeline0/GstXvImageSink:xvimagesink0:  
Could not open display (null)  
Setting pipeline to NULL …  
Freeing pipeline …

Regarding your second point, my version has the support as below.

deo I/O:  
FFMPEG: YES  
avcodec: YES (57.107.100)  
avformat: YES (57.83.100)  
avutil: YES (55.78.100)  
swscale: YES (4.8.100)  
avresample: NO  
GStreamer: YES (1.14.5)  
v4l/v4l2: YES (linux/videodev2.h)

Your any feedback will be highly appreciated.  
Best Regards.

---

<div class="post-metadata">

**Author:** ![30216](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@30216](https://forums.developer.nvidia.com/u/30216)\
**Post date:** [May 3, 2021, 2:44am UTC](https://forums.developer.nvidia.com/t/on-board-camera/176807/8 "2021-05-03T02:44:23Z")

</div>

t-launch-1.0 -v nvarguscamerasrc ! ‘video/x-raw(memory:NVMM), width=640, height=480, framerate=30/1’ ! nvvidconv ! xvimagesink

Setting pipeline to PAUSED …

Pipeline is live and does not need PREROLL …

Setting pipeline to PLAYING …

New clock: GstSystemClock

/GstPipeline:pipeline0/GstNvArgusCameraSrc:nvarguscamerasrc0.GstPad:src: caps = video/x-raw(memory:NVMM), width=(int)640, height=(int)480, format=(string)NV12, framerate=(fraction)30/1

/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:src: caps = video/x-raw(memory:NVMM), width=(int)640, height=(int)480, format=(string)NV12, framerate=(fraction)30/1

/GstPipeline:pipeline0/Gstnvvconv:nvvconv0.GstPad:src: caps = video/x-raw, width=(int)640, height=(int)480, framerate=(fraction)30/1, format=(string)YUY2

/GstPipeline:pipeline0/GstXvImageSink:xvimagesink0.GstPad:sink: caps = video/x-raw, width=(int)640, height=(int)480, framerate=(fraction)30/1, format=(string)YUY2

/GstPipeline:pipeline0/Gstnvvconv:nvvconv0.GstPad:sink: caps = video/x-raw(memory:NVMM), width=(int)640, height=(int)480, format=(string)NV12, framerate=(fraction)30/1

/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:sink: caps = video/x-raw(memory:NVMM), width=(int)640, height=(int)480, format=(string)NV12, framerate=(fraction)30/1

GST\_ARGUS: Creating output stream

CONSUMER: Waiting until producer is connected…

GST\_ARGUS: Available Sensor modes :

GST\_ARGUS: 2592 x 1944 FR = 29.999999 fps Duration = 33333334 ; Analog Gain range min 1.000000, max 16.000000; Exposure Range min 34000, max 550385000;

GST\_ARGUS: 2592 x 1458 FR = 29.999999 fps Duration = 33333334 ; Analog Gain range min 1.000000, max 16.000000; Exposure Range min 34000, max 550385000;

GST\_ARGUS: 1280 x 720 FR = 120.000005 fps Duration = 8333333 ; Analog Gain range min 1.000000, max 16.000000; Exposure Range min 22000, max 358733000;

GST\_ARGUS: Running with following settings:

Camera index = 0

Camera mode = 2

Output Stream W = 1280 H = 720

seconds to Run = 0

Frame Rate = 120.000005

GST\_ARGUS: Setup Complete, Starting captures for 0 seconds

GST\_ARGUS: Starting repeat capture requests.

CONSUMER: Producer has connected; continuing.

ERROR: from element /GstPipeline:pipeline0/GstXvImageSink:xvimagesink0: Output window was closed

Additional debug info:

xvimagesink.c(555): gst\_xv\_image\_sink\_handle\_xevents (): /GstPipeline:pipeline0/GstXvImageSink:xvimagesink0

Execution ended after 0:00:05.677526522

Setting pipeline to PAUSED …

Setting pipeline to READY …

GST\_ARGUS: Cleaning up

CONSUMER: Done Success

GST\_ARGUS: Done Success

Setting pipeline to NULL …

Freeing pipeline …

$ import cv2

import-im6.q16: not authorized `cv2’ @ error/constitute.c/WriteImage/1037.

nujet@nujet-desktop:~/opencv\_build/opencv/build$ print(cv2.getBuildInformation())

bash: syntax error near unexpected token `cv2.getBuildInformation’

nujet@nujet-desktop:~/opencv\_build/opencv/build$ sha1sum -c /etc/nv\_tegra\_release

sha1sum: /etc/nv\_tegra\_release: no properly formatted SHA1 checksum lines found

nujet@nujet-desktop:~/opencv\_build/opencv/build$ cd /usr/lib/aarch64-linux-gnu/

nujet@nujet-desktop:/usr/lib/aarch64-linux-gnu$ sudo ln -sf tegra/libGL.so libGL.so

nujet@nujet-desktop:/usr/lib/aarch64-linux-gnu$ python3 -c ‘import cv2; print(cv2. **version** )’

4.5.1

---

<div class="post-metadata">

**Author:** ![JerryChang](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/jerrychang/32/14043_2.png) [@JerryChang](https://forums.developer.nvidia.com/u/JerryChang)\
**Post date:** [May 3, 2021, 8:57am UTC](https://forums.developer.nvidia.com/t/on-board-camera/176807/9 "2021-05-03T08:57:49Z")

</div>

hello 30216,

please check developer guide, [Approaches for Validating and Testing the V4L2 Driver](https://docs.nvidia.com/jetson/archives/l4t-archived/l4t-325/index.html#page/Tegra%20Linux%20Driver%20Package%20Development%20Guide/jetson_xavier_camera_soft_archi.html#wwpID0E0YB0HA) for reference,  
thanks

---

<div class="post-metadata">

**Author:** ![Honey\_Patouceul](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/honey_patouceul/32/389777_2.png) [@Honey\_Patouceul](https://forums.developer.nvidia.com/u/Honey_Patouceul)\
**Post date:** [May 3, 2021, 10:36am UTC](https://forums.developer.nvidia.com/t/on-board-camera/176807/10 "2021-05-03T10:36:43Z")

</div>

- Can you confirm that you were able to display camera feed with the gstreamer pipeline ?

- These are not shell commands.

> [@Honey\_Patouceul](#):
>
> ```auto
> import cv2
> print(cv2.getBuildInformation())
> 
> ```

You would type these into a python interpreter, such as launched from shell by `python` or `python3`.

---

<div class="post-metadata">

**Author:** ![30216](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@30216](https://forums.developer.nvidia.com/u/30216)\
**Post date:** [May 3, 2021, 9:11pm UTC](https://forums.developer.nvidia.com/t/on-board-camera/176807/11 "2021-05-03T21:11:52Z")

</div>

Dear Sir,

thank for your efforts  
First , I confirm that can access to CSi Camera by gst launch-1.0  
Second, the answer of paragraph as shown below

nujet@nujet-desktop:~$ python3 pi.py

General configuration for OpenCV 4.5.1 =====================================  
Version control: 4.5.1-dirty

Platform:  
Timestamp: 2021-01-02T12:47:39Z  
Host: Linux 5.4.0-54-generic aarch64  
CMake: 3.18.4  
CMake generator: Unix Makefiles  
CMake build tool: /bin/gmake  
Configuration: Release

CPU/HW features:  
Baseline: NEON FP16

C/C++:  
Built as dynamic libs?: NO  
C++ standard: 11  
C++ Compiler: /opt/rh/devtoolset-9/root/usr/bin/c++ (ver 9.3.1)  
C++ flags (Release): -Wl,-strip-all -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wuninitialized -Wsuggest-override -Wno-delete-non-virtual-dtor -Wno-comment -Wimplicit-fallthrough=3 -Wno-strict-overflow -fdiagnostics-show-option -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections -fvisibility=hidden -fvisibility-inlines-hidden -O3 -DNDEBUG -DNDEBUG  
C++ flags (Debug): -Wl,-strip-all -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wuninitialized -Wsuggest-override -Wno-delete-non-virtual-dtor -Wno-comment -Wimplicit-fallthrough=3 -Wno-strict-overflow -fdiagnostics-show-option -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections -fvisibility=hidden -fvisibility-inlines-hidden -g -O0 -DDEBUG -D\_DEBUG  
C Compiler: /opt/rh/devtoolset-9/root/usr/bin/cc  
C flags (Release): -Wl,-strip-all -fsigned-char -W -Wall -Werror=return-type -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wuninitialized -Wno-comment -Wimplicit-fallthrough=3 -Wno-strict-overflow -fdiagnostics-show-option -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections -fvisibility=hidden -O3 -DNDEBUG -DNDEBUG  
C flags (Debug): -Wl,-strip-all -fsigned-char -W -Wall -Werror=return-type -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wuninitialized -Wno-comment -Wimplicit-fallthrough=3 -Wno-strict-overflow -fdiagnostics-show-option -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections -fvisibility=hidden -g -O0 -DDEBUG -D\_DEBUG  
Linker flags (Release): -L/root/ffmpeg\_build/lib -Wl,–gc-sections -Wl,–as-needed  
Linker flags (Debug): -L/root/ffmpeg\_build/lib -Wl,–gc-sections -Wl,–as-needed  
ccache: YES  
Precompiled headers: NO  
Extra dependencies: ade Qt5::Core Qt5::Gui Qt5::Widgets Qt5::Test Qt5::Concurrent /lib64/libpng.so /lib64/libz.so dl m pthread rt  
3rdparty dependencies: ittnotify libprotobuf libjpeg-turbo libwebp libtiff libopenjp2 IlmImf quirc tegra\_hal

OpenCV modules:  
To be built: calib3d core dnn features2d flann gapi highgui imgcodecs imgproc ml objdetect photo python3 stitching video videoio  
Disabled: world  
Disabled by dependency: -  
Unavailable: java python2 ts  
Applications: -  
Documentation: NO  
Non-free algorithms: NO

GUI:  
QT: YES (ver 5.15.0)  
QT OpenGL support: NO  
GTK+: NO  
VTK support: NO

Media I/O:  
ZLib: /lib64/libz.so (ver 1.2.7)  
JPEG: libjpeg-turbo (ver 2.0.6-62)  
WEBP: build (ver encoder: 0x020f)  
PNG: /lib64/libpng.so (ver 1.5.13)  
TIFF: build (ver 42 - 4.0.10)  
JPEG 2000: build (ver 2.3.1)  
OpenEXR: build (ver 2.3.0)  
HDR: YES  
SUNRASTER: YES  
PXM: YES  
PFM: YES

Video I/O:  
DC1394: NO  
FFMPEG: YES  
avcodec: YES (58.112.103)  
avformat: YES (58.64.100)  
avutil: YES (56.60.100)  
swscale: YES (5.8.100)  
avresample: NO  
GStreamer: NO  
v4l/v4l2: YES (linux/videodev2.h)

Parallel framework: pthreads

Trace: YES (with Intel ITT)

Other third-party libraries:  
Lapack: NO  
Eigen: NO  
Custom HAL: YES (carotene (ver 0.0.1))  
Protobuf: build (3.5.1)

OpenCL: YES (no extra features)  
Include path: /tmp/pip-req-build-zuuo394f/opencv/3rdparty/include/opencl/1.2  
Link libraries: Dynamic load

Python 3:  
Interpreter: /opt/python/cp36-cp36m/bin/python (ver 3.6.12)  
Libraries: libpython3.6m.a (ver 3.6.12)  
numpy: /tmp/pip-build-env-c03ewnak/overlay/lib/python3.6/site-packages/numpy/core/include (ver 1.19.3)  
install path: python

Python (for build): /bin/python2.7

Java:  
ant: NO  
JNI: NO  
Java wrappers: NO  
Java tests: NO

## Install to: /tmp/pip-req-build-zuuo394f/\_skbuild/linux-aarch64-3.6/cmake-install

nujet@nujet-desktop:~$

---

<div class="post-metadata">

**Author:** ![Honey\_Patouceul](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/honey_patouceul/32/389777_2.png) [@Honey\_Patouceul](https://forums.developer.nvidia.com/u/Honey_Patouceul)\
**Post date:** [May 3, 2021, 9:59pm UTC](https://forums.developer.nvidia.com/t/on-board-camera/176807/12 "2021-05-03T21:59:26Z")

</div>

> [@30216](#):
>
> GStreamer: NO

If you want to use a gstreamer pipeline for opencv VideoCapture or VideoWriter, you would first have to configure, build and install an opencv version with GSTREAMER support.

---

<div class="post-metadata">

**Author:** ![30216](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@30216](https://forums.developer.nvidia.com/u/30216)\
**Post date:** [May 4, 2021, 3:39pm UTC](https://forums.developer.nvidia.com/t/on-board-camera/176807/13 "2021-05-04T15:39:37Z")

</div>

Dear Mr. Honey

Thank you very much for your help.

According to your last email to install the Opencv with GStreamer , we do, but still, we have two problems

1- The first problem is that we check the installation, we found the Gstreamer NO ?which command can be used to make it?

2- The second problem that Although we try to install the oldest version of Opencv, which is 4.1.1, when we check, we found that the system still keeps the final version we installed which was 4.5.1?

3- Other question, which version best of the opencv supports the GStreamer and can install on Nvidea Jetson TX2?

4- The final question ,in python version 3.6 the opencv work with it is 4.5.1 while in python version 2.7 the opencv work is 4.1.1 as shown below

Thank you again for your help

Best regards

30216

nujet@nujet-desktop:~$ python3 pi.py

General configuration for OpenCV 4.5.1 =====================================  
Version control: 4.5.1-dirty

Platform:  
Timestamp: 2021-01-02T12:47:39Z  
Host: Linux 5.4.0-54-generic aarch64  
CMake: 3.18.4  
CMake generator: Unix Makefiles  
CMake build tool: /bin/gmake  
Configuration: Release

CPU/HW features:  
Baseline: NEON FP16

C/C++:  
Built as dynamic libs?: NO  
C++ standard: 11  
C++ Compiler: /opt/rh/devtoolset-9/root/usr/bin/c++ (ver 9.3.1)  
C++ flags (Release): -Wl,-strip-all -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wuninitialized -Wsuggest-override -Wno-delete-non-virtual-dtor -Wno-comment -Wimplicit-fallthrough=3 -Wno-strict-overflow -fdiagnostics-show-option -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections -fvisibility=hidden -fvisibility-inlines-hidden -O3 -DNDEBUG -DNDEBUG  
C++ flags (Debug): -Wl,-strip-all -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wuninitialized -Wsuggest-override -Wno-delete-non-virtual-dtor -Wno-comment -Wimplicit-fallthrough=3 -Wno-strict-overflow -fdiagnostics-show-option -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections -fvisibility=hidden -fvisibility-inlines-hidden -g -O0 -DDEBUG -D\_DEBUG  
C Compiler: /opt/rh/devtoolset-9/root/usr/bin/cc  
C flags (Release): -Wl,-strip-all -fsigned-char -W -Wall -Werror=return-type -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wuninitialized -Wno-comment -Wimplicit-fallthrough=3 -Wno-strict-overflow -fdiagnostics-show-option -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections -fvisibility=hidden -O3 -DNDEBUG -DNDEBUG  
C flags (Debug): -Wl,-strip-all -fsigned-char -W -Wall -Werror=return-type -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wuninitialized -Wno-comment -Wimplicit-fallthrough=3 -Wno-strict-overflow -fdiagnostics-show-option -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections -fvisibility=hidden -g -O0 -DDEBUG -D\_DEBUG  
Linker flags (Release): -L/root/ffmpeg\_build/lib -Wl,–gc-sections -Wl,–as-needed  
Linker flags (Debug): -L/root/ffmpeg\_build/lib -Wl,–gc-sections -Wl,–as-needed  
ccache: YES  
Precompiled headers: NO  
Extra dependencies: ade Qt5::Core Qt5::Gui Qt5::Widgets Qt5::Test Qt5::Concurrent /lib64/libpng.so /lib64/libz.so dl m pthread rt  
3rdparty dependencies: ittnotify libprotobuf libjpeg-turbo libwebp libtiff libopenjp2 IlmImf quirc tegra\_hal

OpenCV modules:  
To be built: calib3d core dnn features2d flann gapi highgui imgcodecs imgproc ml objdetect photo python3 stitching video videoio  
Disabled: world  
Disabled by dependency: -  
Unavailable: java python2 ts  
Applications: -  
Documentation: NO  
Non-free algorithms: NO

GUI:  
QT: YES (ver 5.15.0)  
QT OpenGL support: NO  
GTK+: NO  
VTK support: NO

Media I/O:  
ZLib: /lib64/libz.so (ver 1.2.7)  
JPEG: libjpeg-turbo (ver 2.0.6-62)  
WEBP: build (ver encoder: 0x020f)  
PNG: /lib64/libpng.so (ver 1.5.13)  
TIFF: build (ver 42 - 4.0.10)  
JPEG 2000: build (ver 2.3.1)  
OpenEXR: build (ver 2.3.0)  
HDR: YES  
SUNRASTER: YES  
PXM: YES  
PFM: YES

Video I/O:  
DC1394: NO  
FFMPEG: YES  
avcodec: YES (58.112.103)  
avformat: YES (58.64.100)  
avutil: YES (56.60.100)  
swscale: YES (5.8.100)  
avresample: NO  
GStreamer: NO  
v4l/v4l2: YES (linux/videodev2.h)

Parallel framework: pthreads

Trace: YES (with Intel ITT)

Other third-party libraries:  
Lapack: NO  
Eigen: NO  
Custom HAL: YES (carotene (ver 0.0.1))  
Protobuf: build (3.5.1)

OpenCL: YES (no extra features)  
Include path: /tmp/pip-req-build-zuuo394f/opencv/3rdparty/include/opencl/1.2  
Link libraries: Dynamic load

Python 3:  
Interpreter: /opt/python/cp36-cp36m/bin/python (ver 3.6.12)  
Libraries: libpython3.6m.a (ver 3.6.12)  
numpy: /tmp/pip-build-env-c03ewnak/overlay/lib/python3.6/site-packages/numpy/core/include (ver 1.19.3)  
install path: python

Python (for build): /bin/python2.7

Java:  
ant: NO  
JNI: NO  
Java wrappers: NO  
Java tests: NO

## Install to: /tmp/pip-req-build-zuuo394f/\_skbuild/linux-aarch64-3.6/cmake-install

nujet@nujet-desktop:~$ python3  
Python 3.6.9 (default, Jan 26 2021, 15:33:00)  
[GCC 8.4.0] on linux  
Type “help”, “copyright”, “credits” or “license” for more information.

> > > impory  
> > > Traceback (most recent call last):  
> > > File “”, line 1, in   
> > > NameError: name ‘impory’ is not defined  
> > > import cv2  
> > > cv2. **version**  
> > > ‘4.5.1’  
> > > exit  
> > > Use exit() or Ctrl-D (i.e. EOF) to exit  
> > > exit  
> > > Use exit() or Ctrl-D (i.e. EOF) to exit
> > > 
> > > exit()  
> > > nujet@nujet-desktop:~$ python pi.py

General configuration for OpenCV 4.1.1 =====================================  
Version control: unknown

Extra modules:  
Location (extra): /home/nujet/opencvn/opencv\_contrib-4.1.1/modules  
Version control (extra): unknown

Platform:  
Timestamp: 2021-05-02T11:45:34Z  
Host: Linux 4.9.140-tegra aarch64  
CMake: 3.10.2  
CMake generator: Unix Makefiles  
CMake build tool: /usr/bin/make  
Configuration: RELEASE

CPU/HW features:  
Baseline: NEON FP16  
required: NEON  
disabled: VFPV3

C/C++:  
Built as dynamic libs?: YES  
C++ Compiler: /usr/bin/c++ (ver 7.5.0)  
C++ flags (Release): -fsigned-char -ffast-math -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wuninitialized -Winit-self -Wsuggest-override -Wno-delete-non-virtual-dtor -Wno-comment -Wimplicit-fallthrough=3 -Wno-strict-overflow -fdiagnostics-show-option -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections -fvisibility=hidden -fvisibility-inlines-hidden -O3 -DNDEBUG -DNDEBUG  
C++ flags (Debug): -fsigned-char -ffast-math -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wuninitialized -Winit-self -Wsuggest-override -Wno-delete-non-virtual-dtor -Wno-comment -Wimplicit-fallthrough=3 -Wno-strict-overflow -fdiagnostics-show-option -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections -fvisibility=hidden -fvisibility-inlines-hidden -g -O0 -DDEBUG -D\_DEBUG  
C Compiler: /usr/bin/cc  
C flags (Release): -fsigned-char -ffast-math -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wuninitialized -Winit-self -Wno-comment -Wimplicit-fallthrough=3 -Wno-strict-overflow -fdiagnostics-show-option -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections -fvisibility=hidden -O3 -DNDEBUG -DNDEBUG  
C flags (Debug): -fsigned-char -ffast-math -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wuninitialized -Winit-self -Wno-comment -Wimplicit-fallthrough=3 -Wno-strict-overflow -fdiagnostics-show-option -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections -fvisibility=hidden -g -O0 -DDEBUG -D\_DEBUG  
Linker flags (Release): -Wl,–gc-sections  
Linker flags (Debug): -Wl,–gc-sections  
ccache: NO  
Precompiled headers: NO  
Extra dependencies: m pthread cudart\_static -lpthread dl rt /usr/lib/aarch64-linux-gnu/libcuda.so nppc nppial nppicc nppicom nppidei nppif nppig nppim nppist nppisu nppitc npps cublas cufft -L/usr/local/cuda-10.2/lib64 -L/usr/lib/aarch64-linux-gnu  
3rdparty dependencies:

OpenCV modules:  
To be built: aruco bgsegm bioinspired calib3d ccalib core cudaarithm cudabgsegm cudacodec cudafeatures2d cudafilters cudaimgproc cudalegacy cudaobjdetect cudaoptflow cudastereo cudawarping cudev cvv datasets dnn dnn\_objdetect dpm face features2d flann freetype fuzzy gapi hdf hfs highgui img\_hash imgcodecs imgproc line\_descriptor ml objdetect optflow phase\_unwrapping photo plot python2 python3 quality reg rgbd saliency shape stereo stitching structured\_light superres surface\_matching text tracking ts video videoio videostab xfeatures2d ximgproc xobjdetect xphoto  
Disabled: world  
Disabled by dependency: -  
Unavailable: cnn\_3dobj java js matlab ovis sfm viz  
Applications: apps  
Documentation: NO  
Non-free algorithms: NO

GUI:  
QT: YES (ver 5.9.5)  
QT OpenGL support: NO  
VTK support: NO

Media I/O:  
ZLib: /usr/lib/aarch64-linux-gnu/libz.so (ver 1.2.11)  
JPEG: /usr/lib/aarch64-linux-gnu/libjpeg.so (ver 80)  
WEBP: build (ver encoder: 0x020e)  
PNG: /usr/lib/aarch64-linux-gnu/libpng.so (ver 1.6.34)  
TIFF: /usr/lib/aarch64-linux-gnu/libtiff.so (ver 42 / 4.0.9)  
JPEG 2000: build (ver 1.900.1)  
OpenEXR: build (ver 2.3.0)  
HDR: YES  
SUNRASTER: YES  
PXM: YES  
PFM: YES

Video I/O:  
DC1394: YES (2.2.5)  
FFMPEG: YES  
avcodec: YES (57.107.100)  
avformat: YES (57.83.100)  
avutil: YES (55.78.100)  
swscale: YES (4.8.100)  
avresample: NO  
GStreamer: YES (1.14.5)  
v4l/v4l2: YES (linux/videodev2.h)

Parallel framework: pthreads

Trace: YES (with Intel ITT)

Other third-party libraries:  
Lapack: YES (/usr/lib/aarch64-linux-gnu/liblapack.so /usr/lib/aarch64-linux-gnu/libcblas.so /usr/lib/aarch64-linux-gnu/libatlas.so)  
Eigen: YES (ver 3.3.4)  
Custom HAL: YES (carotene (ver 0.0.1))  
Protobuf: build (3.5.1)

NVIDIA CUDA: YES (ver 10.2, CUFFT CUBLAS FAST\_MATH)  
NVIDIA GPU arch: 62  
NVIDIA PTX archs:

cuDNN: NO

OpenCL: YES (no extra features)  
Include path: /home/nujet/opencvn/opencv-4.1.1/3rdparty/include/opencl/1.2  
Link libraries: Dynamic load

Python 2:  
Interpreter: /usr/bin/python2.7 (ver 2.7.17)  
Libraries: /usr/lib/aarch64-linux-gnu/libpython2.7.so (ver 2.7.17)  
numpy: /usr/lib/python2.7/dist-packages/numpy/core/include (ver 1.13.3)  
install path: lib/python2.7/dist-packages/cv2/python-2.7

Python 3:  
Interpreter: /usr/bin/python3 (ver 3.6.9)  
Libraries: /usr/lib/aarch64-linux-gnu/libpython3.6m.so (ver 3.6.9)  
numpy: /home/nujet/.local/lib/python3.6/site-packages/numpy/core/include (ver 1.19.3)  
install path: lib/python3.6/dist-packages/cv2/python-3.6

Python (for build): /usr/bin/python2.7

Java:  
ant: NO  
JNI: NO  
Java wrappers: NO  
Java tests: NO

## Install to: /usr/local

nujet@nujet-desktop:~$

---

<div class="post-metadata">

**Author:** ![Honey\_Patouceul](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/honey_patouceul/32/389777_2.png) [@Honey\_Patouceul](https://forums.developer.nvidia.com/u/Honey_Patouceul)\
**Post date:** [May 4, 2021, 10:51pm UTC](https://forums.developer.nvidia.com/t/on-board-camera/176807/14 "2021-05-04T22:51:44Z")

</div>

> [@30216](#):
>
> /tmp/pip-req-build-zuuo394f/\_skbuild/linux-aarch64-3.6/cmake-install

So you have least 2 versions of opencv installed;

- 4.5.1 built without GSTREAMER support, installed in /tmp/pip-req-build-zuuo394f/\_skbuild/linux-aarch64-3.6/cmake-install
- 4.1.1 built with GSTREAMER support, installed in /usr/local.

Python3 uses the 4.5.1  
Python2 uses the 4.1.1.

So it should work from python2.  
If you want to use gstreamer pipeline in opencv from python3, you would reconfigure an opencv build with `-D WITH_GSTREAMER=ON`, build and install.  
I’d suggest to use this script that will do that and configure for installing both python2 and python3:

> **[GitHub - mdegans/nano\_build\_opencv: Build OpenCV on Nvidia Jetson Nano](https://github.com/mdegans/nano_build_opencv)**
>
> Build OpenCV on Nvidia Jetson Nano

---

<div class="post-metadata">

**Author:** ![nadeemm](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/nadeemm/32/367020_2.png) [@nadeemm](https://forums.developer.nvidia.com/u/nadeemm)\
**Post date:** [October 18, 2021, 6:14pm UTC](https://forums.developer.nvidia.com/t/on-board-camera/176807/15 "2021-10-18T18:14:59Z")

</div>

Closed on October 18, 2021, 6:14pm UTC


