My current project requires me to be have as little latency as possible, one of the main reasons i moved from NX to orin was to reduce runtime of my code, even if it will only improve on a few miliseconds.
i’ve built a small test process to check for latency on my camera, what i’ve done is:
connect a LED to the jetson GPIO.
find the pixel in the frame that the LED is on.
enter a simple open camera test file.
listen to a switch before each frame grab.
when the switch is on, start a timer and send HIGH through the GPIO pin.
test the pixel the LED is on, when its green number is more than a certain number, it means the program has seen the LED is on.
parameters i change between each test:
fps- either 30 or 60
resolution - either 1080p(1920x1080) or 480p(640x480)
camera exposure time- between 1 (almost 100% dark) to 300(about 30milisec, default camera exposure)
i’ll add my test results on jetson NX first:
fps :30
resolution - 1080p
exposure - 1-10
i can see the led on the same frame i turned it on-best result, between 0 to 30 milisec delay
fps:60
res-1080p
rexposure 1-10
i can see the LED with 3-4 frame delay, meaning over 60 milisec delay
fps :60
res-480p
exposure 1-10
i can see the led on the same frame i turned it on- between 0 to 16 milisec delay but low resolution
now my ORIN test results, which have been disappointing :
fps :30
resolution - 1080p
exposure - 1-10
i can see the led on the NEXT frame i turned it on- between 30 to 60 milisec delay
fps:60
res-1080p
rexposure 1-10
i can see the LED with 5-6 frame delay, meaning over 100 milisec delay
fps :60
res-480p
exposure 1-300
i can see the led on the same frame i turned it on- between 0 to 16 milisec delay but low resolution
conclusion- ORIN seem to struggle even more than the NX when it comes to high fps and high resolution, or even high resolution in general.
in a project which i am fighting with every 1 milisecond delay, this has been a very big problem.
notes:
gstreamer pipeline to start the camera:
open("v4l2src device=/dev/video0 ! video/x-raw,width=640,height=480 ! nvvidconv flip-method=2 ! video/x-raw(memory:NVMM), format = I420 ! nvvidconv ! video/x-raw,format=BGRx,width=(int)640, height=(int)480, framerate= (fraction)60/1 ! videoconvert !video/x-raw,format=BGR ! appsink drop=True sync=False");
to change camera settings i use v4l2-ctl
what i am looking for:
i would appreciate some advice when it comes to using cameras, maybe i am doing something wrong, maybe its a camera problem and not a jetson problem, maybe its an Opencv problem.
if anyone has a good development camera i can use i would appreciate it as well, preferably USB3 camera but i can work with a mipi camera if the cable is long enough(>35cm).