← Projects

Python · Rock images

pyRockImageLab

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

DOI License

Python versions PyPI version PyPI downloads conda-forge version conda downloads

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

Python 3.10 or newer. Install from PyPI or conda-forge:

pip install pyrockimagelab
conda 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 Automated workflows for subsurface geological analysis and reservoir modeling, from well-log QC to flow and heat simulation, with a Rust engine and a Python interface.