Replies: 1 comment 1 reply
-
颜色应该得是一个范围,不同模拟器渲染方式不同,出来的颜色不可能完全一样。而且可能得用 HSV 而非 RGB( |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
放个想法在这:)
或者上彩色直方图匹配(
ColorMatch
颜色匹配,即“找色”。
该任务属性需额外部分字段:
roi
: array<int, 4> | list<array<int, 4>>识别区域坐标。可选,默认 [0, 0, 0, 0],即全屏。
四个值分别为 [x, y, w, h]。
color
: string | list<string, >颜色的 hex 代码,如 #000000。必选。
threshold
: double | list<double, >颜色占比阈值,即 color 在 roi 中的占比。可选,默认 1.0 。
若为数组,长度需和
template
数组长度相同。total_threshold
: double总颜色占比阈值,即 colors 在 roi 中的占比。可选,默认 1.0 。
method
: int模板匹配算法。可选。可参考 https://www.compuphase.com/cmetric.htm
method_threshold
: double模板匹配算法的颜色匹配阈值,即颜色的相近程度。可选,默认 1.0 。
Beta Was this translation helpful? Give feedback.
All reactions