Image-stitcher icon indicating copy to clipboard operation
Image-stitcher copied to clipboard

UserWarning:怎么解决

Open 18HEU22BIT opened this issue 3 years ago • 6 comments

你好 UserWarning: In this program, original ga algorithm is replaced with a exprimental one, to disable this, go to this file and comment the line "In this program, original ga algorithm is replaced with a exprimental one, to disable this, go to this file and comment the line") 另外是只需要配置好环境 改好stitch.py的图片路径就可以运行吗

18HEU22BIT avatar Jan 27 '22 10:01 18HEU22BIT

是的,这个代码里我用了一些自己写的算法,你可以找到警告的那句代码注释掉就好了,当然不注释也应该不影响运行,只不过可能会和库里的函数结果有偏差

zhaobenx avatar Jan 27 '22 16:01 zhaobenx

Error Traceback (most recent call last): File "D:\PycharmProjects\SIFTgithub\stitch.py", line 524, in test_stich stitcher = Stitcher(image1, image2, points, points) File "D:\PycharmProjects\SIFTgithub\stitch.py", line 171, in init self.matcher = Matcher(image1, image2, method=method) File "D:\PycharmProjects\SIFTgithub\stitch.py", line 74, in init if self.method == Method.ORB: ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all() 你好 我把stitch.py的 img1 = cv2.imread("../img/3-left.jpg") img2 = cv2.imread("../img/3-right.jpg") 图片路径改了之后报错是因为环境没配置好吗还是有其他要改的地方吗 大佬可以加qq1398637962教一下么

18HEU22BIT avatar Jan 29 '22 02:01 18HEU22BIT

这个好像是我testcase 没有及时更新的问题所以报错了,你把stich 里面的unit test 全删掉应该就好了。 而且这个项目已经是四年前的了,很多问题可能我自己都没法解答了😂

zhaobenx avatar Jan 29 '22 16:01 zhaobenx

错误回溯(最近一次调用):文件 “D:\PycharmProjects\SIFTgithub\stitch.py”,第 524 行,在 test_stich 拼接器 = Stitcher(image1, image2, points, points) 文件 “D:\PycharmProjects\SIFTgithub\stitch.py”,第 171 行,在 init 中 self.matcher = Matcher(image1, image2, method=method) 文件 “D:\PycharmProjects\SIFTgithub\stitch.py”,第 74 行,在 init if self.method == Method.ORB 中: ValueError:具有多个元素的数组的真值不明确。使用 a.any() 或 a.all() 你好 我把 stitch.py 的 img1 = cv2.imread(“../img/3-left.jpg“) img2 = cv2.imread(”../img/3-right.jpg“) 图片路径改了之后报错是因为环境没配置好吗还是有其他要改的地方吗 大佬可以加qq1398637962教么一下

woaixuexiros avatar Feb 23 '23 03:02 woaixuexiros

兄弟我也是你这些问题 一模一样 你解决了吗

woaixuexiros avatar Feb 23 '23 03:02 woaixuexiros

兄弟我也是你这些问题一模一样你解决了吗

你好,你解决了吗,我运行不出来

hkhhkk avatar Apr 13 '23 07:04 hkhhkk