MCPcopy Create free account
hub / github.com/HobbitLong/PyContrast / RGB2Lab

Class RGB2Lab

pycontrast/datasets/util.py:84–89  ·  view source on GitHub ↗

Convert RGB PIL image to ndarray Lab.

Source from the content-addressed store, hash-verified

82
83
84class RGB2Lab(object):
85 """Convert RGB PIL image to ndarray Lab."""
86 def __call__(self, img):
87 img = np.asarray(img, np.uint8)
88 img = color.rgb2lab(img)
89 return img
90
91
92class RGB2YCbCr(object):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected