AirtestProject / AirtestProject/Airtest
MacOS airtest1.2.3图像识别rgb选项不起作用
- Dominant language
- Python
- Stars
- 9.6k
- Forks
- 1.5k
- PR merge metrics
- No merged PRs in 30d
Description
(请尽量按照下面提示内容填写,有助于我们快速定位和解决问题,感谢配合。否则直接关闭。)
**(重要!问题分类)**
* 测试开发环境AirtestIDE使用问题 -> https://github.com/AirtestProject/AirtestIDE/issues
* 控件识别、树状结构、poco库报错 -> https://github.com/AirtestProject/Poco/issues
* 图像识别、设备控制相关问题 -> 按下面的步骤
**描述问题bug**
一个控件中内容是一模一样的只有颜色不相同,于是我翻开教程,查到了rgb设置为True可以区分颜色。但是当我把rgb选项开启后,依然对颜色不同的模板捕获成功。
(简洁清晰得概括一下遇到的问题是什么。或者是报错的traceback信息。)
```shell
[DEBUG][Start debugging...]
/Applications/AirtestIDE.app/Contents/MacOS/airtest/core/android/static/adb/mac/adb -P 5037 -s e66cdc75 wait-for-device
/Applications/AirtestIDE.app/Contents/MacOS/airtest/core/android/static/adb/mac/adb -P 5037 -s e66cdc75 shell getprop ro.build.version.sdk
Try finding:
Template(tpl1586245090478.png)
/Applications/AirtestIDE.app/Contents/MacOS/airtest/core/android/static/adb/mac/adb -P 5037 -s e66cdc75 shell screencap -p
/Applications/AirtestIDE.app/Contents/MacOS/airtest/core/android/static/adb/mac/adb -P 5037 -s e66cdc75 shell dumpsys display
/Applications/AirtestIDE.app/Contents/MacOS/airtest/core/android/static/adb/mac/adb -P 5037 -s e66cdc75 shell dumpsys SurfaceFlinger
/Applications/AirtestIDE.app/Contents/MacOS/airtest/core/android/static/adb/mac/adb -P 5037 -s e66cdc75 shell getevent -p
try match with SURFMatching
[SURF] threshold=0.7, result={'result': (546, 1394), 'rectangle': [(135, 1330), (135, 1458), (958, 1458), (958, 1330)], 'confidence': 0.7778783074021339}
find_best_result() run time is 2.48 s.
match result: {'result': (546, 1394), 'rectangle': [(135, 1330), (135, 1458), (958, 1458), (958, 1330)], 'confidence': 0.7778783074021339}
(546, 1394)
[DEBUG][End debugging....]
(在这里粘贴traceback或其他报错信息)
```
**相关截图**
(贴出遇到问题时的截图内容,如果有的话)
(在AirtestIDE里产生的图像和设备相关的问题,请贴一些AirtestIDE控制台黑窗口相关报错信息)
**复现步骤**
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
**预期效果**
对于颜色识别的结果正常处理,勾选rgb选项后能够正常的区分红色灰色
**python 版本:** `python3.7.3`
**airtest 版本:** `1.2.3`
**设备:**
- 型号: [e.g. 360 N7lite]
- 系统: [e.g. Android 8.1]
- (别的信息)
**其他相关环境信息**
条件有限,未尝试
(其他运行环境,例如在linux ubuntu16.04上运行异常,在windows上正常。)
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.