https://github.com/shaymorad/lightricks-home-assignment
My implementation of the home assignment given by the company Lightricks.
https://github.com/shaymorad/lightricks-home-assignment
cli-app home-assignment image-processing json jsonschema python3
Last synced: about 2 months ago
JSON representation
My implementation of the home assignment given by the company Lightricks.
- Host: GitHub
- URL: https://github.com/shaymorad/lightricks-home-assignment
- Owner: ShayMorad
- License: mit
- Created: 2025-06-09T19:32:56.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-06-09T20:07:24.000Z (about 1 year ago)
- Last Synced: 2025-06-09T20:29:48.688Z (about 1 year ago)
- Topics: cli-app, home-assignment, image-processing, json, jsonschema, python3
- Language: Python
- Homepage:
- Size: 0 Bytes
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Advanced Image Editing System
This project was developed as part of the Lightricks Students Home Assignment.
It showcases an image editing tool built from scratch in Python, using NumPy for core operations and implementing convolution-based filters and adjustments without any external image-processing libraries.
The system is modular, extensible, and configurable via a JSON file, and supports both saving and displaying the final result.
Features
-
Modular Design - Each operation is cleanly separated to allow for easy extension and maintenance.
-
JSON-Based Configuration - Users can define image paths, filters, parameters, and save/display options using a structured input file.
-
Supported Filters:
-
Box Blur – Averages pixel values in an X×Y neighborhood to produce a softened effect.
-
Sobel Edge Detection – Highlights image edges using horizontal and vertical gradient kernels.
-
Sharpen – Enhances image details using the unsharp masking technique.
-
Supported Adjustments:
-
Brightness – Adjusts pixel intensity globally.
-
Contrast – Stretches or compresses pixel value distribution.
-
Saturation – Modifies color vibrancy (in RGB approximation).
-
Sequential Layering - Applies operations in the exact order specified by the user.
-
Validation & Error Handling - Provides clear messages for invalid configuration files.
-
Display or Save Output - Allows visualizing the result or saving it to a file based on user input.
-
CLI Integration - Run the tool via command line with a single command.
Media
Here are a few examples of images edited using the tool and the filters described above:
Original Image
Box Blur (5x5)
Sobel Edge Detection
Pipeline (multiple filters layered)
Running the Project
To try it out locally, follow these steps:
- Clone the repository:
git clone <url>
- Open the folder in your preferred code editor
-
Optional: Set up a virtual environment using python3 -m venv venv
- Install dependencies:
pip install -r requirements.txt
- Run the editor with:
python3 edit_image.py --config path/to/config.json
Example JSON Configuration
```json
{
"input": "image.png",
"output": "output.png",
"display": true,
"operations": [
{
"type": "brightness",
"value": 0.6
},
{
"type": "box",
"width": 5,
"height": 3
},
{
"type": "contrast",
"value": -3
}
]
}