3dtof / voxelsdk

VoxelSDK - an SDK supporting TI's 3D Time of Flight cameras
BSD 3-Clause "New" or "Revised" License
108 stars 71 forks source link

setFrameRate() makes depth data abnormal #55

Open JoeyZhu opened 8 years ago

JoeyZhu commented 8 years ago

I set framerate before depthCamera->start() with

FrameRate r;
r.numerator = 15.0f * 10000;
r.denominator = 10000;
uint g = gcd(r.numerator, r.denominator);
r.numerator = r.numerator/g;
r.denominator = r.denominator/g;

but depthdata is abnormal, see the link below.

when I commented out code above, depth data is ok.

I setCameraProfile(2) before setFrameRate, I noticed this affects. How can I set profile to longrange while set framerate to 15fps? Thank You!

good depth data: http://pan.baidu.com/s/1bmGoeM

bad depth data: http://pan.baidu.com/s/1o7w1h8m

hlprasu commented 8 years ago

Could you please provide a minimalistic runnable code which demonstrates this problem?

Are you using the setFrameRate() API or setting parameters directly?

Which depth camera are you using? TintinCDK?

Thanks Prasad

~ Prasad Bhat On 26-Jan-2016 7:31 AM, "JoeyZhu" notifications@github.com wrote:

I set framerate before depthCamera->start() with

FrameRate r; rnumerator = 150f * 10000; rdenominator = 10000; uint g = gcd(rnumerator, rdenominator); rnumerator = rnumerator/g; rdenominator = rdenominator/g;

but depthdata is abnormal, see the link below

when I commented out code above, depth data is ok

good depth data: http://panbaiducom/s/1bmGoeM

bad depth data: http://panbaiducom/s/1o7w1h8m

Thank you !

— Reply to this email directly or view it on GitHub https://github.com/3dtof/voxelsdk/issues/55.

JoeyZhu commented 8 years ago

After referring to 9221 datasheet(SBAS703A), I found INTG_DUTY_CYCLE should be updated according to the frame rate settings. So after calling setFrameRate, I called set() API to set INTG_DUTY_CYCLE to a half of previous value due to I set frame rate from 30 to 15. And the depthdata is ok now.

Yes, I'm using TI's TintinCDK. And I use setFrameRate() API to set frame rate.

I think setFrameRate() API should contain this kind of low level parameters change, right ? Thank you!

hlprasu commented 8 years ago

I just checked to confirm whether setFrameRate() refreshes integer duty cycle or not. It actually does it via integration % time parameter.

See https://github.com/3dtof/voxelsdk/blob/master/TI3DToF/ToFCamera.cpp#L175

@Anand: Any thoughts?

On 26 January 2016 at 11:59, JoeyZhu notifications@github.com wrote:

After referring to 9221 datasheet(SBAS703A), I found INTG_DUTY_CYCLE should be updated according to the frame rate settings. So after calling setFrameRate, I called set() API to set INTG_DUTY_CYCLE to a half of previous value due to I set frame rate from 30 to 15. And the depthdata is ok now.

Yes, I'm using TI's TintinCDK. And I use setFrameRate() API to set frame rate.

I think setFrameRate() API should contain this kind of low level parameters change, right ? Thank you!

— Reply to this email directly or view it on GitHub https://github.com/3dtof/voxelsdk/issues/55#issuecomment-174852868.

~ Prasad Bhat