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.6.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.6-py3-none-any.whl (16.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: zooplankton_image_tool-0.1.6.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.6.tar.gz
Algorithm Hash digest
SHA256 7501ffdc7de11bb536827cc83097f9cf58bf94c4b26ee57c48222adfe8fc8fe3
MD5 20bc733a1695bc5af4dce6172f7c3657
BLAKE2b-256 ce8764ac6ac3ef41306bee288b7929453b862a99abf2e08ed35ebfef653d6b1e

See more details on using hashes here.

Provenance

The following attestation bundles were made for zooplankton_image_tool-0.1.6.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.6-py3-none-any.whl.

File metadata

File hashes

Hashes for zooplankton_image_tool-0.1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 6a936bf0b4faf5877fef126ca9f54fb9a147f14297f49dfbe9569adbc296f2f8
MD5 3a5dd7b007a251228c77dee116d0913d
BLAKE2b-256 6efa73cb7247f7c8a080190bafce29a6c05f396ebd06e00de21dab66ed5cd32f

See more details on using hashes here.

Provenance

The following attestation bundles were made for zooplankton_image_tool-0.1.6-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