Skip to main content

Image extension of Semantiva framework.

Project description

Semantiva Imaging

Overview

Semantiva Imaging is a comprehensive image processing extension for the Semantiva framework that provides production-ready tools for computer vision and scientific imaging workflows. Built with type safety and pipeline composability at its core, it offers seamless integration with industry-standard libraries like OpenCV while maintaining transparent, auditable processing chains.

The extension delivers enterprise-grade capabilities including multi-format I/O, OpenCV integration, N-channel image support, and advanced factory patterns for rapid processor development—all within Semantiva's dual-channel architecture that processes data and metadata simultaneously.

Links:


Features

OpenCV Integration

  • Factory-Generated Processors: Automatically generates OpenCV-based processors using the _create_opencv_processor factory
  • Smart Channel Conversion: Handles BGR/RGB channel reordering transparently for OpenCV functions
  • Signature Synthesis: Dynamically creates processors from OpenCV function signatures with proper parameter mapping
  • Tuple Return Handling: Manages complex OpenCV return types with automatic unpacking and conversion

Comprehensive Data Types

  • Single Channel: SingleChannelImage for 2D grayscale images and SingleChannelImageStack for 3D stacks
  • Multi-Channel: RGBImage, RGBAImage, and generic NChannelImage with customizable channel metadata
  • Stack Support: All image types available as stack variants for temporal or Z-axis data
  • Smart Casting: Auto-cast 12-/16-bit arrays to float32 by default (disable with auto_cast=False)

Multi-Format I/O

  • Standard Formats: PNG, JPEG, TIFF, NPZ with dedicated loader/saver classes
  • Video Support: AVI video loading and saving with VideoRGBImageStackLoader and VideoRGBImageStackSaver
  • Animated Media: Animated GIF support for both single-channel and RGBA image stacks
  • Network Loading: HTTP/HTTPS image loading via UrlLoader factory pattern
  • Parametric Generation: Synthetic image generation with TwoDGaussianSingleChannelImageGenerator

Advanced Processing

  • Factory Systems: _create_nchannel_processor and _create_opencv_processor for dynamic processor generation
  • Built-in Operations: Image arithmetic, filtering, normalization, cropping, and stack projections
  • Scientific Analysis: Gaussian fitting probes including TwoDGaussianFitterProbe and TwoDTiltedGaussianFitterProbe
  • Pre-built OpenCV Processors: Ready-to-use filters, edge detection, and morphological operations

Interactive Visualization

  • Cross-Section Viewer: Dynamic exploration of 2D image cross-sections (ImageCrossSectionInteractiveViewer)
  • Stack Animation: Animate image sequences with SingleChannelImageStackAnimator
  • Projection Views: X-Y intensity projections with ImageXYProjectionViewer
  • Standard Display: Both static and interactive image viewers for Jupyter notebook integration

Pipeline Integration

  • Seamless Workflow: Full integration with Semantiva's YAML-based pipeline system
  • Context-Aware Processing: Metadata flows alongside data for parameter-driven operations
  • Modular Design: Mix and match processors in complex multi-stage workflows

Installation

pip install semantiva semantiva-imaging

Quick Start: Parametric Image Generation Pipeline

Semantiva Imaging demonstrates advanced capabilities through parametric workflows that generate synthetic data, extract features, and perform model fitting—all within a unified pipeline architecture.

The following example generates a time-varying 2D Gaussian signal with parametric position, standard deviation, and orientation changes:

Run the complete pipeline:

semantiva run tests/pipeline_parametric_gaussian_fit.yaml -v

Pipeline highlights:

  • Parametric Generation: Creates image stacks using symbolic expressions for signal parameters
  • Feature Extraction: Extracts Gaussian parameters from each frame using TwoDTiltedGaussianFitterProbe
  • Model Fitting: Fits polynomial models to temporal parameter evolution
  • Context Flow: Metadata and parameters flow seamlessly alongside image data

This demonstrates Semantiva's dual-channel processing where data and metadata evolve together, enabling dynamic, parameter-driven workflows ideal for research and production environments.


Codec-Dependent Classes

Some loader/saver classes in Semantiva Imaging depend on system-specific codecs, which may not be available or consistent across all environments. For detailed information about dependencies, risks, and recommendations, please refer to the Codec Dependencies Documentation.

License

Semantiva-imaging is released under the Apache License 2.0.

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

semantiva_imaging-0.2.1.tar.gz (82.5 kB view details)

Uploaded Source

Built Distribution

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

semantiva_imaging-0.2.1-py3-none-any.whl (75.0 kB view details)

Uploaded Python 3

File details

Details for the file semantiva_imaging-0.2.1.tar.gz.

File metadata

  • Download URL: semantiva_imaging-0.2.1.tar.gz
  • Upload date:
  • Size: 82.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: pdm/2.26.1 CPython/3.10.12 Linux/6.11.0-1018-azure

File hashes

Hashes for semantiva_imaging-0.2.1.tar.gz
Algorithm Hash digest
SHA256 022bdedfaaca85bd75823c9a1bd246ea15a2c53fbe233638dbfcaa9be4ce934d
MD5 e557e9eead2e2387fbaf5f3260a49d6b
BLAKE2b-256 5dc0721ea787e3ad624b6f29c742ad1f7063fd1ee810865afc1e91e226c615bd

See more details on using hashes here.

File details

Details for the file semantiva_imaging-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: semantiva_imaging-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 75.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: pdm/2.26.1 CPython/3.10.12 Linux/6.11.0-1018-azure

File hashes

Hashes for semantiva_imaging-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 8e76c28edd57cbcb408df3d47fd58d49a3deb685c585e6fac1a0e31bb79a182b
MD5 10726cb9f0cc56af47b5fdaa4f8bb23d
BLAKE2b-256 f175d6a4488e83dffcfe8db7b06a263adc70749b584ff79c74f9e3b9f09521ba

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