Filter Image (deprecated)¶
Some of the docstrings for this module have been extracted from the scikit-image library and are covered by their respective licenses.
-
class
node_filtering.
ImageFiltering_deprecated
[source]¶ Filters one image into another using one of a number of predefinedfiltering operations. The implemented filters are to a large extentbased on scikit-image, but some filters are not from this package.
This node is DEPRECATED, use instead the more specific nodes such as:Edge Detection, Corner Detection, Threshold, etc.
Algorithms: -
Improves contrast by stretching and equalizing the histogramin a sliding window over the image
- sigma:
Clipping limit (normalized between 0 and 1). Higher values give more contrast. (default 1.0)
- adaptive kernel size:
Size of the sliding window. Must evenly divide both image width and height.
- bins:
Number of bins in computed histogram (default 256)
-
Applies the correction: Vout = scale Vin^gamma
Processes each channel separately
- scale:
Constant scale factor applied after gamma correction
- gamma:
Gamma factor applied to image.
<1 increases intensities of mid-tones,
>1 decreases intensities of mid-tones
adjust, histogram equalization
Improves contrast by stretching and equalizing the histogram
- bins:
Number of bins in computed histogram (default 256)
-
Applies the correction: Vout = scale log(1 + Vin)
Processes each channel separately
- scale:
Constant scale factor applied after gamma correction
- inverse:
Perform inverse log-correction instead (default false):
Vout = scale (2^Vin - 1)
-
Performs Sigmoid correction on input image. Also known as contrast adjustment.
Vout = 1/(1+exp(gain*(cutoff-Vin)))
Processes each channel separately
- inverse:
Perform negative sigmoid correction instead (default false)
- cutoff:
Shifts the characteristic curve for the sigmoid horizontally(default 0.5)
- gain:
Gain of sigmoid, affects rise time of curve (default 10.0)
-
Canny edge detection.
- sigma:
Standard deviation of gaussian kernel (default 1.0)
center image
Shifts image so that center of mass lies in center of image
clamp
Restricts the output values to a given maximum/minimum
- maximum:
The maximum output value that can be passed through
- minimum:
The minimum output value that can be passed through
color, generic
Generic conversion from one colour space to another. Requires secondary input (right click to add) with table.Each row row of table corresponds to one output colour. Number of columns must match number of channels in input image.
-
Converts greyscale values after normalization and scaling from 0 - 255 into a matplotlib colourmap.
- cmap:
The colormap to use in conversion
-
Interprets input channels as Hue-Saturation-Value (HSV) and outputs Red-Green-Blue (RGB) channels.
-
Interprets input channels as Red-Green-Blue (RGB) and outputs Hue-Saturation-Value (HSV) channels.
-
Interprets input channels as sRGB and outputs CIE XYZ channels.
-
Interprets input channels as CIE XYZ and outputs sRGB channels.
-
Computes the convex hull of a binary image.
The convex hull is the set of pixels included in the smallest convexpolygon that surround all white pixels in the input image.
-
Computes the convex hull of each object in a binary image.
The convex hull is the set of pixels included in the smallest convexpolygon that surround all white pixels in the input image.
This function uses labeling to define unique objects, findsthe convex hull of each using convex_hull_image,
and combines these regions with logical OR. Be aware the convexhulls of unconnected objects may overlap in the result
convolution
Convolves the input image with a kernel given by second input as a table (right-click on node to add second operand input)
- border mode:
Method for handling border of image
- k:
Value to give as input at borders when mode=constant
-
Corner detection using the FAST (Feature from Accelerated Segment Test) method.
- n:
Number of points out of 16 that should be all brighter ordarker than test point. (default 12)
- threshold:
Threshold used in determining wheter the pixels are darker orbrighter (default 0.15).
Decrease threshold when more corners are desired
-
Compute Kitchen-Rosenfeld corner measure response image
- border mode:
Method for handling values outside the borders
- k:
Value outside image borders when method constant is used.
-
Compute Shi-Tomasi (Kanade-Tomasi) corner measure responseimage. Uses information from auto-correlation matrix
- sigma:
Standard deviation used for the Gaussian kernel, which is used as weighting function for the auto-correlation matrix.
-
Compute corner harris response image.
- sigma:
Standard deviation used for the Gaussian kernel, which is used as weighting function for the auto-correlation matrix.
- eps:
Normalisation factor (Nobles corner measure)
- k:
Sensitivity factor to separate corners from edges, typically in range [0, 0.2]. Small values of k result in detection of sharp corners.
- harris method:
Method to compute response image from auto-correlationmatrix
-
Compute Moravec corner measure response image.
This is one of the simplest corner detectors and is comparatively fast but has several limitations (e.g. not rotation invariant).
- window size:
Size of window used during calculations
-
Find edges using the Laplace operator.
- kernel size:
Kernel size of the discrete Laplacian operator
-
Find edges using the Prewitt transform as one of, or combination of horizontal and vertical prewitt convolutions
- horizontal/vertical:
Select orientation for transform, if both then mean square of both will be used
-
Find edges using Robert’s cross operator.
- positive/negative diagonal:
Select orientation for transform
-
Find edges using the Scharr transform as one of, or combination of horizontal and vertical prewitt convolutions.
The Scharr operator has a better rotation invariance than other edge filters such as the Sobel or the Prewitt operators
- horizontal/vertical:
Select orientation for transform, if both then mean square of both will be used
-
Find edges using the Sobel transform as one of, or combination of horizontal and vertical prewitt convolutions.
- horizontal/vertical:
Select orientation for transform, if both then mean square of both will be used
-
Two-dimensional Gaussian filter
- sigma-x:
Standard deviation of gaussian filter along X-axis
- sigma-y:
Standard deviation of gaussian filter along Y-axis
- border mode:
Determines how the array borders are handled
- k:
Value outside image borders when method constant is used.
greyscale
Transforms RGB images into greyscale
- luminance preserving:
Use weighted average based on separate luminosity of red-green-blue receptors in human eye.
Only works for three channel images
- preserve alpha:
Passes through channel 4 (alpha), otherwise it is treated as another channel affecting output
-
Computes an approximation of the determinant of the hessian matrix for each pixel.
- sigma:
Standard deviation of gaussian kernel (default 3.0) used for calculating Hessian.
Approximation is not reliable for sigma < 3.0
-
Creates the integral image of the input.
An integral image contains at coordinate (m,n) the sum of all values above and to the left of it.
S(m,n) = sum(im[0:m, 0:n])
-
Creates a unique integer label for each connected component in an integer valued or binary image.
- diagonal neighborhood:
If true then also consider diagonals for connectivity
morphology, remove small holes
Removes small holes from an integer or boolean image.
- n:
Maximum size in pixels of areas to remove (default 64)
- diagonal neighborhood:
If true then also consider diagonals for connectivity
morphology, remove small objects
Removes connected components smaller than the given size.
- n:
Maximum size in pixels of areas to remove (default 64)
- diagonal neighborhood:
If true then also consider diagonals for connectivity
-
Returns the skeleton of a binary image. Thinning is used to reduce each connected component in a binary image to a single-pixel wide skeleton.
normalize
Adds a (positive) scale and offset so that smallest/highest value in image becomes 0 and 1 respectively.
Operates on each channel separately
scale/offset
Adds a scale and/or an offset to each channel equally
- scale:
Scale factor applied to image before offset
- offset:
Offset applied to image after scale
-
Applies an adaptive threshold to an array.
Also known as local or dynamic thresholding where the threshold value is the weighted mean for the local neighborhood of a pixel subtracted by a constant.
- sigma:
Standard deviation of gaussian kernel when method gaussian is used.
- offset:
Constant subtracted from weighted mean of neighborhood to calculate the local threshold value. (default 0.0)
- kernel size:
Size of blocks used during threshold check.
Must be an odd number. (default 3)
- threshold method:
Method used for calculating adaptive threshold
-
Performs global thresholding based a selection of automatic algorithms with none or few parameters
- auto threshold method:
Method used for calculating threshold
threshold, basic
Compares each channel with a threshold
- threshold:
Threshold value to compare with
transform, crop
Crops the image to the given rectanglular area
- x:
Left edge of image
- y:
Top edge of image
- width:
Width of image
- height:
Height of image
transform, padding
Adds a padding to an image
- x:
If positive, amount of padding added on the left side. If negative the amount of padding added on the right side.
- y:
If positive, amount of padding added on the top.If negative the amount of padding added on the bottom.
- k:
Constant value used in padded areas
- add alpha:
Adds an alpha with value 1.0 inside image, 0.0 outside
-
Rescales an image by a given factor
- interpolation degree:
Degree of polynomial (0 - 5) used for interpolation.
0 - no interpolation, 1 - bi-linear interpolation, 3 - bi-cubic interpolation
- scale x:
Scale factor along X direction (horizontal)
- scale y:
Scale factor along Y direction (vertical)
-
Resizes an image to match the given dimensions
- width:
The new width of the image
- height:
The new height of the image
- interpolation degree:
Degree of polynomial (0 - 5) used for interpolation.
0 - no interpolation, 1 - bi-linear interpolation, 3 - bi-cubic interpolation
- aspect:
Preserve aspect ratio (gives smaller size on one axis)
- padding:
Adds padding to fill out full width/height after aspect-correct scaling
-
Rotates an image
- angle:
Angular degrees to rotate clockwise
- resize:
If true new image dimensions are calculated to exactly fit the image
transform, to integer
Converts all channels into integer data
Inputs: source : image
source image to filter
operand : table
Filter operands
Outputs: result : image
result after filtering
-