← Projects

Python · Rock images

pyRockImageLab

pyRockImageLab (pyrockimagelab) crops, orthorectifies, stitches, and mosaics geological core photographs.

  • Version0.1.1
  • LicenseAGPL-3.0 or later
  • Python3.10+
pyRockImageLab logo

Overview

pyRockImageLab turns core photographs into clean, measurable images. It starts from a low-resolution photo of a whole core box: you pick the four corners of each core segment, and the tool cuts it out and straightens it into an orthorectified strip. It then stitches high-resolution close-up photos along that segment into one detailed mosaic. Corner picks are saved, so a later run can start from the same picks.

Hand samples, outcrop photos, and machine-learning identification are planned later.

Key features

01

Crop and orthorectify

Pick four corners on a box photo and get a straight, orthorectified core segment.

02

Stitch and mosaic

Stitch high-resolution close-ups along a segment into one mosaic.

03

Reusable picks

Corner picks are saved, so a later run can start from the same corners.

04

Browser app, notebook, command line

A browser app (pyrockimagelab-app), a worked example notebook on a small example core, and a pyrockimagelab command.

Browser app

Run pyrockimagelab-app and it opens in your web browser, with two jobs.

Crop core-box photo: click the corners of each core section in a core-box photo, and the app saves each section as a straightened image labelled with its depth.
Stitch close-up photos: join close-up photos along one core section into one long high-resolution image.

Installation

pip install pyrockimagelab

Start the app with pyrockimagelab-app; it opens in your web browser.

License and citation

Cite

Lai, L.S.-H. (2026) pyRockImageLab, Zenodo, https://doi.org/10.5281/zenodo.23656974.

GNU Affero General Public License 3.0 or later.

Next project SubsurfiX SubsurfiX takes you from a folder of well logs to a 3D property model you can simulate on, with flow, heat and CO₂ storage simulation in one Rust engine.