Skip to content
This program will find out the number of different colors in an image.
Python
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
Images
README.md
main.py

README.md

How to calculate number of different colors in an image

Our aim is to calculate the number of different colors in an image.

Note:

If the image is in gray scale then use img=cv2.imread(filename,0)

The result will be the same but if in case you wish to see the colors then you will be able to see it in the range of 0-255 instead of [0,0,0]-[255,255,255].

You can’t perform that action at this time.