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

Processor for convert images with given paramters and permute images from HWC to CHW. More...

#include <convert_and_permute.h>

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

Public Member Functions

void SetAlpha (const std::vector< float > &alpha)
 Process the input images. More...
 
void SetBeta (const std::vector< float > &beta)
 Process the input images. More...
 
void SetSwapRB (bool swap_rb)
 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, const std::vector< float > &alpha, const std::vector< float > &beta, bool swap_rb=false, ProcLib lib=ProcLib::DEFAULT)
 Process the input images. More...
 

Detailed Description

Processor for convert images with given paramters and permute images from HWC to CHW.

Member Function Documentation

◆ Run()

bool fastdeploy::vision::ConvertAndPermute::Run ( FDMat mat,
const std::vector< float > &  alpha,
const std::vector< float > &  beta,
bool  swap_rb = false,
ProcLib  lib = ProcLib::DEFAULT 
)
static

Process the input images.

Parameters
[in]matThe input image data,result = mat * alpha + beta
[in]alphaThe alpha channel data
[in]betaThe beta channel data
[in]libto define OpenCV or FlyCV or CVCUDA will be used.
Returns
true if the process successed, otherwise false

◆ SetAlpha()

void fastdeploy::vision::ConvertAndPermute::SetAlpha ( const std::vector< float > &  alpha)
inline

Process the input images.

Parameters
[in]alphaset the value of the alpha parameter

◆ SetBeta()

void fastdeploy::vision::ConvertAndPermute::SetBeta ( const std::vector< float > &  beta)
inline

Process the input images.

Parameters
[in]betaset the value of the beta parameter

◆ SetSwapRB()

void fastdeploy::vision::ConvertAndPermute::SetSwapRB ( bool  swap_rb)
inline

Process the input images.

Parameters
[in]swap_rbset the value of the swap_rb parameter

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