Measured, not guessed
Reconstruction bakes real-world scale into the model, and the library reports it. A tissue box, scanned on an iPhone 16 Pro Max:
Tape measure22 × 11 × 12.5 cm
Model, from
onDimensions23.5 × 12.7 × 13.8 cmThe extra height is tissue poking out of the top.
How it works
- Detect. Frame the object and fit the bounding box.
- Capture. Walk around it in guided passes. Three at different heights is Apple's recommendation.
- Reconstruct. Photogrammetry runs on device. No upload, no account.
- Use it. A USDZ, plus its width, height and depth in metres.
Requirements
- iPhone 12 Pro or newer (LiDAR)
- iOS 17+
- React Native 0.79+ with the New Architecture
Expo works too, via the bundled config plugin. Check support at runtime with ObjectCaptureSession.isDeviceSupported().
Quick start
import {
ObjectCaptureView,
ObjectCaptureSession,
PhotogrammetrySession,
} from 'react-native-object-capture';
// 1. Scan
<ObjectCaptureView imagesDirectory="Images/" checkpointDirectory="Snapshots/" style={{ flex: 1 }} />
await ObjectCaptureSession.startDetection();
await ObjectCaptureSession.startCapturing();
// 2. Reconstruct on device, and get the true size
PhotogrammetrySession.addDimensionsListener(({ width, height, depth }) =>
console.log(`${width} × ${height} × ${depth} m`));
await ObjectCaptureSession.finishSession();
await PhotogrammetrySession.startReconstruction({
imagesDirectory: 'Images/',
checkpointDirectory: 'Snapshots/',
outputPath: 'Outputs/model.usdz',
});