资源简介
效果可看博客:https://blog.csdn.net/qq153471503/article/details/80064653
代码片段和文件信息
# -*- coding: UTF-8 -*-
import os
import os.path
import sys
if __name__ == “__main__“:
if len(sys.argv) != 3:
print
print(“Input error. conmond format: \n \
python %s [images path] [output file] \n \
For example: python %s ./faces_data ./at.txt “)%(sys.argv[0] sys.argv[0])
sys.exit(0)
base_PATH = sys.argv[1]
SEPARATOR = “;“
fh = open(sys.argv[2] “w“)
label = 0
for dirname dirnames filenames in os.walk(base_PATH):
for subdirname in dirnames:
subject_path = os.path.join(dirname subdirname)
for filename in os.listdir(subject_path):
abs_path = “%s/%s“ % (subject_path filename)
print “%s%s%d“ % (abs_path SEPARATOR label)
fh.write(abs_path)
fh.write(SEPARATOR)
fh.write(str(label))
fh.write(‘\n‘)
label = label + 1
fh.close()
- 上一篇:自写环信demo
- 下一篇:离散数学 蔡英 课后答案
相关资源
- ffmpeg4+OpenCV3+VS2017 H264编解码
- OpenCV与OpenGL实现增强现实
- 学习opencv 中文版 pdf 带完整目录
- ippicv_windows_20151201.zip
- 几个基于openCV开发的手势识别代码
- OpenCV3.3 mingw64位编译 包含contribute部分
- opencv3.2.0依赖项ippicv_linux_20151201.tgz
- Opencv3.2_VS2015_64bit_debug/release
- 多目标跟踪vs+opencv
- opencv 的汽车分类器的正样本。
- opencv人脸识别demo并保存头像小照片
- opencv 1.2 安装
- Machine Learning for OpenCV 原版PDF by Beye
- Learning-OpenCV-3_examples.zip
- Learning OpenCV Computer Vision with the OpenC
- 官方版opencv1.0 windows系统
- 二维码定位符识别带
- OpenCV3.2.0稳定版调用包
- OpenCV v320 X86开发包
- opencv3原书源码.7z
- zw_OpenCV-2.3.1-win-superpack.part3.zip
- x86OpenCV3.2.0
- openCV1.0.rar
- opencv水果识别样本(苹果、香蕉、梨
- OpenGL显示三维点云图像
- openCV_1.0及2.0版本使用的Lib和Dll文件
- OpenCV人脸识别-3.0
- Qt+OpenCV人脸识别
- opencv 360度n张图像拼接,任意角度两
- zw_摄像头实时监控与报警系统Opencv.
评论
共有 条评论