The image
Module¶
fft_image |
Perform an FFT on the supplied image array. |
lowpass_filter_image |
Load an image from a file, and low-pass filter via a Gaussian kernel. |
Some basic image processing routines.
-
pphelper.image.
fft_image
(image)¶ Perform an FFT on the supplied image array.
Parameters: image (ndarray) – An array of the image Returns: A namedtuple containing the the fast-fourier transform, the amplitude and phase. Return type: namedtuple
-
pphelper.image.
lowpass_filter_image
(image=None, filename=None, flatten=False, sigma=3)¶ Load an image from a file, and low-pass filter via a Gaussian kernel.
Parameters: - image (ndarray, optional) – The image to be processed. This will usually have been created using scipy.misc.imread or a similar function. If this argument is present, filename will be ignored.
- filename (string, optional) – The name of the image file to load and process. Will be ignored is image_array is not None.
- flatten (bool, optional) – Whether to “flatten” the image before filtering, i.e. convert it to grayscale.
- sigma (scalar, optional) – The standard deviation for Gaussian kernel. See scipy.ndimage.filters.gaussian_filter.
Returns: The lowpass-filtered image.
Return type: ndarray
See also
scipy.ndimage.gaussian_filter()