Open
Conversation
98fa50b to
a9cbc23
Compare
Contributor
Author
|
其它大小会变的元素应该也可以用这个appear_multi_scale(),appear_then_click_multi_scale() |
Contributor
|
有几个问题请教下
|
结界皮肤改变时,"育成"、"结界卡"、"防守"等按钮的显示大小会变化 原始模板匹配无法识别不同缩放比例的按钮图片 修改 1. 在 RuleImage 添加 match_multi_scale() 方法 自动尝试 0.5~1.2 倍的缩放比例进行模板匹配 根据最佳缩放比例动态调整 roi_front 尺寸,确保点击坐标正确 2. 在 base_task 添加多尺度识别方法 appear_multi_scale() - 多尺度图片识别 appear_then_click_multi_scale() - 多尺度识别并点击 3. 修改以下图片使用多尺度匹配: I_SHI_GROWN I_SHI_CARD I_SHI_DEFENSE 感觉结界皮肤可以删了( 测试了10多款皮肤都没问题(也可能我皮肤太少) 后边只用对鲤鱼旗适配就行
Contributor
Author
|
@ljxun
1.适配最优点击范围,不排除可能会点到外边(虽然click可以重复多点几次),要改也行
2.我取的模板是初始皮或者是那种鲤鱼旗比较大的,有些结界的鲤鱼旗挺小的(后续可以优化一下方法自选范围)
3.我改下
…------------------ 原始邮件 ------------------
发件人: ***@***.***>;
发送时间: 2026年2月12日(星期四) 晚上10:26
收件人: ***@***.***>;
抄送: ***@***.***>; ***@***.***>;
主题: Re: [runhey/OnmyojiAutoScript] feat(KekkaiUtilize): 添加多尺度模板匹配,结界皮肤通用 (PR #1425)
ljxun left a comment (runhey/OnmyojiAutoScript#1425)
有几个问题请教下
为啥要取最优的尺寸 ,只要一个尺寸匹配超过 需要的置信度就可以返回吧
这个尺寸从1.0 开始效率更高吧
if mat is None or mat.shape[0] == 0 or mat.shape[1] == 0: 这句应该返回False吧
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
使用方式: # scale_range: 缩放范围 (start, end, step),step不填默认0.1 self.appear_then_click_multi_scale(self.I_SHI_GROWN, scale_range=(0.8, 1.2)) # scales: 自定义缩放列表 self.appear_then_click_multi_scale(self.I_SHI_GROWN, scales=[0.8, 0.9, 1.0, 1.1]) # 都不指定则使用默认 [0.5, 0.6, ..., 1.2] self.appear_then_click_multi_scale(self.I_SHI_GROWN) 优先级:scale_range > scales > 默认
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
结界皮肤改变时,"育成"、"结界卡"、"防守"等按钮的显示大小会变化
原始模板匹配无法识别不同缩放比例的按钮图片
修改
感觉结界皮肤可以删了(
测试了10多款皮肤都没问题(也可能我皮肤太少)
后边只用对鲤鱼旗适配就行