Git Product home page Git Product logo

color-isolation's Introduction

color_isolation.py

Python program used to easily color isolate a specific part of a picture.

color_isolation.png

Table of contents

1. Description

color_isolation.py is a Python program leveraging OpenCV and its HSV filtering capabilities to color isolate a specific part of a picture.

Here are the consecutive process steps:

  1. The user executes the program and the HSV version of the input picture appears
  2. The user clicks 5 times on several places on the object he wants to color isolate. This step allows to record samples of HSV values
  3. Based on these values, an average of the HSV values will be elaborated and the HSV range is computed
  4. Using the HSV range and the cv2.inRange function, the mask isolating the object of interest is created
  5. Using the same mask, the region of the object of interest is black-outed from a grayscaled version of the input picture and the original colored object is added at this precise location

color_isolation_gif

2. Getting started

2.1 Dependencies

  • Tested on macOS Big Sur version 11.0.1
  • Python 3.7

2.2 Installing

For testing color_isolation.py, install the required packages by typing following Terminal command at the root of the project:

pip install -r requirements.txt

2.3 Executing program

The color_isolation.py script can be run by typing following Terminal command at the root of the project:

python3.7 color_isolation.py

3. Version history

  • 0.1
    • Initial release

color-isolation's People

Contributors

antho1426 avatar

Watchers

 avatar

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.