logo
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Readme
Files and versions

Updated 3 months ago

image-decode

Image Decode Implementation with CV2

author: Kaiyuan Hu, Rentong Guo


Description

An image decode operator implementation with OpenCV.


Code Example

Load a image from path './src_dog.jpg'.

Write a pipeline with explicit inputs/outputs name specifications:

from towhee import pipe, ops, DataCollection

p = (
  pipe.input('path')
  .map('path', 'image', ops.image_decode.cv2_rgb())
  .output('path', 'image')
)


Factory Constructor

Create the operator via the following factory method:

image_decode.cv2_rgb()


Interface

An image decode operator takes an image path as input. It decodes the image back to ndarray.

Parameters:

img: str

​ Image file path.

Returns: towhee.types.Image (a sub-class of numpy.ndarray)

​ The decoded image data as numpy.ndarray.

More Resources

Jael Gu a0243c4475 Add more resources 12 Commits
file-icon .gitattributes
1.1 KiB
download-icon
Initial commit 3 years ago
file-icon README.md
3.0 KiB
download-icon
Add more resources 3 months ago
file-icon __init__.py
700 B
download-icon
update 2 years ago
file-icon image_decode_cv2.py
2.8 KiB
download-icon
Add timer 5 months ago
file-icon requirements.txt
29 B
download-icon
update 3 years ago
file-icon result.png
58 KiB
download-icon
Update 2 years ago
file-icon src_dog.jpg
26 KiB
download-icon
Update 2 years ago