Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

XYZ bin file generation using tofi_compute_depth #695

Open
Vignesh-E opened this issue Jun 26, 2024 · 9 comments
Open

XYZ bin file generation using tofi_compute_depth #695

Vignesh-E opened this issue Jun 26, 2024 · 9 comments

Comments

@Vignesh-E
Copy link

Hi there,

We are trying to extract point cloud data from the raw frame, like wise you guys did using TOF module.

./tofi_compute_depth --I=./ADTF3175_TOF/raw_frames_release_mode3 --O=./ADTF3175_TOF/raw_frames_release_mode3/processed --CCB=./crXXX.ccb --MODE=3 --INI=config/RawToDepthAdsd3500_lr-qnative.ini --ISP_Enable=1

if we run the above command, it will gives us three different frames namely AB, Radian depth and xyz bin files right. whats the logic used to extract xyz from raw frame.

I tried using a GenerateXYZTables() function, but still not able extract same xyz frames.

Pls, help with necessary info.

@andrestraker
Copy link
Collaborator

Hi,

For lr-qnative the frame received from the ADSD3500 already needs to be de-interleaved, followed by extraction of the AB, depth and confidence frames.

Afterwards, the XYZ can be derived.

This can be seen in the following code: https://github.com/analogdevicesinc/ToF/tree/main/sdk/common/adi/depth-compute-opensource/src

Note, we have an example that will show this functionality more directly. This example is expected to be ready by 7/3. I will update here.

Regards,
Andre

@Vignesh-E
Copy link
Author

Hi andre,

Is it possible build tofi_compute_depth binary in TOF git repository?

It is not getting built by default. Do I need enable any flag to build tofi_compute_depth binary?

Regards,
Vignesh

@andrestraker
Copy link
Collaborator

No, it is not possible to do so. It is supplied as a binary in the eval kits, 4.3.0 and earlier.

@Vignesh-E
Copy link
Author

how to calcuate distance using xyz bin file?

@andrestraker
Copy link
Collaborator

z is the distance in mm.

@Vignesh-E
Copy link
Author

Vignesh-E commented Jul 18, 2024

This distance is the measurement from camera to oobject right?

@andrestraker
Copy link
Collaborator

Correct.

@Vignesh-E
Copy link
Author

Hi andre,

I'm running in mode 3, so every 4 ,5 byte has Absolute Brightness.
For few pixel it has values only in 4th byte and 5th byte is 0, for few pixel values in 4th and 5th byte

I'm reading and displaying it as uint16 data, for pixel which has data in 4th and 5th was not giving proper video.

I'm not sure how to process it for preview and display

Can you please help me on this

Thanks
Vignesh

@andrestraker
Copy link
Collaborator

Hi Vignesh,

I am assuming you are referring to the fact that the data coming from the eval kit is interleaved before processing. The NXP we use in the eval kit does not support virtual channels. Therefore the data comes interleaved from the ToF sensors.

You can see how to de-interleave the data via the following code:

DeInterleaveDepth(uint8_t *p_frame_data, uint32_t n_bits_in_depth,

Note, this discussion is relevant to pre-v5.0.0.

Regards,
Andre

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants