npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@andrewjohnmahar/arcore-depth

v0.1.3

Published

Small Android-only Capacitor 8 bridge for ARCore Depth DBH observations.

Readme

@andrewjohnmahar/arcore-depth

Android-only Capacitor 8 bridge for the DrawDown experimental ARCore DBH quality-control workflow.

Purpose

The 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.

It is deliberately narrow. During a short DBH sweep it:

  1. opens a native ARCore camera preview;
  2. enables Config.DepthMode.AUTOMATIC;
  3. asks the inspector to align the 1.3 m DrawDown tag with a centre crosshair;
  4. acquires ARCore 16-bit depth frames locally;
  5. finds the contiguous depth surface around the crosshair and estimates left/right trunk boundaries from the depth discontinuity;
  6. converts those boundaries back into CPU image coordinates using ARCore coordinate transforms;
  7. combines camera intrinsics with the apparent width to return compact DBH observations;
  8. discards all intermediate frames.

The 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.

Capacitor contract

The native plugin registers as:

DrawDownArCoreDepth

Methods:

checkSupport(): Promise<{
  isSupported: boolean;
  hasDepthApi: boolean;
  pluginVersion?: string;
  message?: string;
}>
startDbhSession({
  tagDictionary: 'DICT_6X6_250',
  tagId: 0,
  tagSizeCm: 10,
  targetHeightM: 1.3,
}): Promise<{ started: boolean }>
captureDbhSweep({
  durationMs: 3000,
  minObservations: 5,
  maxObservations: 10,
  retainFrames: false,
}): Promise<{
  observations: Array<{
    frontSurfaceDepthM: number;
    focalLengthXPx: number;
    trunkWidthPx: number;
    rangeSource: 'arcore_depth16';
    trackingConfidence?: number;
    boundaryConfidence?: 'high' | 'medium' | 'low';
    depthMadM?: number;
    timestampMs?: number;
  }>;
  deviceModel?: string;
  arcoreVersion?: string;
}>
stopDbhSession(): Promise<void>

This matches the DrawDownArCoreDepth adapter already prepared in DrawDown.

Installation

From a local tarball:

npm install ./drawdown-arcore-depth-0.1.1.tgz
npx cap sync android

Or, after publishing the package to a registry:

npm install @andrewjohnmahar/arcore-depth
npx cap sync android

Then import it if direct typed access is wanted:

import { DrawDownArCoreDepth } from '@andrewjohnmahar/arcore-depth';

The current DrawDown adapter can also resolve the registered native plugin by its Capacitor name.

Android requirements

  • Capacitor 8
  • Android min SDK 24+
  • ARCore-supported Android device
  • device support for the ARCore Depth API
  • Google Play Services for AR installed and current
  • camera permission

The 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().

Offline behaviour

The measurement path is local:

ARCore camera
  -> local depth map
  -> local boundary sampling
  -> compact numeric observations
  -> DrawDown on-device DBH aggregation
  -> offline sync queue

No internet connection is required for the sweep itself.

Storage behaviour

retainFrames: true is rejected by design.

The 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.

Measurement geometry

The plugin returns:

  • front-surface z-depth to the trunk around the crosshair;
  • apparent trunk width in CPU-image pixels;
  • an effective focal length along the actual measured width axis.

The DrawDown application then applies the existing GreenLens-style tangent/cylinder correction rather than treating the trunk as a flat plane.

V0.1 boundary method

This first field-test version intentionally avoids a heavy native OpenCV or neural-network dependency.

The 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.

This 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.

Field validation recommendation

For each test tree, retain:

  • authoritative tape DBH;
  • ARCore QC DBH;
  • disagreement percentage;
  • phone model and ARCore version;
  • observation count and MAD;
  • existing DrawDown inspection photo.

Test across tree size classes, bark types, light conditions, species, and several ARCore Depth-capable Android devices.

ARCore version

The Android library is currently pinned to:

implementation 'com.google.ar:core:1.54.0'

Review this pin deliberately rather than silently floating to a newer version, because measurement software should record and validate changes in the sensing stack.

Privacy / ARCore notice

Apps using ARCore need to comply with Google's ARCore user-privacy requirements. See NOTICE.md and Google's current ARCore documentation before production distribution.

License

MIT for this plugin source. Google ARCore itself is subject to Google's ARCore terms.

DrawDown field anchor (v0.1.2)

No 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.