- +91 7075575787
- [email protected]
- Moosarambagh, Hyderabad
Colour Identification through OpenCV is a Simple but very effective Project which involves in identifying colour on a particular thing, this is useful in various applications, especially for the people who are having difficulty in recognizing colours and for the blind people, if we add Text to Speech Library. In order to identify the colours, the model is trained on various coloured images using KNN Classifier which is a popular Machine Learning Algorithm and whenever we pass a new image to the model it will try to predict that particular colour by comparing the colour code within its database which the model is trained and then it displays it on the Screen.
Colour identification api has been used in order to train and test the colour a specific image given. In the colour recognition API, we have colour histogram feature extraction methodology and KNN classifier has been used to train the model. Colour histogram feature extraction is a method of extracting or generating histograms for an image colour channels (blue, green, red) i.e, cv2.calcHist(). K-Nearest Neighborclassifier is basically non-parametric supervised learning algorithm, which can be used for both classification and regression problem. The classification over here is done basically by making cluster of classes.
Note: Make sure you have checked add to path check boxes at the end of installation process, which solves a major problem of code execution error.
If you are just starting and want to know how to install anaconda refer to this link. or If you already have anaconda and want to check on how to create anaconda environment,
If you already have anaconda and want to check on how to create anaconda environment, set up jupyter notebook refer to this article. You can skip the article if you have knowledge of installing anaconda, setting up environment and installing requirements.txt
So, we have used multiple combination of plain coloured images with 7 basic days to day used colours. These images are fed to color_histogram_extraction file where each image is converted into a specific RGB format along with its colour class (0->Red, 1->Blue,). These are then used to train our KNN classifier model. whenever we try to predict any colour of an image, we need to pass the whole image, or we can test it out by converting that image into rgb format and passing it to KNN classifier to predict the colour.
How can we help you?
🟢 we are online | privacy policy
WhatsApp us