imutil.hpp
来自「这是个人脸识别程序」· HPP 代码 · 共 57 行
HPP
57 行
// $image\imutil.hpp 1.5 milbo$// Warning: this is raw research code -- expect it to be quite messy.#if !defined(imutil_hpp)#define imutil_hpp#define IM_NEAREST_PIXEL 0 // values for fBilinear etc parameters#define IM_BILINEAR 1#define IM_AVERAGE_ALL 2#define IM_NO_WIDTH_DIVISIBLE_BY_4 0 // values for fWidthDivisibleBy4 parameter#define IM_WIDTH_DIVISIBLE_BY_4 1#define IM_CLIP 0 // values for fExtend parameter#define IM_EXTEND 1void MoveImage(Image &Img, // io int nxShift, int nyShift, bool fVerbose=false, bool fExtend=false); // invoid CropImage(Image &Img, // io int nTopCrop, int nBottomCrop, int nLeftCrop, int nRightCrop, bool fVerbose=false); // invoid FlipImage(Image &Img, // io bool fVertical=false, bool fVerbose=false); // invoid ScaleImage(Image &Img, // io const int nNewWidth, const int nNewHeight, const bool fVerbose, const bool fBilinear); // invoid ExtendImage(Image &Img, // io int nLeft, int nRight, int nTop, int nBottom, bool fVerbose=false); // invoid ReduceImage(Image &Img, // io double Scale, int ReduceMethod, bool fVerbose=false); // invoid ReduceImageAssign(Image &Img, // io const Image &InImg, double Scale, int ReduceMethod, bool fVerbose=false); // invoid ExtractImage(Image &Img, // io int nNewWidth, int nNewHeight, // in double nxMid, double nyMid, double Scale, double Angle, // in bool fVerbose=false, bool fBilinear=false, bool fExtend=false); // invoid DrawVerticalLine(Image &Img, // io int ix, bool fVerbose=false); // invoid DrawHorizontalLine(Image &Img, // io int iy, bool fVerbose=false); // invoid FillImage(Image &Img, byte Color);void FillRectangle(Image &Img, int ix1, int iy1, int ix2, int iy2, int Color);void ReduceSizeBy1_2(Image &Dest, Image &Src);void GetImageSize(int &width, int &height, char sPath[]);extern inline void SwapImages(Image &Img0, Image &Img1);#endif // imutil_hpp
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?