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

DepthCapture example code issue #22

Closed amjad14 closed 9 years ago

amjad14 commented 9 years ago

After installing the binary for Voxel SDK and building DepthCapture.cpp, the executable doesn't perform any action.

hlprasu commented 9 years ago

Does it show any (error) message?

On 11 July 2015 at 02:10, amjad14 notifications@github.com wrote:

After installing the binary for Voxel SDK and building DepthCapture.cpp, the executable doesn't perform any action.

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

~ Prasad Bhat

amjad14 commented 9 years ago

No, a command prompt window pop up and disappear.

gadiyar commented 9 years ago

Could you please run the executable from a command prompt? That will allow us to catch the error messages.

amjad14 commented 9 years ago

it says required argument missing

gadiyar commented 9 years ago

You need to run the program from the command line with the following parameters:

DepthCapture.exe -v 0x0451 -p 0x9100 -f filename.bin -n 100 -t raw_processed

(replace the parameters as needed based on your board; the ones above are for the Haddock CDK, for capturing 100 frames of raw_processed data).

amjad14 commented 9 years ago

Thanks, it seems to work. But how the data is mapped inside .bin file?

hlprasu commented 9 years ago

Please see https://github.com/3dtof/voxelsdk/issues/6

On 13 July 2015 at 20:06, amjad14 notifications@github.com wrote:

Thanks, it seems to work. But how the data is mapped inside .bin file?

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

~ Prasad Bhat

amjad14 commented 9 years ago

It helped! but i'm still wondering the order in term of pixels of the Depth and amplitude data. I can see that I get for depth data 76800 (320*240) times 4bytes (float), but what about the order?

amjad14 commented 9 years ago

I figured out the order.

for row = 1:240
for col= 1:320 Depthimage( row , col ) = A(k); // A is the float vector with the stream of data from binary file k=k+1; end
end

hlprasu commented 9 years ago

It is row-ordered depth data. Endianness is machine dependent.

On 14 July 2015 at 19:45, amjad14 notifications@github.com wrote:

Any information about the data order getting out of the line code on the right? f.write((char _)d->depth.data(), sizeof(float)_d->size.width*d->size.height);

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

~ Prasad Bhat

Jc-Seo commented 5 years ago

I figured out the order.

for row = 1:240 for col= 1:320 Depthimage( row , col ) = A(k); // A is the float vector with the stream of data from binary file k=k+1; end end

Can I ask you how did you read .bin file generated from DepthCapture.cpp? I want to read bin file and pass it to opencv Mat