opencv / opencv/opencv-python

Real-time color detection in varying light conditions

Open
#1,033 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

question
Dominant language
Python
Stars
5.4k
Forks
1k
Avg merge
22h 17m
Merged PRs (30d)
3

Description

Problem Overview:

I am developing an algorithm to detect the concentration of a chemical using the RGB values of a liquid placed in the center of an image. Over the course of five minutes, the liquid changes color based on the chemical concentration in the air. This color is then compared to surrounding reference colors in the image, each of which has a known RGB value that corresponds to a specific concentration. When a suitable match is found between the liquid’s color and the surrounding reference colors, we can determine the chemical concentration.

However, there are two significant challenges in real-time detection:

Device-Specific RGB Variations: Different mobile devices capture colors differently due to variations in camera sensors. Fortunately, since both the liquid and reference colors are captured by the same device, this challenge is inherently mitigated. Any deviation in RGB values will affect both the liquid and reference colors in the same way, making the comparison consistent.

Lighting Conditions: The more critical issue is uneven lighting. If the lighting is uniform, all RGB values across the image will change consistently, and the detection will still be accurate. But if there's glare or uneven lighting in parts of the image, the RGB values will vary at those points while others remain unchanged. This causes inconsistencies in color comparison and leads to inaccurate concentration detection.

Request for Suggestions:

I'm seeking suggestions to handle the challenge of uneven lighting conditions, particularly when there is glare or shadow on certain parts of the image. How can I ensure that the color detection remains reliable in non-uniform lighting scenarios?

4

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No repository file, test, or entry point is identified in the issue. Start by clarifying the intended OpenCV and Python scope, the target detection behavior under glare or shadow, and what measurable result would count as reliable before proposing an implementation.

Written by the indexing model from the issue text.

Assessment

Tech stack
opencv, python
Domain
computer-vision
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.