Hi Guys!
I’ve implemented the object detection model by following the tutorial in YouTube (Real-Time Object Detection in 10 Lines of Python Code on Jetson Nano) and it’s using the Raspberry Pi V2 Camera attached on my Jetson Nano.
What can I do to detect objects from my IP Camera (RSTP) instead of the raspberry pi camera?
I had tested out the solution to edit the gstCamera.cpp code but it can’t work
(text files attached below are gstcamera.cpp, error message when launching program and mydetection python script
Could someone please provide me some well-detailed solutions?
Thank you so much!
Thanks again @Honey_Patouceul ! I can now launch the program.
However, the color seems not accurate at all. How can I fix this ? (already applied your colorCorrection patch)
I cannot say with so few details. You may tell what resolution, framerate and encoding your IP cam is sending.
I’d suggest to first try without jetson-inference and just try to have a gstreamer pipeline to display:
Hi @Honey_Patouceul
After I edited the gstCamera.cpp code, things got better although there’s long delays when detecting objects and the color seems a bit off.
Tested both format (BGRx and NV12) as mentioned above, obtained the same result
I did the same mistake at first…using BGR instead of RGB.
If you look to my patch, you’ll see it has name with ColorsCorrected.
In buildLaunchStr, change BGR into RGB, rebuild, reinstall and it might be ok.
Sorry for disturbing you again!
Do you mind explaining the patch code you applied to gstCamera.cpp and .h file in order to make RTSP streaming possible?
First note that this patch is obsolete. Now jetson-utils supports RTSP sources.
In older versions, it was expecting cameras only, with a different syntax/prefix for CSI cameras or V4L2 cameras. If the provided string was not matching one of these syntaxs, the video source was returning an error and aborting. My patch just added, if both cameras syntax were not recognized, a 3rd case where a pipeline with the provided string (plus some other code added in by buildLaunchStr) is tried.