FastDeploy  latest
Fast & Easy to Deploy!
Public Member Functions | Static Public Member Functions | List of all members
fastdeploy::vision::Resize Class Reference

Processor for Resize images. More...

#include <resize.h>

Inheritance diagram for fastdeploy::vision::Resize:
Inheritance graph
[legend]
Collaboration diagram for fastdeploy::vision::Resize:
Collaboration graph
[legend]

Public Member Functions

bool SetWidthAndHeight (int width, int height)
 Process the input images. More...
 
- Public Member Functions inherited from fastdeploy::vision::Processor
virtual bool operator() (FDMat *mat)
 operator () for calling processor in this way: processor(mat) More...
 
virtual bool operator() (FDMat *mat, ProcLib lib)
 operator () for calling processor in this way: processor(mat, lib) This function is for backward compatibility, will be removed in the near future, please use operator()(FDMat* mat) instead and set proc_lib in mat. More...
 
virtual bool operator() (FDMatBatch *mat_batch)
 operator () for calling processor in this way: processor(mat_batch) More...
 

Static Public Member Functions

static bool Run (FDMat *mat, int width, int height, float scale_w=-1.0, float scale_h=-1.0, int interp=1, bool use_scale=false, ProcLib lib=ProcLib::DEFAULT)
 Process the input images. More...
 

Detailed Description

Processor for Resize images.

Member Function Documentation

◆ Run()

bool fastdeploy::vision::Resize::Run ( FDMat mat,
int  width,
int  height,
float  scale_w = -1.0,
float  scale_h = -1.0,
int  interp = 1,
bool  use_scale = false,
ProcLib  lib = ProcLib::DEFAULT 
)
static

Process the input images.

Parameters
[in]matThe input image data, result = mat * alpha + beta
[in]widthwidth of the output image.
[in]heightheight of the output image.
[in]scale_wscale of width, deafult is -1.0.
[in]scale_hscale of height, deafult is -1.0.
[in]interpinterpolation method, deafult is 1.
[in]use_scaleto define wheather to scale the image, deafult is true.
[in]libto define OpenCV or FlyCV or CVCUDA will be used.
Returns
true if the process successed, otherwise false

◆ SetWidthAndHeight()

bool fastdeploy::vision::Resize::SetWidthAndHeight ( int  width,
int  height 
)
inline

Process the input images.

Parameters
[in]widthset the value of the width parameter
[in]heightset the value of the height parameter

The documentation for this class was generated from the following files: