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).
  • 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 from any terminal (CMD recommended on Windows)
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

# Load and run tracking programmatically
openlpt.run('path/to/config.txt')

# Or launch GUI from within a script
openlpt.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)

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

Uploaded CPython 3.13Windows x86-64

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

Uploaded CPython 3.13macOS 15.0+ ARM64

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

Uploaded CPython 3.12Windows x86-64

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

Uploaded CPython 3.12macOS 15.0+ ARM64

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

Uploaded CPython 3.11Windows x86-64

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

Uploaded CPython 3.11macOS 15.0+ ARM64

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

Uploaded CPython 3.10Windows x86-64

openlpt-2.1.6-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.6-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.6.tar.gz.

File metadata

  • Download URL: openlpt-2.1.6.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.6.tar.gz
Algorithm Hash digest
SHA256 2b531bcf6c0d1326feddd01c7ebb1d9e323139a2e5f56a1cc495949ce24abe56
MD5 dc942492e4b314ad4bf5af42bce08f40
BLAKE2b-256 ca1ef72bf52fdec81aa84cb1d9925149c15d6384bfc92c76536c7b474bc54dc2

See more details on using hashes here.

File details

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

File metadata

  • Download URL: openlpt-2.1.6-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.6-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 7456509784ef5032bb04d766a28800607bf975647177e8006e17ab328beae6c6
MD5 9e136428d0eca2420416c5d3e9be700d
BLAKE2b-256 34af851998607d5068faa83378352513548991ccfeab07388337552fd7527184

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for openlpt-2.1.6-cp313-cp313-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 44600348ecd66038336cf618e2e17e2e8e94a5177a765d4bb552996657d49bbc
MD5 23bee3585293b8571366ca53999a724e
BLAKE2b-256 bd3094910e903c916ca076d8766dffa0f080b9ddf6e18b80c33863fef7f4caa2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for openlpt-2.1.6-cp313-cp313-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 e6c7685ba588df23e8a6a9a75d3ed8eabf1eae4fe091ce19bdd002a9185979f6
MD5 a846bd212d77b4c8ac746d078fe5907c
BLAKE2b-256 9b61cba6adbd4fb6ed73e2e0e8d8fcf3dcea84c57a5b132bef8ecdeed4e90bb3

See more details on using hashes here.

File details

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

File metadata

  • Download URL: openlpt-2.1.6-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.6-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 7814d91efc75315a8b66bdcbfafb4043d251431ef6b7b9bfcad066364ab625f7
MD5 d5ba5cd4bd86fb69e40104bdd96c8576
BLAKE2b-256 f7b055bf10f2824e57bc51bd08edf12a6a7cdaeb7a0001a870830434f2a4e507

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for openlpt-2.1.6-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 b9e9cf2fe12fde5ca0ec60dd59818ff2f5f8b6640da3c9a331babb59d5000f01
MD5 53ea768a8b61fde17d72d20133435312
BLAKE2b-256 86dbe7cabd0843e2966fbf35bc3b9911fc9e3a5f71334fc36efcaf97c3951eb9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for openlpt-2.1.6-cp312-cp312-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 7dd384bb8903a45b49138532f7abb36ddb9fae7bea09384fae968c23b6e0468a
MD5 abcf65c72ee436f6b9a66a743cf7529b
BLAKE2b-256 7abfe117f6e9c3f790726adcf078ef6be65e42bf7fd2435f41f4598cd26ad821

See more details on using hashes here.

File details

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

File metadata

  • Download URL: openlpt-2.1.6-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.6-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 05eba83202fbcc5c9d2e3e2354f5d837793a992ce300b080b4091c1d58ec871e
MD5 6dff6277b0effb87f9844547b2dbc40e
BLAKE2b-256 a90c7c16f67ff37011078ce020e7df8c48c6f17d09c5db1fc77e5df74544be5b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for openlpt-2.1.6-cp311-cp311-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 4bd157c9fcfe131337df140430cc0c14300d8e5f85a7874fbf996d74b92c41ee
MD5 209b0d802854aa82a7e4ac9047b90cbb
BLAKE2b-256 25fd436dc5037c7fd1c959d5da122c25708dae7197c02bacfe1e993c5ef0af0d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for openlpt-2.1.6-cp311-cp311-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 4f4f981a8934509716b0fcaacd6231a5732aaccedf3d80ca8b8cb60354fed91e
MD5 72d73f57b04e0ec28dd60d620108cece
BLAKE2b-256 0d22fc9187df386c121870b4f68ccce0f02acc7ff966aa13933c20305cda5dec

See more details on using hashes here.

File details

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

File metadata

  • Download URL: openlpt-2.1.6-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.6-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 d5ba96f2967ad9dd4e23d6ddd7fcddea948f0dff4c456839881a58e19152146a
MD5 9ce04140b0bbfee9a9650bd6f7e159c4
BLAKE2b-256 9fbbc4e72ac647f6693f97734ac8ddcd4e059dd6fd9217a750abacb20c86d86c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for openlpt-2.1.6-cp310-cp310-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 234563145a20582c6cf58340a34c21710b2106c1814d3f76e71a1b777e44b9b1
MD5 c19aba10b02d4e16ea8a4991834e0596
BLAKE2b-256 bd33e512d2c350dd6a692caa587bc6dda6ababbbac4c8d573f0e4458e251c3e8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for openlpt-2.1.6-cp310-cp310-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 b81c453081a80eb6e74a5e14bf549062ae9a62919d5723922548fd61bfbebbcc
MD5 31d8db48cb5353d4acbdb070f1bc10e4
BLAKE2b-256 851eb91279e02c70b663ae8702149f379c803171448c353c94400a968e35aab0

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