Skip to main content

OptoCalib

Lightweight ArUco-locked perspective alignment and Δ E₇₆ colorimetric calibration for scientific and industrial computer vision.

optocalib solves two major challenges in smartphone-based optical sensing (microfluidics, LAMP/PCR assays, water quality strips, agriculture leaf colorimetry, and industrial QC):

  1. Perspective & Scale Drift: Automatically locks onto 4 printed ArUco markers (IDs 0–3) and rectifies skewed images in <5 ms.
  2. Ambient Lighting Bias: Normalizes illumination using a built-in white reference patch and quantifies color accuracy via perceptual Δ E₇₆ and CIELAB ((L^, a^, b^*)).

Quick Start

import cv2
from optocalib import calibrate_image, measure_roi_lab, generate_calibration_card

# 1. Generate a printable calibration template
generate_calibration_card("my_lab_mat.png")

# 2. Calibrate a skewed/unevenly lit photo
img = cv2.imread("sample_photo.jpg")
result = calibrate_image(img)

print("Locked:", result["aruco_locked"])
print("Delta-E76 Improved:", result["delta_e_before"], "->", result["delta_e_after"])

# 3. Measure perceptual CIELAB color in any ROI
lab_values = measure_roi_lab(result["image"], box=(145, 145, 199, 295))
print("CIELAB:", lab_values)

Metadata

Release files for optocalib-lab 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for optocalib-lab 0.1.0
File Size Uploaded Provenance Actions
optocalib_lab-0.1.0.tar.gz 3.3 kB Without provenance Details for optocalib_lab-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for optocalib-lab 0.1.0
File Interpreter ABI Platform Actions
optocalib_lab-0.1.0-py3-none-any.whl Python 3 none any Details for optocalib_lab-0.1.0-py3-none-any.whl

Total release size: 7.3 kB

Release files / optocalib_lab-0.1.0.tar.gz

Download URL optocalib_lab-0.1.0.tar.gz
Size 3.3 kB
Tags Source
SHA-256 checksum
How to use checksums
ae8630240c8632fa6dc2ecd70629c22b3516fc6963791b2910e7639254d5baf0
BLAKE2b-256 checksum
How to use checksums
8714a6e60568a810dd4174d1c5a9bfcf21e9a9410bd43018f4b2436b5b022ef5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.6

Release files / optocalib_lab-0.1.0-py3-none-any.whl

Download URL optocalib_lab-0.1.0-py3-none-any.whl
Size 3.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
bf31d939f092c729d4f3dddd05f1fc99fd8cfa015adc273cb4ca8c57bc58cd5b
BLAKE2b-256 checksum
How to use checksums
268cdc387d3286317580505a2cd985cd7ab2490b8de96b5aaceb78baa87b3e03
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.6

Security for optocalib-lab 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page