You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
backend-duoji-monitor/libs/win6422/HeatMap.h

68 lines
1.8 KiB
C

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

#ifndef _HEATMAP_H__
#define _HEATMAP_H__
#ifdef WIN32
#if defined(HEATMAP_EXPORTS)
#define HEATMAP_API __declspec(dllexport)
#else
#define HEATMAP_API __declspec(dllimport)
#endif
#define CALLMETHOD __stdcall
#else
#define HEATMAP_API
#define CALLMETHOD
#endif
#ifndef HEATMAP_API
#define HEATMAP_API
#endif
#ifdef __cplusplus
extern "C" {
#endif
//Bmp位图信息
typedef struct bmpImageInfo
{
unsigned char *pBuffer; //Bmp图片数据指针
int nWidth; //图片宽度
int nHeight; //图片高度
int nBitCount; //图片位数,支持8位24位32位
int nDirection; //数据存储方向 0从上到下从左到右 1从下到上从左到右
}BMPIMAGE_INFO;
///输入数据信息
typedef struct heatMapInfoIn
{
BMPIMAGE_INFO stuGrayBmpInfo; //8位Bmp灰度热度图数据不包含图片头数据存储方向从上到下
BMPIMAGE_INFO stuBkBmpInfo; //背景图Bmp位图数据包含图片头存储方向从下到上
}HEATMAP_IMAGE_IN;
//输出数据信息
typedef struct heatMapInfoOut
{
unsigned char *pBuffer; //输出的彩色热度图数据(包含图片头),宽高、位数和背景图相同
int nPicSize; //图片内存大小(包含头) :宽*高*nBitCount/8 + 54
float fOpacity; //透明度,范围0-1
}HEATMAP_IMAGE_Out;
///\brief 生成热度图数据信息
/// param [in] stuBmpInfoIn Bmp位图数据输入
/// param [in] stuBmpInfoOut Bmp位图数据输出,包含图片头
/// param [out] true or false
HEATMAP_API bool CALLMETHOD CreateHeatMap(const HEATMAP_IMAGE_IN *stuBmpInfoIn, HEATMAP_IMAGE_Out *stuBmpInfoOut);
///\brief 将网络二进制数据转化成灰度数据
/// param [in] srcData 二进制数据
/// param [in] width 宽
/// param [in] height 高
/// param [in] resultOut 灰度数据
/// param [out] true or false
HEATMAP_API bool CALLMETHOD TransNetDataToGrayData(unsigned char * srcData, int width, int height, unsigned char * resultOut);;
#ifdef __cplusplus
}
#endif
#endif //_HEATMAP_H__