liuruoze / liuruoze/EasyPR

请问颜色定位中HSV模型的s和v根据h的值进行自适应变化的原理是什么? mim_sv的自适应公式是怎么得出来的?

Open
#290 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
6.4k
Forks
2.5k
PR merge metrics
No merged PRs in 30d

Description

if (H > min_h && H < max_h) {
float Hdiff = 0;
if (H > avg_h)
Hdiff = H - avg_h;
else
Hdiff = avg_h - H;

float Hdiff_p = float(Hdiff) / diff_h;

float min_sv = 0;
if (true == adaptive_minsv)
min_sv =
minref_sv -
minref_sv / 2 *
(1
- Hdiff_p); // inref_sv - minref_sv / 2 * (1 - Hdiff_p)
else
min_sv = minabs_sv; // add

if ((S > min_sv && S < max_sv) && (V > min_sv && V < max_sv))
colorMatched = true;
}

Contributor guide

No contributing guide indexed for this repository

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

Start with the HSV matching snippet in the issue and locate the implementation of adaptive_minsv, minref_sv, and diff_h in the repository. Trace how the values are configured and used, then document the rationale or derivation of the min_sv formula and its effect on color matching.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, opencv
Domain
computer-vision
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.