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

Processor for Normalize images with given paramters. More...

#include <normalize.h>

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

Public Member Functions

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 (Mat *mat, const std::vector< float > &mean, const std::vector< float > &std, bool is_scale=true, const std::vector< float > &min=std::vector< float >(), const std::vector< float > &max=std::vector< float >(), ProcLib lib=ProcLib::DEFAULT, bool swap_rb=false)
 Process the input images. More...
 

Detailed Description

Processor for Normalize images with given paramters.

Member Function Documentation

◆ Run()

bool fastdeploy::vision::Normalize::Run ( Mat mat,
const std::vector< float > &  mean,
const std::vector< float > &  std,
bool  is_scale = true,
const std::vector< float > &  min = std::vector<float>(),
const std::vector< float > &  max = std::vector<float>(),
ProcLib  lib = ProcLib::DEFAULT,
bool  swap_rb = false 
)
static

Process the input images.

Parameters
[in]matThe input image data, result = mat * alpha + beta
[in]meantarget mean vector of output images
[in]stdtarget std vector of output images
[in]maxmax value vector to be in target image
[in]minmin value vector to be in target image
[in]libto define OpenCV or FlyCV or CVCUDA will be used.
[in]swap_rbto define whether to swap r and b channel order
Returns
true if the process successed, otherwise false

◆ SetSwapRB()

void fastdeploy::vision::Normalize::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: