MCPcopy Create free account
hub / github.com/IceClear/StableSR / rgb2bgr

Function rgb2bgr

scripts/util_image.py:214–214  ·  view source on GitHub ↗
(im)

Source from the content-addressed store, hash-verified

212def bgr2rgb(im): return cv2.cvtColor(im, cv2.COLOR_BGR2RGB)
213
214def rgb2bgr(im): return cv2.cvtColor(im, cv2.COLOR_RGB2BGR)
215
216def tensor2img(tensor, rgb2bgr=True, out_type=np.uint8, min_max=(0, 1)):
217 """Convert torch Tensors into image numpy arrays.

Callers 2

imwriteFunction · 0.85
jpeg_compressFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected