Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[建议]希望当roi为[0,0,0,0]时不计算/不执行roi_offset(即继续识别全屏) #528

Open
Remok-R opened this issue Feb 1, 2025 · 0 comments

Comments

@Remok-R
Copy link

Remok-R commented Feb 1, 2025

当前在[0,0,0,0]上加入offset会单纯地参与计算,导致识别区域为最左上一块(变为[0,0,x,y])。希望当roi为[0,0,0,0]时不执行roi_offset,继续识别全屏。

使用场景例:某游戏的战斗页面ui支持用户自定义,导致用户的ui位置各不相同,但位置相对固定,由于屏幕震动等效果有少量位移(720p下,约为5个像素)
现行做法是每一次进战斗便全屏识别一遍ui。能用,但识别时间较长,极偶尔还会识别错误。

希望使用 "roi":"当前节点名","roi_offset":[-10,-10,20,20](即希望第一次执行时,当前节点在之前未识别过→[0,0,0,0]→识别全屏;第二次识别时→当前节点已识别过→从第一遍识别到的区域扩大一圈进行识别)来降低资源消耗与识别时间。
当前是只能使用roi"当前节点名",但不能加入offset的。offset后首次识别区域就会变为左上一小块(符合设计预期?)。如果能够在roi为[0,0,0,0]时不计算offset(识别全屏)就能实现期望效果了。

当然,如果这个需求会使运算速度减慢较多、得不偿失,或者单纯觉得没有“简洁的美感”,就保持不变也好……(毕竟程序已经能跑了为什么要改.jpg)

最后祝大家正月快乐~

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant