Hi,
I’m trying to get depth data from an Arducam ToF Camera in C. The example from github compiles, but returns no more than the height and width of the image. The example code in the wiki does not match the github example, and does not run. When I attempt to read the depth_ptr variable it returns large and seemingly random numbers.
Can I get a code snippet that actually retrieves the depth of a pixel so that I can understand what I’m doing wrong?
Here’s my code currently:
if ((frame = arducamCameraRequestFrame(tof, 200) ) != 0x00)
{
format = arducamCameraGetFormat(frame, DEPTH_FRAME);
depth_ptr = (float*) arducamCameraGetDepthData(frame);
confidence_ptr = (float*)arducamCameraGetConfidenceData(frame);printf("Dist: %d\n",depth_ptr[21600]); arducamCameraReleaseFrame(tof, frame);
}