ImageResizer class
Process object for resizing an image.
Contents
- Reference
Base classes
- class ProcessObject
- Abstract base class for all process objects.
Public functions
- auto create(int width, int height, int depth, bool useInterpolation, bool preserveAspectRatio, bool blurOnDownsampling) -> std::shared_ptr<ImageResizer>
- Create instnace.
- void setWidth(int width)
- void setHeight(int height)
- void setDepth(int depth)
- void setSize(VectorXi size)
- void setPreserveAspectRatio(bool preserve)
- void setInterpolation(bool useInterpolation)
- void loadAttributes() override
Private functions
- void execute() virtual
Function documentation
std::shared_ptr<ImageResizer> fast:: ImageResizer:: create(int width,
int height,
int depth,
bool useInterpolation,
bool preserveAspectRatio,
bool blurOnDownsampling)
Create instnace.
| Parameters | |
|---|---|
| width | Width of new image |
| height | Height of new image |
| depth | Depth of new image, if 3D input |
| useInterpolation | Whether to use linear interpolation or not |
| preserveAspectRatio | Whether to preserve aspect ratio when resizing |
| blurOnDownsampling | Whether to apply GaussianSmoothing on the input image before downsampling. This is crucial to avoid aliasing artifacts. The standard deviation of the smoothing is set to (d - 1) / 2 where d is the downsampling factor. |
| Returns | instance |