ColorSense is a project that leverages finger detection, point projection, and K-means clustering to recognize the dominant color in an image. By utilizing multi-threading and multi-processing techniques, ColorSense achieves real-time color analysis with enhanced efficiency.
- Finger detection: ColorSense utilizes computer vision techniques to detect fingers within an image.
- Point projection: The detected fingers are used to project a point within the image, focusing on the region of interest.
- K-means clustering: ColorSense employs K-means clustering to extract the dominant color from the projected region.
- Multi-threading: The project implements multi-threading to optimize the performance of concurrent tasks and enhance real-time color recognition.
- Multi-processing: ColorSense utilizes multi-processing to leverage the power of multiple processors, further improving the speed and efficiency of color analysis.
- Finger detection: The project employs computer vision algorithms to detect and track fingers in an image or video stream.
- Point projection: Based on the detected fingers, ColorSense projects a point within the image, centering around the region of interest.
- Region extraction: The projected point serves as the center for extracting a region of interest from the image.
- Dominant color recognition: K-means clustering is applied to the extracted region, identifying the dominant color within that specific area.
- Real-time analysis: The multi-threading and multi-processing techniques ensure that the color recognition process is efficient and operates in real-time.
- Python (3.6.9)
- OpenCV (4.7.0.72)
- Mediapipe (0.8.2)
- Numpy (1.19.3)
- Webcolors (1.11.1)
To use ColorSense, follow these steps:
- Clone the repository: git clone https://github.com/samaypashine/ColorSense.git
- Install the required dependencies:
pip3 install -r requirements.txt
- Run the application:
python3 colorsense_threading.py
- Wave your hand in-front of the camera to activate the feed to start detecting the finger and colors.