This commit is contained in:
louiscklaw
2025-01-31 22:57:47 +08:00
parent b1cd1d4662
commit b3cc8e8323
764 changed files with 722101 additions and 0 deletions

View File

@@ -0,0 +1,9 @@
import os
# 处理前要将pos.txt里面每行按"*.jpg 1 0 0 20 20"的格式修改neg.txt不需要改格式
# neg.txt和pos.txt里面末尾的空行要删去
# neg.txt里面图片大小和数量可以不用特别指定也不需要生成vec文件
# os.system("opencv_createsamples.exe -vec pos.vec -info pos.txt -num 100 -w 20 -h 20")
os.system("opencv_createsamples -info pos.txt -vec pos.vec -num 100 -w 20 -h 20")
# os.system("pause")