def read_process(): (yield from read_frame_from_stream(transformer.output, pause=True)) first = crop((yield from read_frame_from_stream(transformer.output, pause=True)), left=crop_left, right=crop_right, bottom=crop_bottom, top=crop_top) second = crop( (yield from read_frame_from_stream(transformer.output, pause=True)), left=crop_left, right=crop_right, bottom=crop_bottom, top=crop_top) self.assertEqual(first, second)
def read_process(): image = (yield from read_frame_from_stream(transformer.output, timeout=1000, pause=False)) target_image = np.copy(image) for y, row in enumerate(image): for x, px in enumerate(row): target_image[y // 2 + ((y % 2) * len(image) // 2)][x // 2 + ((x % 2) * len(row) // 2)] = px imageio.imsave(platform.output_filename_base + ".png", target_image)
def read_process(): self.assertEqual( crop((yield from read_frame_from_stream(transformer.output, pause=True)), left=crop_left, right=crop_right, bottom=crop_bottom, top=crop_top), testdata_transformed)
def read_process(): for n in range(2): frame = (yield from read_frame_from_stream(transformer.outputs[i], timeout=1000, pause=False)) imageio.imsave( platform.output_filename_base + f"_{i}_{n}.png", frame)
def read_process(): image = (yield from read_frame_from_stream(stream_captured, timeout=1000, pause=False)) imageio.imsave(platform.output_filename_base + "_output_{}.png".format(i_captured), image)
def read_process(): for i in range(2): image = (yield from read_frame_from_stream(wavelet.output, timeout=1000, pause=False)) imageio.imsave(platform.output_filename_base + str(i) + ".png", image)