Hello i am working with an IMX camera on Jetson Orin Nano 4gb, and i am trying to set aeregion property with my program. Using the ICameraProperties i read out the getMinAeRegionSize()
value and got 256*256. Therefore i decided to use the aeregion
size of 256
x256
.
My camera resolution is 1920*1080 and with testing i have found out that the aeregion
setting only works at certain parts of the image, in other parts of the image it causes the pipeline to freeze and eventually timeout.
These are some examples of aeregion
position that seemed to work:
GST_ARGUS: NvArgusCameraSrc: Setting AE REGION : 0 0 512 512 1.000000
AE Region: 0 0 512 512 1.000000
GST_ARGUS: Setting AeRegion on the fly: 0 0 512 512 1.000000
GST_ARGUS: NvArgusCameraSrc: Setting AE REGION : 0 512 512 1024 1.000000
AE Region: 0 512 512 1024 1.000000
GST_ARGUS: Setting AeRegion on the fly: 0 512 512 1024 1.000000
GST_ARGUS: NvArgusCameraSrc: Setting AE REGION : 0 1024 512 1536 1.000000
AE Region: 0 1024 512 1536 1.000000
GST_ARGUS: Setting AeRegion on the fly: 0 1024 512 1536 1.000000
And this is an example of values which did not work:
GST_ARGUS: NvArgusCameraSrc: Setting AE REGION : 412 832 768 1188 1.000000
GST_ARGUS: NvArgusCameraSrc: Setting AE REGION : 512 1024 1024 1536 1.000000
I am unable to determine why some values are accepted and some cause pipeline to freeze.
With the highest DEBUG
level of 9
on the element nvarguscamerasrc
i only get this output after the pipeline freezes and few seconds go by:
CONSUMER: ERROR OCCURRED
[ERROR] [AvDeepStream] argus-camera-source: TIMEOUT�)
GST_ARGUS: NvArgusCameraSrc: Setting AE REGION : 412 832 668 1088 1.0
AE Region: 0 1536 256 1792 1.000000
0:00:07.468006976 4105 0xaaaae7b21580 DEBUG nvarguscamerasrc gstnvarguscamerasrc.cpp:1714:consumer_thread:<argus-camera-source> consumer_thread: stop_requested=1
[INFO] [AvDeepStream] Received EOS, stopping the stream
GST_ARGUS: Cleaning up
Afterwards i have to restart nvargus-daemon
systemctl in order to run the test again.
My main question is, are there some additional conditions regarding setting the numbers in aeregion
property ? Since i dont know why the pipeline is freezing with some values
Please check the daemon log for the detail.
https://elinux.org/Jetson/l4t/Camera_BringUp
Thanks
Hi and thank you for your reply, i tried looking into daemon logs, the most intel i got from sudo journalctl -u nvargus-daemon -f
This is what i got:
Settting the aeregion
values to these numbers
GST_ARGUS: NvArgusCameraSrc: Setting AE REGION : 0 510 256 766 1.000000
AE Region: 0 510 256 766 1.000000
GST_ARGUS: NvArgusCameraSrc: Setting AE REGION : 0 561 256 817 1.000000
AE Region: 0 561 256 817 1.000000
GST_ARGUS: NvArgusCameraSrc: Setting AE REGION : 0 612 256 868 1.000000
AE Region: 0 612 256 868 1.000000
GST_ARGUS: NvArgusCameraSrc: Setting AE REGION : 0 663 256 919 1.000000
AE Region: 0 663 256 919 1.000000
GST_ARGUS: NvArgusCameraSrc: Settin
Causes the following errors to arise
Sep 18 06:50:35 dcs nvargus-daemon[4371]: (Autocontrol) Error BadParameter: NvIspAeSetUpLac1Settings: effective image region [256x252] is too small (in src/algorithms/ae/ae_metering.cpp, function NvIspAeSetUpLac1Settings(), line 729)
Sep 18 06:50:35 dcs nvargus-daemon[4371]: (Autocontrol) Error BadParameter: AE failed to grab PCL metadata
Sep 18 06:50:35 dcs nvargus-daemon[4371]: (in src/algorithms/ae/ae_main.cpp, function run(), line 858)
Sep 18 06:50:35 dcs nvargus-daemon[4371]: (Autocontrol) Error BadParameter: NvIspAeSetUpLac1Settings: effective image region [256x252] is too small (in src/algorithms/ae/ae_metering.cpp, function NvIspAeSetUpLac1Settings(), line 729)
Sep 18 06:50:35 dcs nvargus-daemon[4371]: (Autocontrol) Error BadParameter: AE failed to grab PCL metadata
Sep 18 06:50:35 dcs nvargus-daemon[4371]: (in src/algorithms/ae/ae_main.cpp, function run(), line 858)
Sep 18 06:50:35 dcs nvargus-daemon[4371]: (Autocontrol) Error BadParameter: NvIspAeSetUpLac1Settings: effective image region [256x252] is too small (in src/algorithms/ae/ae_metering.cpp, function NvIspAeSetUpLac1Settings(), line 729)
Sep 18 06:50:35 dcs nvargus-daemon[4371]: (Autocontrol) Error BadParameter: AE failed to grab PCL metadata
Sep 18 06:50:35 dcs nvargus-daemon[4371]: (in src/algorithms/ae/ae_main.cpp, function run(), line 858)
Sep 18 06:50:35 dcs nvargus-daemon[4371]: (Autocontrol) Error BadParameter: NvIspAeSetUpLac1Settings: effective image region [256x252] is too small (in src/algorithms/ae/ae_metering.cpp, function NvIspAeSetUpLac1Settings(), line 729)
The size [256x252] as reported by the error doesnt corespond with the points i set in aeregion
. This is also the case when trying to set the window to a bigger size
This is the case with a size of window set to 356x356:
GST_ARGUS: NvArgusCameraSrc: Setting AE REGION : 0 994 356 1350 1.000000
AE Region: 0 994 356 1350 1.000000
Resulting error:
Sep 18 06:57:21 dcs nvargus-daemon[4505]: CAM: serial no file already exists, skips storing again(Autocontrol) Error BadParameter: NvIspAeSetUpLac1Settings: effective image region [356x228] is too small (in src/algorithms/ae/ae_metering.cpp, function NvIspAeSetUpLac1Settings(), line 729)
Maybe the size clamp by the output ratio.
Could you check by any output size that the ratio is 4:3 like 640x480/2592x1944?
Is this what you meant ? This is the resolution of the video
GST_ARGUS: Running with following settings:
Camera index = 0
Camera mode = 2
Output Stream W = 1920 H = 1080
seconds to Run = 0
Frame Rate = 29.999999
Any other sensor mode that the ratio is 4:3?
What do you mean ? Should i change the resolution ?
Looks like there are two sensor mode support by sensor driver.
Could you check another sensor mode?
BTW, have below command to check the sensor mode.
v4l2-ctl --list-formats-ext
This is the output of said command
$ v4l2-ctl --list-formats-ext
ioctl: VIDIOC_ENUM_FMT
Type: Video Capture
[0]: 'RG10' (10-bit Bayer RGRG/GBGB)
Size: Discrete 3280x2464
Interval: Discrete 0.048s (21.000 fps)
Size: Discrete 3280x1848
Interval: Discrete 0.036s (28.000 fps)
Size: Discrete 1920x1080
Interval: Discrete 0.033s (30.000 fps)
Size: Discrete 1640x1232
Interval: Discrete 0.033s (30.000 fps)
Size: Discrete 1280x720
Interval: Discrete 0.017s (60.000 fps)
Please select 3280x2464 sensor mode to verify.
Thanks
Even with the resolution of 3280 x 2464
i am experiencing the same behaviour
GST_ARGUS: Setting AeRegion on the fly: 0 2056 257 2313 1.000000
GST_ARGUS: NvArgusCameraSrc: Setting AE REGION : 0 2313 257 2570 1.000000
AE Region: 0 2313 257 2570 1.000000
GST_ARGUS: Setting AeRegion on the fly: 0 2313 257 2570 1.000000
CONSUMER: ERROR OCCURRED
[ERROR] [AvDeepStream] argus-camera-source: CANCELLED�)
With the error quotes of the window being [256x148]
Sep 18 09:43:24 dcs nvargus-daemon[3401]: (Autocontrol) Error BadParameter: NvIspAeSetUpLac1Settings: effective image region [256x148] is too small (in src/algorithms/ae/ae_metering.cpp, function NvIspAeSetUpLac1Settings(), line 729)
Sep 18 09:43:24 dcs nvargus-daemon[3401]: (Autocontrol) Error BadParameter: NvIspAeSetUpLac1Settings: effective image region [256x148] is too small (in src/algorithms/ae/ae_metering.cpp, function NvIspAeSetUpLac1Settings(), line 729)
The error tell size is less than 256x256.
Yes thats the point, the issue with all the resolutions is that it crashes due to small window size even tho the parameters by which the window was set dont result to the values outputed in the Error.
setting aeregion to 0 2056 257 2313 1.0
is 2313-2056=257
and 257-0=257
resulting in 257x257
window by my understanding
Please try even numbers like 256x256.
And from the log looks like set the AE ranges to 0 2313 257 2570 that greater than the output size 2464
Even numbers caused the same Error to arise
To your second point with it being higher than 2464
. I dont think it is, since the 2313-2570
is in image width, which is max 3280
, due to the order being [top, left, bottom, right]
. This can be seen in the documentation for aeregion
Source: https://developer.download.nvidia.com/embedded/L4T/r28_Release_v3.0/Docs/Jetson_TX1_and_TX2_Accelerated_GStreamer_User_Guide.pdf?t=eyJscyI6ImdzZW8iLCJsc2QiOiJodHRwczovL3d3dy5nb29nbGUuY29tLyJ9
OK, that’s my mistake.
What’s your version. I check below command on JP5.1.2 without problem.
xvimagesink sync=false
GST_ARGUS: NvArgusCameraSrc: Setting AE REGION : 0 2313 257 2570 1
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
GST_ARGUS: Creating output stream
CONSUMER: Waiting until producer is connected...
GST_ARGUS: Available Sensor modes :
GST_ARGUS: 2592 x 1944 FR = 29.999999 fps Duration = 33333334 ; Analog Gain range min 1.000000, max 16.000000; Exposure Range min 34000, max 550385000;
GST_ARGUS: 2592 x 1458 FR = 29.999999 fps Duration = 33333334 ; Analog Gain range min 1.000000, max 16.000000; Exposure Range min 34000, max 550385000;
GST_ARGUS: 1280 x 720 FR = 120.000005 fps Duration = 8333333 ; Analog Gain range min 1.000000, max 16.000000; Exposure Range min 22000, max 358733000;
GST_ARGUS: Running with following settings:
Camera index = 0
Camera mode = 0
Output Stream W = 2592 H = 1944
seconds to Run = 0
Frame Rate = 29.999999
GST_ARGUS: Setting AeRegion: 0 2313 257 2570 1.000000
GST_ARGUS: Setup Complete, Starting captures for 0 seconds
GST_ARGUS: Starting repeat capture requests.
CONSUMER: Producer has connected; continuing.
My JetPack is also 5.1.2, however i am changing the aeregion on the fly, when the camera pipleine is already running, there might be a difference since it has a custom print into the console for changing it during the run. What do you think ?
Could you verify the gst-launch-1.0 command in my previous comment to confirm.
Thanks