infstellar/genshin_impact_assistant

[help wanted 需要帮助] dev-tool中video2path.py运行报错

Closed this issue · 3 comments

[GIA] 委托脚本编写教程与演示
按照上边的视频里操作的,
开始播放视频按a,选择ID,这一步正常。关键的是在按下“]”键之后会自动暂停,提示“press any key to continue.”,再按空格就报错了。我需要怎么解决这个问题?
pic_2024-03-17_15-11-47

附视频

2024-03-17.15-04-34.mp4

在报错的minimap.py里添加了一行
from source.device.alas import utils as UTS
把报错的这行
area = area_pad(get_bbox(image, threshold=128), pad=-1)
改成
area = area_pad(UTS.get_bbox(image, threshold=128), pad=-1)
算是临时解决了,水平不够不清楚自己哪里搞错了= =

感觉像是bug?
source\map\detection\minimap.pyarea = area_pad(get_bbox(image, threshold=128), pad=-1)这一行中,
根据参数threshold推测想要调用source\device\alas\utils.py里的get_bbox(image, threshold=0)

get_bbox()这个函数被这句from source.util import *导入的同名函数顶掉了
所以去调用了source\util.py里的get_bbox(image, black_offset=15)导致报错

image
image

修了~