def gen_images(self, image_data): # reconstruct the images images = [] for i in range(len(image_data)): images.append(Image(grayscale_to_RGB(image_data[i]), self.cam, self.gen_patterns[i])) return images
def setUp(self): self.width = 4 self.height = 16 patterns = gray_code_patterns((self.width, self.height), vertical_stripes=False) images = [] for p in patterns: data = p.image images.append(Image(grayscale_to_RGB(data), None, [GeneratedPattern([(p, None)])])) (self.gray_code_values, self.valid_pixel_mask) = gray_code_estimates(images)
def setUp(self): data = [[[8, 240, 12, 225], [240, 12, 225, 12]], [[234, 12, 25, 8], [12, 25, 8, 250]], [[12, 219, 248, 21], [219, 248, 21, 8]], [[243, 5, 8, 252], [174, 8, 252, 230]]] patterns = gray_code_patterns((2,4), vertical_stripes=False) images = [] for i in range(len(data)): images.append(Image(grayscale_to_RGB(data[i]), None, [GeneratedPattern([(patterns[i], None)])])) (self.gray_code_values, self.valid_pixel_mask) = gray_code_estimates(images)