code_app/imgproc/HGImgProc.h

75 lines
2.3 KiB
C
Raw Normal View History

2022-05-03 10:25:52 +00:00
#ifndef __HGIMGPROC_H__
#define __HGIMGPROC_H__
#include "../base/HGDef.h"
#include "../base/HGBaseErr.h"
#include "HGImgProcErr.h"
#include "../base/HGImage.h"
/* 最近邻插值 */
#define HGIMGPROC_INTERPOTYPE_NN 1L
/* 双线性插值 */
#define HGIMGPROC_INTERPOTYPE_LINEAR 2L
/* 纠偏参数 */
typedef struct
{
/* 填充 */
HGBool fillBlank;
HGBool convex;
HGBool colorBlank;
/* 其他参数 */
HGBool useParam;
HGDouble threshold;
HGInt noise;
HGInt indent;
}HGImgDeskewParam;
/* 图像缩放
* :
* 1) image: in,
* 2) destImage: in,
* 3) interpolation: in, , HGIMGPROC_INTERPOTYPE_*
* :
* 1) ROI区域
* 2) type必须一样
* 3) origon不一致的情况
* 4) image和destImage不能是同一个句柄
*/
HGEXPORT HGResult HGAPI HGImgProc_ResizeImage(HGImage image, HGImage destImage, HGUInt interp);
/*
*
* 1) image: in,
* 2) destImage: in,
* 3) brightness: in, , -255255
* 4) contrast: in, , -127127
* 5) gamma: , 0.15.0
* :
* 1) ROI区域, ROI区域的大小必须一致
* 2) type必须一样
* 3) origon不一致的情况
* 4) image和destImage可以是同一个句柄
*/
HGEXPORT HGResult HGAPI HGImgProc_ImageAdjustColors(HGImage image, HGImage destImage,
HGInt brightness, HGInt contrast, HGFloat gamma);
/*
*
* 1) image: in,
* 2) autoCrop: in, , HGTRUE则忽略destWidth和destHeight
* 3) deskew: in,
* 4) param: in, , NULL时使用默认参数
* 5) destWidth: in,
* 6) destHeight: in,
* 7) destType: in,
* 8) destOrigin: in,
* 9) destImage: out,
* * :
* 1) image的ROI区域
* 2) image的类型为HGBASE_IMGTYPE_GRAY和HGBASE_IMGTYPE_RGB
*/
HGEXPORT HGResult HGAPI HGImgProc_ImageDeskew(HGImage image, HGBool autoCrop, HGBool deskew, const HGImgDeskewParam* param,
HGUInt destWidth, HGUInt destHeight, HGUInt destType, HGUInt destOrigin, HGImage* destImage);
#endif /* __HGIMGPROC_H__ */