Skip to main content

ZIT, the premier zooplankton imaging tool

Project description

ZIT (Zooplankton Image Tool)

ZIT is a tool designed to enhance and composite plankton photos from video frames. It uses computer vision techniques (OpenCV MOG2 background subtraction and contour filtering) to create clean, high-quality composites showing the locomotion of zooplankton.

Mariposa Example

Features

  • Frame Capture: Extract frames from videos at specified intervals.
  • Motion-Based Composition: Create composites by overlaying moving entities on a stable background.
  • Entity Recognition: Uses MOG2 background subtraction to isolate animals from noise and artifacts.
  • Parameter Sweeping: Find optimal threshold values for different video conditions.

Installation

Ensure you have Poetry installed.

poetry install

Usage

CLI

Capture frames and create a composite in one command:

# Using poetry
poetry run zit --input samples/limo.mp4 --composite --entities

# If installed
zit --input samples/limo.mp4 --composite --entities

Parameters

  • --input, -i: Path to the input video.
  • --interval: Interval in seconds for frame capture (default: 1).
  • --composite: Enable composition after frame capture.
  • --entities: Use entity recognition for cleaner composites (recommended).
  • --epsilon: Difference threshold for entity detection (default: 20.0). Also referred to as Thresh in sweep grids.
  • --noise: Minimum pixel area for a detected entity (default: 50.0). Also referred to as MinArea in sweep grids.
  • --skip START END: Process only a specific frame range.
  • --out-file: Name of the output composite image (default: composited.png).

Parameter Sweep

To find the optimal threshold values for your video, use the parameter sweep script. It generates a 5x5 grid of composites sweeping across MinArea (noise) and Thresh (epsilon).

python sweep_grid.py

Gallery

Parameter Grids

Find the optimal thresholds for different conditions. These grids show variations in MinArea and Thresh.

Video 184368 Sweep Video 230717 Sweep Video 307555 Sweep

Entity Recognition Results

Clean composites generated using OpenCV MOG2 and contour filtering.

Video 184368 Video 230717 Video 307555

Examples

Plankton Example Lovely Example 1 Lovely Example 2

Cleanup

To remove temporary files and generated frames:

rm -rf temp_sweep_* frames/

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

zooplankton_image_tool-0.1.7.tar.gz (12.4 kB view details)

Uploaded Source

Built Distribution

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

zooplankton_image_tool-0.1.7-py3-none-any.whl (16.5 kB view details)

Uploaded Python 3

File details

Details for the file zooplankton_image_tool-0.1.7.tar.gz.

File metadata

  • Download URL: zooplankton_image_tool-0.1.7.tar.gz
  • Upload date:
  • Size: 12.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for zooplankton_image_tool-0.1.7.tar.gz
Algorithm Hash digest
SHA256 6e858cb645820cdeea957447e2217c9c92de546f0f6684770d5ab5288a313b06
MD5 471dd68eec262ec33c54d06fd07bbc21
BLAKE2b-256 888743de4bcc8154dc2b81e424e05fe2b6cf7d74ba2fa5942fca9a0006d83f32

See more details on using hashes here.

Provenance

The following attestation bundles were made for zooplankton_image_tool-0.1.7.tar.gz:

Publisher: publish.yml on juleshenry/zooplankton-image-tool

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file zooplankton_image_tool-0.1.7-py3-none-any.whl.

File metadata

File hashes

Hashes for zooplankton_image_tool-0.1.7-py3-none-any.whl
Algorithm Hash digest
SHA256 9ffc2562df86a3fe0841efeb3f06495e2f4b1780211fb5caadc7f84acb98ae32
MD5 d830c01d73da13babcfe824a155e2366
BLAKE2b-256 0822944f84779c09080e01bc71baf06d145a95f7eefc3dff8dc76b9c6a9e9ad8

See more details on using hashes here.

Provenance

The following attestation bundles were made for zooplankton_image_tool-0.1.7-py3-none-any.whl:

Publisher: publish.yml on juleshenry/zooplankton-image-tool

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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