{"_id":"@andrewjohnmahar/arcore-depth","_rev":"4-4b71a4dc46e95c0fbe13cc9b220f9565","name":"@andrewjohnmahar/arcore-depth","dist-tags":{"latest":"0.1.3"},"versions":{"0.1.0":{"name":"@andrewjohnmahar/arcore-depth","version":"0.1.0","keywords":["capacitor","android","arcore","depth","forestry","dbh"],"author":{"name":"DrawDown"},"license":"MIT","_id":"@andrewjohnmahar/arcore-depth@0.1.0","maintainers":[{"name":"andrewjohnmahar","email":"andrew@jaam.au"}],"dist":{"shasum":"29d23f5c9aaaa178f3e2ec7c80777d937b741463","tarball":"https://registry.npmjs.org/@andrewjohnmahar/arcore-depth/-/arcore-depth-0.1.0.tgz","fileCount":27,"integrity":"sha512-C+Jq1Be+nQZgBdylBdzVp1ABceDo2hrmBxi4EQ4IdmAsNQ4uomozc+jk9NdWsLq0gnf8iZUsIR46YBiIOTlrTA==","signatures":[{"sig":"MEYCIQCxYk7+ljur1eBxjhX2bvpjMNBKidp3MXSfzmIV+3mrRgIhAN1APY82NkjRX1+GrtG1AEKk3prU2xssDAXHyS8uXmww","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":62024},"main":"dist/plugin.cjs.js","_from":"file:/Users/andrewmahar/Downloads/andrewjohnmahar-arcore-depth-0.1.0.tgz","types":"dist/esm/index.d.ts","unpkg":"dist/plugin.js","module":"dist/esm/index.js","scripts":{"build":"npm run clean && tsc -p tsconfig.json && rollup -c rollup.config.mjs","clean":"rimraf dist","pack:local":"npm run build && npm pack"},"_npmUser":{"name":"andrewjohnmahar","email":"andrew@jaam.au"},"_resolved":"/Users/andrewmahar/Downloads/andrewjohnmahar-arcore-depth-0.1.0.tgz","capacitor":{"android":{"src":"android"}},"_integrity":"sha512-C+Jq1Be+nQZgBdylBdzVp1ABceDo2hrmBxi4EQ4IdmAsNQ4uomozc+jk9NdWsLq0gnf8iZUsIR46YBiIOTlrTA==","_npmVersion":"11.6.1","description":"Small Android-only Capacitor 8 bridge for ARCore Depth DBH observations.","directories":{},"_nodeVersion":"24.11.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"rimraf":"^6.0.0","rollup":"^4.0.0","typescript":"^5.8.0","@capacitor/core":"^8.0.0","@capacitor/android":"^8.0.0","@rollup/plugin-node-resolve":"^16.0.0"},"peerDependencies":{"@capacitor/core":">=8.0.0"},"_npmOperationalInternal":{"tmp":"tmp/arcore-depth_0.1.0_1787099245694_0.6729438175456319","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@andrewjohnmahar/arcore-depth","version":"0.1.1","keywords":["capacitor","android","arcore","depth","forestry","dbh"],"author":{"name":"DrawDown"},"license":"MIT","_id":"@andrewjohnmahar/arcore-depth@0.1.1","maintainers":[{"name":"andrewjohnmahar","email":"andrew@jaam.au"}],"dist":{"shasum":"38f1ceda6b28c22c151a90602daff1ea2836da22","tarball":"https://registry.npmjs.org/@andrewjohnmahar/arcore-depth/-/arcore-depth-0.1.1.tgz","fileCount":27,"integrity":"sha512-yKOacy5SfJIvPIVz3G33WbXR+ROhPy0pwAsWXfJ9HBEq8vwJt/NvwEcQD5j1yYyY6hLZiopePiyRGkw/AFJWEQ==","signatures":[{"sig":"MEYCIQD/bcTMDzqkEPCVbwxGEXc+K0uQEvfVdfdvyjlduo9NIAIhAMpYiT/pqpAbJT3PCCUqDtd7jIJVyCUXr0nW4KHdjA0M","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":62245},"main":"dist/plugin.cjs.js","_from":"file:/Users/andrewmahar/Downloads/andrewjohnmahar-arcore-depth-0.1.1.tgz","types":"dist/esm/index.d.ts","unpkg":"dist/plugin.js","module":"dist/esm/index.js","scripts":{"build":"npm run clean && tsc -p tsconfig.json && rollup -c rollup.config.mjs","clean":"rimraf dist","pack:local":"npm run build && npm pack"},"_npmUser":{"name":"andrewjohnmahar","email":"andrew@jaam.au"},"_resolved":"/Users/andrewmahar/Downloads/andrewjohnmahar-arcore-depth-0.1.1.tgz","capacitor":{"android":{"src":"android"}},"_integrity":"sha512-yKOacy5SfJIvPIVz3G33WbXR+ROhPy0pwAsWXfJ9HBEq8vwJt/NvwEcQD5j1yYyY6hLZiopePiyRGkw/AFJWEQ==","_npmVersion":"11.6.1","description":"Small Android-only Capacitor 8 bridge for ARCore Depth DBH observations.","directories":{},"_nodeVersion":"24.11.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"rimraf":"^6.0.0","rollup":"^4.0.0","typescript":"^5.8.0","@capacitor/core":"^8.0.0","@capacitor/android":"^8.0.0","@rollup/plugin-node-resolve":"^16.0.0"},"peerDependencies":{"@capacitor/core":">=8.0.0"},"_npmOperationalInternal":{"tmp":"tmp/arcore-depth_0.1.1_1787698160133_0.23675976423023304","host":"s3://npm-registry-packages-npm-production"}},"0.1.2":{"name":"@andrewjohnmahar/arcore-depth","version":"0.1.2","keywords":["capacitor","android","arcore","depth","forestry","dbh"],"author":{"name":"DrawDown"},"license":"MIT","_id":"@andrewjohnmahar/arcore-depth@0.1.2","maintainers":[{"name":"andrewjohnmahar","email":"andrew@jaam.au"}],"dist":{"shasum":"867e8beb55620637d9b211b04e3facb47095d65b","tarball":"https://registry.npmjs.org/@andrewjohnmahar/arcore-depth/-/arcore-depth-0.1.2.tgz","fileCount":27,"integrity":"sha512-PRzOLhXj07LaWjyvrEEJwKKc8G5sv4Bkqchh2SWRboRC63YzB8xnnckFTacDnzBPAz2ouJJvD5OUTFMB8weJJA==","signatures":[{"sig":"MEUCIQDcOVB3RbyxNswYGj0leKi2XokbwbHr5HlSiqagT5W6KAIgOpQuI/X5sGndi7Dyc0BX1yxU538ui47LrRWHBC4rUGk=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":62706},"main":"dist/plugin.cjs.js","_from":"file:/Users/andrewmahar/Downloads/andrewjohnmahar-arcore-depth-0.1.2.tgz","types":"dist/esm/index.d.ts","unpkg":"dist/plugin.js","module":"dist/esm/index.js","scripts":{"build":"npm run clean && tsc -p tsconfig.json && rollup -c rollup.config.mjs","clean":"rimraf dist","pack:local":"npm run build && npm pack"},"_npmUser":{"name":"andrewjohnmahar","email":"andrew@jaam.au"},"_resolved":"/Users/andrewmahar/Downloads/andrewjohnmahar-arcore-depth-0.1.2.tgz","capacitor":{"android":{"src":"android"}},"_integrity":"sha512-PRzOLhXj07LaWjyvrEEJwKKc8G5sv4Bkqchh2SWRboRC63YzB8xnnckFTacDnzBPAz2ouJJvD5OUTFMB8weJJA==","_npmVersion":"11.6.1","description":"Small Android-only Capacitor 8 bridge for ARCore Depth DBH observations.","directories":{},"_nodeVersion":"24.11.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"rimraf":"^6.0.0","rollup":"^4.0.0","typescript":"^5.8.0","@capacitor/core":"^8.0.0","@capacitor/android":"^8.0.0","@rollup/plugin-node-resolve":"^16.0.0"},"peerDependencies":{"@capacitor/core":">=8.0.0"},"_npmOperationalInternal":{"tmp":"tmp/arcore-depth_0.1.2_1787819236844_0.40130692560298376","host":"s3://npm-registry-packages-npm-production"}},"0.1.3":{"name":"@andrewjohnmahar/arcore-depth","version":"0.1.3","description":"Small Android-only Capacitor 8 bridge for ARCore Depth DBH observations.","main":"dist/plugin.cjs.js","module":"dist/esm/index.js","types":"dist/esm/index.d.ts","scripts":{"clean":"rimraf dist","build":"npm run clean && tsc -p tsconfig.json && rollup -c rollup.config.mjs","pack:local":"npm run build && npm pack"},"keywords":["capacitor","android","arcore","depth","forestry","dbh"],"license":"MIT","author":{"name":"DrawDown"},"peerDependencies":{"@capacitor/core":">=8.0.0"},"devDependencies":{"@capacitor/core":"^8.0.0","rollup":"^4.0.0","@rollup/plugin-node-resolve":"^16.0.0","typescript":"^5.8.0","@capacitor/android":"^8.0.0","rimraf":"^6.0.0"},"unpkg":"dist/plugin.js","capacitor":{"android":{"src":"android"}},"publishConfig":{"access":"public"},"_id":"@andrewjohnmahar/arcore-depth@0.1.3","_integrity":"sha512-7INuu1J2dsf2lWViBXGt1weOWxRyUmA0VLoiJkyoIyDtiS3OPQphat/KJMARr3Z5XM9QlTuDoTi711vClnY3Wg==","_resolved":"/Users/andrewmahar/Downloads/andrewjohnmahar-arcore-depth-0.1.3.tgz","_from":"file:/Users/andrewmahar/Downloads/andrewjohnmahar-arcore-depth-0.1.3.tgz","_nodeVersion":"24.11.0","_npmVersion":"11.6.1","dist":{"integrity":"sha512-7INuu1J2dsf2lWViBXGt1weOWxRyUmA0VLoiJkyoIyDtiS3OPQphat/KJMARr3Z5XM9QlTuDoTi711vClnY3Wg==","shasum":"94b64a05164c4e72fe5a3cc53773977f3ce68fb5","tarball":"https://registry.npmjs.org/@andrewjohnmahar/arcore-depth/-/arcore-depth-0.1.3.tgz","fileCount":27,"unpackedSize":67319,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCTihyPSgvZIBz0T2x4k8liN9iFXjyKm91ys6MYLJMGnQIhANSD2maQ2qXtZgN6zvF6WkLQgnOY2QMsANwgbMrcHlKw"}]},"_npmUser":{"name":"andrewjohnmahar","email":"andrew@jaam.au"},"directories":{},"maintainers":[{"name":"andrewjohnmahar","email":"andrew@jaam.au"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/arcore-depth_0.1.3_1788165107578_0.09746711855156853"},"_hasShrinkwrap":false}},"time":{"created":"2026-08-19T00:27:25.598Z","modified":"2026-08-31T08:31:47.949Z","0.1.0":"2026-08-19T00:27:25.850Z","0.1.1":"2026-08-25T22:49:20.273Z","0.1.2":"2026-08-27T08:27:16.997Z","0.1.3":"2026-08-31T08:31:47.740Z"},"author":{"name":"DrawDown"},"license":"MIT","keywords":["capacitor","android","arcore","depth","forestry","dbh"],"description":"Small Android-only Capacitor 8 bridge for ARCore Depth DBH observations.","maintainers":[{"name":"andrewjohnmahar","email":"andrew@jaam.au"}],"readme":"# @andrewjohnmahar/arcore-depth\n\nAndroid-only Capacitor 8 bridge for the DrawDown experimental ARCore DBH quality-control workflow.\n\n## Purpose\n\nThe plugin exposes local ARCore Depth measurements to a Capacitor app without requiring cloud services, video storage, LiDAR, Cloud Anchors, Geospatial APIs, or server-side inference.\n\nIt is deliberately narrow. During a short DBH sweep it:\n\n1. opens a native ARCore camera preview;\n2. enables `Config.DepthMode.AUTOMATIC`;\n3. asks the inspector to align the 1.3 m DrawDown tag with a centre crosshair;\n4. acquires ARCore 16-bit depth frames locally;\n5. finds the contiguous depth surface around the crosshair and estimates left/right trunk boundaries from the depth discontinuity;\n6. converts those boundaries back into CPU image coordinates using ARCore coordinate transforms;\n7. combines camera intrinsics with the apparent width to return compact DBH observations;\n8. discards all intermediate frames.\n\nThe plugin does **not** calculate carbon and does **not** replace the forestry diameter tape. In DrawDown, `manualDbhCm` remains authoritative; the ARCore result is experimental QC evidence only.\n\n## Capacitor contract\n\nThe native plugin registers as:\n\n```ts\nDrawDownArCoreDepth\n```\n\nMethods:\n\n```ts\ncheckSupport(): Promise<{\n  isSupported: boolean;\n  hasDepthApi: boolean;\n  pluginVersion?: string;\n  message?: string;\n}>\n```\n\n```ts\nstartDbhSession({\n  tagDictionary: 'DICT_6X6_250',\n  tagId: 0,\n  tagSizeCm: 10,\n  targetHeightM: 1.3,\n}): Promise<{ started: boolean }>\n```\n\n```ts\ncaptureDbhSweep({\n  durationMs: 3000,\n  minObservations: 5,\n  maxObservations: 10,\n  retainFrames: false,\n}): Promise<{\n  observations: Array<{\n    frontSurfaceDepthM: number;\n    focalLengthXPx: number;\n    trunkWidthPx: number;\n    rangeSource: 'arcore_depth16';\n    trackingConfidence?: number;\n    boundaryConfidence?: 'high' | 'medium' | 'low';\n    depthMadM?: number;\n    timestampMs?: number;\n  }>;\n  deviceModel?: string;\n  arcoreVersion?: string;\n}>\n```\n\n```ts\nstopDbhSession(): Promise<void>\n```\n\nThis matches the `DrawDownArCoreDepth` adapter already prepared in DrawDown.\n\n## Installation\n\nFrom a local tarball:\n\n```bash\nnpm install ./drawdown-arcore-depth-0.1.1.tgz\nnpx cap sync android\n```\n\nOr, after publishing the package to a registry:\n\n```bash\nnpm install @andrewjohnmahar/arcore-depth\nnpx cap sync android\n```\n\nThen import it if direct typed access is wanted:\n\n```ts\nimport { DrawDownArCoreDepth } from '@andrewjohnmahar/arcore-depth';\n```\n\nThe current DrawDown adapter can also resolve the registered native plugin by its Capacitor name.\n\n## Android requirements\n\n- Capacitor 8\n- Android min SDK 24+\n- ARCore-supported Android device\n- device support for the ARCore Depth API\n- Google Play Services for AR installed and current\n- camera permission\n\nThe plugin declares ARCore and ARCore Depth as optional features so the wider DrawDown app can still install on unsupported devices. The app must runtime-gate the experimental DBH feature with `checkSupport()`.\n\n## Offline behaviour\n\nThe measurement path is local:\n\n```text\nARCore camera\n  -> local depth map\n  -> local boundary sampling\n  -> compact numeric observations\n  -> DrawDown on-device DBH aggregation\n  -> offline sync queue\n```\n\nNo internet connection is required for the sweep itself.\n\n## Storage behaviour\n\n`retainFrames: true` is rejected by design.\n\nThe plugin retains no sweep video and no routine RGB/depth frames. Only compact numeric observations are returned to DrawDown. DrawDown can continue to retain its normal single inspection photograph separately.\n\n## Measurement geometry\n\nThe plugin returns:\n\n- front-surface z-depth to the trunk around the crosshair;\n- apparent trunk width in CPU-image pixels;\n- an effective focal length along the actual measured width axis.\n\nThe DrawDown application then applies the existing GreenLens-style tangent/cylinder correction rather than treating the trunk as a flat plane.\n\n## V0.1 boundary method\n\nThis first field-test version intentionally avoids a heavy native OpenCV or neural-network dependency.\n\nThe inspector centres the tag on the crosshair. The plugin samples the local dense depth surface and walks left/right until the depth leaves the trunk-depth band. It scores boundary confidence from edge depth jumps, patch completeness, and depth MAD.\n\nThis is suitable for a controlled validation pilot against diameter tape. It is **not yet an audit-grade claim**. The purpose of the pilot is to quantify bias, MAE/RMSE, failure rates, device effects, and performance by DBH class before deciding whether to add RGB segmentation or a multi-view 3-D fit.\n\n## Field validation recommendation\n\nFor each test tree, retain:\n\n- authoritative tape DBH;\n- ARCore QC DBH;\n- disagreement percentage;\n- phone model and ARCore version;\n- observation count and MAD;\n- existing DrawDown inspection photo.\n\nTest across tree size classes, bark types, light conditions, species, and several ARCore Depth-capable Android devices.\n\n## ARCore version\n\nThe Android library is currently pinned to:\n\n```gradle\nimplementation 'com.google.ar:core:1.54.0'\n```\n\nReview this pin deliberately rather than silently floating to a newer version, because measurement software should record and validate changes in the sensing stack.\n\n## Privacy / ARCore notice\n\nApps using ARCore need to comply with Google's ARCore user-privacy requirements. See `NOTICE.md` and Google's current ARCore documentation before production distribution.\n\n## License\n\nMIT for this plugin source. Google ARCore itself is subject to Google's ARCore terms.\n\n## DrawDown field anchor (v0.1.2)\n\nNo ArUco marker is required by the native ARCore workflow. The existing RFID/NFC tree tag identifies the 1.3 m DBH plane. For the depth sweep, place the crosshair on exposed bark immediately beside the tag at the same height so the tag itself does not influence the depth boundary. Manual diameter tape remains authoritative.\n","readmeFilename":"README.md"}