code_device/hgdriver/ImageProcess/ImageApplyCustomGamma.h

45 lines
1.0 KiB
C
Raw Normal View History

2022-05-07 09:05:51 +00:00
/*
2022-05-03 03:56:07 +00:00
* ====================================================
2022-05-07 09:05:51 +00:00
*
*
* 2020/4/21
* 2020/4/21
* v1.0
2022-05-03 03:56:07 +00:00
* ====================================================
*/
#ifndef IMAGE_APPLY_CUSTOM_CAMMA_H
#define IMAGE_APPLY_CUSTOM_CAMMA_H
#include "ImageApply.h"
class CImageApplyCustomGamma : public CImageApply
{
public:
/*
2022-05-07 09:05:51 +00:00
* table [in]:
* length [in]:256768
2022-05-03 03:56:07 +00:00
* */
CImageApplyCustomGamma(unsigned char* table,int length);
virtual ~CImageApplyCustomGamma();
virtual void apply(cv::Mat& pDib, int side);
virtual void apply(std::vector<cv::Mat>& mats, bool isTwoSide);
void setTableData(const unsigned char* data, int length);
private:
void init_gamma_table();
void setLUT(const unsigned char* table, int byteCount);
bool emptyPtr;
private:
unsigned char m_table_bit8[256];
unsigned char m_table_bit24[768];
};
#endif // !IMAGE_APPLY_CUSTOM_CAMMA_H