您的位置:首页 > 编程语言 > Python开发

【opencv】python3 将图片生成视频文件

2017-05-10 18:09 901 查看
TensorFlow是谷歌基于DistBelief进行研发的第二代人工智能学习系统,其命名来源于本身的运行原理。Tensor(张量)意味着N维数组,Flow(流)意味着基于数据流图的计算,TensorFlow为张量从流图的一端流动到另一端计算过程。TensorFlow是将复杂的数据结构传输至人工智能神经网中进行分析和处理过程的系统。

TensorFlow可被用于语音识别图像识别等多项机器深度学习领域,对2011年开发的深度学习基础架构DistBelief进行了各方面的改进,它可在小到一部智能手机、大到数千台数据中心服务器的各种设备上运行。TensorFlow将完全开源,任何人都可以用。

原生接口文章

【Tensorflow】tf.placeholder函数
【TensorFlow】tf.nn.conv2d是怎样实现卷积的
【TensorFlow】tf.nn.max_pool实现池化操作
【Tensorflow】tf.nn.relu函数
【Tensorflow】tf.reshape
函数
【Tensorflow】tf.nn.dropout函数
【Tensorflow】tf.argmax函数
【Tensorflow】tf.cast
类型转换 函数
【Tensorflow】tf.train.AdamOptimizer函数
【Tensorflow】tf.Graph()函数
【TensorFlow】tf.nn.softmax_cross_entropy_with_logits的用法

【Tensorflow】tf.dynamic_partition
函数 分拆数组

     原生接口实例

【Tensorflow】实现简单的卷积神经网络CNN实际代码
【Tensorflow
实战】实现欧式距离

        slim接口文章

【Tensorflow】tensorflow.contrib.slim


【Tensorflow
slim】 slim.arg_scope的用法

【Tensorflow
slim】slim.data包

【Tensorflow
slim】slim evaluation 函数

【Tensorflow
slim】slim layers包

【Tensorflow
slim】slim learning包
【Tensorflow
slim】slim losses包

【Tensorflow
slim】slim nets包

【Tensorflow
slim】slim variables包

【Tensorflow
slim】slim metrics包
       slim
实例

【Tensorflow
slim 实战】写MobileNet

【Tensorflow
slim 实战】写Inception-V4 Inception-ResNet-v2结构
        kera
接口文章

【Tensorflow
keras】Keras:基于Theano和TensorFlow的深度学习库

【Tensorflow
keras】轻量级深度学习框架 Keras简介

        tensorflow使用过程中的辅助接口或通过tensorflow实现的批量操作接口

将非RGB图片转换为RGB图片

【opencv】python3
将图片生成视频文件

【opencv】selective_search函数

=========================================================================

import os
import cv2
from PIL import Image
import numpy as np

fourcc = cv2.VideoWriter_fourcc('M', 'J', 'P', 'G')
size = (640,360)
vw = cv2.VideoWriter('file.avi', fourcc=fourcc, fps=1.0, frameSize=size)

path = "H:\\camera\\camera1\\"
filelist = os.listdir(path)
index = 0
for f in filelist:
f_read = cv2.imread(path+f)
f_img = Image.fromarray(f_read)
f_rs = f_img.resize([640,360],resample=Image.NONE)
f_out = np.array(f_rs)
# cv2.imwrite("file"+str(index)+".jpg",f_out)
# index+=1
vw.write(f_out)
vw.release()
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息