<< return to Pixycam.com

Adjust brightness with auto exposure correction disabled

Hi,

I’m trying to detect an LED in an outdoor setting with changing light conditions. For this I wanted to disable the auto exposure correction in PixyMon so that the brightness of the LED itself is consistent. As it is documented the brightness slider at the tuning tab doesn’t work with auto exposure correction disabled. Is there any other way to adjust the brightness?

The brightness is at a good level and stable when I disable auto exposure correction but as soon as I click the apply button the brightness is reset to a standard value which is way too bright for my application. I’m not sure if I’m doing something wrong or if this is a bug. Or maybe it’s not possible to save the brightness level with auto exposure correction disabled?

I’m using
PixyMon v2 version 3.0.24
Pixy2 firmware version 3.0.18 general build
Pixy2 hardware version 2.3.0

Thank you very much for your help,
Nik

I think I found a workaround that lets me store the brightness setting. I can save the Pixy parameters into a prm file with auto exposure correction active, edit the file to disable it and then load the file in PixyMon again.
Set auto exposure correction to 0:
data value=“0” key=“Auto Exposure Correction” type=“INT8”
data value=“589856” key=“AEC Value” type=“INT32”

The AEC Value seems to be responsible for the brightness. Is there some documentation what this parameter means? Does this parameter set the gain/offset of the camera sensor?

Thank you,
Nik

Hello,
The current brightness level should be saved as fixed (unchanging) when you disable auto exposure. So for example if you want low exposure, lower the brightness before disabling auto exposure. It sounds like you’re saying that when you disable it, the exposure ends up being set too high. Are you using Pixy2 and the latest firmware version?

Edward

Hi Edward,

The procedure you’re describing works until I click on the “Apply” button. After disabling auto exposure the brightness is fixed at the correct low level like you say. But as soon as I click the “Apply” button the brightness is reset to some standard value.
I’m using:
PixyMon v2 version 3.0.24
Pixy2 firmware version 3.0.18 general build
Pixy2 hardware version 2.3.0

Thanks,
Nik

Hello,
This appears to be bug. Here’s a workaround: From PixyMon, save the parameters from the File menu. Then go into the .prm file with a text editor and change the “AEC Value” to 262146.

<data key="AEC Value" value="262146" type="INT32"/>

Then save the text file and load the same prm file into PixyMon.

The AEC value are two 16-bit values stuck together, so it’s not as simple as “small is dark”, “large is bright”. Let me know if this is too dark and I can suggest some other values (524296 is slightly brighter).

Edward

Thanks, I’ll try this.

Cheers,
Nik

Hi Edward,

I’m coming back to this topic as I’m still struggling finding consistent brightness settings. It seems like the Pixy2 camera adjusts the brightness levels at each startup. When I turn on the camera in a dark environment and then go to a bright environment the images will be much brighter compared to when I turn on the camera directly in the bright environment. I’m doing this with “auto exposure correction” disabled. Is this also a bug or intended behavior?

Thank you,
Nik

The brightness should be consistent upon power up if auto exposure correction is disabled, however auto-white balance on power-up that can also affect things. I would also disable Auto White Balance on power-up. https://docs.pixycam.com/wiki/doku.php?id=wiki:v2:pixymon_index#camera-tab

Edward

I have everything disabled:
<Pixy_parameters>
data type=“INT8_ARRAY” key=“signature1” value=“gXsAgSAAAAD/////AQAAAAAAAADF////AQAAAOT///+2t7cAAAAAAA==”/>
data type=“FLOAT32” key=“Signature 1 range” value=“8”/>
data type=“STRING” key=“Signature label 1” value=""/>
data type=“INT8_ARRAY” key=“signature2” value=“gQAAgSAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADpDQAQAAAAAA==”/>
data type=“FLOAT32” key=“Signature 2 range” value=“3.5”/>
data type=“STRING” key=“Signature label 2” value=""/>
data type=“INT8_ARRAY” key=“signature3” value=“gQAAgSAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADpDQAQAAAAAA==”/>
data type=“FLOAT32” key=“Signature 3 range” value=“3.5”/>
data type=“STRING” key=“Signature label 3” value=""/>
data type=“INT8_ARRAY” key=“signature4” value=“gQAAgSAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADpDQAQAAAAAA==”/>
data type=“FLOAT32” key=“Signature 4 range” value=“3.5”/>
data type=“STRING” key=“Signature label 4” value=""/>
data type=“INT8_ARRAY” key=“signature5” value=“gQAAgSAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADpDQAQAAAAAA==”/>
data type=“FLOAT32” key=“Signature 5 range” value=“3.5”/>
data type=“STRING” key=“Signature label 5” value=""/>
data type=“INT8_ARRAY” key=“signature6” value=“gQAAgSAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADpDQAQAAAAAA==”/>
data type=“FLOAT32” key=“Signature 6 range” value=“3.5”/>
data type=“STRING” key=“Signature label 6” value=""/>
data type=“INT8_ARRAY” key=“signature7” value=“gQAAgSAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADpDQAQAAAAAA==”/>
data type=“FLOAT32” key=“Signature 7 range” value=“3.5”/>
data type=“STRING” key=“Signature label 7” value=""/>
data type=“FLOAT32” key=“Min brightness” value=“0.2”/>
data type=“INT8” key=“Color code mode” value=“1”/>
data type=“INT32” key=“Signature teach threshold” value=“3700”/>
data type=“INT16” key=“LED brightness” value=“750”/>
data type=“INT16” key=“Max blocks” value=“100”/>
data type=“INT16” key=“Max blocks per signature” value=“100”/>
data type=“INT32” key=“Min block area” value=“20”/>
data type=“INT16” key=“Max merge dist” value=“7”/>
data type=“INT8” key=“Block filtering” value=“0”/>
data type=“INT16” key=“Max tracking velocity” value=“65”/>
data type=“INT8” key=“Data out port” value=“0”/>
data type=“INT8” key=“I2C address” value=“84”/>
data type=“INT32” key=“UART baudrate” value=“19200”/>
data type=“INT8” key=“Pixy 1.0 compatibility mode” value=“0”/>
data type=“INT8” key=“Camera brightness” value=“4”/>
data type=“INT8” key=“Auto Exposure Correction” value=“0”/>
data type=“INT32” key=“AEC Value” value=“262146”/>
data type=“INT8” key=“Color saturation” value=“255”/>
data type=“INT8” key=“Auto White Balance” value=“0”/>
data type=“INT8” key=“Auto White Balance on power-up” value=“0”/>
data type=“INT8” key=“Flicker avoidance” value=“0”/>
data type=“INT32” key=“AWB Value” value=“4372”/>
data type=“INT8” key=“Min frames per second” value=“61”/>
data type=“INT16” key=“S0 lower limit” value="-200"/>
data type=“INT16” key=“S0 upper limit” value=“200”/>
data type=“INT16” key=“S1 lower limit” value="-200"/>
data type=“INT16” key=“S1 upper limit” value=“200”/>
data type=“INT16” key=“Servo frequency” value=“60”/>
data type=“INT16” key=“Edge distance” value=“4”/>
data type=“INT16” key=“Edge threshold” value=“35”/>
data type=“INT16” key=“Minimum line width” value=“0”/>
data type=“INT16” key=“Maximum line width” value=“100”/>
data type=“INT16” key=“Line extraction distance” value=“13”/>
data type=“INT16” key=“Maximum merge distance” value=“6”/>
data type=“INT16” key=“Minimum line length” value=“10”/>
data type=“INT32” key=“Maximum line compare” value=“5000”/>
data type=“INT8” key=“White line” value=“0”/>
data type=“INT8” key=“Line filtering” value=“1”/>
data type=“INT8” key=“Intersection filtering” value=“1”/>
data type=“INT8” key=“Barcode filtering” value=“1”/>
data type=“INT16” key=“Default turn angle” value=“0”/>
data type=“INT8” key=“Delayed turn” value=“0”/>
data type=“INT8” key=“Manual vector select” value=“0”/>
data type=“INT8” key=“Go” value=“0”/>
data type=“INT8” key=“Repeat” value=“0”/>
data type=“STRING” key=“Barcode label 0” value=""/>
data type=“STRING” key=“Barcode label 1” value=""/>
data type=“STRING” key=“Barcode label 2” value=""/>
data type=“STRING” key=“Barcode label 3” value=""/>
data type=“STRING” key=“Barcode label 4” value=""/>
data type=“STRING” key=“Barcode label 5” value=""/>
data type=“STRING” key=“Barcode label 6” value=""/>
data type=“STRING” key=“Barcode label 7” value=""/>
data type=“STRING” key=“Barcode label 8” value=""/>
data type=“STRING” key=“Barcode label 9” value=""/>
data type=“STRING” key=“Barcode label 10” value=""/>
data type=“STRING” key=“Barcode label 11” value=""/>
data type=“STRING” key=“Barcode label 12” value=""/>
data type=“STRING” key=“Barcode label 13” value=""/>
data type=“STRING” key=“Barcode label 14” value=""/>
data type=“STRING” key=“Barcode label 15” value=""/>
data type=“INT8” key=“Default program” value=“0”/>
data type=“INT8” key=“Program select on power-up” value=“0”/>
data type=“INT8” key=“Debug” value=“0”/>
data type=“INT16” key=“fwver” value=“0”/>
data type=“STRING” key=“fwtype” value=“general”/>
</Pixy_parameters>

Best,
Nik

Hello,
We’re trying to reproduce this and will get back to you.

Edward

Hello,
This does appear to be some kind of bug. We’ll look into fixing it in the coming week or so. Sorry for the trouble.

Edward

Thank you! It would be great if you could take a look at both of the bugs mentioned in this thread.

Best,
Nik

Hi Edward,

Did you have time to take a look at this?

Thank you,
Nik

Hi Hik,
This hasn’t been finished (sorry). We will try to get this done in the coming weeks, hopefully before June 1.

Edward

Hi Edward,

I’m sorry to bother you again but have you been able to look at this? My project is on hold since multiple months because I can’t get consistent brightness levels. I’m building a follow me drone using the Pixy2. Here is a video of the first test flight: https://www.reddit.com/r/diydrones/comments/10txhuo/first_test_flight_of_my_autonomous_follow_me/

I would really appreciate if you could take a look at the 2 bugs or maybe find a workaround.

Thank you,
Nik

Hello,
Sorry for the delay. We looked into this, which led us to ask On semiconductor some questions, but we haven’t heard back. We’ll try to get some answers this week.

Edward

Thank you for the update.

Cheers,
Nik