MCPcopy Create free account
hub / github.com/NVIDIA/DALI / rgb2bayer

Function rgb2bayer

dali/test/python/debayer_test_utils.py:73–79  ·  view source on GitHub ↗
(img, pattern)

Source from the content-addressed store, hash-verified

71
72
73def rgb2bayer(img, pattern):
74 h, w, c = img.shape
75 assert c == 3
76 h = h // 2 * 2
77 w = w // 2 * 2
78 r, g, b = rgb_bayer_masks((h, w), pattern)
79 return img[:h, :w, 0] * r + img[:h, :w, 1] * g + img[:h, :w, 2] * b
80
81
82def rgb2bayer_seq(seq, patterns):

Callers 3

sample_genFunction · 0.90
sample_genFunction · 0.90
prepare_test_imgsFunction · 0.90

Calls 1

rgb_bayer_masksFunction · 0.85

Tested by

no test coverage detected