Documentation

Technical guide for configuring and using RealityExtract for automated data capture.

1. Overview

RealityExtract is an Android application for automated optical character recognition (OCR) of tagged displays and instruments. It uses hashtag markers (e.g., #1#, #2#) to identify measurement points and continuously captures their numeric values.

Key Features

  • Tag-based identification - Place hashtag markers next to displays for automatic detection
  • On-device OCR - Deep learning-based engine runs entirely on-device, no network required
  • Auto-correction - Automatically finds optimal preprocessing settings for each tag
  • Configurable sampling - Set capture intervals from 500ms to several seconds
  • CSV export - Export captured data with timestamps for analysis
  • Debug capture - Diagnostic data for troubleshooting OCR issues

2. Quick Start

  1. Install the app - Download and install the APK from the
  2. Create a project - Open the app and create a new project
  3. Place tag markers - Print or write hashtag markers (e.g., #1#) and place them next to the displays you want to capture
  4. Scan for tags - From the project screen, tap "Scan for Tags". The app detects visible tags and guides you through configuring each tag's properties (name, value range, LED format)
  5. Start capture - Tap "Start Capture". The app calibrates tag positions, then continuously reads and records values
  6. Export - Export the captured data as CSV for analysis

3. Projects & Sessions

Projects

A project represents a specific setup or measurement configuration. Each project stores:

  • Tag mappings with per-tag properties (value range, LED display format)
  • Sampling interval
  • Preprocessing settings
  • Calibration data (tag positions and value regions)
  • Auto-correction results

Sessions

A session is a single capture run within a project. Each session contains:

  • Timestamped readings for each tag
  • Start and end times
  • Statistics (total readings, null rates, etc.)
  • Optional debug data

4. Calibration Process

Calibration is the process of detecting tag markers and determining where to read values from. It consists of several phases:

Calibration Phases

1. DETECTING

The app scans the camera feed for hashtag markers. Each tag must be detected in multiple consecutive frames to be confirmed. The tag's bounding box is averaged across detections for stability.

2. VALIDATING (with Auto-Correction)

If auto-correction is enabled, the app tests different preprocessing settings for each tag to find the optimal configuration. See the Auto-Correction section for details.

3. CALIBRATED

Calibration is complete. The app stores the tag positions and value regions, and is ready to start capture.

Value Region Detection

For each detected tag, the app determines where the numeric value is located. This can happen in two ways:

  • Automatic detection - The OCR engine detects numeric text near the tag and uses that bounding box as the value region
  • Fallback region - If no value is detected during calibration, a default region is calculated relative to the tag position (approximately 1.5x tag width, 2.5x tag height)

5. Auto-Correction

Auto-correction automatically finds the best preprocessing settings for each tag's value region. This is particularly useful when different displays require different image processing to be read reliably.

Auto-Correction can be enabled/disabled per project in the capture settings (gear icon). It is enabled by default.

How It Works

  1. After tag detection, the app enters a validation phase
  2. For each tag, it attempts to read the value using the current preprocessing preset
  3. After 5 attempts, if the success rate is below 70%, it moves to the next preset
  4. If the success rate is above 90%, it immediately selects that preset
  5. After testing all presets (or reaching the 120-second timeout), it selects the best-performing preset
  6. The selected preset is stored as the tag's preprocessing override

Preset Cycling Order

The app first tries with no preprocessing (default), then cycles through these presets in order. LED/inverted presets are tested first since they're most effective for digital displays:

#Preset NameDescription
0defaultNo preprocessing (baseline)
1led_basicLED mode + binary + invert
2inverted_onlyBinary + invert (no LED mode)
3led_claheLED mode + CLAHE + binary + invert
4inverted_claheCLAHE + binary + invert
5light_claheCLAHE with clip limit 2.0
6medium_claheCLAHE with clip limit 4.0
7strong_claheCLAHE with clip limit 6.0
8binary_onlyBinary thresholding only
9clahe_binaryCLAHE + binary thresholding
10maximumFull enhancement (all options)

Expected Value Range (Min/Max)

You can optionally set minimum and maximum expected values for each tag. Values outside this range are rejected both during capture and during calibration validation.

How It Works

  1. Set min and max values for a tag in the tag properties (tap a tag to edit, e.g., min=0, max=100 for a percentage display)
  2. During capture, OCR readings outside the range are rejected and not recorded
  3. During calibration validation, out-of-range readings are counted as failures for preset selection
  4. This helps filter out misreadings (e.g., "1234" when the display shows "12.34")

When to Use

  • When you know the expected value range (e.g., 0-100 for percentages, 0-50 for temperatures)
  • When decimal points are hard to detect (LED displays often show "2345" instead of "23.45")
  • To reject obviously incorrect readings during capture

Note: Tags without min/max constraints accept any numeric value. Combine with LED Display Format for best results on LED/LCD displays.

Important: Auto-correction evaluates presets by running the on-device OCR engine against each preprocessing configuration to measure recognition success rate.

6. Preprocessing Settings

Preprocessing uses OpenCV to enhance images before OCR. All preprocessing happens on-device.

Available Settings

CLAHE (Contrast Limited Adaptive Histogram Equalization)

Enhances local contrast in images. The clip limit controls how much contrast enhancement is applied (higher = more enhancement, but may amplify noise).

Settings: claheEnabled, claheClipLimit (1.0-8.0)

Binary Thresholding

Converts the image to black and white using adaptive thresholding. Useful for high-contrast displays or when removing background noise.

Setting: binaryThresholdEnabled

LED Mode

Optimized processing for LED/LCD displays. Extracts bright pixels on dark backgrounds and applies specialized filtering for segment-style displays.

Setting: ledModeEnabled

Invert Colors

Inverts black and white after thresholding. Used for displays with light text on dark backgrounds (common in LED displays).

Setting: invertForLed

Processing Pipeline

When preprocessing is enabled, the following steps are applied in order:

  1. Convert to grayscale
  2. Apply CLAHE (if enabled)
  3. Apply binary thresholding (if enabled)
  4. Invert colors (if enabled)
  5. Send to OCR engine

7. OCR Modes

The app uses a deep learning-based recognition engine that runs entirely on-device, with specialized preprocessing for different display types.

On-Device OCR Engine

General-purpose OCR that works well with most printed text and digital displays. Uses a deep learning model trained on diverse text styles. The engine includes:

  • Text detection - Locates text regions in the image
  • Text recognition - Converts detected regions to text
  • Preprocessing pipeline - Applies CLAHE, thresholding, and LED mode as needed

LED/LCD Display Support

For LED and LCD displays (digital scales, meters, industrial equipment), use the LED mode preprocessing option. This extracts bright pixels on dark backgrounds and applies specialized filtering for segment-style displays.

Tip: Enable Auto-Correction in capture settings (gear icon) to automatically find the best preprocessing settings for each tag, including LED mode when appropriate.

8. Debug Data Capture

When enabled, debug data capture collects diagnostic information to help troubleshoot OCR issues. This data is uploaded to the cloud and can be viewed in the admin dashboard.

What's Captured

  • Calibration images - Raw and annotated frames showing detected tags
  • Capture images - Sample frames during capture with overlay regions
  • Cropped regions - Before/after preprocessing images for each tag
  • Device logs - Logcat output filtered to app-specific tags
  • Session metadata - Frame dimensions, timing, tag metrics, issues

Viewing Debug Data

Debug sessions can be viewed in the admin dashboard at /admin/debug. Each session shows:

  • Session summary and status
  • Detected issues (null values, low confidence, dimension mismatches)
  • Per-tag statistics and auto-correction results
  • Image samples with before/after preprocessing comparison
  • Filterable device logs

Privacy note: Debug data includes camera images and is stored in Firebase Storage associated with your user account. Only enable debug capture when troubleshooting, and delete sessions when no longer needed.

9. Auto-Stop Timer

The auto-stop timer lets you set a maximum duration for a capture session. When the timer expires, the capture stops automatically. This is useful for unattended recordings or when you know exactly how long you need to capture data.

How to Use

  1. On the project screen, locate the duration slider above the "Start Capture" button
  2. Slide to select a preset duration: 5 min, 10 min, 15 min, 30 min, 1h, 2h, or 4h
  3. Leave the slider all the way to the left for "No limit" (manual stop only)
  4. Start the capture — the top bar displays an "Auto-stop: Xm" or "Auto-stop: Xh" indicator

Pause & Resume

If you pause a timed capture, the remaining time is preserved. When you resume, the timer continues from where it left off rather than restarting.

Note: The auto-stop duration is saved per project. You can change it before each session without affecting other project settings.

10. Web Dashboard

The web dashboard at realityextract.com provides tools for viewing and analyzing captured data. Sign in with your account to access your projects and sessions.

Session View

Each session page displays captured readings with interactive chart and table views. The following features are available:

Time Range Filtering

Filter displayed data by preset time windows (last 5/15/30 minutes, last hour) or define a custom date range. Useful for focusing on specific periods during long capture sessions.

Statistics Panel

View calculated statistics for each data column including minimum, maximum, mean, standard deviation, count, and null count. Statistics update automatically when time range changes.

Series Visibility

Click on legend items to show or hide individual data series. Hidden series appear with strikethrough text in the legend. Useful when comparing specific columns.

Threshold Alerts

Configure minimum and maximum threshold values per column. Thresholds appear as dashed horizontal lines on the chart, making it easy to identify values outside expected ranges.

Session Comparison

Overlay data from another session in the same project. Comparison data appears as dashed lines with lighter colors. Sessions are aligned by start time for easy comparison.

Annotations

Add timestamped notes to mark important events or observations. Annotations appear as green markers on the chart. Click a marker or annotation in the panel to highlight it.

Brush Zoom

Drag the brush control below the chart to zoom into a specific data range. Use the Reset Zoom button to return to the full view.

Export Options

Export data as CSV (raw or processed) or save the current chart view as a PNG image for reports and presentations.

Data Processing

The processing panel provides algorithms to clean and smooth captured data:

  • Interpolate NULL values using neighboring data points
  • Correct outlier values that deviate significantly from neighbors
  • Apply moving average smoothing to reduce noise
  • Remove sudden spikes based on rate of change

Note: Processing configurations are saved per session and automatically reapplied when you return.

11. Subscription & Plans

RealityExtract offers a free tier and a Pro subscription to fit different usage needs.

Available Plans

Free

1 hour of capture time per month. Ideal for trying the app and occasional use.

Pro

60 hours of capture time per month, plus priority support. Designed for regular professional use.

Top-Up Packs

Pro subscribers can purchase additional capture hours in top-up packs. Top-up hours never expire and stack on top of the monthly allowance.

How to Subscribe

  • Web: From the web dashboard, go to the Subscription page to manage your plan and purchase top-ups via Stripe
  • Android: From the Android app, subscription options are available through Google Play Billing

Note: Your subscription and capture time are synced across the app and web dashboard. Usage resets on the first of each month.

12. Troubleshooting

Tags not detected

  • Ensure hashtag markers are clearly visible and well-lit
  • Use high-contrast markers (black on white or white on black)
  • Keep the camera steady during calibration
  • Ensure markers are within the camera's focus range

High null rates during capture

  • Enable auto-correction to find optimal preprocessing settings
  • For LED displays, try enabling LED mode preprocessing
  • Increase the sampling interval (slower but more reliable)
  • Ensure consistent lighting (avoid reflections and glare)
  • Enable debug capture to diagnose specific issues

Incorrect values read

  • Check the cropped region images in debug data - ensure the display is fully visible
  • If the value region is cut off, recalibrate or adjust tag placement
  • For decimal numbers, ensure the decimal point is clearly visible
  • Try different preprocessing presets

Dimension mismatch warnings

  • This occurs when the camera resolution changes after calibration
  • Recalibrate the project to update value regions for the current resolution
  • Avoid switching between portrait and landscape during a session

RealityExtract Documentation v2.5

Download · Debug Dashboard · Home