How one can get actual world distance with/from iOS AVFoundation LiDAR?


The LiDAR scanner on iPhones operates by emitting gentle and gauging the time it requires for the sunshine to rebound. Nonetheless, that is subjected to a large number of environmental variables that may have an effect on the precision of the gap measurement. As an example, the reflectivity of the wall, illumination circumstances, and even the angle of the gadget can all influence the readings. It is also value acknowledging that the depth map furnished by the LiDAR scanner isn’t a precise distance map, and sure assumptions are made throughout the conversion course.

As well as, the depth information derived from LiDAR isn’t flawlessly correct, and may carry discrepancies. The information you are deciphering is liable to noise and interference, and these can lead to values that exceed the precise distance.

One doable methodology to boost the measurements may be to sift the depth information to decrease noise and to use some type of smoothing or averaging over a number of readings. You would additionally try discarding outliers out of your measurements or using a median worth instead of the typical.

Additionally, keep in mind that depth measurements nearer to the gadget are usually extra correct than measurements at a distance. That is owing to the dispersal of the LiDAR gentle because it strikes away from the scanner, in addition to a larger chance of interference or inaccuracies with longer distances.

One other facet to ponder is that depth information is usually given in relation to the gadget’s aircraft of reference, not the digicam module itself. This suggests that your measured distance additionally incorporates the thickness of the gadget.

In your code, I observe that you simply’re using the minimal worth (min) as your remaining depth. This might probably be problematic if there are any spurious low values in your depth information (which might regularly happen on account of noise or different artifacts within the information). Using the median or a trimmed imply may be extra resistant to those sorts of points.

Lastly, guarantee you’re correctly calibrating the LiDAR sensor. Examine the AVCaptureDevice.isAutoFocusRangeRestrictionSupported and AVCaptureDevice.isSmoothAutoFocusSupported properties to verify they’re set accurately.

Related Articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest Articles