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

Function _to_normalized_image

VSR/Framework/Callbacks.py:93–103  ·  view source on GitHub ↗
(img, mode)

Source from the content-addressed store, hash-verified

91
92
93def _to_normalized_image(img, mode):
94 img = np.asarray(img)
95 assert img.ndim == 4
96 return_img = []
97 for single_img in img:
98 if single_img.shape[-1] == 2:
99 # treat 2 channels image as optical flow
100 return_img.append(_flow_to_image(img, mode))
101 single_img = np.clip(single_img, 0, 255)
102 return_img.append(array_to_img(single_img, mode))
103 return return_img
104
105
106def _color_wheel():

Callers 1

Calls 2

_flow_to_imageFunction · 0.85
array_to_imgFunction · 0.85

Tested by

no test coverage detected