Are you able to use existing IP cameras instead of setting up pi’s for the Jetson TX2 setup? If so where do you specify the IP addresses of the cameras?
here?
url1='http://pi1.local:8000/stream.mjpg'
url2='http://pi2.local:8000/stream.mjpg'
url3='http://pi3.local:8000/stream.mjpg'
url4='http://pi4.local:8000/stream.mjpg'
Hi @vondalej
Yes, please specify the IP addresses of the cameras here. Any IP camera can be used not just raspberry pi.
Hi there, Enjoying this project, greatly appreciate it, however I am stuck on an issue currently and wondering if you could offer any guidance
File “jetsonano/securitycamnano.py”, line 77, in
fgmask=cv2.erode(fgmask,kernel,iterations=1)
cv2.error: OpenCV(4.5.1) /tmp/pip-req-build-zuuo394f/opencv/modules/imgproc/src/morph.dispatch.cpp:1010: error: (-215:Assertion failed) !src.empty() in function ‘erode’
I am using a Jetson Nano . Thanks
Hi @nemesjs5662 which camera are you using? This error means that opencv is unable to read frames from your camera. If you are using a USB camera, this will not work and you will have to do some small modifications.
Hi sir, I have a Aluratek HD 1080P Video Webcam
Yes i realized your gstreamer pipeline wouldnt work with my camera and modified that already
however this fixed the pipeline error and brought me to the error in my earlier post around erode plus these warnings .
[ WARN:0] global /tmp/pip-install-w8b2xk2p/opencv-python_ecd0f58ce24240a49aa13f1fcc663248/opencv/modules/videoio/src/cap_gstreamer.cpp (713) open OpenCV | GStreamer warning: Error opening bin: syntax error
[ WARN:0] global /tmp/pip-install-w8b2xk2p/opencv-python_ecd0f58ce24240a49aa13f1fcc663248/opencv/modules/videoio/src/cap_gstreamer.cpp (480) isPipelinePlaying OpenCV | GStreamer warning: GStreamer: pipeline have not been created
Traceback (most recent call last):
File “jetsonano/securitycamnano.py”, line 77, in
fgmask=cv2.erode(fgmask, kernel, iterations=1)
cv2.error: OpenCV(4.4.0) /tmp/pip-install-w8b2xk2p/opencv-python_ecd0f58ce24240a49aa13f1fcc663248/opencv/modules/imgproc/src/morph.dispatch.cpp:1010: error: (-215:Assertion failed) !src.empty() in function ‘erode’
What else do i need to modify to ensure usb camera will work. Thanks so much
I modified the config.py for usb camera true and was able to get it to run but it never recognized a person in the frame.
Video recording started
Analyzing file mp4_videos/video6.mp4 to find human in video
[ WARN:4] global /tmp/pip-install-w8b2xk2p/opencv-python_ecd0f58ce24240a49aa13f1fcc663248/opencv/modules/videoio/src/cap_gstreamer.cpp (1761) handleMessage OpenCV | GStreamer warning: Embedded video playback halted; module qtdemux6 reported: This file contains no playable streams.
[ WARN:4] global /tmp/pip-install-w8b2xk2p/opencv-python_ecd0f58ce24240a49aa13f1fcc663248/opencv/modules/videoio/src/cap_gstreamer.cpp (888) open OpenCV | GStreamer warning: unable to start pipeline
[ WARN:4] global /tmp/pip-install-w8b2xk2p/opencv-python_ecd0f58ce24240a49aa13f1fcc663248/opencv/modules/videoio/src/cap_gstreamer.cpp (480) isPipelinePlaying OpenCV | GStreamer warning: GStreamer: pipeline have not been created
Person not found in video.
If you can offer any insight i would greatly appreciate the help. Thanks!
I switched to a csi camera do to speed issues with my usb and all is good. thanks Great project
1 Like
@nemesjs5662 Great that it worked out for you. You can run the Jetson Nano in 2 modes: as jetson nano, in which case it will do motion detection in real time but not object detection. You can also run the jetsontx2 scripts on the nano which will detect objects from up to 4 cameras and display them on the screen.
1 Like