Giter Club home page Giter Club logo

negative-to-digital-image-converter's Introduction

Negative to Digital Image Converter

This Python script is designed to convert negative images into positive ones. It uses the OpenCV and NumPy libraries to perform image processing tasks.

How it Works

The script contains several functions that work together to process the image:

  1. invert_colors(image): This function inverts the colors of the image. It subtracts the color values of the image from 255, effectively creating a negative of the image.

  2. find_darkest_brightest_neutral_gray_pixels(image): This function finds the darkest, brightest, and a neutral gray pixel in the image. These values are used later to adjust the color balance of the image.

  3. apply_curves_adjustment(image, darkest_rgb, brightest_rgb, neutral_gray_rgb): This function adjusts the color balance of the image based on the darkest, brightest, and a neutral gray points found earlier.

  4. process_image(image_path): This is the main function that brings everything together. It loads an image, inverts its colors, finds the darkest, brightest, and a neutral gray pixels, applies color balance adjustments, and finally displays the adjusted image.

Usage

To use this script, simply call the process_image(image_path) function with the path to your negative image as the argument.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.