logo
Browse Source

Update

Signed-off-by: Jael Gu <mengjia.gu@zilliz.com>
v1
Jael Gu 2 years ago
parent
commit
0810791d54
  1. 39
      README.md
  2. BIN
      result.png
  3. BIN
      src_dog.jpg

39
README.md

@ -2,50 +2,31 @@
*author: Kaiyuan Hu, Rentong Guo*
<br />
## Description
An image decode operator implementation with OpenCV.
<br />
## Code Example
Load a image from path './dog.jpg'.
Load a image from path './src_dog.jpg'.
*Write the pipeline in simplified style:*
*Write a pipeline with explicit inputs/outputs name specifications:*
```python
import towhee
from towhee.dc2 import pipe, ops, DataCollection
towhee.glob('./dog.jpg') \
.image_decode.cv2() \
.show()
p = (
pipe.input('path')
.map('path', 'image', ops.image_decode.cv2_rgb())
.output('path', 'image')
)
```
*Write a same pipeline with explicit inputs/outputs name specifications:*
```python
import towhee
towhee.glob['path']('./dog.jpg') \
.image_decode.cv2['path', 'img']() \
.select['img']() \
.show()
```
<img src="./show_result.jpg" height="150px"/>
<img src="./result.png" height="150px"/>
@ -57,7 +38,7 @@ towhee.glob['path']('./dog.jpg') \
Create the operator via the following factory method:
***image_decode.cv2()***
***image_decode.cv2_rgb()***

BIN
result.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB

BIN
src_dog.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Loading…
Cancel
Save