Example #1
0
    def process_one(self):
        img_name = self.image_paths[0]
        mid_name = img_name[img_name.rindex("\\") + 1:]
        operations = []

        image_data = self.load_image_and_label(mid_name)
        # perform operations - call functions
        data1, oper1 = ImOp.RotateRange(25, 25).perform_operation(
            image_data, operations)
        data, oper = ImOp.Invert().perform_operation(data1, oper1)

        # temp_processed_data = ImageOperations.create_aberation_data(actual_image)

        # write output
        self.write_image_and_label(data, mid_name, oper)
Example #2
0
    def process_data(self):
        i = 0
        for img_name in self.image_paths:
            print img_name
            mid_name = img_name[img_name.rindex("\\") + 1:]
            operations = []

            image_data = self.load_image_and_label(mid_name)
            # perform operations - call functions
            data1, oper1 = ImOp.RotateRange(25, 25).perform_operation(
                image_data, operations)
            data, oper = ImOp.Invert().perform_operation(data1, oper1)

            # temp_processed_data = ImageOperations.create_aberation_data(actual_image)

            # write output
            self.write_image_and_label(data, mid_name, oper)
            i = i + 1
            sys.stdout.write('\r[{0}{1}] {2}'.format('#' * (i / 10),
                                                     ' ' * (10 - i / 10), i))