def ex(params): rgb = RGBExtractor() rgb.shp = (200, 200) p = list(params) p[-1] *= 1.5 return rgb.extract(*p)
def ex(params): rgb = RGBExtractor() rgb.shp = (200, 200) p = list(params) p[-1] *= 1.5 return rgb.extract(*p)
def collage(bubbles): ex = RGBExtractor() ex.shp = (200, 200) images = [ex.extract(*p) for p in bubble_params(bubbles)] if len(images) == 3: return np.vstack(images) r, g, b = tuple( montage2d(np.array([a[:, :, i] for a in images])) for i in range(3)) return np.dstack((r, g, b)).astype(np.uint8)
def collage(bubbles): ex = RGBExtractor() ex.shp = (200, 200) images = [ex.extract(*p) for p in bubble_params(bubbles)] if len(images) == 3: return np.vstack(images) r, g, b = tuple(montage2d(np.array([a[:, :, i] for a in images])) for i in range(3)) return np.dstack((r, g, b)).astype(np.uint8)