58 lines
1.3 KiB
C++
58 lines
1.3 KiB
C++
#pragma once
|
|
#include <windows.h>
|
|
#define CMP_FLOAT_RANGLE(F_SRC,F_ERR,F_CUR) (F_CUR<=(F_SRC+F_ERR))&&(F_CUR>=(F_SRC-F_ERR))
|
|
|
|
|
|
typedef struct tagIMAGE_SIZE_MTF
|
|
{
|
|
INT n_image_width;
|
|
INT n_image_height;
|
|
INT n_image_start_x;
|
|
INT n_image_start_y;
|
|
}IMAGE_SIZE_MTF,*PIMAGE_SIZE_MTF;
|
|
|
|
typedef struct tagIMAGE_RECT_MTF
|
|
{
|
|
FLOAT f_r_mtf;
|
|
FLOAT f_g_mtf;
|
|
FLOAT f_b_mtf;
|
|
}IMAGE_RECT_MTF,*PIMAGE_RECT_MTF;
|
|
|
|
typedef struct tagIMAGE_MTF
|
|
{
|
|
INT width_half_count;
|
|
INT height_half_count;
|
|
INT n_mtf_image_width;
|
|
INT n_mtf_image_height;
|
|
INT n_cur_precent_rect_count;
|
|
IMAGE_SIZE_MTF st_image_size;
|
|
bool b_init_image_info_flg;
|
|
}IMAGE_MTF,*PIMAGE_MTF;
|
|
|
|
class CSupperScanImageMTF
|
|
{
|
|
public:
|
|
CSupperScanImageMTF(void);
|
|
~CSupperScanImageMTF(void);
|
|
IMAGE_MTF st_im;
|
|
|
|
private :
|
|
bool is_blank;
|
|
INT width_half_count;
|
|
INT height_half_count;
|
|
INT float_range;
|
|
INT threshold;
|
|
|
|
bool b_init_image_info_flg;
|
|
IMAGE_RECT_MTF(**blank_bk);
|
|
IMAGE_RECT_MTF(**cur_image);
|
|
|
|
|
|
public:
|
|
bool SetSkipBlankPara(INT width_half_count,INT height_half_count,INT float_range,INT threshold);
|
|
bool GetImageBlankFlag();
|
|
bool InitMTFImageInfo(INT n_image_width, INT n_image_height, INT n_start_x, INT n_start_y);
|
|
bool IsImageBlank(PBYTE p_image_data, INT n_image_width, INT n_image_height, DWORD dw_bit_color);
|
|
|
|
};
|