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

Processor for padding images to given size. More...

#include <pad_to_size.h>

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

Public Member Functions

void SetWidthHeight (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 (Mat *mat, int width, int height, const std::vector< float > &value, ProcLib lib=ProcLib::DEFAULT)
 Process the input images. More...
 

Detailed Description

Processor for padding images to given size.

Member Function Documentation

◆ Run()

bool fastdeploy::vision::PadToSize::Run ( Mat mat,
int  width,
int  height,
const std::vector< float > &  value,
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]valuevalue vector used by padding of the output image.
[in]libto define OpenCV or FlyCV or CVCUDA will be used.
Returns
true if the process successed, otherwise false

◆ SetWidthHeight()

void fastdeploy::vision::PadToSize::SetWidthHeight ( 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: