Skip to main content

Open-source Lagrangian Particle Tracking (LPT) with GUI and CLI

Project description

OpenLPT - Open-source Lagrangian Particle Tracking GUI

GitHub Stars Python Version License

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

[!TIP] Ensure you have activated your environment before running these commands: conda activate OpenLPT (On Windows, we recommend using Command Prompt (CMD) as PowerShell may have execution policy restrictions).

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

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

Method 1: One-Click Installation (Recommended for developers)

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'.

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!

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

openlpt-2.1.7.tar.gz (4.1 MB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

openlpt-2.1.7-cp313-cp313-win_amd64.whl (4.8 MB view details)

Uploaded CPython 3.13Windows x86-64

openlpt-2.1.7-cp313-cp313-manylinux_2_28_x86_64.whl (5.3 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.28+ x86-64

openlpt-2.1.7-cp313-cp313-macosx_15_0_arm64.whl (5.1 MB view details)

Uploaded CPython 3.13macOS 15.0+ ARM64

openlpt-2.1.7-cp312-cp312-win_amd64.whl (4.8 MB view details)

Uploaded CPython 3.12Windows x86-64

openlpt-2.1.7-cp312-cp312-manylinux_2_28_x86_64.whl (5.3 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.28+ x86-64

openlpt-2.1.7-cp312-cp312-macosx_15_0_arm64.whl (5.1 MB view details)

Uploaded CPython 3.12macOS 15.0+ ARM64

openlpt-2.1.7-cp311-cp311-win_amd64.whl (4.8 MB view details)

Uploaded CPython 3.11Windows x86-64

openlpt-2.1.7-cp311-cp311-manylinux_2_28_x86_64.whl (5.3 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.28+ x86-64

openlpt-2.1.7-cp311-cp311-macosx_15_0_arm64.whl (5.1 MB view details)

Uploaded CPython 3.11macOS 15.0+ ARM64

openlpt-2.1.7-cp310-cp310-win_amd64.whl (4.8 MB view details)

Uploaded CPython 3.10Windows x86-64

openlpt-2.1.7-cp310-cp310-manylinux_2_28_x86_64.whl (5.3 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.28+ x86-64

openlpt-2.1.7-cp310-cp310-macosx_15_0_arm64.whl (5.1 MB view details)

Uploaded CPython 3.10macOS 15.0+ ARM64

File details

Details for the file openlpt-2.1.7.tar.gz.

File metadata

  • Download URL: openlpt-2.1.7.tar.gz
  • Upload date:
  • Size: 4.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for openlpt-2.1.7.tar.gz
Algorithm Hash digest
SHA256 b19a531b0d7e57e866045dfdb933923d3fb8bbafd4e76b4f59e92bd20f8edd0e
MD5 72faf75721c1547a2f8a15eba4bdd99d
BLAKE2b-256 99a8481d6b12d5e1fb40efea629d8a0d5882ba538b88ff2e612958f3978e68e0

See more details on using hashes here.

File details

Details for the file openlpt-2.1.7-cp313-cp313-win_amd64.whl.

File metadata

  • Download URL: openlpt-2.1.7-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 4.8 MB
  • Tags: CPython 3.13, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for openlpt-2.1.7-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 7bcd3c1bd5de669a0dc4005a24bba887cd92ac7fc5db218a819a962d0a5621bd
MD5 eb7940ba77c2584e3df377b9525cdef0
BLAKE2b-256 a154faedd015b442270bb752ba05f5d37deb1cf32b20dc2954935035e4670011

See more details on using hashes here.

File details

Details for the file openlpt-2.1.7-cp313-cp313-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for openlpt-2.1.7-cp313-cp313-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 38512d9b25c33662ed3dc4f4372ecb3a3d0411a230bbfc3a53b82fe7bdd16223
MD5 12b97e0cfa947d0344f31b4c50b4dc44
BLAKE2b-256 ef3425ad0d07002122add96f3db8ebe5cc1fa3952f6224d5170c9ccafbaa92d5

See more details on using hashes here.

File details

Details for the file openlpt-2.1.7-cp313-cp313-macosx_15_0_arm64.whl.

File metadata

File hashes

Hashes for openlpt-2.1.7-cp313-cp313-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 6c9bb8cf122a0690eac18b77a839d98bc7ed53374a666de5837e73d2b608ef7a
MD5 7fb16bf583facfed509cf0ab03d29bf3
BLAKE2b-256 b2ce6f79f66913262ed4b2f52749ba752b75f74ce0815b9afe7f311e90544f36

See more details on using hashes here.

File details

Details for the file openlpt-2.1.7-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: openlpt-2.1.7-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 4.8 MB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for openlpt-2.1.7-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 fdd85e102373618ce7fbbaf11565c6c6e1b6f2fb53588023a826084e779140f7
MD5 36a8650d391939bc7e0734ca691f742e
BLAKE2b-256 6323759dccfab49b9284c7d325577ab4185ff8affd70cc354e151c1cc24708fb

See more details on using hashes here.

File details

Details for the file openlpt-2.1.7-cp312-cp312-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for openlpt-2.1.7-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 422b08971d6f94fdb6a75580e33d7dd07050731ef0829277a0a15e76c6fe606f
MD5 e680272032cff46a7b648a2f6c16154b
BLAKE2b-256 7bc41bf7369a56c6894a738f73f636f0e733d9113b359912b9d5e0628933cb49

See more details on using hashes here.

File details

Details for the file openlpt-2.1.7-cp312-cp312-macosx_15_0_arm64.whl.

File metadata

File hashes

Hashes for openlpt-2.1.7-cp312-cp312-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 bc278c301e1b9b242fbfab820035521f5abff769278b211cb5c79551ec9cac54
MD5 7866577908d34f6136d807e8ff006f37
BLAKE2b-256 c77198ae5d8f83afefe4493c649d9a2c2587858f95b2a0a8a5f21fc6dc3334b0

See more details on using hashes here.

File details

Details for the file openlpt-2.1.7-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: openlpt-2.1.7-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 4.8 MB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for openlpt-2.1.7-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 451e21ea81d900159a3bccfcb7ef92cc7b38eb46a0437c9c8eb8407d61c6750a
MD5 bc3ca7a3681e9a3e313f1a9cf2789cd6
BLAKE2b-256 79a5e4b7948745a4e103454222557eb9f902f839569afb528c648871b89ae830

See more details on using hashes here.

File details

Details for the file openlpt-2.1.7-cp311-cp311-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for openlpt-2.1.7-cp311-cp311-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 e53ef3d445b002244daa7a3960c5459cb71fdd20a737afa8e893892ce57a9505
MD5 18c693d9c6c096c268a2b79c3b64bcf1
BLAKE2b-256 b520d33e81f30ded969b1c7297297cd2c7d637c93ce1c0f4a2e1e241741e00cb

See more details on using hashes here.

File details

Details for the file openlpt-2.1.7-cp311-cp311-macosx_15_0_arm64.whl.

File metadata

File hashes

Hashes for openlpt-2.1.7-cp311-cp311-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 62f8a5a25168302d1a4353350f46697be846aaa617ec26817e16c9e9c665b00d
MD5 490c2312ef319b789fa130adf5ed1a48
BLAKE2b-256 b0200b049c2c366e805e25bc5df1f1759d4b9e1841195a2e4f663ce844cef3d5

See more details on using hashes here.

File details

Details for the file openlpt-2.1.7-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: openlpt-2.1.7-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 4.8 MB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for openlpt-2.1.7-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 10216add2c01c690fe98fede696ea638ff76895f87f09fee576f83df9cfa1c78
MD5 94096e6f069ffc263d367d8bba924a20
BLAKE2b-256 894c37f0a6decacad3f04182dc89494b4504cad68c929e2f71c24a8916dd8c3a

See more details on using hashes here.

File details

Details for the file openlpt-2.1.7-cp310-cp310-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for openlpt-2.1.7-cp310-cp310-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 41addf773cbff46d7de88f327dc680c938b860855c92de4e296dd99ec3f8639c
MD5 fcd9dd895915062be7484b756e35da6d
BLAKE2b-256 6b14f4afda8274d8ebe99886c67ec744be6242eecb2039b5caf3f525f505b489

See more details on using hashes here.

File details

Details for the file openlpt-2.1.7-cp310-cp310-macosx_15_0_arm64.whl.

File metadata

File hashes

Hashes for openlpt-2.1.7-cp310-cp310-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 9157ecd7e0617603898ef6555051e76c099691a717f1ba964310885697451fd6
MD5 69611abcc38d6ec49ce8fd9690515e2b
BLAKE2b-256 1cb5ff2031e7c8ad16b11a681f7cd86921f303f348ab5a227dfabb0ecb40bf1f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page