def __init__(self, kernel=None, image=None):
        self.fftengine = fftengine.fftEngine()

        self.kernel = None
        self.shape = None
        self.image_fft = None
        self.kernel_fft = {}

        if kernel is not None:
            self.setKernel(kernel)
        if image is not None:
            self.setImage(image)
Beispiel #2
0
	def __init__(self, kernel=None, image=None):
		self.fftengine = fftengine.fftEngine()

		self.kernel = None
		self.shape = None
		self.image_fft = None
		self.kernel_fft = {}

		if kernel is not None:
			self.setKernel(kernel)
		if image is not None:
			self.setImage(image)
#

import numpy
import quietscipy
import scipy.ndimage
import fftengine
import sys
try:
        import numextension
except:
        pass
import math
import arraystats
from scipy import stats

ffteng = fftengine.fftEngine()

### wrap some functions that are in numextension
def minmax(image):
        return (image.min(), image.max())

def despike(image, size=11, sigma=3.5, debug=0):
        '''
        size is the neighborhood size.  wide spikes require a wider
        neighborhood.  size = 11 has been shown to work well on spikes
        up to 3 or 4 pixels wide.

        sigma is the threshold for spike intensity.
        the mean and std. dev. are calculated in a neighborhood around
        each pixel.  if the pixel value varies by more than sigma * std
        dev. then the pixel will be set to the mean value.
Beispiel #4
0
#

import numpy
import quietscipy
import scipy.ndimage
import fftengine
import sys
try:
    import numextension
except:
    pass
import math
import arraystats
from scipy import stats

ffteng = fftengine.fftEngine()


### wrap some functions that are in numextension
def minmax(image):
    return (image.min(), image.max())


def despike(image, size=11, sigma=3.5, debug=0):
    '''
	size is the neighborhood size.  wide spikes require a wider
	neighborhood.  size = 11 has been shown to work well on spikes
	up to 3 or 4 pixels wide.

	sigma is the threshold for spike intensity.
	the mean and std. dev. are calculated in a neighborhood around
Beispiel #5
0
 def __init__(self, pad=False):
     self.fftengine = fftengine.fftEngine()
     self.clearBuffer()
     self.pad = pad
Beispiel #6
0
	def __init__(self, pad=False):
		self.fftengine = fftengine.fftEngine()
		self.clearBuffer()
		self.pad = pad