AravisProject / aravis

A vision library for genicam based cameras
GNU Lesser General Public License v2.1
868 stars 325 forks source link

Failed to enable Auto Exposure ROI on FLIR Blackfly 162S2C #506

Open lherman-cs opened 3 years ago

lherman-cs commented 3 years ago

Describe the bug

Aravis GStreamer plugin doesn't accept the camera's auto exposure ROI settings.

I was trying to set FLIR-BFS-U3-16S2C-CS auto exposure ROI from the GStreamer plugin:

gst-launch-1.0 aravissrc camera-name=FLIR-0140D428 offset-y=150 features="AutoAlgorithmSelector=Ae AutoExposureRoiEnable_Val=true AutoExposureRoiWidth_Val=228" ! video/x-raw, width=1440, height=810, format=UYVY, framerate=30/1 ! videoconvert ! fpsdisplaysink

Aravis seems to receive the parameters properly, but it errors out with a write error to the camera. Following are the logs from "all:3":

out.log

Also, AutoExposureRoiHeight_Val seems to be an invalid key, whereas AutoExposureRoiWidth_Val exists. Is this expected? Is there a tool to list available nodes?

To Reproduce

gst-launch-1.0 aravissrc camera-name=FLIR-0140D428 offset-y=150 features="AutoAlgorithmSelector=Ae AutoExposureRoiEnable_Val=true AutoExposureRoiWidth_Val=228" ! video/x-raw, width=1440, height=810, format=UYVY, framerate=30/1 ! videoconvert ! fpsdisplaysink

Expected behavior Expected the camera to be configured properly.

Camera description:

Platform description:

Edit: Updated the log file

EmmanuelP commented 3 years ago

Also, AutoExposureRoiHeight_Val seems to be an invalid key, whereas AutoExposureRoiWidth_Val exists. Is this expected? Is there a tool to list available nodes?

Yes, arv-tool-0.8

Please try to set auto exposure with it.

The log file content does not look like a regular debug output/

I'm closing this issue. Please reopen if you think there is still something to fix in Aravis.

lherman-cs commented 3 years ago

My bad, I uploaded the wrong log. Below is the correct one:

out.log

lherman-cs commented 3 years ago

@EmmanuelP would you mind reopening the issue? I don't have access to reopen. Thanks

EmmanuelP commented 3 years ago

I don't see any error or failure in the log.

Again, please use arv-tool.

lherman-cs commented 3 years ago

@EmmanuelP toward the end, the camera responded with:

[GcRegisterNode::_set_integer_value] address = 0xc3424, value = 0x168
packet_type  = cmd
command      = write-memory-cmd
size         = 12
id           = 32
address      = 0x00000000000c3424
00000000 55 33 56 43 00 40 02 08 0c 00 20 00 24 34 0c 00  U3VC.@.... .$4..
00000010 00 00 00 00 68 01 00 00                          ....h...        
packet_type  = (null)
command      = write-memory-ack
size         = 4
id           = 32
written      =          0 (0x00000000)
00000000 55 33 56 43 06 80 03 08 04 00 20 00 00 00 00 00  U3VC...... .....

[[UvDevice::write_memory] Unexpected answer (0x8006) <-- this error
lherman-cs commented 3 years ago

I tried usingarv-tool, however the configurations are not reflected on Spinview. Is this expected? Or aravis has a different preset from Spinview? If it has a different preset, how can we confirm if the new settings are applied properly?

arv-tool command:

./arv-tool-0.8 control AutoAlgorithmSelector=Ae AasRoiEnable=true AasRoiWidth=300 AasRoiHeight=100 AasRoiOffsetX=300 AasRoiOffsetY=40
EmmanuelP commented 3 years ago

The command you have written above should output the actual feature value. What was the output of your command ?