Skip to content

Enhancement: Introduce Advanced Image Processing Operators (Canny, Histogram Equalization, Brightness/Contrast, Morphology) #134

@khushalkks

Description

@khushalkks

The current operator ecosystem in ImageLab provides a solid base for fundamental image processing operations (blurring, thresholding, geometric transforms, Sobel derivatives, etc.).
To further strengthen the pipeline for real-world computer vision and image preprocessing workflows, I would like to propose adding a small set of widely adopted advanced operators.

These additions would significantly enhance the flexibility and practical usability of the system while aligning with standard OpenCV-based processing pipelines.
Problem Statement

While the existing operator architecture is modular and extensible, the following commonly used operations are currently missing:

Robust edge detection (Canny)
Contrast enhancement via histogram equalization
Direct brightness and contrast adjustments
Morphological transformations (erosion, dilation, etc.)
These operations are frequently required in production-grade CV pipelines. Their absence may require users to preprocess images externally before using ImageLab.
Proposed Enhancements
I propose introducing the following operators:

  1. Canny Edge Detection
    Purpose: Accurate multi-stage edge detection
    Common use cases: Feature extraction, object detection preprocessing
    Suggested parameters:
    threshold1
    threshold2

  2. Histogram Equalization
    Purpose: Improve contrast in grayscale images
    Use cases: Low-light image enhancement, preprocessing before thresholding
    Suggested parameter:
    mode (e.g., grayscale)

  3. Brightness & Contrast Adjustment
    Purpose: Controlled linear intensity transformation
    Use cases: Image enhancement and normalization
    Suggested parameters:
    brightness
    contrast

  4. Morphological Operations
    Purpose: Structural image refinement
    Operations:
    erosion
    dilation
    opening
    closing
    Suggested parameters:
    operation
    kernel_size
    Design & Implementation Considerations

Each operator will inherit from BaseOperator
Registration will follow the existing registry.py pattern
Parameter validation will be implemented to ensure robustness

No breaking changes to the current pipeline execution flow
Unit tests can be added for coverage
Benefits

Enhances ImageLab’s capability for real-world CV workflows
Reduces need for external preprocessing
Keeps architecture modular and scalable
Aligns the project more closely with standard OpenCV feature sets

Increases the practical value of the visual pipeline builder
Willing to Contribute

I would be happy to implement these operators and submit a structured PR following project guidelines, if this proposal is approved.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions