DEV Community

Pavan Kumar Sadashiv
Pavan Kumar Sadashiv

Posted on

OpenGalvoCal

OpenGalvoCal: Next-Generation F-Theta Lens & Galvo Distortion Calibration System

Complete Problem Analysis, Mathematical Foundations, and Modern Software Architecture Specification


1. Executive Summary & Project Vision

1.1 The Mission

Galvanometer-based ("galvo") laser systems (Fiber, CO2, UV, and MOPA) are the backbone of modern industrial marking, precision micro-machining, and artisan engraving. Despite rapid advancements in laser sources and controller hardware, the software ecosystem for optical calibration remains mired in decades-old legacy tools. The standard industry utility—EzCad's bundled CorFile / CorFile2 utility—is a fragile, closed-source, 32-bit Windows application plagued by driver conflicts, geometric bugs, proprietary binary formats, and primitive 9-point manual measurement workflows.

OpenGalvoCal is conceived as a modern, cross-platform, open-source calibration suite and software engine designed to eliminate F-theta lens distortion, galvo mirror non-linearities, and mechanical assembly misalignments. By pairing robust mathematical modeling (Thin-Plate Splines, 5th-order bivariate polynomials, and decoupled affine transforms) with automated computer vision (CV) capture via flatbed scanners or smartphone cameras, OpenGalvoCal democratizes sub-50-micron marking accuracy across any field size (from 70×70 mm up to 300×300 mm and beyond).

1.2 Core Objectives

  • Platform Independence: Native support for Windows, macOS, and Linux via a modern Rust/Tauri desktop interface and a headless CLI.
  • Driver Coexistence: Zero conflict with modern laser control suites (e.g., LightBurn, EzCad, LinuxCNC) by utilizing non-invasive capture methods and native LibUSB/WinUSB communication without driver replacement.
  • Automated Computer Vision (CV): Replace error-prone manual caliper measurements with high-precision optical scanning (sub-pixel corner detection of 81- to 225-point dot/checkerboard matrices).
  • Universal Interoperability: Direct export to JCZ binary .cor/.cor2 files, LightBurn .lbgalvo configurations, LinuxCNC kinematics tables, and an open JSON/YAML calibration schema.
  • Mathematical Correctness: True decoupling of galvo skew, mirror orthogonality, trapezoidal tilt, barrel/pincushion distortion, and galvo scale factor.

2. Root Cause Analysis: The Physics & Geometry of Galvo Distortion

To build software that corrects optical distortion, we must first model every physical mechanism contributing to beam positioning errors in a galvanometer optical scanner.

                  +-----------------------------------+
                  |         Laser Source              |
                  +-----------------+-----------------+
                                    | Beam
                                    v
                            +---------------+
                            | Galvo Mirror X| (Theta_X)
                            +-------+-------+
                                    |
                                    v
                            +---------------+
                            | Galvo Mirror Y| (Theta_Y)
                            +-------+-------+
                                    |
                                    v
                         +---------------------+
                         |   F-Theta Objective |
                         +----------+----------+
                                    |
            +-----------------------+-----------------------+
            |                       |                       |
      Flat Planar Field      Ideal Flat Beam       Distorted Field
     (Without Correction)  (True F-Theta Lens)    (Real-World Errors)
            |                       |                       |
   - Tangent Distortion    - Focal Length f       - Pincushion / Barrel
   - Spherical Defocus     - y = f * theta        - Trapezoid / Skew
   - Field Curvature       - Uniform Spot Size    - Non-linear Edge Bowing
Enter fullscreen mode Exit fullscreen mode

2.1 Optical & Kinematic Error Sources

1. Tangent Distortion (Pre-Objective / Post-Objective Geometry)

In a simple scanning system without an F-theta lens, an angular deflection $ heta$ creates a linear displacement on a flat surface proportional to the tangent of the deflection angle:
$$y = f \cdot an( heta)$$
Because $ an( heta) > heta$ for $ heta > 0$, beam velocity accelerates away from the optical center, resulting in massive pincushion distortion and non-uniform laser fluence.

2. F-Theta Lens Deviations ($y = f \cdot heta$)

An F-theta objective is specifically engineered to introduce an optical barrel distortion that cancels out the natural tangent distortion:
$$y = f \cdot heta$$
However, real-world multi-element F-theta lenses (especially budget 1064 nm fiber or 355 nm UV lenses) deviate from the theoretical linear relationship. Residual aberrations include:

  • Higher-order spherical aberrations: Causing non-linear edge bowing (the characteristic "banana shape" reported by users on 200 mm and 300 mm lenses).
  • Field curvature (Petzval curvature): Spot focal plane curves away from the flat marking surface, causing focal waist expansion and line thickening at corners.
  • Chromatic & thermal drift: Laser power absorption in the optical elements induces thermal lensing, shifting effective focal length during long jobs.

3. Mirror Separation & Parallax (Off-Axis Mirror Geometry)

Galvo mirrors $X$ and $Y$ are physically separated along the optical axis by a distance $d_{sep}$ (typically 7 to 15 mm). Because Mirror $X$ is further from the lens entrance pupil than Mirror $Y$:

  • The effective focal distance and scan angles differ between the X and Y axes.
  • Deflection along the Y axis shifts the point of incidence on the X mirror, introducing coupled cross-axis distortion ($X$ position depends non-linearly on $Y$ position).

4. Mechanical & Galvanometer Assembly Errors

  • Orthogonality Skew: The rotation axes of mirrors X and Y may not be perfectly $90.00^\circ$ perpendicular. Even a $0.2^\circ$ mechanical misalignment produces a diamond-shaped parallelogram skew across a 200×200 mm field.
  • Planar Tilt / Non-perpendicular Focal Axis: If the galvo scanhead is tilted relative to the work bed, the field projects as a keystone / trapezoid (one side wider than the opposing side).
  • Galvo Motor Non-Linearity & DAC Quantization: Galvo rotary position sensors (capacitive or optical encoders) and their analog driver boards possess small non-linearities, temperature drift, and DAC quantization steps across the 16-bit range ($-32768$ to $+32767$).

3. Comprehensive Breakdown of Legacy EzCad CorFile Failures

A critical review of the real-world experiences from hundreds of active machine operators reveals catastrophic flaws in the existing CorFile architecture:

Problem Domain Legacy EzCad / CorFile Failure Mode User Impact & Community Complaints
Driver Lock-in & Conflicts Requires exclusive proprietary JCZ LMC drivers. Incompatible with WinUSB / LibUSB used by modern platforms (LightBurn). When users switch to LightBurn, running CorFile triggers "Failed to open lmc driver" or hangs silently. Restoring requires deep driver uninstalls/reinstalls.
Platform Inflexibility 32-bit legacy Windows binary compiled in the 2000s. Relies on deprecated MFC libraries. Completely unusable on macOS or Linux without unstable virtual machines with pass-through USB latency.
Coordinate Flips & Mirroring Inverting galvos or swapping Galvo 1 / Galvo 2 in Ezcad parameters conflicts with how .cor stores coordinate orientation. Post-calibration marks are frequently inverted $180^\circ$, mirrored, or rotated $90^\circ$ (@GuyMouton, @billsouth2660, @MakerPlates). Parameter UI locks out manual changes.
Sparse Sampling (9-Point Grid) Only marks a $3 imes 3$ grid (center point + 4 edges + 4 corners). Completely insufficient for higher-order polynomial aberrations on lenses $\ge 150 ext{ mm}$. Concentric squares bow dramatically between calibration points (@otis_d, @milandestroyer6471).
Mathematical Blind Spots Assumes edge points (Points 2, 4, 6, 8) lie strictly on Cartesian axes ($X=0$ or $Y=0$). Cannot decouple or mathematically compute angular skew or parallelogram distortion from pure edge distance measurements (@imajeenyus42).
Human Measurement Error Requires measuring 9 distances with handheld digital calipers to $0.01 ext{ mm}$ precision across black tape or scrap metal. Zero-drift on calipers, parallax error, line thickness ambiguity, and manual data-entry typos ruin the calibration, requiring multi-hour retry loops.
Black-Box Proprietary Format Saves an encrypted/opaque binary .cor or .cor2 file with no human-readable inspection. Users cannot manually tweak scale or inspect distortion metrics (@Chanvgap). Corrupts field size when switching between metric and imperial units.
Security & Packaging Packed with outdated packers; flags false-positives in enterprise antivirus suites. McAfee / Windows Defender regularly quarantines or deletes CorFile.exe directly from the install directory (@MarshallCNC).
Abandonment in EzCad 3 EzCad 3 removed CorFile.exe entirely in favor of an untranslated, undocumented internal wizard. Operators upgrading to newer controllers are left stranded with no viable distortion calibration path.

4. Mathematical Architecture for Modern Calibration

OpenGalvoCal implements a dual-layer calibration model:

  1. Parametric Global Affine Transform: Resolves coordinate system alignment, scaling, offset, and mechanical orthogonality skew.
  2. Non-Parametric / High-Order Optical Transform: Models and eliminates non-linear lens aberrations across the full 2D field.
[Target Coordinate (x, y)] 
          |
          v
+-----------------------------+
| Layer 1: Affine Alignment   | --> Corrects Offset, Scale (X/Y),
| (Scale, Skew, Rotation)     |     Rotation, and Mirror Orthogonality
+--------------+--------------+
               |
               v
+-----------------------------+
| Layer 2: Optical Correction | --> Corrects Keystone/Trapezoid,
| (Polynomial / Thin-Plate)   |     Barrel/Pincushion, and Edge Bowing
+--------------+--------------+
               |
               v
[Galvo DAC Output (Vx, Vy)]
Enter fullscreen mode Exit fullscreen mode

4.1 Layer 1: Decoupled Affine Normalization

Let $(u, v) \in [-1, 1]^2$ represent normalized commanded galvo coordinates, and $(x, y) \in \mathbb{R}^2$ represent measured physical coordinates in millimeters.

The linear transformation accounts for:

  • Offset: $(x_0, y_0)$
  • Linear scaling factors: $S_x, S_y$ (pulses/mm or DAC units/mm)
  • Grid rotation: $ heta$
  • Galvo axis orthogonality skew: $\psi$

$$egin{bmatrix} x_{aff} \ y_{aff} \end{bmatrix} =
egin{bmatrix} S_x & 0 \ 0 & S_y \end{bmatrix}
egin{bmatrix} \cos heta & -\sin( heta + \psi) \ \sin heta & \cos( heta + \psi) \end{bmatrix}
egin{bmatrix} u \ v \end{bmatrix} + egin{bmatrix} x_0 \ y_0 \end{bmatrix}$$

Decoupling orthogonality $\psi$ from rotation $ heta$ is essential: rotation is simply the orientation of the workpiece or head mount, whereas skew $\psi$ represents physical non-perpendicularity of the galvanometer mirror axes.

4.2 Layer 2: Non-Linear Distortion Modeling

Option A: Bivariate 5th-Order Polynomial Surface

For lenses with standard radial and tangential distortions, the residual displacement $(\Delta x, \Delta y)$ is modeled as a 5th-order complete polynomial:

$$\Delta x(u, v) = \sum_{i=0}^{5} \sum_{j=0}^{5-i} a_{i,j} \, u^i v^j$$
$$\Delta y(u, v) = \sum_{i=0}^{5} \sum_{j=0}^{5-i} b_{i,j} \, u^i v^j$$

  • $i+j = 1$: Linear scaling and skew terms (redundant with Layer 1, held orthogonal).
  • $i+j = 2$: Trapezoidal / keystone distortion ($u^2, uv, v^2$), caused by focal plane tilt.
  • $i+j = 3$: Primary barrel / pincushion distortion ($u(u^2+v^2), v(u^2+v^2)$).
  • $i+j = 4, 5$: Higher-order peripheral bowing (critical for large $200 ext{ mm}$ and $300 ext{ mm}$ field lenses).

Option B: Thin-Plate Spline (TPS) Interpolation

For irregular or complex lens aberrations where polynomial fitting suffers from Runge’s phenomenon at the field boundaries, OpenGalvoCal applies 2D Thin-Plate Splines (TPS). Given $N$ measured calibration control points $(u_k, v_k) o (x_k, y_k)$:

$$f(u, v) = \mathbf{a}0 + a_x u + a_y v + \sum{k=1}^N w_k \, U\left(\left| (u, v) - (u_k, v_k)
ight|
ight)$$

where the radial basis kernel is $U(r) = r^2 \ln(r)$, minimizing the physical bending energy:
$$E_{bend} = \iint_{\mathbb{R}^2} \left( \left(rac{\partial^2 f}{\partial u^2}
ight)^2 + 2\left(rac{\partial^2 f}{\partial u \partial v}
ight)^2 + \left(rac{\partial^2 f}{\partial v^2}
ight)^2
ight) du \, dv$$

TPS provides perfectly smooth, infinitely differentiable $C^1$ velocity profiles across the entire scanning field, preventing galvo mirror acceleration spikes and chatter.


5. Automated Computer Vision (CV) Pipeline

Manual caliper measurement is the single largest point of human failure in laser calibration. OpenGalvoCal introduces an automated optical calibration pipeline.

+--------------------------------------------------------------------------+
|                       Automated Vision Pipeline                          |
+--------------------------------------------------------------------------+
|                                                                          |
|  1. Generate Target Vector Grid                                          |
|     - Mark dense grid (81 points: 9x9, or 225 points: 15x15)             |
|     - High-contrast fiducial marks (ChArUco / Ring-Dot array)            |
|                                                                          |
|  2. Image Acquisition                                                    |
|     - Mode A: Flatbed Scanner (Zero perspective distortion, 1200+ DPI)   |
|     - Mode B: Smartphone / DSLR Camera (Corrected via ChArUco fiducials) |
|                                                                          |
|  3. Sub-Pixel Feature Detection                                          |
|     - OpenCV Hough circles / Saddle-point corner detection               |
|     - Centroid precision < 0.05 pixels (~5 to 10 microns)                |
|                                                                          |
|  4. Coordinate Registration & Homography                                 |
|     - Perspective de-warping via known planar fiducials                  |
|     - Global coordinate frame normalization                              |
|                                                                          |
|  5. Residual Error Vector Generation                                     |
|     - Map nominal (commanded) coordinates to observed coordinates        |
|     - Generate interactive error heatmap & vector displacement map       |
|                                                                          |
+--------------------------------------------------------------------------+
Enter fullscreen mode Exit fullscreen mode

5.1 Flatbed Document Scanner Workflow (Gold Standard)

  1. The operator marks a standardized grid on a flat sheet of black anodized aluminum, black cardstock, or thermally sensitive paper.
  2. The card is placed on any standard commercial flatbed document scanner (e.g., Canon, Epson) at 600 or 1200 DPI.
  3. Because flatbed scanners use a linear optical array moved by a precision lead screw, they possess zero perspective distortion and exceptional dimensional linearity.
  4. The software automatically detects the target corners, calculates exact micron displacements for all grid points, and generates the correction matrix in under 5 seconds.

5.2 Smartphone / Camera Assisted Workflow (Zero Extra Hardware)

  1. The marked calibration sheet incorporates four corner ArUco / AprilTag fiducial markers with known physical dimensions.
  2. The user snaps a photo with any modern smartphone.
  3. OpenGalvoCal applies perspective homography inversion to eliminate camera perspective tilt, rectifies camera radial lens distortion using tag geometry, and extracts the inner laser-marked dot array.

6. Software Architecture & Implementation Specification

6.1 Technology Stack Selection

  • Core Engine & Kinematics: Rust
    • Ultra-high numerical performance, zero garbage collection pauses.
    • Type-safe mathematical operations using nalgebra.
    • Memory-safe binary serialization for legacy file formats.
  • Frontend / GUI Layer: Tauri + Svelte 5 + WebGL
    • Lightweight (<15 MB binary footprint vs. >150 MB for Electron).
    • Native OS rendering with zero web-engine bloat.
    • Interactive 2D/3D WebGL distortion vector mesh visualization.
  • Computer Vision Module: C++ / Rust (via opencv bindings)
    • Sub-pixel corner detection (cornerSubPix), ellipse fitting, and adaptive thresholding.
  • Direct Hardware Driver Interface: rusb (LibUSB)
    • Direct communication with JCZ LMCV4 / DLC boards without altering system drivers or breaking LightBurn.
+--------------------------------------------------------------------------+
|                       OpenGalvoCal Architecture                          |
+--------------------------------------------------------------------------+
|                                                                          |
|   [ User Interface Layer: Tauri + Svelte + WebGL ]                       |
|   - Interactive Wizard   - 2D/3D Error Heatmap   - Caliper Fallback UI   |
|                                                                          |
+------------------------------------+-------------------------------------+
                                     | IPC / Bridge
                                     v
+--------------------------------------------------------------------------+
|   [ Rust Core Engine ]                                                   |
|   +-----------------------+ +-----------------------+ +----------------+ |
|   | Vision & Detection    | | Math & Solver Engine  | | File Exporters | |
|   | - ChArUco / Grid CV   | | - Affine Decomposition| | - .cor / .cor2 | |
|   | - Sub-pixel Centroids | | - 5th-Order Poly Fit  | | - .lbgalvo     | |
|   | - Scanner Rectifier   | | - Thin-Plate Spline   | | - JSON / YAML  | |
|   +-----------------------+ +-----------------------+ +----------------+ |
|                                                                          |
|   +------------------------------------------------------------------+   |
|   | Hardware Communication Layer (Optional Direct Connection)         |   |
|   | - LibUSB / WinUSB abstraction                                     |   |
|   | - JCZ LMC / DLC controller protocol parser                       |   |
|   +------------------------------------------------------------------+   |
+--------------------------------------------------------------------------+
Enter fullscreen mode Exit fullscreen mode

6.2 Universal Open Calibration Schema (galvocal.json)

Unlike the closed binary .cor format, OpenGalvoCal establishes an open, human-readable JSON schema that fully documents the optical state:

{
  "$schema": "https://opengalvocal.org/schema/v1/calibration.json",
  "metadata": {
    "profileName": "Fiber_30W_175mm_Opex",
    "created": "2026-10-31T09:43:00Z",
    "softwareVersion": "1.0.0",
    "operatorNotes": "Calibrated via 1200 DPI flatbed scan on anodized aluminum"
  },
  "lensHardware": {
    "nominalFocalLengthMm": 254.0,
    "nominalFieldSizeMm": 175.0,
    "wavelengthNm": 1064,
    "mountThread": "M85x1"
  },
  "galvoConfig": {
    "axisOrientation": {
      "galvo1Axis": "X",
      "galvo2Axis": "Y",
      "invertGalvo1": false,
      "invertGalvo2": true,
      "swapXY": false
    },
    "dacResolutionBits": 16,
    "fieldLimitDac": 32767
  },
  "affineParameters": {
    "scaleFactorX": 1.00234,
    "scaleFactorY": 0.99812,
    "orthogonalitySkewDeg": 0.084,
    "rotationDeg": 0.12,
    "offsetMm": { "x": 0.15, "y": -0.08 }
  },
  "distortionModel": {
    "type": "ThinPlateSpline",
    "gridResolution": [9, 9],
    "measuredFieldSizeMm": 174.82,
    "maxResidualErrorMm": 0.018,
    "meanResidualErrorMm": 0.007,
    "controlPoints": [
      { "nominal": [-80.0, -80.0], "corrected": [-80.42, -80.38] },
      { "nominal": [0.0, -80.0], "corrected": [0.02, -80.12] },
      { "nominal": [80.0, -80.0], "corrected": [80.39, -80.41] }
    ]
  }
}
Enter fullscreen mode Exit fullscreen mode

6.3 Reverse-Engineered JCZ .cor / .cor2 Binary Compatibility

To guarantee backward compatibility with existing EzCad2, EzCad3, and LightBurn installations, OpenGalvoCal includes a complete binary packer/unpacker for JCZ correction files:

  • Format Anatomy:
    • Header Magic: Specific byte markers identifying format revision (0x43 0x4F 0x52 / COR).
    • Grid Specification: Sampling count (typically $33 imes 33$ or $65 imes 65$ interpolation matrix across full DAC range).
    • Coordinate Interleaving: Paired IEEE-754 32-bit floats or signed 16-bit integers representing delta displacements: $$\Delta X(i, j) = X_{corrected}(i, j) - X_{ideal}(i, j)$$ $$\Delta Y(i, j) = Y_{corrected}(i, j) - Y_{ideal}(i, j)$$
    • Galvo Flags: Inversion, swap, and orientation bits encoded into the header, preventing the famous "180° rotation / mirrored engraving" bug by synchronizing with user parameters.

7. Step-by-Step Modern User Workflow

[ Step 1: Laser Mark ] ---> [ Step 2: Optical Capture ] ---> [ Step 3: Solve & Review ] ---> [ Step 4: Export ]
  Generate & mark             Scan or photo of target         Automatic grid detection,       Direct export to
  high-contrast 9x9           using flatbed scanner or        residual error analysis,        .cor, .lbgalvo,
  fiducial test grid          smartphone camera               and 2D/3D distortion mesh       or open JSON
Enter fullscreen mode Exit fullscreen mode

Step 1: Calibration Target Generation & Laser Marking

  1. The user selects their nominal lens field size (e.g., 70, 110, 150, 175, 200, 300 mm) in OpenGalvoCal.
  2. The software generates a test pattern:
    • Dense Grid Mode (Vision): 81 fiducial dots with 4 unique ArUco alignment markers and a central reference crosshair.
    • Assisted Caliper Mode (Manual Fallback): 9 numbered reference circles with crosshair centers, optimized for caliper jaws.
  3. The pattern is marked using the user's current software (EzCad or LightBurn) as a 1:1 uncorrected job on scrap material (black cardstock, black masking tape, or anodized aluminum).

Step 2: High-Speed Automated Capture

  • Method A (Scanner): Place marked card on a flatbed scanner. Click "Scan & Detect".
  • Method B (Camera): Hold phone over target. The software automatically identifies corners, corrects perspective tilt, and extracts dot centers.
  • Method C (Guided Caliper Entry): If manual calipers are used, OpenGalvoCal guides the operator step-by-step with high-contrast diagrams, caliper zero-drift verification alerts, and real-time sanity checking (flagging typos and geometric contradictions).

Step 3: Analysis & Live Interactive Verification

  • OpenGalvoCal calculates the affine transformation and residual distortion field.
  • A Visual Distortion Heatmap displays:
    • Total barrel/pincushion magnitude.
    • Skew angle in degrees.
    • Maximum dimensional deviation (e.g., +1.84 mm at corner (X: 87.5, Y: 87.5)).
  • The user can inspect the simulated before/after square and circle geometry in real time.

Step 4: One-Click Export

The user clicks "Apply Calibration":

  • For LightBurn: Saves an updated .lbgalvo profile or imports directly into LightBurn device settings.
  • For EzCad2 / EzCad3: Exports a clean, valid .cor / .cor2 file with correct axis inversions already configured.
  • For Custom / Industrial: Saves standard JSON/CSV lookup tables.

8. Specific Solutions to Community Failure Modes

Community Issue / Pain Point Root Cause in Legacy Tools OpenGalvoCal Modern Solution
Marked Image Upside-Down / 90° Rotated EzCad applies .cor files using a fixed coordinate convention, ignoring user parameter invert flags (@billsouth2660, @MakerPlates). The software includes an interactive Orientation Preview. Users confirm visual orientation (top-left marker alignment) before saving; Galvo 1/Galvo 2 and Invert bits are baked consistently into the file.
"Failed to open lmc driver" EzCad CorFile cannot communicate over WinUSB drivers installed for LightBurn (@rssacnavy, @JulietTangoCustoms). OpenGalvoCal decouples marking from calibration. Marking is done via standard export files (.dxf, .svg, .lbgalvo), requiring zero driver swaps. Optional direct control uses standard multi-OS LibUSB.
Distortion Persists on Large Lenses (200/300mm) A 9-point grid is too sparse to capture 4th/5th order peripheral lens curve deviations (@otis_d, @milandestroyer6471). Supports up to 225 calibration points (15×15 matrix) using automated vision, accurately capturing high-order non-linear edge bow.
Skew / Parallelogram Not Corrected Legacy caliper method measures radial edge distances assuming points lie on axes, mathematically incapable of resolving shear angle (@imajeenyus42). True 2D coordinate registration computes independent $X$ and $Y$ displacements for every point, allowing full decomposition of non-orthogonal shear ($\psi$).
Inches vs. Metric Scaling Bug EzCad defaults to metric units internally; entering inches causes scaling to explode (@kapple5290, @camiscioni08). Strict internal unit normalization to SI standard millimeters ($1 ext{ in} = 25.400 ext{ mm}$), regardless of user display preference.
Caliper Jaw Damage & Measurement Noise Calipers slip on paper or metal; zero shifts during multi-point measurement (@lithgowlights859). Automatic flatbed scanning removes manual measurement entirely. For manual mode, automatic software prompts require re-zeroing calipers after every 3 measurements.

9. Implementation Roadmap & Project Deliverables

Phase 1: Mathematical Engine & Spec (Weeks 1 - 4)
├── Complete Rust solver (nalgebra, Thin-Plate Splines, 5th-order polynomial)
├── JCZ .cor / .cor2 binary parser and serializer
└── LightBurn .lbgalvo format generator

Phase 2: Computer Vision Core (Weeks 5 - 8)
├── Scanner image ingestion & automated DPI calculation
├── Sub-pixel corner and centroid extraction pipeline
└── Homography de-warping for mobile camera captures

Phase 3: Cross-Platform GUI (Weeks 9 - 12)
├── Tauri + Svelte desktop application
├── Interactive WebGL distortion mesh visualizer
├── Step-by-step calibration wizard (Scanner, Camera, Caliper modes)
└── Automated test suite and cross-validation against physical galvo systems

Phase 4: Open Community Launch & Ecosystem (Weeks 13+)
├── Open-source repository release (MIT / Apache 2.0)
├── Pre-compiled binaries for Windows, macOS (Universal), and Linux (.AppImage, .deb)
└── Public online lens profile repository for community-shared base calibrations
Enter fullscreen mode Exit fullscreen mode

10. Conclusion

The widespread frustration documented across the laser engraving community highlights an urgent need for modern engineering in the optical calibration space. By replacing fragile 32-bit binaries, proprietary driver dependencies, and imprecise manual calipers with rigorous mathematical transforms, cross-platform architecture, and automated computer vision, OpenGalvoCal transforms a multi-hour, error-prone ordeal into a 60-second, sub-50-micron precision workflow.

Top comments (0)