https://github.com/abhigyan126/drishyavastu
Itis a Python image processing library that integrates with C++ for high-performance operations. Note: C++ binaries are not included and need to be compiled.
https://github.com/abhigyan126/drishyavastu
c crop-image from-scratch image-display image-processing python python-extension
Last synced: 7 months ago
JSON representation
Itis a Python image processing library that integrates with C++ for high-performance operations. Note: C++ binaries are not included and need to be compiled.
- Host: GitHub
- URL: https://github.com/abhigyan126/drishyavastu
- Owner: Abhigyan126
- License: cc0-1.0
- Created: 2024-04-10T08:34:32.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-03-28T16:30:28.000Z (8 months ago)
- Last Synced: 2025-04-07T11:41:13.034Z (8 months ago)
- Topics: c, crop-image, from-scratch, image-display, image-processing, python, python-extension
- Language: C++
- Homepage:
- Size: 182 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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:
```bash
git clone https://github.com/yourusername/ImageEngine.git
```
2. Compile the C++ binaries in the `utility` directory:
```bash
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:
```bash
pip install numpy
```
## Usage
Import and use ImageEngine in your Python scripts:
```python
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


### note:
- for mac/linux -> .so
- for windows -> .pyd