def load1(self): self.ids.img.source = self.filePath self.ids.img.reload() sav(imgtmp,functions.aux(self.filePath)) self.ids.imgt.source=imgtmp self.ids.imgt.reload() self.ld1=True self.set_stat(ok)
def save(self): if self.ld1: sav(out,functions.aux(imgtmp)) self.set_stat("Imagen guardada correctamente") self.ids.out.source=out self.ids.out.reload() else: self.set_stat("No hay imagenes para guardar")
def f1(self, instance): a = functions.puntos(self.filePath) #a=[[self.root.ids.u_l.x,self.root.ids.u_l.y],[self.root.ids.u_r.x,self.root.ids.u_r.y],[self.root.ids.d_l.x,self.root.ids.d_l.y],[self.root.ids.d_r.x,self.root.ids.d_r.y]] temporal = np.array(a) img = functions.aux(self.filePath) b = functions.four_point_transform(img, temporal) sav(self.tmpdir, b) sav(self.statdir, b) self.root.ids.imgorig.source = self.statdir self.root.ids.imgorig.reload() self.root.ids.imgtmp.source = self.tmpdir self.root.ids.imgtmp.reload()
def rest(self, instance): sav(self.tmpdir, functions.aux(self.statdir)) self.root.ids.imgtmp.reload()
def f2(self, instance): sav("./out/" + str(self.cont) + ".jpg", functions.aux(self.tmpdir))
def load(self): sav(imgtmp,functions.aux(out)) self.ids.imgt.reload() self.set_stat("Imagen cargada correctamente")