Skip to content

Python application which calculates the rate of dark and light parts of objects in the input picture

Notifications You must be signed in to change notification settings

szirocica/Color-Rate-Calculator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Color-Rate-Calculator

Python application which calculates the rate of dark and light parts of objects in the input picture.

For accurate results, the input image shouldn't have a very colourful background. The bigger part of the image the object, the better the results are. To avoid segmentation, the input image should have a one colour background.

Packages used:
-opencv
-tkinter
-math
-numpy

How to use:

  1. [optional step] Before launch, cut the important part out from the original picture to make the calculation more accurate.
  2. Launch program, choose image.
  3. 3 window appears: a hsv colour palette, the original input image, a window which will show the segmented area.
  4. Let's designate a black part of the object on the original image. Can be done by one click, or by designating with a rectangle by holding the left mouse button.
  5. We can make the segmented area more accurate by h, s, v, Shift + h, Shift + s, Shift + v buttons. The hsv colour palette may help for experts, but it's easy to reach optimal result without understanding it.
  6. Once the segmentated area is accurate enough, we can save it in a variable. In case of black part: press b button.
  7. Designating the white part works the same way. Once it is ready press w button to save. (The colour sequence is optional, and works both way)
  8. If the 2 aera is ready and the b and w button was pushed, the results appear in the console.

About

Python application which calculates the rate of dark and light parts of objects in the input picture

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages