Units of SetExposure method

Post Reply
suhl79
Posts: 21
Joined: Thu Mar 18, 2010 7:45 am

Units of SetExposure method

Post by suhl79 » Mon Dec 27, 2010 7:42 pm

Hi,

Although I've found SetAEC() method very useful it lacks some performance when it comes to severe light conditions. That's why I try to improve it a little bit. During my research I've found that when working with reflected light at some exposure settings the picture I get from the camera seems to oscilate/pumps revealing and hiding the outer parts of the picture. I think this is due to 'misalignment' of camera exposure and light source frequency. My question is if it's possible to calculate optimal exposure value for the camera knowing the frequency of the light source? (for example 60Hz) If I knew the unit of exposure value maybe I could figure it out on my own.

Thanks
Konrad

p.s. And A Happy New Year to all tech folks from NP.

Birch
Posts: 1139
Joined: Thu Jan 30, 2003 5:00 am
Location: Corvallis, Oregon

Re: Units of SetExposure method

Post by Birch » Tue Dec 28, 2010 1:59 am

Yes, its possible the AEC is getting in a kind of feedback loop with the IR strobe. You might try switching from strobed to continuous illumination mode to solve the issue (set intensity to one of values in link below).

We typically use AEC with the filterswitcher set to block IR light which is why this may not have come to our attention before.

http://www.naturalpoint.com/optitrack/s ... .html#q221

suhl79
Posts: 21
Joined: Thu Mar 18, 2010 7:45 am

Re: Units of SetExposure method

Post by suhl79 » Tue Dec 28, 2010 3:10 am

The problem is I don't use camera with IR illumination. I use V120:slim with external visible light illuminator which frequency is constant of 60Hz. But I cannot assume that my product's end user would use the same frequenccy, so do You have any sugestions on computing the right exposure value? I've tried to make a grid of measurements with exposure and threshold values with a step of 10 for example, but due to the pulsing phenomenon the results are unreliable.

Birch
Posts: 1139
Joined: Thu Jan 30, 2003 5:00 am
Location: Corvallis, Oregon

Re: Units of SetExposure method

Post by Birch » Tue Dec 28, 2010 4:02 pm

The right exposure value is going to be subjective based on the criteria of your application and the typical features of the scene. For example the goal might be to reduce ambient light vs large bright objects, or it might be to optimize an evenly lit scene for human viewing.

If you want to try and implement your own basic AEC you could do a one-shot approach where you put a camera into MJPEG mode, sample all the pixels in the grayscale image and then compute an exposure value based on a known algorithm. You can find numerous algorithms online by searching on "automatic exposure algorithm". For example :

http://www.imageval.com/public/Products ... posure.htm

Note that the AEC mode for OptiTrack cameras operates inside the camera imager and the per-frame updates are not controlled by software.

leith
Posts: 192
Joined: Tue Jan 02, 2007 2:17 pm

Re: Units of SetExposure method

Post by leith » Thu Dec 30, 2010 9:55 pm

Also, keep in mind: There are specific types of lighting that are designed to work with high frequency shutters. They are typically used in film making.

Specifically: HMI lights and Kino Flo lights. Kino Flo in particular is primarily designed to deal with shutter issues.

beckdo
NaturalPoint Employee
NaturalPoint Employee
Posts: 520
Joined: Tue Jan 02, 2007 2:02 pm

Re: Units of SetExposure method

Post by beckdo » Wed Jan 05, 2011 6:28 pm

I exposed all the useful settings of the camera's AEC & AGC logic in the Camera SDK. On our next release, you should take a look at the camerarev7.h header file. It lists all the settings, their power-up defaults, and the range of each setting. They can all be set via the camera's function SetCameraOption.

jimmyjoe
Posts: 10
Joined: Tue Jun 15, 2010 10:45 am
Location: Seattle, WA

Re: Units of SetExposure method

Post by jimmyjoe » Fri May 06, 2011 4:56 pm

Just found out this using the SDK.1.1.0.Final, tech support just told me. I had never seen it any documentation before.

The SDK calls are not consistent for the SetExposure method.

The V120 SetExposure() method uses scan lines, 0 to 480, 17.02 uS per scan line.
SetExposure(480) = exposure of 480 scan lines * 17.02 uS = 8169 uS

The S250e param uses uS, 0 to 4167 uS.
SetExposure(4167) = exposure of 4167 uS.

The same for SetFrameRate, the V120 uses percentages for setting the paramater.
SetFrameRate(100), sets it to 120 fps.
Reading the setting back will return it in fps, not %.

The S250e uses frames per second as the parameter.
SetFrameRate(250), sets it to 250 fps.
Reading the setting back will return it in fps.

Thought these might be of some help for other people.

Birch
Posts: 1139
Joined: Thu Jan 30, 2003 5:00 am
Location: Corvallis, Oregon

Re: Units of SetExposure method

Post by Birch » Mon May 09, 2011 10:59 pm

Just to pile onto this post, here is some slightly more precise info :)

The V100:R2 and V120:SLIM also have a blanking period per frame which is the equivalent of 5 scanlines. The exposure value for these cameras is in scanline units.

vblank = 5 lines
frame rate = 100, 50 or 25

((1 second / ) / (480 + )) = time per scanline

timing @ 100hz :
((1 second) / 100) / (480 + 5) = 20.6185567 microseconds per scanline


The formula for calculating exposure duration :
((1 second / ) / (480 + VBlank)) *

default settings for V100 (100hz w/ exposure = 55) :
((1 second / 100) / (480 + 5)) * 55 = 1.134 milliseconds

NaturalPoint - Mike
Posts: 1896
Joined: Tue Feb 01, 2011 8:41 am
Location: Corvallis, OR

Re: Units of SetExposure method

Post by NaturalPoint - Mike » Thu May 12, 2011 6:20 pm

After a few days of internal discussion, we compared empirically measured data vs formulas with additional data, and we have hammered out the actual values for this:

V100, V100:R2: 1 exposure = 20.55 microseconds.
V120:Slim, V120:Duo, V120:Trio: 1 exposure = 17.13 microseconds.
S250e: 1 exposure = 1 microsecond.

Maximum value for V100/V120 cameras: 480
Maximum value for S250e cameras: Frame time in microseconds - 200, eg: 250FPS -> 3800 maximum exposure. 125FPS -> 7800 maximum exposure.

When changing exposure within the SDK, it is completely possible to use an exposure value that is too high for the camera. For the V100/V120 type cameras, this will generate unpredictable results. For the S250e cameras, using a higher exposure time than allowed for by framerate will automatically set the camera to use the maximum allowable exposure (If the framerate is 250FPS, which would normally have a maximum exposure setting of 3800, and you attempted to set the exposure to 7800, the camera would ignore the higher value and use the setting of 3800).

We will be posting this information on our FAQ, and it is tagged to go into upcoming documentation releases.

I hope this clears everything up -

Post Reply