MCPcopy Create free account
hub / github.com/LoSealL/VideoSuperResolution / array_to_img

Function array_to_img

VSR/Util/ImageProcess.py:29–32  ·  view source on GitHub ↗

Convert an ndarray to PIL Image.

(x, mode='YCbCr')

Source from the content-addressed store, hash-verified

27
28
29def array_to_img(x, mode='YCbCr'):
30 """Convert an ndarray to PIL Image."""
31 x = np.squeeze(x)
32 return Image.fromarray(x.astype('uint8'), mode=mode)
33
34
35def img_to_array(img, data_format=None):

Callers 9

combineFunction · 0.90
rsrFunction · 0.90
denoiseFunction · 0.90
_read_fileMethod · 0.85
imwriteFunction · 0.85
_colored_grayscale_imageFunction · 0.85
_to_normalized_imageFunction · 0.85
_flow_to_imageFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected