Augmented Reality Measuring Tape
This code demonstrates how to use ARKit to measure lengths.
Measure will always drop at 20 cm from the central point of the device (you may change that distance)
The device’s camera cannot touch to object since it needs a distance for focusing (focus length)
iOS has not exact distance between the camera and a given object (deeply it uses only one camera to work with ARKit, thus it has no information about depth)
The user looks into 3D world and drop the measure via his 2D screen. The app has no idea which object he actually want to measure and how far (from the device) it is
Because of all above issues, the measure may “float” between the device and the object of measuring.
Accuracy is depended much on how parallell between measure and object, the angle of the phone and object to align two ends of the measure with the object (usually it is bad):
The measure uses an image to display marks and numbers. The size of that image is limited about 16384 pixels. Thus we limit the max length of the measure about 1.5m.
There are some solutions for measuring over that limit length.
Xcode 9.0, iOS 11.0 SDK
iOS 11.0 + A9 processors (from iPhone 6s or iPad 2017)
Copyright © 2017 Softgaroo / Nguyen Hong Pham. All rights reserved.