def show_planes(self):
     img = self.ui.pdispace.getImage()
     source = str(img.source)
     self.ui.processingbar.image_currant = source
     if self.um.active:
         new = PI(filename=source).fatiamento(1)
         self.ui.pdispace.addImage(new)
     if self.dois.active:
         new = PI(filename=source).fatiamento(2)
         self.ui.pdispace.addImage(new)
     if self.tres.active:
         new = PI(filename=source).fatiamento(3)
         self.ui.pdispace.addImage(new)
     if self.quatro.active:
         new = PI(filename=source).fatiamento(4)
         self.ui.pdispace.addImage(new)
     if self.cinco.active:
         new = PI(filename=source).fatiamento(5)
         self.ui.pdispace.addImage(new)
     if self.seis.active:
         new = PI(filename=source).fatiamento(6)
         self.ui.pdispace.addImage(new)
     if self.sete.active:
         new = PI(filename=source).fatiamento(7)
         self.ui.pdispace.addImage(new)
     if self.oito.active:
         new = PI(filename=source).fatiamento(8)
         self.ui.pdispace.addImage(new)
 def fatia(self):
     img = self.ui.pdispace.getImage()
     source = str(img.source)
     self.ui.processingbar.image_currant = source
     new = PI(source).colorful(self.slices.text)
     img.source = new
     img.reload()
 def detectar(self):
     img = self.ui.pdispace.getImage()
     source = str(img.source)
     self.ui.processingbar.image_currant = source
     new = PI(source).contours_canny()
     img.source = new
     img.reload()
 def setHistogram(self, filename):
     try:
         newfilename = PI(filename=filename).histogram()
         self.hist.source = newfilename
         self.hist.reload()
     except AttributeError:
         self.hist.source = " "
         self.hist.reload()
 def equalizar(self):
     if self.ui.pdispace.panelimages.content != 'None':
         img = self.ui.pdispace.getImage()
         source = str(img.source)
         self.ui.processingbar.image_currant = source
         new = PI(filename=source).equalize()
         img.source = new
         img.reload()
         self.hist.reload()
    def on_press(self):

        img = self.ui.pdispace.getImage()
        source = str(img.source)
        self.ui.processingbar.image_currant = source
        if self.mediana.active:
            print("Mediana")
            new = PI(source).median_filter(int(self.kernelTextInput.text))
        elif self.media.active:
            print("Media")
            new = PI(source).media_filter(int(self.kernelTextInput.text))
        elif self.max.active:
            print("Max")
            new = PI(source).media_filter(int(self.kernelTextInput.text))
        elif self.min.active:
            print("Min")
            new = PI(source).media_filter(int(self.kernelTextInput.text))
        img.source = new
        img.reload()
 def on_press(self):
     img = self.ui.pdispace.getImage()
     self.ui.processingbar.image_currant = str(img.source)
     ip = PI(filename=self.ui.getSourceImage())
     try:
         offset = float(self.offsettextinput.text)
         newfilename = ip.power(int(self.consttextinput.text),
                                float(self.gamatextinput.text), offset)
     except ValueError:
         newfilename = ip.power(int(self.consttextinput.text),
                                float(self.gamatextinput.text))
     img.source = newfilename
     img.reload()
Beispiel #8
0
 def build(self):
     b = BoxLayout()
     filename = PI(filename="./images/estrada.jpg").media_filter(5)
     # fcka = FigureCanvasKivyAgg(plt)
     b.add_widget(Image(source=filename))
     return b
 def get_gcf(self, source):
     plt = PI(filename=source).histogram()
     return plt
Beispiel #10
0
 def build():
     b = BoxLayout()
     filename = PI(filename="./images/estrada.jpg").media_filter(5)
     b.add_widget(Image(source=filename))
     return b