Python OpenCV sample subset images
来源:互联网 发布:reverse软件下载 编辑:程序博客网 时间:2024/06/06 00:33
sample subset images from many images
import sys,osdef fileCountIn(dir): return sum([len(files) for root,dirs,files in os.walk(dir)])print "sample images:"path = "/home/qz/Desktop/CalibGoProHero4/intrinsic/src3/"newpath = "/home/qz/Desktop/CalibGoProHero4/intrinsic/src/"fileCount = fileCountIn(path)print fileCountsample_ratio = 0.025sample_digits = int(1/sample_ratio)print sample_digitsindex = 1for filename in os.listdir(path): index = index +1 if(index%sample_digits==0): print filename img = cv2.imread(path + filename) img = cv2.transpose(img) img = cv2.flip(img,1 ) new_name = newpath + filename cv2.imwrite(new_name, img)
0 0
- Python OpenCV sample subset images
- python + opencv 学习系列 1 : Getting Started with Images
- OpenCV-Python 教程——从Images开始
- Integral images in OpenCV
- Converting between ROS images and OpenCV images
- 用 Python 和 OpenCV 检测图片上的条形码Detecting Barcodes in Images with Python and OpenCV
- Detecting Skin in Images & Video Using Python and OpenCV皮肤检测
- 【持续更新】opencv sample分类
- OpenCV 团块跟踪sample使用
- ROS images和OpenCV images之间的转化
- python -- TextCtrl sample
- python -- chat (sample)
- python: https server sample
- python: https client sample
- Python and Golang upload images
- Python&Print Time&Read Images
- OpenCV save RGB images as bmp
- OpenCV例程2 how to scan images
- 01 java基础
- session 持久化
- MongoDB 3.4 高可用集群搭建(三)shard 分片
- 窗口状态参数
- Android根据文件路径加载指定文件
- Python OpenCV sample subset images
- 7springboot 注解
- Android AutoLayout全新的适配方式 堪称适配终结者
- response设置编码的三种方式以及比较
- tomcat 禁用不安全的http请求方式
- C# SplitContainer 控件详细用法
- php开发手机app接口
- HTML5 <canvas>
- TIPTOP使用技巧(二)