计算机视觉研究的实用工具
cvbase的Python项目详细描述
#简介[PYPI版本](https://img.shields.io/pypi/v/cvbase.svg)(https://pypi.python.org/pypi/cvbase)
[![python版本](https://img.shields.io/pypi/pyversions/cvbase.svg)](
[![构建状态](https://travis-ci.org/hellock/cvbase.svg?branch=master)(https://travis ci.org/hellock/cvbase)
[![覆盖状态](https://codecov.io/gh/hellock/cvbase/branch/master/graph/badge.svg)]python2/3和opencv 2/3
-timer
-progress visualization
-plotting tools
-object detection utils
流行功能,如进度可视化、计时器、视频到帧/帧到视频。
-progress visualization
如果要对项目列表应用方法并跟踪进度,则“跟踪进度”是一个不错的选择。它将显示一个进度条来告诉进度和预计到达时间。
``python
import cvbase as cvb
def func(item):
![进度](docs/_static/progress.gif)
项目跟踪并行进度(功能、任务,8)
8个工人BR/>‘BR/> BR/> -定时器< BR/>< BR/>有利于计算机程序的运行时间为“定时器”。
By/>‘Python’BR/>导入时间
BR/>用CVB。(TimeR):模拟某些代码块
时间。睡眠(1)BR/>‘BR/> BR/>或尝试更灵活的方式。
BR/>``` python
timer=cvb.timer()
此处为代码块1
打印(timer.since泷start())
此处为代码块2
打印(timer.since泷last泷check())
打印(timer.since泷start())
`````
-视频/帧转换
将视频分割成帧。
`` python
=videoreader('video_file.mp4')
video.cvt2frames('frame_dir')
````
除了“cvt2frames”之外,“videoreader”还包装了许多其他有用的方法来像列表对象一样操作视频,像
```
video=cvb.videoreader('video_file.mp4')
len(video)获取总帧数
video[5]获取视频中img的第6帧:遍历所有帧
print(img.shape)
````
使用“frames2video”方法。
``python
video=cvb.frames2video('frame_dir','out_video_file.avi',fps=30)
````
-视频编辑(需要ffmpeg)
````
>
加入两个视频剪辑。
```python
调整视频大小('input.mp4','resized.mp4',比率=2)
```
转换视频格式。
```python
cvb.convert懔video('input.avi','output.mp4',vcodec='h264')
`'
[![python版本](https://img.shields.io/pypi/pyversions/cvbase.svg)](
[![构建状态](https://travis-ci.org/hellock/cvbase.svg?branch=master)(https://travis ci.org/hellock/cvbase)
[![覆盖状态](https://codecov.io/gh/hellock/cvbase/branch/master/graph/badge.svg)]python2/3和opencv 2/3
-timer
-progress visualization
-plotting tools
-object detection utils
流行功能,如进度可视化、计时器、视频到帧/帧到视频。
-progress visualization
如果要对项目列表应用方法并跟踪进度,则“跟踪进度”是一个不错的选择。它将显示一个进度条来告诉进度和预计到达时间。
``python
import cvbase as cvb
def func(item):
![进度](docs/_static/progress.gif)
项目跟踪并行进度(功能、任务,8)
8个工人BR/>‘BR/> BR/> -定时器< BR/>< BR/>有利于计算机程序的运行时间为“定时器”。
By/>‘Python’BR/>导入时间
BR/>用CVB。(TimeR):模拟某些代码块
时间。睡眠(1)BR/>‘BR/> BR/>或尝试更灵活的方式。
BR/>``` python
timer=cvb.timer()
此处为代码块1
打印(timer.since泷start())
此处为代码块2
打印(timer.since泷last泷check())
打印(timer.since泷start())
`````
-视频/帧转换
将视频分割成帧。
`` python
=videoreader('video_file.mp4')
video.cvt2frames('frame_dir')
````
除了“cvt2frames”之外,“videoreader”还包装了许多其他有用的方法来像列表对象一样操作视频,像
```
video=cvb.videoreader('video_file.mp4')
len(video)获取总帧数
video[5]获取视频中img的第6帧:遍历所有帧
print(img.shape)
````
使用“frames2video”方法。
``python
video=cvb.frames2video('frame_dir','out_video_file.avi',fps=30)
````
-视频编辑(需要ffmpeg)
````
>
加入两个视频剪辑。
```python
调整视频大小('input.mp4','resized.mp4',比率=2)
```
转换视频格式。
```python
cvb.convert懔video('input.avi','output.mp4',vcodec='h264')
`'