frame_helper
Public Member Functions | Static Public Member Functions | List of all members
frame_helper::FrameHelper Class Reference

#include <FrameHelper.h>

Public Member Functions

 FrameHelper ()
 
void convert (const base::samples::frame::Frame &src, base::samples::frame::Frame &dst, int offset_x=0, int offset_y=0, ResizeAlgorithm algo=INTER_LINEAR, bool bundistort=false)
 
void setCalibrationParameter (const CameraCalibration &para)
 
void setCalibrationParameter (const CameraCalibrationCv &para)
 
void undistort (const base::samples::frame::Frame &src, base::samples::frame::Frame &dst)
 
void convertColor (const base::samples::frame::Frame &src, base::samples::frame::Frame &dst)
 
void saveFrame (const std::string &filename, base::samples::frame::Frame const &frame)
 
void loadFrame (const std::string &filename, base::samples::frame::Frame &frame)
 

Static Public Member Functions

static void copyMatToFrame (const cv::Mat &src, base::samples::frame::Frame &frame)
 
static void resize_bayer (const base::samples::frame::Frame &src, base::samples::frame::Frame &dst, int offset_x=0, int offset_y=0)
 
static void resize (const base::samples::frame::Frame &src, base::samples::frame::Frame &dst, int offset_x=0, int offset_y=0, ResizeAlgorithm algo=INTER_LINEAR)
 
static void rotateBy180Degrees (const base::samples::frame::Frame &src, base::samples::frame::Frame &dst)
 
static float calcDistanceToObject (float f, float virtual_size, float real_size)
 
static float calcDistanceToObject (const base::samples::frame::Frame &frame, float virtual_width, float real_width, float virtual_height, float real_height)
 
static cv::Point2f calcRelPosToPoint (float fx, float fy, int x1, int y1, int x2, int y2, float d)
 
static cv::Point2f calcRelPosToPoint (const base::samples::frame::Frame &frame, int x1, int y1, int x2, int y2, float d)
 
static cv::Point2f calcRelPosToCenter (const base::samples::frame::Frame &frame, int x1, int y1, float d)
 
static void convertBayerToRGB24 (const base::samples::frame::Frame &src, base::samples::frame::Frame &dst)
 
static void convertBayerToRGB24 (const uint8_t *src, uint8_t *dst, int width, int height, base::samples::frame::frame_mode_t mode)
 
static void convertRGBToGray (const base::samples::frame::Frame &src, base::samples::frame::Frame &dst, bool copy_attributes=true)
 
static void convertBayerToGreenChannel (const base::samples::frame::Frame &src, base::samples::frame::Frame &dst)
 
static void convertBayerToGreenChannel (const uint8_t *src, uint8_t *dst, int width, int height, base::samples::frame::frame_mode_t mode)
 
static void calcDiff (const base::samples::frame::Frame &src1, const base::samples::frame::Frame &src2, base::samples::frame::Frame &dst)
 
static void convertPJPGToRGB24 (const base::samples::frame::Frame &src, base::samples::frame::Frame &dst)
 
static bool convertPJPGToRGB24 (const uint8_t *source, uint8_t *target_buffer, const size_t source_size, const int width, const int height)
 
static void convertJPEGToRGB24 (uint8_t const *src, uint8_t *dst, size_t const src_size, int const width, int const height)
 
static cv::Mat convertToCvMat (const base::samples::frame::Frame &frame)
 
static int getOpenCvType (const base::samples::frame::Frame &frame)
 

Constructor & Destructor Documentation

frame_helper::FrameHelper::FrameHelper ( )

Member Function Documentation

void frame_helper::FrameHelper::calcDiff ( const base::samples::frame::Frame &  src1,
const base::samples::frame::Frame &  src2,
base::samples::frame::Frame &  dst 
)
static
float frame_helper::FrameHelper::calcDistanceToObject ( float  f,
float  virtual_size,
float  real_size 
)
static
float frame_helper::FrameHelper::calcDistanceToObject ( const base::samples::frame::Frame &  frame,
float  virtual_width,
float  real_width,
float  virtual_height,
float  real_height 
)
static
cv::Point2f frame_helper::FrameHelper::calcRelPosToCenter ( const base::samples::frame::Frame &  frame,
int  x1,
int  y1,
float  d 
)
static
cv::Point2f frame_helper::FrameHelper::calcRelPosToPoint ( float  fx,
float  fy,
int  x1,
int  y1,
int  x2,
int  y2,
float  d 
)
static
cv::Point2f frame_helper::FrameHelper::calcRelPosToPoint ( const base::samples::frame::Frame &  frame,
int  x1,
int  y1,
int  x2,
int  y2,
float  d 
)
static
void frame_helper::FrameHelper::convert ( const base::samples::frame::Frame &  src,
base::samples::frame::Frame &  dst,
int  offset_x = 0,
int  offset_y = 0,
ResizeAlgorithm  algo = INTER_LINEAR,
bool  bundistort = false 
)
void frame_helper::FrameHelper::convertBayerToGreenChannel ( const base::samples::frame::Frame &  src,
base::samples::frame::Frame &  dst 
)
static
void frame_helper::FrameHelper::convertBayerToGreenChannel ( const uint8_t *  src,
uint8_t *  dst,
int  width,
int  height,
base::samples::frame::frame_mode_t  mode 
)
static
void frame_helper::FrameHelper::convertBayerToRGB24 ( const base::samples::frame::Frame &  src,
base::samples::frame::Frame &  dst 
)
static
void frame_helper::FrameHelper::convertBayerToRGB24 ( const uint8_t *  src,
uint8_t *  dst,
int  width,
int  height,
base::samples::frame::frame_mode_t  mode 
)
static
void frame_helper::FrameHelper::convertColor ( const base::samples::frame::Frame &  src,
base::samples::frame::Frame &  dst 
)
void frame_helper::FrameHelper::convertJPEGToRGB24 ( uint8_t const *  src,
uint8_t *  dst,
size_t const  src_size,
int const  width,
int const  height 
)
static
void frame_helper::FrameHelper::convertPJPGToRGB24 ( const base::samples::frame::Frame &  src,
base::samples::frame::Frame &  dst 
)
static

/Brief conversion for PJPG to RGB24.

bool frame_helper::FrameHelper::convertPJPGToRGB24 ( const uint8_t *  source,
uint8_t *  target_buffer,
const size_t  source_size,
const int  width,
const int  height 
)
static
void frame_helper::FrameHelper::convertRGBToGray ( const base::samples::frame::Frame &  src,
base::samples::frame::Frame &  dst,
bool  copy_attributes = true 
)
static
cv::Mat frame_helper::FrameHelper::convertToCvMat ( const base::samples::frame::Frame &  frame)
static
void frame_helper::FrameHelper::copyMatToFrame ( const cv::Mat &  src,
base::samples::frame::Frame &  frame 
)
static
int frame_helper::FrameHelper::getOpenCvType ( const base::samples::frame::Frame &  frame)
static
void frame_helper::FrameHelper::loadFrame ( const std::string &  filename,
base::samples::frame::Frame &  frame 
)
void frame_helper::FrameHelper::resize ( const base::samples::frame::Frame &  src,
base::samples::frame::Frame &  dst,
int  offset_x = 0,
int  offset_y = 0,
ResizeAlgorithm  algo = INTER_LINEAR 
)
static
void frame_helper::FrameHelper::resize_bayer ( const base::samples::frame::Frame &  src,
base::samples::frame::Frame &  dst,
int  offset_x = 0,
int  offset_y = 0 
)
static
void frame_helper::FrameHelper::rotateBy180Degrees ( const base::samples::frame::Frame &  src,
base::samples::frame::Frame &  dst 
)
static
void frame_helper::FrameHelper::saveFrame ( const std::string &  filename,
base::samples::frame::Frame const &  frame 
)
void frame_helper::FrameHelper::setCalibrationParameter ( const CameraCalibration para)
void frame_helper::FrameHelper::setCalibrationParameter ( const CameraCalibrationCv para)
void frame_helper::FrameHelper::undistort ( const base::samples::frame::Frame &  src,
base::samples::frame::Frame &  dst 
)

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