Skip to content

The script takes a picture and counts the ratio of colorful area to black/white area

Notifications You must be signed in to change notification settings

UWMELD/Pixel_Counter_Alex

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pixel_Counter_Alex

The script takes a picture and counts the ratio of colorful area to black/white area

  • count.py
  • count the amount of colored(non black & non white) pixels and the total number of areas.
  • count2.py
  • separate the picture into smaller squares and count the number of squares that is occupied by colored pixels.
  • calculate the percentage of the area of the counted squares in the square.

Before using

  1. (if not yet installed) Run "pip install opencv-python" to satisfy the independency.
  2. Change line 5 of "count.py" or line 6 of "count2.py" for target picture.
  3. Run the script under the folder where the picture is located.

About

The script takes a picture and counts the ratio of colorful area to black/white area

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages