Open Pranjal-SB opened 11 months ago
when i do python3 matcher.py i get that error
i researched a bit and found out that this error mostly comes only in replit which i am using 😅 lol but still if you could help i would be glad
i tried running on my pc and after a long load of all the templates i could find i got this different error
[*] Loaded "./templates/Wartortle.png"!
[*] Loaded "./templates/Watchog.png"!
[*] Loaded "./templates/Wattrel.png"!
[*] Loaded "./templates/Weavile.png"!
[*] Loaded "./templates/Weedle.png"!
[*] Loaded "./templates/Weepinbell.png"!
[*] Loaded "./templates/Weezing.png"!
[*] Loaded "./templates/Whimsicott.png"!
[*] Loaded "./templates/Whirlipede.png"!
[*] Loaded "./templates/Whiscash.png"!
[*] Loaded "./templates/Whismur.png"!
[*] Loaded "./templates/Wigglytuff.png"!
[*] Loaded "./templates/Wiglett.png"!
[*] Loaded "./templates/Wimpod.png"!
[*] Loaded "./templates/Wingull.png"!
[*] Loaded "./templates/Wishiwashi.png"!
[*] Loaded "./templates/Wo-Chien.png"!
[*] Loaded "./templates/Wobbuffet.png"!
[*] Loaded "./templates/Woobat.png"!
[*] Loaded "./templates/Wooloo.png"!
[*] Loaded "./templates/Wooper.png"!
[*] Loaded "./templates/Wormadam.png"!
[*] Loaded "./templates/Wugtrio.png"!
[*] Loaded "./templates/Wurmple.png"!
[*] Loaded "./templates/Wynaut.png"!
[*] Loaded "./templates/Wyrdeer.png"!
[*] Loaded "./templates/Xatu.png"!
[*] Loaded "./templates/Xerneas.png"!
[*] Loaded "./templates/Xurkitree.png"!
[*] Loaded "./templates/Yamask.png"!
[*] Loaded "./templates/Yamper.png"!
[*] Loaded "./templates/Yanma.png"!
[*] Loaded "./templates/Yanmega.png"!
[*] Loaded "./templates/Yungoos.png"!
[*] Loaded "./templates/Yveltal.png"!
[*] Loaded "./templates/Zacian.png"!
[*] Loaded "./templates/Zamazenta.png"!
[*] Loaded "./templates/Zangoose.png"!
[*] Loaded "./templates/Zapdos.png"!
[*] Loaded "./templates/Zarude.png"!
[*] Loaded "./templates/Zebstrika.png"!
[*] Loaded "./templates/Zekrom.png"!
[*] Loaded "./templates/Zeraora.png"!
[*] Loaded "./templates/Zigzagoon.png"!
[*] Loaded "./templates/Zoroark.png"!
[*] Loaded "./templates/Zorua.png"!
[*] Loaded "./templates/Zubat.png"!
[*] Loaded "./templates/Zweilous.png"!
[*] Loaded "./templates/Zygarde.png"!
[*] Testing source: ./test_poketwo_spawns/poketwo_deino.png
Traceback (most recent call last):
File "C:\Users\psbha\Documents\Stuff\opencv_poketwofinder-master\matcher.py", line 99, in <module>
main()
File "C:\Users\psbha\Documents\Stuff\opencv_poketwofinder-master\matcher.py", line 92, in main
match_canditates.append({"name": str(template), "template": template.template, "result": check_matching(poketwo_spawn.template, template.template)})
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\psbha\Documents\Stuff\opencv_poketwofinder-master\matcher.py", line 55, in check_matching
kp1, kp2, matches = match_images(src, templ_flipped, False)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\psbha\Documents\Stuff\opencv_poketwofinder-master\matcher.py", line 12, in match_images
matches = bf.match(des1, des2)
^^^^^^^^^^^^^^^^^^^^
cv2.error: OpenCV(4.8.0) D:\a\opencv-python\opencv-python\opencv\modules\core\src\batch_distance.cpp:275: error: (-215:Assertion failed) type == src2.type() && src1.cols == src2.cols && (type == CV_32F || type == CV_8U) in function 'cv::batchDistance'
checked google maybe its because i gave 1000 templates or smh maybe
oh it was because of flabebe template it has those specia e s in her name so it didnt load correctly
bruh i have the exact deino image but this
//......loads
[*] Testing source: ./test_poketwo_spawns/poketwo_deino.png
[*] Potential Match: 'Iron moth' with score: 139
maybe most probably was becoz of the background
new issue not right at all fr
if there is any way to remove the bg before scan it may work better
Hello!
bruh i have the exact deino image but this
new issue not right at all fr
This python script currently does not have any instructions to follow when trying to match a source image containing a pokemon that it does not have a template for & it may output inaccurate results even with pre-existing templates, I was aware of that issue already and plan on fixing it at some point.
if there is any way to remove the bg before scan it may work better
I am not so sure if i will implement such feature, though its a maybe.
Thank you for the feedback!