Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Félix_D_
Beginner
118 Views

Color camera parameters not updated

It seems the color camera parameters values, especially the exposure and white balance, are not updated for access with the dedicated query fonctions from the PXCCapture::Device interface.

Let's say I have :

PXCCapture::Device * device = captureMgr->QueryDevice();

// Get some initial values here
pxcI32 exposure = device->QueryColorExposure();
pxcI32 whiteBalance = device->QueryColorWhiteBalance();

device->SetColorAutoExposure(true);
device->SetColorAutoWhiteBalance(true);

// Process some frames...
// Exposure and white balance obviously change regarding the color stream

// Get new values for each frame
exposure = device->QueryColorExposure();
whiteBalance = device->QueryColorWhiteBalance();

// Values do not change !

I believe this is a bug since there are obvious changes in the color stream but the values returned by the query functions do not change over time ?

Is there any workaround for this ?

0 Kudos
4 Replies
samontab
Valued Contributor II
118 Views

My guess is that it's by design.

When auto is selected, that parameter is no longer readable. And when you try to read it, you get the old value, not the current, active one that you see the effects on the image.

This is because when you set a parameter to auto, something (the camera firmware for example) needs to be constantly calculating this parameter and updating it in real time in the actual hardware, which is slow. If you would like to read it, you would need to add thread access control to it, which could lead to slower performance of the camera, and maybe that's an overhead they decided to not have.

It could also be possible that the functionality is there, and they just forgot to add it. But that seems more unlikely.

As a workaround, you can always set those parameters manually, and have your own auto exposure, white balance, etc, done in your application, which may be even better in the long run, although they may not be as fast as the built-in ones.

hape
Beginner
118 Views

Hi Samontag and Felix,

samontab wrote:

As a workaround, you can always set those parameters manually, and have your own auto exposure, white balance, etc, done in your application, which may be even better in the long run, although they may not be as fast as the built-in ones.

Unfortunately, I do not have yet much experience in playing with such camera parameters. However, in which situations do you think a manual control over these parameters could result in better picture quality? Would it be possible to improve the quality of the pictures for example during very extreme (dark/bright) illumination situations?

Your last post urges me to finally play around with these parameters :P

Thanks!

Hans

samontab
Valued Contributor II
118 Views

Well, image quality will be similar if the manual settings you use are similar to the auto parameters, but you will have full control over the image acquisition parameters.

This means that, in theory, you could be able to have a better exposed image using manual controls instead of the auto ones. But, of course, you would need to know what you're doing to end up with a better result.

Félix_D_
Beginner
118 Views

samontab wrote:

When auto is selected, that parameter is no longer readable. And when you try to read it, you get the old value, not the current, active one that you see the effects on the image.

This is because when you set a parameter to auto, something (the camera firmware for example) needs to be constantly calculating this parameter and updating it in real time in the actual hardware, which is slow.

I guess you're right for the slowdown that would be introduced by constant update. Anyone from Intel confirming this ?

However my problem is that even if I later stop the "auto" mode, values are still not updated. For instance, I could start my app, set auto exposure to true, wait a bit and get ready for my stream capture, then stop the "auto" mode and retrieve the new fixed exposure value used for the capture. Thing is, this doesn't work, after I stop the auto exposure, the value still remains unchanged. Any ideas about this ?

samontab wrote:

As a workaround, you can always set those parameters manually, and have your own auto exposure, white balance, etc, done in your application, which may be even better in the long run, although they may not be as fast as the built-in ones.

Oh you're right, but I have no idea how to automatically adjust those parameters in order to get good results. I'm way more confident in Intel's adjusting, so it's sad I can't access these values.

Someone from Intel confirming I'm really not able to retrieve them ?

EDIT :

Turning on the "auto" mode does not change the white balance value for instance, but turning it off resets the value returned by QueryColorWhiteBalance() to the default value (6500 K) whatever the actual color temperature. I tested this streaming an orange surface (getting me the white balance set to cold value, close to the image I get manually setting the white balance to 3000 K) and when I stop the auto white balance, the stream keeps the last value from auto mode but the value returned by QueryColorWhiteBalance() switches to 6500 K.

Could be useful to get the actual value instead of the default one, this can be very misleading. Intel team, any way for me to hotfix this ?

Reply