/primitive-color-detector

Color detector from images using Python and OpenCV2

Primary LanguagePython

Color detector from images using Python and OpenCV2

Written by Khakim Assidiqi on 30 september 2018

Library Used

  1. NumPy : adding support for large, multi-dimensional arrays and matrices. (pip install numpy)
  2. Argparse : Ggenerates help and usage messages and issues errors when users give the program invalid arguments. (pip install argparse)
  3. OpenCV : OpenCV is a library of programming functions mainly aimed at real-time computer vision. (pip install opencv-python)

Commentary

you can modify this script to detect color from a video

Example Result

root@her:~/Color_Detector_from_Image_with_Python# python color.py -i test7.png 
color detected: merah di (x=42.8588485718, y=51.12059021)
color detected: oren di (x=253.828544617, y=46.5188217163)
color detected: kuning di (x=484.461540222, y=48.9792098999)
color detected: ijo di (x=377.960853577, y=214.794471741)
color detected: biru di (x=254.974235535, y=386.626396179)
color detected: ungu di (x=153.511177063, y=218.875038147)
root@her:~/Color_Detector_from_Image_with_Python# 

SS