Skip to content

Latest commit

 

History

History
68 lines (48 loc) · 1.94 KB

README.md

File metadata and controls

68 lines (48 loc) · 1.94 KB

drishya_vastu - ImageEngine

ImageEngine is a Python image processing library that integrates with C++ for high-performance operations. Note: C++ binaries are not included and need to be compiled.

Features

  • Grayscale Conversion: Convert RGB images to grayscale.
  • Brightness Adjustment: Adjust brightness for red, green, and blue channels.
  • Contrast Adjustment: Enhance or reduce contrast.
  • Channel Extraction: Extract specific color channels (Red, Green, Blue).
  • Maximum Channel Preservation: Preserve the maximum intensity channel.
  • Sobel Edge Detection: Detect edges using the Sobel operator.
  • Image Display: Display images directly.
  • Image Rotation: Rotate images by specified degrees.
  • Image Cropping: Crop images to specified dimensions.

Installation

  1. Clone the repository:

    git clone https://github.com/yourusername/ImageEngine.git
  2. Compile the C++ binaries in the utility directory:

    g++ -shared -o rbg2grey.so rbg2grey.cpp
    g++ -shared -o brighten.so brighten.cpp
    g++ -shared -o contrast.so contrast.cpp
    g++ -shared -o channel_extraction.so channel_extraction.cpp
    g++ -shared -o keepmaxchannel.so keepmaxchannel.cpp
    g++ -shared -o sobel_edge.so sobel_edge.cpp
    g++ -shared -o rotate.so rotate.cpp
    g++ -shared -o crop.so crop.cpp
  3. Install dependencies:

    pip install numpy

Usage

Import and use ImageEngine in your Python scripts:

from imageengine import ImageEngine

engine = ImageEngine()
grey_image = engine.grey_scale(image_data, height, width)

The name is derived from sanskrit where:
-> drishya is translated as image
-> vaastu is translated as architecture

3

Untitled-2