A mobile-first web toolkit for capturing and logging water meter readings β with automatic EXIF metadata extraction, GPS-based timezone detection, OCR digit recognition, and cloud storage integration.
An in-browser OCR tool that lets you swipe across meter numbers to extract digits automatically.
- Swipe-to-select β draw your finger across the meter display; a translucent band tracks your path
- Smart cropping β on release, the region is cropped from the full-resolution original image (not the downscaled display), upscaled 2Γ, and preprocessed with grayscale conversion, contrast stretching, and binarization
- Tesseract.js OCR β runs entirely in the browser with no server, no API key, and no cost; character whitelist locked to
0123456789., page segmentation set to single text line mode - Editable results β OCR output appears in an editable field with a confidence percentage so the user can verify or correct before submitting
- Visual feedback β green translucent band while swiping, dashed bounding box with corner markers on release, crop preview in a slide-up panel
- Mobile-optimized interface works on iOS and Android
- Upload photos from camera or photo library
- Support for JPEG, PNG formats
- Automatic EXIF metadata extraction
- Touch-friendly image manipulation (pinch zoom, pan, rotate)
- Automatic GPS coordinate extraction from photo metadata
- Smart timezone detection using Geoapify API
- Displays latitude, longitude, and hemispheric references
- Real-time timezone recommendation based on location
- Visual confirmation with green notification
- Three automatic modes:
- EXIF datetime: Uses photoβs original timestamp
- Capture time: For browser camera photos (< 10 seconds old)
- Manual entry: Prompts user for old photos without metadata
- Timezone-aware UTC conversion
- Dual display: Original time (local) and UTC time
- Single meter or compound meter support
- Flexible units: Gallons, Liters, Cubic Feet, Cubic Meters
- Organization ID, Device ID, and Meter Name fields
- Structured JSON output with all metadata
- Local/OneDrive Save: Downloads files to iOS Files app
- User selects destination (OneDrive, iCloud Drive, etc.)
- Saves both image and JSON metadata
- Two-step process for iOS compatibility
- SharePoint Integration (optional):
- Direct upload to configured SharePoint folder
- Azure AD authentication with SSO support
- Batch upload (image + JSON)
- Pre-configured for:
/sites/MarlinProductEngineering2/Shared Documents/Mobile/EXIF
- iOS Debug Console: Real-time debugging visible on-screen
- Comprehensive console logging
- Error handling with user-friendly messages
- No external dependencies except CDN libraries
| File | Description |
|---|---|
index.html |
Meter OCR tool β swipe-to-select + Tesseract.js digit recognition |
exif-extractor.html |
EXIF extraction tool β photo metadata, GPS, timezone, meter readings, JSON export |
README.md |
This file |
LICENSE |
MIT License |
CHANGELOG.md |
Version history |
CONTRIBUTING.md |
Contributor guidelines |
SHAREPOINT_SETUP.md |
Azure AD app registration for SharePoint uploads |
TIMEZONE_DEBUG_GUIDE.md |
Debugging GPS timezone detection |
-
Fork or clone this repository
git clone https://github.com/jahrling/EXIFtest.git
-
Enable GitHub Pages
- Go to repository Settings β Pages
- Select
mainbranch and root folder - Save
- Access your tools
- OCR Tool:
https://jahrling.github.io/EXIFtest/ - EXIF Tool:
https://jahrling.github.io/EXIFtest/exif-extractor.html - Bookmark or add to home screen on mobile
- Open
index.htmlon your phone - Tap the camera icon to upload or take a meter photo
- Swipe your finger across the meter numbers β a green band follows your path
- When you lift your finger, a dashed bounding box and crop preview appear
- Tap Read Numbers to run OCR
- Review the extracted digits (editable) and confidence score
- Tap Redo to re-swipe, or β© to undo
The tool applies the following transforms before OCR to maximize accuracy:
Original crop β 2Γ upscale β Grayscale β Contrast stretch β Binary threshold β Tesseract
Tesseract configuration:
- Language:
eng - Character whitelist:
0123456789. - Page segmentation mode:
7(single text line)
- Get close β fill the frame with the meter display
- Good lighting β avoid shadows across the digits
- Swipe tightly β follow the number row closely; a smaller region means less noise
- Straight angle β shoot the meter face-on when possible
- Open
exif-extractor.htmlon your phone - Tap to upload or take a meter photo
- Review extracted GPS and timestamp data
- Enter meter details (Org ID, Device ID, meter name, reading)
- Select timezone (auto-detected if GPS available)
- Tap Save Image & JSON to download files
The Geoapify API key is pre-configured with 3,000 free requests per day.
How it works:
- Photo with GPS β Automatic timezone detection
- Green notification appears: βπ Timezone Detected from GPSβ
- Dropdown auto-updates to correct timezone
To enable SharePoint uploads:
- Register Azure AD Application at portal.azure.com
- Configure API Permissions:
Files.ReadWrite.All,Sites.ReadWrite.All - Add Client ID to
exif-extractor.html(line ~740) - Update Target Folder in
sharePointConfigobject
π See <SHAREPOINT_SETUP.md> for detailed instructions.
- Open the app in Safari
- Tap the Share button
- Select βAdd to Home Screenβ
- Tap βAddβ
- Open the app in Chrome
- Tap the three-dot menu
- Select βAdd to Home screenβ
- Tap βAddβ
The app will appear on your home screen like a native app.
{
"filename": "IMG_1234.jpg",
"orgId": "ORG123",
"deviceId": "DEV456",
"meterName": "Building A Main",
"meterType": "single",
"meterReadings": {
"reading1": 12345.67,
"units": "gallons",
"reading2": 67890.12
},
"OffsetTimeOriginal": "UTC-06:00",
"timestamp_utc": "2024-01-15T20:30:45.000Z",
"DateTimeOriginal": "2024-01-15T14:30:45.000Z",
"gps": {
"latitude": 41.878100,
"latitudeRef": "N",
"longitude": -87.629800,
"longitudeRef": "W",
"gpsVersionID": "2.2.0.0"
}
}- Pure HTML/CSS/JavaScript β no build process required
- Single-file applications β easy to deploy and maintain
- Progressive Web App (PWA-ready) β can be added to home screen
- 100% client-side β no data leaves the browser (except optional SharePoint upload and Geoapify timezone lookup)
| Library | Used In | Purpose |
|---|---|---|
| exif-js | EXIF tool | EXIF metadata extraction |
| Tesseract.js v5 | OCR tool | In-browser OCR engine |
| MSAL.js | EXIF tool | Microsoft authentication (optional) |
- Geoapify Reverse Geocoding API β timezone detection from GPS coordinates
- Microsoft Graph API β SharePoint file upload (optional)
- β iOS Safari 14+
- β Android Chrome 80+
- β Desktop Chrome, Edge, Firefox, Safari
- No data collection β all processing happens in browser
- No server backend β direct client-to-API communication
- OCR runs locally β Tesseract.js processes images entirely on-device
- OAuth 2.0 β secure authentication for SharePoint
Added:
index.htmlβ Swipe-to-select OCR tool for reading meter digits- Tesseract.js integration (fully in-browser, no API key, no cost)
- Touch-based swipe path drawing with visual feedback
- Full-resolution crop from original image with 2Γ upscale
- Image preprocessing pipeline (grayscale, contrast stretch, binarization)
- Editable OCR result field with confidence percentage
- Dark mobile-first UI with JetBrains Mono + Outfit typography
exif-extractor.htmlβ Photo metadata extraction and meter reading logger- GPS coordinate extraction and timezone detection
- Single and compound meter support
- JSON export with structured metadata
- SharePoint integration (optional)
- Image zoom, pan, and rotate
Problem: OCR returns garbled text or low confidence
- Ensure good lighting and a straight-on angle
- Swipe tightly along the digit row β avoid including extra text or graphics
- Try the βRedoβ button and swipe more precisely
Problem: Tesseract takes a long time to load
- First load downloads the OCR engine (~2-4 MB over CDN); subsequent runs in the same session are instant
Problem: Swipe doesnβt register
- Make sure youβre swiping on the image area, not the header or panel
Problem: GPS location detected but timezone doesnβt update
- Check the debug panel (black console at bottom)
Problem: βSave to SharePointβ button doesnβt appear
- Azure AD Client ID must be configured (see <SHAREPOINT_SETUP.md>)
Problem: Files wonβt open on iOS
- HTML files must be accessed via a URL (GitHub Pages), not from the Files app
- Integrate OCR results into the EXIF/JSON export flow
- Add serial number / meter ID recognition
- Offline support via service worker
- Batch processing for multiple photos
- Export to CSV / Excel
- Power Automate integration for SharePoint workflows
MIT License β see for details.