@4qm2我下载的口鼻xml文件的链接是这个:https://github.com/RobinDavid/OpenCV-tutorials?tab=readme-ov-file,上面的超链接标记错了
4
4qm2
@4qm2
0
声望
2
楼层
118
资料浏览
0
粉丝
0
关注
4qm2 发布的帖子
-
haar xml文件(mouse和nose)转换cascade文件出现错误,请问有转换之后的cascade文件吗?
回复: xml转cascade
是这样的,我需要口鼻部位的haar模型,但是openmv这个仓库下没有口鼻相关的文件,所以我去opencv的仓库下下载了口鼻对应的xml文件,然后进行转换的时候出现了错误,报错如下:(py27) PS E:\Desktop\openmv\ml\haarcascade> python .\cascade_convert.py .\haarcascade_mcs_mouth.xml Converting old XML format.. Traceback (most recent call last): File ".\cascade_convert.py", line 426, in <module> main() File ".\cascade_convert.py", line 423, in main cascade_binary_universal(args.file, args.stages, args.name) File ".\cascade_convert.py", line 101, in cascade_binary_universal cascade_binary_old(path, n_stages, name) File ".\cascade_convert.py", line 281, in cascade_binary_old fout.write(struct.pack('h', int(float(a.childNodes[0].nodeValue)*256))) #int16_t struct.error: short format requires SHRT_MIN <= number <= SHRT_MAX (py27) PS E:\Desktop\openmv\ml\haarcascade> python .\cascade_convert.py .\haarcascade_mcs_nose.xml Converting old XML format.. Traceback (most recent call last): File ".\cascade_convert.py", line 426, in <module> main() File ".\cascade_convert.py", line 423, in main cascade_binary_universal(args.file, args.stages, args.name) File ".\cascade_convert.py", line 101, in cascade_binary_universal cascade_binary_old(path, n_stages, name) File ".\cascade_convert.py", line 265, in cascade_binary_old fout.write(struct.pack('B', s)) # uint8_t struct.error: ubyte format requires 0 <= number <= 255
感觉可能是精度出现了问题,可以提供帮助吗