A client wants to measure the length of a sofa from a single photo—without a tape measure or special equipment. We implemented this feature in mobile apps with accuracy up to 2% under proper conditions. Our experience: 5+ years in iOS/Android development, 30+ projects with AR and computer vision. We offer a turnkey solution: from method selection (LiDAR, SLAM, or monocular depth) to integration with your backend. Get a consultation—we'll evaluate your project in one day.
Which Measurement Method to Choose: LiDAR, SLAM, or Monocular Depth?
ARKit/ARCore (LiDAR or SLAM) is accurate but requires device support. iPhone 12 Pro and newer with LiDAR deliver 1–3 cm accuracy at distances up to 5 meters. ARCore on Android without LiDAR is worse, with 3–8 cm error.
Monocular depth estimation works on any device without LiDAR, using CNN to estimate depth from a single frame. MiDaS, DPT, Depth Anything V2 are current models. Accuracy is noticeably lower than LiDAR but sufficient for many tasks.
| Method | Accuracy | Device Requirements | Implementation Complexity |
|---|---|---|---|
| LiDAR (ARKit/ARCore) | 1–3 cm | iPhone 12 Pro+, iPad Pro | Medium |
| SLAM (ARKit/ARCore) | 3–8 cm | Devices with ARKit/ARCore support | Medium |
| Monocular depth | 5–15% | Any device | High (neural network) |
// iOS: method selection based on device capabilities func selectMeasurementMethod() -> MeasurementMethod { if ARWorldTrackingConfiguration.supportsSceneReconstruction(.mesh) { return .lidarARKit // iPhone 12 Pro+, iPad Pro } else if ARWorldTrackingConfiguration.isSupported { return .slamARKit // ARKit without LiDAR } else { return .monocularDepth // fallback to CoreML model } } What Affects Measurement Accuracy?
Measurement accuracy directly depends on shooting conditions: lighting, surface texture, distance to the object, and camera angle. White walls without texture degrade SLAM tracking, and high lighting can cause overexposure. For stable results:
- Textured surfaces (black, glossy objects are harder to detect)
- Distance to the object no more than 5 m with LiDAR, 3 m with SLAM
- Minimize dynamic objects in the frame
- Proper camera focus
How We Implement Measurement via ARKit
// Measuring distance between two points in AR class ARMeasurementSession: NSObject, ARSessionDelegate { var arView: ARSCNView! private var startAnchor: ARAnchor? private var endAnchor: ARAnchor? func placePoint(at screenPoint: CGPoint) -> MeasurementPoint? { // Raycast from screen to 3D world space guard let query = arView.raycastQuery( from: screenPoint, allowing: .estimatedPlane, alignment: .any ) else { return nil } guard let result = arView.session.raycast(query).first else { return nil } let worldPosition = result.worldTransform.columns.3 // position in meters return MeasurementPoint( position: SIMD3(worldPosition.x, worldPosition.y, worldPosition.z), confidence: result.targetAlignment == .horizontal ? .high : .medium ) } func calculateDistance(from start: MeasurementPoint, to end: MeasurementPoint) -> Measurement<UnitLength> { let diff = end.position - start.position let distanceMeters = Double(simd_length(diff)) return Measurement(value: distanceMeters, unit: .meters) } } A common mistake is not accounting that raycast works best on well-textured surfaces. A white wall produces poor SLAM tracking, causing AR markers to drift.
Displaying the Measurement in AR
func addMeasurementLine(from start: SIMD3<Float>, to end: SIMD3<Float>, distance: String) { let midpoint = (start + end) / 2 // Line between points let lineNode = SCNNode(geometry: createCylinder(from: start, to: end)) // Label with distance at midpoint let labelNode = SCNNode(geometry: SCNText(string: distance, extrusionDepth: 0.001)) labelNode.position = SCNVector3(midpoint.x, midpoint.y + 0.02, midpoint.z) labelNode.scale = SCNVector3(0.005, 0.005, 0.005) labelNode.constraints = [SCNBillboardConstraint()] // always face the camera sceneRoot.addChildNode(lineNode) sceneRoot.addChildNode(labelNode) } Reference Object Approach for Photo Measurement
Without AR—an object of known size in the frame is needed. A bank card (85.6 × 53.98 mm) is a convenient reference:
// Android: measurement via reference object class ReferenceObjectMeasurer { fun measureWithCard(bitmap: Bitmap, cardBoundingBox: RectF, objectBoundingBox: RectF): MeasurementResult { // Real card dimensions val cardRealWidth = 85.6f // mm val cardRealHeight = 53.98f // Pixels → mm val pixelsPerMmHorizontal = cardBoundingBox.width() / cardRealWidth val pixelsPerMmVertical = cardBoundingBox.height() / cardRealHeight // Perspective distortion correction (simplified) val correctionFactor = estimatePerspectiveCorrection( cardBoundingBox, imageDimensions = bitmap.width to bitmap.height ) return MeasurementResult( widthMm = (objectBoundingBox.width() / pixelsPerMmHorizontal) * correctionFactor, heightMm = (objectBoundingBox.height() / pixelsPerMmVertical) * correctionFactor, accuracy = MeasurementAccuracy.MODERATE // ±5-10% without calibration ) } } Card detection in the frame is done via ML Kit Object Detection or a custom YOLOv8 model (easy to train on 500 card photos in various conditions).
Process: From Idea to Release
- Analytics — study business requirements, audience devices, required accuracy.
- Design — choose architecture: native ARKit/ARCore or cross-platform, define measurement method (LiDAR/SLAM/monocular depth).
- Implementation — develop MVP with basic UI (two points, line), integrate CoreML/ML Kit, configure calibration.
- Testing — verify accuracy on 10+ devices under different shooting conditions, A/B tests.
- Deployment — prepare for App Store and Google Play release, documentation, TestFlight/Firebase Distribution.
| Stage | Duration |
|---|---|
| Analytics | 1–2 days |
| Design | 1–2 days |
| MVP Implementation | 3–5 days (one platform) |
| Full solution (iOS+Android) | 1–2 weeks |
| Testing and Deployment | 3–5 days |
What's Included in the Work
- Architectural documentation and API description
- Integration with your CRM/backend via REST or GraphQL
- Training your team on using the feature
- 3 months of technical support
- Access to source code (with modification rights)
- Certificates from Apple and Google (if required)
We are certified Apple and Google developers. We guarantee measurement accuracy in compliance with App Store Review Guidelines (Section 4.2/5.1). Over 5 years, we have delivered 30+ projects in e-commerce, construction, and healthcare.
Common Implementation Mistakes
- Ignoring device support without LiDAR—users get zero accuracy.
- Lack of perspective distortion calibration when using reference objects.
- Using standard depth models without fine-tuning on the domain.
- Not following Apple's in-app purchase guidelines (if the feature is paid) — StoreKit 2.
Evaluate your project—write to us. Get a consultation on method selection and implementation timeline.
This article references monocular depth estimation and Apple ARKit documentation.







