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

[!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.2.1.tar.gz (5.2 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.2.1-cp313-cp313-win_amd64.whl (6.0 MB view details)

Uploaded CPython 3.13Windows x86-64

openlpt-2.2.1-cp313-cp313-manylinux_2_28_x86_64.whl (6.5 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.28+ x86-64

openlpt-2.2.1-cp313-cp313-macosx_15_0_arm64.whl (6.3 MB view details)

Uploaded CPython 3.13macOS 15.0+ ARM64

openlpt-2.2.1-cp312-cp312-win_amd64.whl (6.0 MB view details)

Uploaded CPython 3.12Windows x86-64

openlpt-2.2.1-cp312-cp312-manylinux_2_28_x86_64.whl (6.5 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.28+ x86-64

openlpt-2.2.1-cp312-cp312-macosx_15_0_arm64.whl (6.3 MB view details)

Uploaded CPython 3.12macOS 15.0+ ARM64

openlpt-2.2.1-cp311-cp311-win_amd64.whl (6.0 MB view details)

Uploaded CPython 3.11Windows x86-64

openlpt-2.2.1-cp311-cp311-manylinux_2_28_x86_64.whl (6.5 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.28+ x86-64

openlpt-2.2.1-cp311-cp311-macosx_15_0_arm64.whl (6.3 MB view details)

Uploaded CPython 3.11macOS 15.0+ ARM64

openlpt-2.2.1-cp310-cp310-win_amd64.whl (6.0 MB view details)

Uploaded CPython 3.10Windows x86-64

openlpt-2.2.1-cp310-cp310-manylinux_2_28_x86_64.whl (6.5 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.28+ x86-64

openlpt-2.2.1-cp310-cp310-macosx_15_0_arm64.whl (6.3 MB view details)

Uploaded CPython 3.10macOS 15.0+ ARM64

File details

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

File metadata

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

File hashes

Hashes for openlpt-2.2.1.tar.gz
Algorithm Hash digest
SHA256 48a973fb8318541a524377769090dc9f972c6a1e03107a1ff6c5a1fd19dd6d06
MD5 31aa7c85d0f04f0627db86974a21f306
BLAKE2b-256 71de96c2866a04cc0499b4d84f6491c6686abd9a951933dfc2a2b98960fd241a

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for openlpt-2.2.1-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 9f6702afb70d96a43a40ac18aa76d4508f87c95ea46accec02d5337a68bf916d
MD5 decb2c3b4192b46cca5f14aeb2079f7b
BLAKE2b-256 76ffc3f771e35496c858141b31f710b047dff867adb2d62e05f94e777e9ba57d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for openlpt-2.2.1-cp313-cp313-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 0a1f35c40c76f756ac4cde2bd1e7ccb7c6b87e6df5171e0027cea910d75a37ae
MD5 13183162481a75ef1c88613bc8666dd4
BLAKE2b-256 e7bd23fa200413335804db89acd7663d7c413ba0baea2035dc1725797a97437c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for openlpt-2.2.1-cp313-cp313-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 0b6095f8578abb928f8f3f9915eac43ad200e47ff6d48f1200da8751efaa625d
MD5 f9cccd06c26dc750fd438c41f1e8b4b3
BLAKE2b-256 d0badf611a5f52988629803748a639521b8603b27b2725ed6597740d591348f4

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for openlpt-2.2.1-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 88528c5f95b11c6cf0f48e1517fa0f8e11ba2bc922c8a1588b27111ade0d59b9
MD5 7e0cdd7b9e02671ea24598e9165f5958
BLAKE2b-256 637b55ccf12a49d1e46b5c32f8c21f79d51ae014c955e9c61de674ec7a47f9a9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for openlpt-2.2.1-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 e95b1ba9ef8ca96fb0be582401ca1c12e848b4bf0211042dd5ed0384bca9f793
MD5 a42691fd618607a8e36ddc4029878f52
BLAKE2b-256 b5ecf04a90dbecc4db92c56a3ccbb465ed47f4325305a248bf24a5085bbd9915

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for openlpt-2.2.1-cp312-cp312-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 b06ccf459e4dbc8112bc461d3333e5ecbf63bca6c9a58795674a9ad0604a88eb
MD5 3f0fc5f004737a2d0e6628b68dc61e78
BLAKE2b-256 80ad3b22e222b3f82305b3eb5d77f02526865a7bc6bf0785574d7cbd8b8f4379

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for openlpt-2.2.1-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 480c4ad5620a8cb3f6a517456f4eb94b7a2a5e6401ba8438e10087853bce86b2
MD5 952531c188f93d8f4cc2f599af4b098b
BLAKE2b-256 eaa3fa75f296395bb9738d587cfdddc65125913f7b40f5f6ced3ac91f49e3325

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for openlpt-2.2.1-cp311-cp311-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 3c68e38d5bb0e51c917331870ce7541026911f745ab493480f9c005df809d1f3
MD5 8d4aac1f06b88ba92e4b0acbd0ef0209
BLAKE2b-256 ebd0338810ffd961300a8a48b06f5417c4e0cb2866ee1447e74cb2cba2e2109d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for openlpt-2.2.1-cp311-cp311-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 d9009ba3170fb2daedbf954d22d6710bec6e3d249ac318f3ac422960456dbdda
MD5 ebf650ac582f13499a1ca38beddddee9
BLAKE2b-256 39fdf7bc2470f5e2b75dd70b5c60d0cef1fe81ee970b7a8e02840efcf71af95b

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for openlpt-2.2.1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 f0bb0a7e4f875fa88bb0a4b75c03e8624aba34ab9596346ef34b63bdcb7b5127
MD5 38adf1e8bedf17cb351277a4c5615f57
BLAKE2b-256 6ab4e37d658229f6b9a5fb336e640865a587e8209010660bbe03199e697b498d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for openlpt-2.2.1-cp310-cp310-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 562fe01f2122537615a0f633b4d980663688036c9d4e0e378e378b4ef4a7ae5c
MD5 fc992f4695bdc9b0abaf8e90dcaaf0a8
BLAKE2b-256 01ad57c8189a585d9f6ed4180cf127606a64f94ad8e1db5be9454c0b4affaac3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for openlpt-2.2.1-cp310-cp310-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 f2aa4178f9f5ece855c7671259f37151962d46bd31b4a65d407d6927c76c417e
MD5 4e568493190342fa8875e73953e9cfc5
BLAKE2b-256 cf23bf4cbeb6e44050980f39c09b9ecd33d450f942a43e08696111bd32d0f9c8

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