A simple example private package
Project description
OCV_Utils
Install
pip3 install git+https://github.com/Alpe6825/ocv_utils
Utils
Image I/O
Loading
Load image and convert it to a certain channel type definition. Supported types rgb, rgba, gray
from ocv_utils import load_image
img = load_image("my_image.png", channels="rgba")
Video I/O
Reading
from ocv_utils import VideoReader
video = VideoReader("video.mp4")
# cv2 like
while True:
ret, frame = video.read()
if not ret:
break
# Or read certain frame
ret, frame = video.read(frame_id=42)
Window
import numpy as np
from ocv_utils import Window
window = Window(delay=0)
window.add_trackbar("x", 1, 255)
window.add_key_action(ord('h'), lambda: print("Hello World!"))
img1 = np.zeros((256, 256), dtype=np.uint8)
img2 = np.random.random((256, 256, 3))
trackbar_values = window.imshow([img1, img2])
print("Trackbar Values:", trackbar_values) # Trackbar Values: {'x': 1}
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
ocv_utils-0.0.1.tar.gz
(5.2 kB
view details)
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 ocv_utils-0.0.1.tar.gz.
File metadata
- Download URL: ocv_utils-0.0.1.tar.gz
- Upload date:
- Size: 5.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cd5fb680eb1fa83d687ee8701cd1262776d314d1faee6fe1f850df8f41a78891
|
|
| MD5 |
3fe69e7e8402bd47cc0d55d5f593d079
|
|
| BLAKE2b-256 |
c22cf0e73757b186ac47253380289996231fa9b86f9b031356ee1e297ca7bd20
|
File details
Details for the file ocv_utils-0.0.1-py3-none-any.whl.
File metadata
- Download URL: ocv_utils-0.0.1-py3-none-any.whl
- Upload date:
- Size: 6.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1c0df543ce935fcbc7ef996a639463d3ae24ab4f5d25fcface42fb3af483d398
|
|
| MD5 |
75becfee4f707640e4df991a9bc251b7
|
|
| BLAKE2b-256 |
4192286f109ad4974e11a78ee1383b61f37e0482e076465641b01e60bb4147fa
|