my problem is a bit complicate to explain but I am gonna do my best ( it's gonna be long) . I am trying to develop a python program to count vehicules in a traffic. For that I have a canvas on which I can draw lines to define the entry and exit of a road ( so the program counts every vehicules crossing the lines). At first it was counting from uploaded videos and it worked well on Windows but I had to use it with Jetson Nano and a webcam to have a live streaming video. s So I installed everything it needed to run and here's what happened:
- I have both python2.7 and python3.7 in my Jetson. But the program was built with python3.7. I tried using gstreamer to open my CSI Camera but it didn't work.
- I decided to see if my opencv was compatible with Gstreamer and i saw "GStreamer: no" and" Python(for build): bin/python2.7
- After running a script( that should open the camera) with python2.7, the camera worked well, so I decided to make my program work with python2.7. And INDEED the program could open the camera BUT there were no canvas anymore, so I couldn't draw the lines .
I tried installing a virtual environment ( archiconda ) , nothing works, the cv2 in my conda env is still not working with Gstreamer. I thought about building it with Cmake but there's no CMakeList.txt in the cv2 folder in my archiconda folder.
Now when I run my script (which shows my openCV build info ) with python2.7 , it shows GStreamer:Yes and Python(for build): home/archiconda/bin/python3 . But when i run it with python3.7 I get GStreamer:No and Python(for build): bin/python2.7
I must admit am so lost i don't understand what's happening.
So my main problem is : How can I make my OpenCV work with GStreamer and Python3.7 on my Jetson Nano
Versions: OpenCV 4.5.4 Python 3.7 GStreamer 1.14.5
Thank you if you had the patience to read me.