Imvideo: Image to video made easy. Powered by OpenCV.
Project description
Imvideo
Imvideo helps you create time-lapse videos from camera-generated image folder and your matplotlib loop.
Install Imvideo
To install this package, type pip install imvideo in command prompt.
C:\Users\user>pip install imvideo
Collecting imvideo
Using cached imvideo-0.0.1-py3-none-any.whl (3.6 kB)
Installing collected packages: imvideo
Successfully installed imvideo-0.0.1
Function Details
Class local: timelapse(title, fps, folder_path, inspect=True):
timelapse(title, fps, folder_path, inspect=True):
Function constructs time-lapse video from images in a folder.
Inputs: title (string) video title + .avi
fps (double) time-lapse video frames per second
folder_path (raw string) location of the image folder
inspect (boolean) True (default)/False
Output:
time-lapse video
Class memory: savebuff(frame, container):
savebuff(frame, container):
Function saves image in in-memory location
Inputs: frame (matplotlib image)
container (list) empty image container
Output: container (list) image container with added frame location
construct(container, title, fps, inspect=True):
construct(container, title, fps, inspect=True):
Function constructs video from images in the container.
Inputs: container (list) image container with frame location
title (string) video title + .avi
fps (double) time-lapse video frames per second
inspect (boolean) True (default)/False
Output:
video
Use Imvideo
- Time-lapse video from a image folder:
import imvideo as imv
imv.local.timelapse(local.timelapse('demo.avi', 5, r".\tests\test_image"))
- Time-lapse video from a matplotlib loop:
import imvideo as imv
def test_matplot_loop(n):
''' Input: n number of frames'''
images = [] # empty image container
plt.figure()
for i in range(n):
plt.plot([np.random.randint(2), np.random.randint(2)])
plt.title("test" + str(i))
images = imv.memory.savebuff(plt, images) # save image in in-memory location
plt.clf()
imv.memory.construct(images, 'matplot_demo.avi', 5) # construct video; 5 fps
return
test_matplot_loop(100) # construct a demo video with 100 frames
Sample output
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file imvideo-0.0.2.tar.gz.
File metadata
- Download URL: imvideo-0.0.2.tar.gz
- Upload date:
- Size: 3.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/51.1.1 requests-toolbelt/0.9.1 tqdm/4.55.1 CPython/3.9.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9734384b373476a9408405cb26756520ad9ddf39fa1c95c5751c18dc00efb58d
|
|
| MD5 |
beeb8a6cb816dcef9af80a2c454c1c4c
|
|
| BLAKE2b-256 |
e4e456456b9012e6bbd7976f7c8df593b064fe15c8c62887d52b7c5ebd02f379
|
File details
Details for the file imvideo-0.0.2-py3-none-any.whl.
File metadata
- Download URL: imvideo-0.0.2-py3-none-any.whl
- Upload date:
- Size: 4.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/51.1.1 requests-toolbelt/0.9.1 tqdm/4.55.1 CPython/3.9.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
33972c1a2656b53d82c5d585b7595869df5bd6ba154dbbbd62023c8fe31c33de
|
|
| MD5 |
674960b38718fd8953b034cc06cec750
|
|
| BLAKE2b-256 |
b8125162a26118be894611c8d8095a0a99049ae7682a65312d64afdca1ebac3b
|