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.8.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.8-cp313-cp313-win_amd64.whl (4.8 MB view details)

Uploaded CPython 3.13Windows x86-64

openlpt-2.1.8-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.8-cp313-cp313-macosx_15_0_arm64.whl (5.1 MB view details)

Uploaded CPython 3.13macOS 15.0+ ARM64

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

Uploaded CPython 3.12Windows x86-64

openlpt-2.1.8-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.8-cp312-cp312-macosx_15_0_arm64.whl (5.1 MB view details)

Uploaded CPython 3.12macOS 15.0+ ARM64

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

Uploaded CPython 3.11Windows x86-64

openlpt-2.1.8-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.8-cp311-cp311-macosx_15_0_arm64.whl (5.1 MB view details)

Uploaded CPython 3.11macOS 15.0+ ARM64

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

Uploaded CPython 3.10Windows x86-64

openlpt-2.1.8-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.8-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.8.tar.gz.

File metadata

  • Download URL: openlpt-2.1.8.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.8.tar.gz
Algorithm Hash digest
SHA256 a4945f0158dbe46b52032a5e3be7577fdee8f3940592c2174d1876198b9e2f8c
MD5 6bb4d2026a6352d5f6dfe875c9071f3b
BLAKE2b-256 b96090d9a64eb36bfa186830df1c561405d67df1790383b889a03a228505419e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: openlpt-2.1.8-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.8-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 7e819b4c9446642d33769c16bf66bd1cf9e9482e2d49165d1df7d6f7b955efa8
MD5 6bf644765933a582ad626edc64de43a0
BLAKE2b-256 5b74351e274a7ee20fe3cbc571364796c22c38ffdd81fbb3096590396c109fbe

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for openlpt-2.1.8-cp313-cp313-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 b28e7bf7b4ab26d6a9c8b091aa4d2b0b7df55c329eeba4905cbf77c859b7c40d
MD5 edcbc5ce40c560fe84c2408855c77a54
BLAKE2b-256 e9a9682725c4bb92cb48f5f5913a943819be709e307b40a0e56735bf36d7e359

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for openlpt-2.1.8-cp313-cp313-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 b8cc9b01d51f4c0c07c17ff2433e1d483e6c24099f13d79332ff35ac45790c43
MD5 45ef6d14e2d53a55cffcda0ab48fe519
BLAKE2b-256 bac79a529097ee261c8e5f91f75d92f832c2307d5ef5386a68e5332d5ae83caa

See more details on using hashes here.

File details

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

File metadata

  • Download URL: openlpt-2.1.8-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.8-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 98c257f0f366f61375426e55d5876ecfb06a78fae810d95c26e56460030ae3b6
MD5 e86ea3d32bfa9cf720bb3fc70493e09b
BLAKE2b-256 ae1ddde114a99749179503cebabf8c78c0e642c704ae4100e7acf5dcb24eaf62

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for openlpt-2.1.8-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 efa543328f3050f7f6f4c62721d48b6e560347c0ba2bde94d331d485ad19cc00
MD5 c03056fa543672d474832311cd9151b9
BLAKE2b-256 ad11c9c6f2fac87f14e80ae0e6f5bef0ee5bf35d0519b46b815376c499a49d03

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for openlpt-2.1.8-cp312-cp312-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 a2707b09820936f321c1bd144b2fff80942e4522e70af7d218bd3b40dae8be26
MD5 115545e45bb44cb8e7e85b64188ee1f0
BLAKE2b-256 13f4b8bb824f530e0a58d558fe5390ce71f1ed663329a7d6eb68428deaf8bd78

See more details on using hashes here.

File details

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

File metadata

  • Download URL: openlpt-2.1.8-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.8-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 7f471e7b63739435d9f43a731fb7ee2979cbc215809c4c9aabcfceb82829135d
MD5 a19a76870b8d5d87a603c16ff850db6c
BLAKE2b-256 39cb5f25c6f0b4fc128435dc908dbb008ed9da17c81876288be107ab39797e7c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for openlpt-2.1.8-cp311-cp311-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 ffdfe7b9f0cb8ffc941e501839a4415721c858919cc4f21f6ae21995129e59a7
MD5 3a96be6d2f8961f3d2af5940aa310031
BLAKE2b-256 ff919bce891ea9e33b89b60cc40ff57346052e0f444640ee0ae306310ee677c6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for openlpt-2.1.8-cp311-cp311-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 b87e62fb1228d92c63ecdb3344771cc1b43b1123d82dd5d470df99f2994e10f7
MD5 cb00d99c5b8f91b0d2e9c1c6a63525fb
BLAKE2b-256 a662069981673db21d85ca6312f3838fe863d85130bfee82bccbaa926f172dc7

See more details on using hashes here.

File details

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

File metadata

  • Download URL: openlpt-2.1.8-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.8-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 a3bd2ae05ea33be11ef741e81b6ea41dd86ff06d271eaa7c35861b8d45d53311
MD5 c71f06e2ecafa8b30527f48d4726f8a3
BLAKE2b-256 478894564cc69b4cafb3ea29d74b36b77ac533e7de3522a1bcadf4b5a2e71b53

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for openlpt-2.1.8-cp310-cp310-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 1a79b942f8cba1b96a95793f9862057cefae503507e23695610c5df1ef045f0c
MD5 48ea68a69ccd6b20c62508ba6d0e2099
BLAKE2b-256 2950f05f479ae5ce9a146c45a65f8b7e624bb6fff7db1abd49661cbf276a89e2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for openlpt-2.1.8-cp310-cp310-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 4caf387f011bf09701283c3c1a109244ec32f9f8d42123c9c182f992fe7ade2b
MD5 2928cd1c3031c6412c5239a68b5785ef
BLAKE2b-256 6c9b19861311c78b347122dd08537803dd785202edaf7fbd833e2d50b02f6095

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