Skip to main content

OpenLPT - Open-source Lagrangian Particle Tracking GUI

GitHub Stars Python Version License PyPI Downloads

OpenLPT is a powerful, user-friendly open-source software for 3D Lagrangian Particle Tracking (LPT), designed for experimental fluid dynamics and flow visualization. Developed by the Ni Research Lab at Johns Hopkins University (JHU), it provides a comprehensive GUI-based workflow for high-precision particle tracking and reconstruction.


🚀 Key Capabilities

  • 3D Particle Tracking: Robust Lagrangian tracking (LPT) and Shake-the-Box (STB) methods.
  • Multi-Camera Calibration: Easy-to-use tools for wand and plate calibration (intrinsic & extrinsic parameters).
    • Note: The current calibration implementation assumes no refraction. For experimental setups involving observation windows, it is critical that the cameras are oriented as close to the surface normal (orthogonal) as possible.
  • Cross-Platform: Full support for Windows, macOS, and Linux.
  • Performance: High-performance C++ core with Python Python bindings for flexibility and speed.

Keywords: Lagrangian Particle Tracking (LPT), Shake-the-Box (STB), 3D Flow Visualization, PIV, Particle Reconstruction, Multi-camera Calibration, Experimental Fluid Dynamics, JHU Ni Research Lab.


Quick Start

1. Graphical User Interface (GUI)

# Launch the interactive GUI
openlpt-gui

2. Command Line Interface (CLI)

# Run STB tracking directly with a config file
openlpt path/to/config.txt

# Show image preprocessing CLI help
openlpt preprocess --help

3. Python API

import openlpt as lpt

# Run tracking programmatically
lpt.run('path/to/config.txt')

# Or launch GUI from within a script
lpt.launch_gui()

Demo

https://github.com/user-attachments/assets/60579007-4f24-4989-8b36-3de2224c9797


Features

  • User-friendly interface in python
  • Lagrangian particle tracking for multiple objects (point-like particles, spherical particles, etc.)
  • Support stereomatching with multiple cameras (at least 2)
  • Include multiple test cases for users to test and understand the code
  • Better structure for adding new functions

Installation

We provide automated scripts that set up everything for you (including Conda, environment, and dependencies).

  1. Download the code:

    git clone https://github.com/JHU-NI-LAB/OpenLPT_GUI.git
    cd OpenLPT_GUI
    
  2. Run the Installer:

    • Windows: Double-click install_windows.bat (Or run in terminal: install_windows.bat)

    • macOS: Run in terminal:

      bash install_mac.command
      
    • Linux: Run in terminal:

      bash install_linux.sh
      
  3. Launch the GUI: After installation, simply run:

    openlpt-gui
    

Method 2: Direct Pip Installation (Easiest)

You can install OpenLPT directly from PyPI:

  • For GUI Support (Recommended):
    pip install "openlpt[gui]"
    
  • For CLI-only:
    pip install "openlpt"
    

Method 3: Manual Installation (Click to expand)

If you prefer to set up the environment manually:

  1. Prerequisites:

    • Miniforge or Anaconda
    • C++ Compiler (Visual Studio 2022 for Windows, Clang for macOS/Linux)
  2. Create Environment and Install:

    # Create environment
    conda create -n OpenLPT python=3.10
    conda activate OpenLPT
    
    # Build and install the package
    pip install .
    

Troubleshooting

Problem Solution
Windows: Build fails Install VS Build Tools and Win11 SDK
macOS: omp.h not found See macOS OpenMP Fix section below
macOS: Architecture python -c "import platform; print(platform.machine())"
Linux: Permissions Use chmod +x or sudo
All: Stale cache Delete build/ folder and retry
Installation: Build isolation If compilation fails due to network, try pip install . --no-build-isolation

macOS OpenMP Fix

If you get fatal error: 'omp.h' file not found:

export CC="$CONDA_PREFIX/bin/clang"
export CXX="$CONDA_PREFIX/bin/clang++"
export CPPFLAGS="-I$CONDA_PREFIX/include"
export LDFLAGS="-L$CONDA_PREFIX/lib -lomp"
pip install -e .

Samples and Tests

Please see the sample format of configuration files, camera files and image files in /test/test_STB or /test/test_STB_Bubble.

To run the sample:

  1. Open OpenLPT GUI.
  2. Load the project configuration from the sample folders.
  3. Click 'Run tracking'.

CLI Image Preprocessing

Use openlpt preprocess to convert TIFF image lists, direct TIFF files, or Phantom CINE files into processed TIFF outputs plus OpenLPT image lists.

Auto-detect cameras from a data root

openlpt preprocess \
  --input-root I:/VONSET/Data/20230123/T2 \
  --frames 0 999

--input-root auto-detects cameras in natural order. It first looks for CINE files in ROOT/Cam1/*.cine, ROOT/Cam2/*.cine, ... (case-insensitive directory names are fine), and also supports flat roots such as ROOT/cam1.cine, ROOT/cam2.cine. If --output-dir is omitted in this mode, output defaults to ROOT/imgFile.

TIFF list preprocessing

openlpt preprocess \
  --input-list cam1_images.txt \
  --input-list cam2_images.txt \
  --output-dir processed_tiffs

CINE preprocessing on a cluster

openlpt preprocess \
  --input-root /scratch/run01 \
  --frames 0 999 \
  --background mean

You can still use direct --cine paths when needed:

openlpt preprocess \
  --cine /scratch/cam1.cine \
  --cine /scratch/cam2.cine \
  --frames 0 999 \
  --output-dir /scratch/preprocessed \
  --background mean

Mean background, invert, and output image lists

openlpt preprocess \
  --input-list cam1_images.txt \
  --output-dir processed_tiffs \
  --background mean \
  --bg-count 50 \
  --bg-stride 5 \
  --invert

Parallel processing with multiple workers

openlpt preprocess \
  --input-list cam1_images.txt \
  --input-list cam2_images.txt \
  --output-dir processed_tiffs \
  --workers 4

Use --workers 0 to use all available CPU cores, which is convenient for cluster jobs:

openlpt preprocess \
  --cine /scratch/cam1.cine \
  --frames 0 999 \
  --output-dir /scratch/preprocessed \
  --workers 0

Processed TIFFs are written under OUTPUT_DIR/camN/, and per-camera image lists are written as OUTPUT_DIR/camN_image_list.txt.

For --input-root, TIFF camera folders under the root are also auto-detected and processed in natural camera order. TIFF root mode currently expects per-camera subdirectories; flat TIFF roots are not auto-grouped.

In the GUI preprocessing panel, use Generate CLI below Process Image (Batch Export) to create a command from the current GUI settings. When all loaded CINE files share a common ROOT/CamN/ layout, the generated command prefers --input-root ROOT and uses ROOT/imgFile rather than imgFile_processed.


Citation

If you use OpenLPT in your research, please cite our publications:

  • Tan, S., Salibindla, A., Masuk, A.U.M. and Ni, R., 2020. Introducing OpenLPT: new method of removing ghost particles and high-concentration particle shadow tracking. Experiments in Fluids, 61(2), p.47.
  • Tan, S., Zhong, S. and Ni, R., 2023. 3D Lagrangian tracking of polydispersed bubbles at high image densities. Experiments in Fluids, 64(4), p.85.

License

This repository contains a mix of original code and MATLAB Coder-generated files under a MathWorks Academic License.

⚠️ Restricted Paths (MATLAB Coder-generated)

The following paths contain code generated by MATLAB Coder and are NOT covered by the general MIT/Open-source license of this repository:

  • /src/srcObject/BubbleCenterAndSizeByCircle
  • /src/srcObject/BubbleCenterAndSizeByCircle/CircleIdentifier.cpp
  • /src/srcObject/BubbleResize
  • /inc/libObject/BubbleCenterAndSizeByCircle
  • /inc/libObject/CircleIdentifier.h
  • /inc/libObject/BubbleResize

📜 Terms and Conditions

For the paths listed above:

  • ACADEMIC INTERNAL OPERATIONS ONLY: Usage is restricted to teaching, academic research, and course requirements.
  • NO Commercial Use: Government, commercial, or other organizational use is NOT permitted.
  • Header Preservation: Do not modify or remove the "Academic License" header comments in these files.
  • No Sublicensing: These files are not sublicensed under this repository's open-source license.
  • Redistribution: If you redistribute this repository, you must keep the original Academic License headers in the generated files.
  • Modification: If you need to modify the generated code, you must hold a valid MathWorks MATLAB Coder license.

All other files in this repository are original work and are distributed under the MIT License (see LICENSE).


Contact & Contribution

  • Issues: Please report bugs or request features via GitHub Issues.
  • Contact: For questions, please contact szhong12@jhu.edu or tanshiyong84@gmail.com.
  • Organization: Ni Research Lab, Johns Hopkins University.
  • Support: If you find this tool helpful, please give us a ⭐ on GitHub!

Metadata

Release files for openlpt 2.2.5

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

Source distribution (sdist)

Source distribution for openlpt 2.2.5
File Size Uploaded Provenance Actions
openlpt-2.2.5.tar.gz 5.7 MB Without provenance Details for openlpt-2.2.5.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for openlpt 2.2.5
File Actions
openlpt-2.2.5-cp313-cp313-win_amd64.whl CPython 3.13 CPython 3.13 Windows x86-64 Details for openlpt-2.2.5-cp313-cp313-win_amd64.whl
openlpt-2.2.5-cp313-cp313-manylinux_2_28_x86_64.whl CPython 3.13 CPython 3.13 Linux glibc 2.28+ x86-64 Details for openlpt-2.2.5-cp313-cp313-manylinux_2_28_x86_64.whl
openlpt-2.2.5-cp313-cp313-macosx_15_0_arm64.whl CPython 3.13 CPython 3.13 macOS 15.0+ ARM64 Details for openlpt-2.2.5-cp313-cp313-macosx_15_0_arm64.whl
openlpt-2.2.5-cp312-cp312-win_amd64.whl CPython 3.12 CPython 3.12 Windows x86-64 Details for openlpt-2.2.5-cp312-cp312-win_amd64.whl
openlpt-2.2.5-cp312-cp312-manylinux_2_28_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.28+ x86-64 Details for openlpt-2.2.5-cp312-cp312-manylinux_2_28_x86_64.whl
openlpt-2.2.5-cp312-cp312-macosx_15_0_arm64.whl CPython 3.12 CPython 3.12 macOS 15.0+ ARM64 Details for openlpt-2.2.5-cp312-cp312-macosx_15_0_arm64.whl
openlpt-2.2.5-cp311-cp311-win_amd64.whl CPython 3.11 CPython 3.11 Windows x86-64 Details for openlpt-2.2.5-cp311-cp311-win_amd64.whl
openlpt-2.2.5-cp311-cp311-manylinux_2_28_x86_64.whl CPython 3.11 CPython 3.11 Linux glibc 2.28+ x86-64 Details for openlpt-2.2.5-cp311-cp311-manylinux_2_28_x86_64.whl
openlpt-2.2.5-cp311-cp311-macosx_15_0_arm64.whl CPython 3.11 CPython 3.11 macOS 15.0+ ARM64 Details for openlpt-2.2.5-cp311-cp311-macosx_15_0_arm64.whl
openlpt-2.2.5-cp310-cp310-win_amd64.whl CPython 3.10 CPython 3.10 Windows x86-64 Details for openlpt-2.2.5-cp310-cp310-win_amd64.whl
openlpt-2.2.5-cp310-cp310-manylinux_2_28_x86_64.whl CPython 3.10 CPython 3.10 Linux glibc 2.28+ x86-64 Details for openlpt-2.2.5-cp310-cp310-manylinux_2_28_x86_64.whl
openlpt-2.2.5-cp310-cp310-macosx_15_0_arm64.whl CPython 3.10 CPython 3.10 macOS 15.0+ ARM64 Details for openlpt-2.2.5-cp310-cp310-macosx_15_0_arm64.whl

Total release size: 81.3 MB

Release files / openlpt-2.2.5.tar.gz

Download URL openlpt-2.2.5.tar.gz
Size 5.7 MB
Tags Source
SHA-256 checksum
How to use checksums
63a1129a7168fc5b5a97d02917902217d8291538ffe674c3d5df98f3bee46c59
BLAKE2b-256 checksum
How to use checksums
f1e98bdc03fc6d14e5693211a63a2f44ad160372ecb188734592d2bcca1b65b1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / openlpt-2.2.5-cp313-cp313-win_amd64.whl

Download URL openlpt-2.2.5-cp313-cp313-win_amd64.whl
Size 6.0 MB
Tags CPython 3.13 Windows x86-64
SHA-256 checksum
How to use checksums
a6c85f3df41c6b54c9ae0bea3693d9b241907c671a8755b451578cdcd3b6949e
BLAKE2b-256 checksum
How to use checksums
07418c2f4869bde762be867649006e10fd4643cde5d1aac1bbed40d86f98ebf4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / openlpt-2.2.5-cp313-cp313-manylinux_2_28_x86_64.whl

Download URL openlpt-2.2.5-cp313-cp313-manylinux_2_28_x86_64.whl
Size 6.6 MB
Tags CPython 3.13 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
bdf7f5e81a121159d89dd2dc651a8fc5728c19ae3f00d7d43189def32b5c96b2
BLAKE2b-256 checksum
How to use checksums
72f1e6169203878b88dd952a26f39fa326cd89ae824a5dd49e81c2ffaf1cbc8e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / openlpt-2.2.5-cp313-cp313-macosx_15_0_arm64.whl

Download URL openlpt-2.2.5-cp313-cp313-macosx_15_0_arm64.whl
Size 6.3 MB
Tags CPython 3.13 macOS 15.0+ ARM64
SHA-256 checksum
How to use checksums
224a5411afbbe1f036875d6a60f7ca3c09e7a25f2b62b03e32ce02dc98d5e0a2
BLAKE2b-256 checksum
How to use checksums
4e6a0278c16c2b428e6c28bd6b7633bf602d027d9a5559e08ba6404f49cdbc3b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / openlpt-2.2.5-cp312-cp312-win_amd64.whl

Download URL openlpt-2.2.5-cp312-cp312-win_amd64.whl
Size 6.0 MB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
7a30640f52d298e3d8fe1fbcfcb1b49ec691eca649db38f4a760082e8180ec58
BLAKE2b-256 checksum
How to use checksums
79690e707f2baba2833b5cec6ded21c244a06ba3f3a8e17ed41fbd547a61d287
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / openlpt-2.2.5-cp312-cp312-manylinux_2_28_x86_64.whl

Download URL openlpt-2.2.5-cp312-cp312-manylinux_2_28_x86_64.whl
Size 6.6 MB
Tags CPython 3.12 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
a416b403e002e877eee52333cf6258648afccda61cf31ba85ddd81b2f2e9fa9f
BLAKE2b-256 checksum
How to use checksums
fe431082996b86cada18c40a264e83abe9c20a9b024b2fb9899000183e1fedbe
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / openlpt-2.2.5-cp312-cp312-macosx_15_0_arm64.whl

Download URL openlpt-2.2.5-cp312-cp312-macosx_15_0_arm64.whl
Size 6.3 MB
Tags CPython 3.12 macOS 15.0+ ARM64
SHA-256 checksum
How to use checksums
878dab02912e442f2a88c137d1464159540086ffc99a1e423fdbe2ca38436fc1
BLAKE2b-256 checksum
How to use checksums
b823ca17ddd811796f78499dfc4c2a40dda5dbd79e65a07a4178def58ea9eca2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / openlpt-2.2.5-cp311-cp311-win_amd64.whl

Download URL openlpt-2.2.5-cp311-cp311-win_amd64.whl
Size 6.0 MB
Tags CPython 3.11 Windows x86-64
SHA-256 checksum
How to use checksums
3479630801fd7a1484706b1ea197360ec7e693b18a76d07f43c0542396158c70
BLAKE2b-256 checksum
How to use checksums
6a5d31649544d7556798df01c070df50be4d51d7daf8907bfdcfaa071dee4e69
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / openlpt-2.2.5-cp311-cp311-manylinux_2_28_x86_64.whl

Download URL openlpt-2.2.5-cp311-cp311-manylinux_2_28_x86_64.whl
Size 6.6 MB
Tags CPython 3.11 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
506df7169bd933f68f4f9bd26074febbf6b11246f0cd00ecb51975303f0f396d
BLAKE2b-256 checksum
How to use checksums
a6447a0566555eb230922d53e1af8dfa5dcfad3ae0bbce41ba0f312ea3edc049
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / openlpt-2.2.5-cp311-cp311-macosx_15_0_arm64.whl

Download URL openlpt-2.2.5-cp311-cp311-macosx_15_0_arm64.whl
Size 6.3 MB
Tags CPython 3.11 macOS 15.0+ ARM64
SHA-256 checksum
How to use checksums
1169d53c7e1422254120aa2b03d1e3346b5461d8e04ac2ed8bbf1fd4e6a8898c
BLAKE2b-256 checksum
How to use checksums
f265b7d640fccf89d90c7af72840ab3332472ce2a7c461c30690b950eb8d3431
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / openlpt-2.2.5-cp310-cp310-win_amd64.whl

Download URL openlpt-2.2.5-cp310-cp310-win_amd64.whl
Size 6.0 MB
Tags CPython 3.10 Windows x86-64
SHA-256 checksum
How to use checksums
57ba13a19580e01137e633bcded2753e1134f1c67724024ba898acd5680ad3c4
BLAKE2b-256 checksum
How to use checksums
c98d03c18e681cd1317e4cc575e47a800a4c487a1baf63330667c7188443ae88
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / openlpt-2.2.5-cp310-cp310-manylinux_2_28_x86_64.whl

Download URL openlpt-2.2.5-cp310-cp310-manylinux_2_28_x86_64.whl
Size 6.6 MB
Tags CPython 3.10 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
e7414fe70caf3d802aeed60dffa70315e19b850319439b81a33c7b6e64aabd84
BLAKE2b-256 checksum
How to use checksums
397cf70930132d5d79774ccd19338ce404fd3e1dd293655dacae45a65b0e361c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / openlpt-2.2.5-cp310-cp310-macosx_15_0_arm64.whl

Download URL openlpt-2.2.5-cp310-cp310-macosx_15_0_arm64.whl
Size 6.3 MB
Tags CPython 3.10 macOS 15.0+ ARM64
SHA-256 checksum
How to use checksums
94b3575aecdab574f3341500d559e74416c24fa913eed91d3370a6cb4d639cf1
BLAKE2b-256 checksum
How to use checksums
ee1855b5c64f31ca45ae4bd4cb8838f9b9fd158f4868b83891da13800bfba874
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Security for openlpt 2.2.5

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