Skip to content

ShayMorad/Lightricks-Home-Assignment

Repository files navigation

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

  1. Modular Design - Each operation is cleanly separated to allow for easy extension and maintenance.
  2. JSON-Based Configuration - Users can define image paths, filters, parameters, and save/display options using a structured input file.
  3. 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.
  4. Supported Adjustments:
    • Brightness – Adjusts pixel intensity globally.
    • Contrast – Stretches or compresses pixel value distribution.
    • Saturation – Modifies color vibrancy (in RGB approximation).
  5. Sequential Layering - Applies operations in the exact order specified by the user.
  6. Validation & Error Handling - Provides clear messages for invalid configuration files.
  7. Display or Save Output - Allows visualizing the result or saving it to a file based on user input.
  8. 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:

  1. Clone the repository: git clone <url>
  2. Open the folder in your preferred code editor
  3. Optional: Set up a virtual environment using python3 -m venv venv
  4. Install dependencies: pip install -r requirements.txt
  5. Run the editor with: python3 edit_image.py --config path/to/config.json

Example JSON Configuration

{
  "input": "image.png",
  "output": "output.png",
  "display": true,
  "operations": [
    {
      "type": "brightness",
      "value": 0.6
    },
    {
      "type": "box",
      "width": 5,
      "height": 3
    },
    {
      "type": "contrast",
      "value": -3
    }
  ]
}

About

My implementation of the home assignment given by the company Lightricks.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages