I installed opencv 4.5.2 in my Jetson Nano.
It imports the cv2 package when I write the command in python shell. But to check my installation I’m following the JetsonHacksNano repository: buildOpenCV/Examples at master · JetsonHacksNano/buildOpenCV · GitHub. I ran the gstreamer_view.cpp to check the installation.
To compile gstreamer_view.cpp:
$ gcc -std=c++11
pkg-config --cflags opencv
pkg-config --libs opencvgstreamer_view.cpp -o gstreamer_view -lstdc++ -lopencv_core -lopencv_highgui -lopencv_videoio
I get the following error:
/usr/bin/ld: cannot find -lopencv_contrib
/usr/bin/ld: cannot find -lopencv_legacy
/usr/bin/ld: cannot find -lgstreamer_view.cpp
collect2: error: ld returned 1 exit status
Can anyone give me an idea what might be the reason for that?