Beispiel #1
0
    def __call__(self, image):
        dbls = oofimage.grayify(image)
        temp = imageops.gaussSmooth(dbls, self.stdDev)

        scaled = imageops.scaleArray2(temp, 0.0, 1.0)

        imageops.setFromArray(image, scaled)
Beispiel #2
0
    def __call__(self, image):
        dbls = oofimage.grayify(image)
        temp = imageops.gaussSmooth(dbls,self.stdDev)  
           
        scaled = imageops.scaleArray2(temp, 0.0, 1.0)

        imageops.setFromArray(image,scaled)
Beispiel #3
0
    def __call__(self, image):
        dbls = oofimage.grayify(image)
        temp1 = imageops.sobel(dbls, 0)
        temp2 = imageops.sobel(dbls, 2)
        combined = imageops.combineVals(temp1, temp2)

        scaled = imageops.scaleArray2(combined, 0.0, 1.0)

        imageops.setFromArray(image, scaled)
Beispiel #4
0
    def __call__(self, image):
        dbls = oofimage.grayify(image)
        temp1=imageops.sobel(dbls,0)
        temp2=imageops.sobel(dbls,2)
        combined=imageops.combineVals(temp1,temp2)  
           
        scaled = imageops.scaleArray2(combined, 0.0, 1.0)

        imageops.setFromArray(image,scaled)
Beispiel #5
0
 def __call__(self, image):
     dbls = oofimage.grayify(image)
     for i in range(self.numAngles):
         phi = i * 180. / self.numAngles
         current = imageops.modGabor(dbls, self.a, self.b, phi)
         if i != 0:
             old = imageops.findLargerVals(current, old)
         else:
             old = current
     scaled = imageops.scaleArray2(old, 0.0, 1.0)
     imageops.setFromArray(image, scaled)
Beispiel #6
0
 def __call__(self, image):
     dbls = oofimage.grayify(image)
     for i in range(self.numAngles):
         phi = i*180./self.numAngles
         current = imageops.modGabor(dbls,self.a,self.b,phi)
         if i!=0:
             old=imageops.findLargerVals(current,old)
         else:
             old=current          
     scaled = imageops.scaleArray2(old, 0.0, 1.0)
     imageops.setFromArray(image,scaled)        
Beispiel #7
0
    def __call__(self, image):
        dbls = oofimage.grayify(image)
        largest = imageops.canny(dbls, self.stdDev)
        ##       smoothed = imageops.gaussSmooth(dbls,self.stdDev)

        ##        for i in range(4):
        ##            temp=imageops.sobel(smoothed,i)
        ##            if i!=0:
        ##                largest=imageops.findLargerVals(largest,temp)
        ##            else:
        ##                largest=temp

        scaled = imageops.scaleArray2(largest, 0.0, 1.0)

        imageops.setFromArray(image, scaled)
Beispiel #8
0
    def __call__(self, image):
        dbls = oofimage.grayify(image)
        largest=imageops.canny(dbls,self.stdDev)
 ##       smoothed = imageops.gaussSmooth(dbls,self.stdDev)
        
##        for i in range(4):
##            temp=imageops.sobel(smoothed,i)
##            if i!=0:
##                largest=imageops.findLargerVals(largest,temp)
##            else:
##                largest=temp 
           
        scaled = imageops.scaleArray2(largest, 0.0, 1.0)

        imageops.setFromArray(image,scaled)
Beispiel #9
0
    def __call__(self, image):
        ##        dbls=imageops.grayify(image)
        ##        final = imageops.newGabor(dbls,self.a,self.b,0)
        ##        gradDirs=intarray.makeIntArray(image.sizeInPixels(),0)
        ##        for i in range(self.numAngles-1):
        ##            phi = (i+1)*180./self.numAngles
        ##            temp = imageops.newGabor(dbls,self.a,self.b,phi)
        ##            final = imageops.findLargerVals2(final,temp,gradDirs,i+1)
        ##        scaled = imageops.scaleArray(final,0.0,1.0,self.Line_color)
        ##        scaled = imageops.nonmaxSuppress(scaled,gradDirs);
        ##        imageops.setFromArray(image,scaled)

        dbls = oofimage.grayify(image)
        for i in range(self.numAngles):
            phi = i * 180. / self.numAngles
            current = imageops.newGabor(dbls, self.a, self.b, phi)
            if i != 0:
                old = imageops.findLargerVals(current, old)
            else:
                old = current

        scaled = imageops.scaleArray(old, 0.0, 1.0, self.Line_color)

        imageops.setFromArray(image, scaled)
Beispiel #10
0
    def __call__(self, image):
##        dbls=imageops.grayify(image)
##        final = imageops.newGabor(dbls,self.a,self.b,0)
##        gradDirs=intarray.makeIntArray(image.sizeInPixels(),0)
##        for i in range(self.numAngles-1):
##            phi = (i+1)*180./self.numAngles
##            temp = imageops.newGabor(dbls,self.a,self.b,phi)
##            final = imageops.findLargerVals2(final,temp,gradDirs,i+1)
##        scaled = imageops.scaleArray(final,0.0,1.0,self.Line_color)
##        scaled = imageops.nonmaxSuppress(scaled,gradDirs);
##        imageops.setFromArray(image,scaled)
        
        dbls = oofimage.grayify(image)
        for i in range(self.numAngles): 
            phi = i*180./self.numAngles
            current = imageops.newGabor(dbls,self.a,self.b,phi)
            if i!=0:
                old=imageops.findLargerVals(current,old)
            else:
                old=current

        scaled = imageops.scaleArray(old, 0.0, 1.0,self.Line_color)

        imageops.setFromArray(image,scaled)
Beispiel #11
0
 def __call__(self, image):
     dbls = oofimage.grayify(image)
     dbls = imageops.spread2(dbls, self.T)
     imageops.setFromArray(image, dbls)
Beispiel #12
0
 def __call__(self, image):
     dbls = oofimage.grayify(image)
     dbls = imageops.addNoise(dbls, self.Standard_deviation)
     imageops.setFromArray(image, dbls)
Beispiel #13
0
 def __call__(self, image):
     dbls = oofimage.grayify(image)
     temp = imageops.laplacian(dbls)
     scaled = imageops.scaleArray2(temp, 0.0, 1.0)
     imageops.setFromArray(image, scaled)
Beispiel #14
0
 def __call__(self,image):
     dbls=oofimage.grayify(image)
     dbls=imageops.spread2(dbls,self.T)
     imageops.setFromArray(image,dbls)
Beispiel #15
0
 def __call__(self,image):
     dbls=oofimage.grayify(image)
     dbls=imageops.addNoise(dbls,self.Standard_deviation)
     imageops.setFromArray(image,dbls)
Beispiel #16
0
 def __call__(self, image):
     dbls = oofimage.grayify(image)
     temp = imageops.laplacian(dbls)  
     scaled = imageops.scaleArray2(temp, 0.0, 1.0)
     imageops.setFromArray(image,scaled)