{"id":19972776,"url":"https://github.com/as567652/color-identification","last_synced_at":"2026-05-08T23:11:14.627Z","repository":{"id":106470783,"uuid":"411230761","full_name":"as567652/Color-Identification","owner":"as567652","description":"OpenCV program to determine whether color of a car is Red, Green, Blue or White.","archived":false,"fork":false,"pushed_at":"2021-09-28T16:27:34.000Z","size":1080,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-12T09:29:24.088Z","etag":null,"topics":["computer-vision","digital-image-processing","matplotlib","opencv","python3"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/as567652.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-09-28T10:11:43.000Z","updated_at":"2021-12-08T07:53:58.000Z","dependencies_parsed_at":"2024-01-09T20:16:54.807Z","dependency_job_id":null,"html_url":"https://github.com/as567652/Color-Identification","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/as567652%2FColor-Identification","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/as567652%2FColor-Identification/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/as567652%2FColor-Identification/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/as567652%2FColor-Identification/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/as567652","download_url":"https://codeload.github.com/as567652/Color-Identification/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241405562,"owners_count":19957845,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["computer-vision","digital-image-processing","matplotlib","opencv","python3"],"created_at":"2024-11-13T03:09:12.622Z","updated_at":"2025-11-26T23:05:23.855Z","avatar_url":"https://github.com/as567652.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Colour Identification Of An Image Using OpenCV\nOpenCV program to determine whether color of a car in provided image is Red, Green, Blue or White.\n\n## Table of contents\n* [Introduction](#introduction)\n* [Approach](#approach)\n* [Technologies](#technologies)\n* [Setup](#setup)\n* [Launch](#launch)\n* [Illustrations](#illustrations)\n* [Status](#status)\n* [Sources](#sources)\n* [Other](#other)\n\n## Introduction\nOpenCV is simple and effective way to solve **Real Life Problems** faced by people in different sectors.\u003cbr/\u003e\u003cbr/\u003e**This project is helpful in solving Problem Statements like -**\u003cbr/\u003e\nOne automobile manufacturer is automating the placement of certain components on the bumpers of a limited-edition line of sports cars. The components are color coordinated, so the robots need to know the color of each car in order to select the appropriate bumper component. Models come in only four colors: blue, green, red, and white. \n\n## Approach\n- HSV (Hue, Saturation, Value) is one of the scheme that describe the way colors combine to create the spectrum we see.\n- We first generate HSV Values of respective colors using **cvtColor()** function in OpenCV.\n- We then declare lower and upper bound to create mask such that hsv values between this range will be considered as white and out of this range will be considered as black.\n- For Better result, image is cropped in such a way that centre of image is in focus.\n- After successful creation of mask for all colors, we count number of white pixels in each masks and store them in a dictionary.\n- We sort the dictionary and print the value corresponding to maxinmum white pixels in given mask.\n- Hence, we are able to find color of given car / object from provided image.\n\n## Technologies\n  #### Software Used :\n  * VS Code : 1.58.2\n  #### Languages Used :\n  * Python 3\n  #### OS used :\n  * Ubuntu 20.04.3 LTS 64-bit\n\n\n## Setup\nFirst you must have these libraries and languages installed on your system -\n  * [Python 3](https://www.python.org/)\n  * [OpenCV](https://opencv.org/)\n\n\n## Launch\nTo run the code, run this commands in terminal with main.py as in current directory and images in Images folder along with main.py\n```\n$ python3 main.py\n```\nWindows will pop-up with resultant images. (Press **esc** to view next image).\n\n## Illustrations\n### Blue Car\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"ReadMe Images/Blue Car/Original Image.png\" width=48% title=\"Original Image\"\u003e\n  \u003cimg src=\"ReadMe Images/Blue Car/Blue Mask.png\" width=48% title=\"Blue Mask Of Original Image\"\u003e\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"ReadMe Images/Blue Car/Red Mask.png\" width=32% title=\"Red Mask Of Original Image\"\u003e\n  \u003cimg src=\"ReadMe Images/Blue Car/Green Mask.png\" width=32% title=\"Blue Mask Of Original Image\"\u003e\n  \u003cimg src=\"ReadMe Images/Blue Car/White Mask.png\" width=32% title=\"Blue Mask Of Original Image\"\u003e\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n   \u003cimg src=\"ReadMe Images/Blue Car/result.png\" width=96% title=\"Output\"\u003e\n\u003c/p\u003e\n\n### White Car\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"ReadMe Images/White Car/Original Image.png\" width=48% title=\"Original Image\"\u003e\n  \u003cimg src=\"ReadMe Images/White Car/White Mask.png\" width=48% title=\"Blue Mask Of Original Image\"\u003e\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"ReadMe Images/White Car/Red Mask.png\" width=32% title=\"Red Mask Of Original Image\"\u003e\n  \u003cimg src=\"ReadMe Images/White Car/Green Mask.png\" width=32% title=\"Blue Mask Of Original Image\"\u003e\n  \u003cimg src=\"ReadMe Images/White Car/Blue Mask.png\" width=32% title=\"Blue Mask Of Original Image\"\u003e\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n   \u003cimg src=\"ReadMe Images/White Car/result.png\" width=96% title=\"Output\"\u003e\n\u003c/p\u003e\n\n## Project status\n  ***Completed***\n\n## Sources\n  * Images used in this project may be subject to copyright.\n  * [Digital Image Processing (Third Edition) by Rafael C. Gonzalez and Richard E. Woods](https://www.amazon.com/Digital-Image-Processing-Rafael-Gonzalez/dp/013168728X)\n  * [OpenCV Documentation](https://docs.opencv.org/2.4/opencv_tutorials.pdf)\n  \n## Other\n  This code was contributed by Abhinav Sharma.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fas567652%2Fcolor-identification","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fas567652%2Fcolor-identification","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fas567652%2Fcolor-identification/lists"}