|  | @ -10,11 +10,29 @@ An image decode operator implementation with OpenCV. | 
		
	
		
			
				|  |  | 
 |  |  | 
 | 
		
	
		
			
				|  |  | 
 |  |  | 
 | 
		
	
		
			
				|  |  | 
 |  |  | 
 | 
		
	
		
			
				|  |  |  |  |  | ## Code Example | 
		
	
		
			
				|  |  |  |  |  | 
 | 
		
	
		
			
				|  |  |  |  |  | Load a image from path './dog.jpg'.  | 
		
	
		
			
				|  |  |  |  |  | 
 | 
		
	
		
			
				|  |  |  |  |  |  *Write the pipeline in simplified style*: | 
		
	
		
			
				|  |  |  |  |  | 
 | 
		
	
		
			
				|  |  |  |  |  | ```python | 
		
	
		
			
				|  |  |  |  |  | import towhee | 
		
	
		
			
				|  |  |  |  |  | 
 | 
		
	
		
			
				|  |  |  |  |  | towhee.glob(./dog.jpg) | 
		
	
		
			
				|  |  |  |  |  | 	.image_decode.cv2() | 
		
	
		
			
				|  |  |  |  |  |   .show() | 
		
	
		
			
				|  |  |  |  |  | ``` | 
		
	
		
			
				|  |  |  |  |  | 
 | 
		
	
		
			
				|  |  |  |  |  | *Write a same pipeline with explicit inputs/outputs name specifications:* | 
		
	
		
			
				|  |  |  |  |  | 
 | 
		
	
		
			
				|  |  | ```python |  |  | ```python | 
		
	
		
			
				|  |  | import towhee import ops |  |  |  | 
		
	
		
			
				|  |  |  |  |  | import towhee | 
		
	
		
			
				|  |  | 
 |  |  | 
 | 
		
	
		
			
				|  |  | img_decode = ops.image_decode.cv2() |  |  |  | 
		
	
		
			
				|  |  | img = img_decode('./dog.jpg') |  |  |  | 
		
	
		
			
				|  |  |  |  |  | towhee.glob['path'](./dog.jpg) | 
		
	
		
			
				|  |  |  |  |  |   .image_decode.cv2['path', 'img']() | 
		
	
		
			
				|  |  |  |  |  |   .select('img') | 
		
	
		
			
				|  |  |  |  |  |   .show() | 
		
	
		
			
				|  |  | ``` |  |  | ``` | 
		
	
		
			
				|  |  | 
 |  |  | 
 | 
		
	
		
			
				|  |  | 
 |  |  | 
 | 
		
	
	
		
			
				|  | @ -23,7 +41,7 @@ img = img_decode('./dog.jpg') | 
		
	
		
			
				|  |  | 
 |  |  | 
 | 
		
	
		
			
				|  |  | Create the operator via the following factory method |  |  | Create the operator via the following factory method | 
		
	
		
			
				|  |  | 
 |  |  | 
 | 
		
	
		
			
				|  |  | ***ops.image_decode.cv2()*** |  |  |  | 
		
	
		
			
				|  |  |  |  |  | ***image_decode.cv2()*** | 
		
	
		
			
				|  |  | 
 |  |  | 
 | 
		
	
		
			
				|  |  | 
 |  |  | 
 | 
		
	
		
			
				|  |  | 
 |  |  | 
 | 
		
	
	
		
			
				|  | @ -47,28 +65,3 @@ An image decode operator takes an image path as input. It decodes the image back | 
		
	
		
			
				|  |  | 
 |  |  | 
 | 
		
	
		
			
				|  |  | 
 |  |  | 
 | 
		
	
		
			
				|  |  | 
 |  |  | 
 | 
		
	
		
			
				|  |  | ## Code Example |  |  |  | 
		
	
		
			
				|  |  | 
 |  |  |  | 
		
	
		
			
				|  |  | Load a image from path './dog.jpg'.  |  |  |  | 
		
	
		
			
				|  |  | 
 |  |  |  | 
		
	
		
			
				|  |  |  *Write the pipeline in simplified style*: |  |  |  | 
		
	
		
			
				|  |  | 
 |  |  |  | 
		
	
		
			
				|  |  | ```python |  |  |  | 
		
	
		
			
				|  |  | import towhee.DataCollection as dc |  |  |  | 
		
	
		
			
				|  |  | 
 |  |  |  | 
		
	
		
			
				|  |  | dc.glob(./dog.jpg) |  |  |  | 
		
	
		
			
				|  |  |   .image_decode.cv2() |  |  |  | 
		
	
		
			
				|  |  |   .show() |  |  |  | 
		
	
		
			
				|  |  | ``` |  |  |  | 
		
	
		
			
				|  |  | 
 |  |  |  | 
		
	
		
			
				|  |  | *Write a same pipeline with explicit inputs/outputs name specifications:* |  |  |  | 
		
	
		
			
				|  |  | 
 |  |  |  | 
		
	
		
			
				|  |  | ```python |  |  |  | 
		
	
		
			
				|  |  | import towhee.DataCollection as dc |  |  |  | 
		
	
		
			
				|  |  | 
 |  |  |  | 
		
	
		
			
				|  |  | dc.glob['path'](./dog.jpg) |  |  |  | 
		
	
		
			
				|  |  |   .image_decode.cv2['path', 'img']() |  |  |  | 
		
	
		
			
				|  |  |   .select('img') |  |  |  | 
		
	
		
			
				|  |  |   .show() |  |  |  | 
		
	
		
			
				|  |  | ``` |  |  |  | 
		
	
		
			
				|  |  | 
 |  |  |  | 
		
	
	
		
			
				|  | 
 |