def start_btn_cb(self): if self.errors(): exit() img_h = int(self.img_h.get()) img_w = int(self.img_w.get()) tile_val = int(self.tile_size.get()) dis_metric = self.hist_var.get() filename = self.image_path[self.image_path.rfind("/") + 1:-4] filename_out = filename + time.strftime("%Y%m%d-%H-%M-%S") + \ "-" + dis_metric + "-" + str(tile_val) + "-" + \ str(img_w) + "x" + str(img_h) mos = Mosaic(self.image_path, (img_w, img_h), tile_val, dis_metric, filename_out) if self.part_chooser.get() == "A": if self.src_dir is None: print("Select source directory") exit() mos.read_src_images(self.src_dir) mos.create_mosaic(self.src_dir) elif self.part_chooser.get() == "C": dir = mos.classify_img() mos.read_src_images(dir) mos.create_mosaic(dir)
def start_btn_cb(self): if self.errors(): exit() img_h = int(self.img_h.get()) img_w = int(self.img_w.get()) tile_val = int(self.tile_size.get()) dis_metric = self.hist_var.get() filename = self.image_path[self.image_path.rfind("/") + 1:-4] filename_out = filename + time.strftime( "%Y%m%d-%H-%M-%S") + "-" + dis_metric + "-" + str( tile_val) + "-" + str(img_w) + "x" + str(img_h) mos = Mosaic(self.image_path, (img_w, img_h), tile_val, self.src_dir, dis_metric, filename_out) if self.part_chooser.get() == "A": mos.read_src_images() mos.create_mosaic() elif self.part_chooser.get() == "C": mos.compute_partB() mos.update_src_images() mos.read_src_images() mos.create_mosaic()