Transform image¶
Some of the docstrings for this module have been extracted from the scikit-image library and are covered by their respective licenses.
-
class
node_transform.
TransformFilter
[source]¶ Transforms and image into another shape
Algorithms: 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
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
- padding:
Adds padding to fill out full width/height after aspect-correct scaling
- aspect:
Preserve aspect ratio (gives smaller size on one axis)
- interpolation degree:
Degree of polynomial (0 - 5) used for interpolation.
0 - no interpolation, 1 - bi-linear interpolation, 3 - bi-cubic interpolation
-
Rotates an image
- angle:
Angular degrees to rotate clockwise
- resize:
If true new image dimensions are calculated to exactly fit the image
Inputs: source : image
source image to filter
Outputs: result : image
result after filtering