This repository has been archived by the owner on Sep 3, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 10
my problem #4
Comments
Meowcolm024
added
bug
Something isn't working
Windows
exceptions on windows
openCV
problems related to openCV
labels
Jan 22, 2019
Try to check the following items:
self.basic_scenes = [cv2.imread(f"./assets/scene/{basic_scene}.png", 0) for basic_scene in basic_scenes]
self.battle_scenes = [cv2.imread(f"./assets/battle/{battle_scene}.png", 0) for battle_scene in battle_scenes]
self.support_scene = cv2.imread(f"./assets/scene/{support_scene}.png", 0)
self.finish_scenes = [cv2.imread(f"./assets/scene/{finish_scene}.png", 0) for finish_scene in finish_scenes]
self.loading_scenes = [cv2.imread(f"./assets/scene/{loading_scene}.png", 0) for loading_scene in loading_scenes] try removing "./" self.basic_scenes = [cv2.imread(f"assets/scene/{basic_scene}.png", 0) for basic_scene in basic_scenes]
self.battle_scenes = [cv2.imread(f"assets/battle/{battle_scene}.png", 0) for battle_scene in battle_scenes]
self.support_scene = cv2.imread(f"assets/scene/{support_scene}.png", 0)
self.finish_scenes = [cv2.imread(f"assets/scene/{finish_scene}.png", 0) for finish_scene in finish_scenes]
self.loading_scenes = [cv2.imread(f"assets/scene/{loading_scene}.png", 0) for loading_scene in loading_scenes] However, I'm not sure whether these measures would work :( |
I’m sorry, but even I did it by your suggestion, It still wrong. |
I have the same question as xiuluoxiuluo1 has |
It seems that this bug is caused by a larger template image than the captured one. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
=========== RESTART: C:\Users\Shinelon\Desktop\FGO-master\main.py ===========
Traceback (most recent call last):
File "C:\Users\Shinelon\Desktop\FGO-one-master\main.py", line 21, in
end = s.recognize()
File "C:\Users\Shinelon\Desktop\FGO-one-master\interface\Major.py", line 70, in recognize
back = self.get_basic()
File "C:\Users\Shinelon\Desktop\FGO-one-master\interface\Major.py", line 27, in get_basic
if analyze(self.screenshot, basic_scene, self.threshold) == 1:
File "C:\Users\Shinelon\Desktop\FGO-one-master\util\cvs.py", line 43, in analyze
res = cv2.matchTemplate(sh, tmp, cv2.TM_CCOEFF_NORMED)
cv2.error: OpenCV(4.0.0) C:\projects\opencv-python\opencv\modules\imgproc\src\templmatch.cpp:589: error: (-215:Assertion failed) corrsize.height <= img.rows + templ.rows - 1 && corrsize.width <= img.cols + templ.cols - 1 in function 'cv::crossCorr'
I AM NOT GOOD AT ENGLISH(thank you in advance.)
I can find a picture which is called "sh"(screen shot) in my floder
then I checked something about opencv and adb , but there is nothing wrong(I can't find where the problem is)
The text was updated successfully, but these errors were encountered: