def f3(self): if self.ld1: sav(imgtmp,functions.threshold(imgtmp)) self.ids.imgt.reload() self.set_stat("Listo") else: self.set_stat(upsall)
def f1(self): if self.ld1: sav(imgtmp,functions.hist_eq(imgtmp)) self.ids.imgt.reload() self.set_stat("Listo") else: self.set_stat(upsall)
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 f14(self): if self.ld1 and self.ld2: sav(imgtmp,functions.op_binario(imgtmp,self.rt2,"xor")) self.ids.imgt.reload() self.set_stat("Listo") elif self.ld1 or self.ld2: self.set_stat(ups2) else: self.set_stat(upsall)
def f9(self): if self.ld1 and self.ld2: sav(imgtmp,functions.op_div(imgtmp,self.rt2)) self.ids.imgt.reload() self.set_stat("Listo") elif self.ld1 or self.ld2: self.set_stat(ups2) else: self.set_stat(upsall)
def f2(self): if self.ld1: vlu=self.ids.entry.text if vlu=='' or vlu=='0': self.set_stat(upsf) else: sav(imgtmp,functions.contrast_str(imgtmp,int(vlu))) self.ids.imgt.reload() self.set_stat("Listo") else: self.set_stat(upsall)
def f12(self): if self.ld1: vlu=self.ids.entry2.text if vlu=='' or vlu=='0': self.set_stat(upsf) else: sav(imgtmp,functions.op_multi(imgtmp,float(vlu))) self.ids.imgt.reload() self.set_stat("Listo") else: self.set_stat(upsall)
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 f6(self): if self.ld1: vlu=self.ids.entry5.text vlu2=self.ids.entry6.text if (vlu=='' or vlu=='0') or (vlu2=='' or vlu2=='0') : self.set_stat(upsf) else: sav(imgtmp,functions.op_rtp(imgtmp,float(vlu),float(vlu2))) self.ids.imgt.reload() self.set_stat("Listo") else: self.set_stat(upsall)
def f10(self): if self.ld1 and self.ld2: vlu=self.ids.entry11.text if (vlu=='' or vlu=='0') : self.set_stat(upsf) else: sav(imgtmp,functions.op_blend(imgtmp,self.rt2,float(vlu))) self.ids.imgt.reload() self.set_stat("Listo") elif self.ld1 or self.ld2: self.set_stat(ups2) else: self.set_stat(upsall)
def f16(self): if self.ld1 and self.ld2: sav("./tmp/trr1.jpg",functions.op_binario(imgtmp,self.rt2,"not")) sav("./tmp/trr2.jpg",functions.op_binario(self.rt2,imgtmp,"not")) sav(imgtmp,functions.op_binario("./tmp/trr1.jpg","./tmp/trr2.jpg","or")) self.ids.imgt.reload() self.set_stat("Listo") elif self.ld1 or self.ld2: self.set_stat(ups2) else: self.set_stat(upsall)
def rest(self, instance): sav(self.tmpdir, functions.aux(self.statdir)) self.root.ids.imgtmp.reload()
def f_hist(self, instance): sav(self.tmpdir, functions.hist_eq(self.tmpdir)) 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")