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

1. Graphical User Interface (GUI)

# Launch the interactive GUI from any terminal
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.3.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.3-cp313-cp313-win_amd64.whl (4.8 MB view details)

Uploaded CPython 3.13Windows x86-64

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

Uploaded CPython 3.13macOS 15.0+ ARM64

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

Uploaded CPython 3.12Windows x86-64

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

Uploaded CPython 3.12macOS 15.0+ ARM64

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

Uploaded CPython 3.11Windows x86-64

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

Uploaded CPython 3.11macOS 15.0+ ARM64

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

Uploaded CPython 3.10Windows x86-64

openlpt-2.1.3-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.3-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.3.tar.gz.

File metadata

  • Download URL: openlpt-2.1.3.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.3.tar.gz
Algorithm Hash digest
SHA256 ff34cc35d0e7d4c2500f2741f5dead11a979baa7c4e2ee075034dbe29663d42d
MD5 313c009127c53c6b9e8e5a7d01014820
BLAKE2b-256 3ccdfe5f67482ceee4cda8ab163a0c9662b12586de1dc88189580dc51d941441

See more details on using hashes here.

File details

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

File metadata

  • Download URL: openlpt-2.1.3-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.3-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 da224021d6bd1563de9052d3707e62f5c0759094a4dfe41920e19742e1910547
MD5 6392fa4dd7d96383e6431b570850053f
BLAKE2b-256 a39456634613bbcf4b439d16fa310cb907bd5907c4a4b6a6d1840643dafa2d39

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for openlpt-2.1.3-cp313-cp313-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 0739ee0f12fede38cce5387943b280759886a2890cf3b7eedccfce65bd935059
MD5 b49b5f290e0ea5aa30034ff45677052e
BLAKE2b-256 1b3e1b1e34e84f1fd6ae925d3df1e2d3f2d93dd63837dc5e0a3b8cacb116cf76

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for openlpt-2.1.3-cp313-cp313-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 757667f515ab05ad3d20fb28fd5c4c4f8d35aff2194aafddd2fe76a707c515e4
MD5 96da2e3ef5a31dbc8c63c814e4194694
BLAKE2b-256 3066103ee6606432d037851754e2f124625d06a665df1b176f03956bd095b8fe

See more details on using hashes here.

File details

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

File metadata

  • Download URL: openlpt-2.1.3-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.3-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 21276aeafbf4444d2e41616f24d14caa07675672195c506a02215e949376fb67
MD5 5369c4890ea0a9daea555ea8cee1a976
BLAKE2b-256 f85fb32b3b1fa7f606606a53fd7bf11ee1e71705f9ca4accae48f84b27a1fd2e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for openlpt-2.1.3-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 15fbc21799860762848754e50f3f9225017182c2b981011b1238fc12550c2657
MD5 adc24c14a6118115035e9e314ab8715d
BLAKE2b-256 79ceb6357e1c9edf63b4fe1cfff2c8a859162d6801eeaa3f42bee4932e8adaf0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for openlpt-2.1.3-cp312-cp312-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 d631d677ca195fef8d2642a97f31a778e8ed39ebcfc89af881ecaf5edf5399d4
MD5 66a9bbc5c07598c21b28ca7fdb29a412
BLAKE2b-256 421af250332eac3b1adb4cef0170d2eb44e0b8f58b020f241355fbc3d0670d3f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: openlpt-2.1.3-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.3-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 e87d6cfa7bbb75a9e15273d277dd22c19295f894514aaf3d4bd3960674a25504
MD5 bd461a009336598face623ac5fd89cbb
BLAKE2b-256 0f82ea2ab0ca4d9080125e78d18dfee41fa43b4729d3184381f2674e44782b20

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for openlpt-2.1.3-cp311-cp311-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 10a395808ffae2420b21d746d1f6c7fec7ecb827ddf7fed0676b58f599e3066b
MD5 f18a0c6b859b09ecf855fe0c6f8fc7e2
BLAKE2b-256 a9c204307fd3af37fff1cdfd39e2dba3c44f424b46ea939681b81db2635d6efb

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for openlpt-2.1.3-cp311-cp311-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 b775446ef5f4e61f56f4d970c12c4b5b406f047f8ceb6c48a13fac7a88ac7342
MD5 685d1ee74d2ce4f98b9288a6ea13894b
BLAKE2b-256 edfc76b71044a6537e933a91a66959c8776d601b25ff393723c771eade41916d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: openlpt-2.1.3-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.3-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 98a9181ba9378ab9eecf0df0bd0d5537798e0392a8f740178d3586d6ee6ea859
MD5 ece1c20e8bb48d65faeedd2b7e91ba60
BLAKE2b-256 de5428dd4390daed226b13102df72da4d96c946ab71e4ae896d250428375bf9a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for openlpt-2.1.3-cp310-cp310-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 6ef19c1a746823f547f563e0d1ecb937a7477436d0164d942716f4886c167158
MD5 1e3250d092357c15675c5ab5ed27c77b
BLAKE2b-256 25581086625bb82678c40422cda8a591864010e54298582abf95ed888eff067e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for openlpt-2.1.3-cp310-cp310-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 ccdb616b972d49457811eec1ae4101199a6610959a64d3e9d12ce00ace383bce
MD5 6e73433c4f815111f4625ddda798c958
BLAKE2b-256 61625d6354011fad7a7850138b156d809a03e29f296b853481a0f141e22e3d3d

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