灰度 300dpi60ppm
This commit is contained in:
parent
15f87a4959
commit
639063e57f
|
@ -915,12 +915,8 @@ void HCamDevice::HtCamChangeExposureValueF(uint32_t* value)
|
|||
std::this_thread::sleep_for(std::chrono::milliseconds(5));
|
||||
printf("曝光F R:%d G:%d B:%d \r\n",value[0],value[1],value[2]);
|
||||
}
|
||||
|
||||
|
||||
|
||||
void HCamDevice::HtCamWriteADCReg_ALL(bool is_gain,bool is_adc1,uint8_t addr, uint8_t data)
|
||||
{
|
||||
|
||||
if (virBaseAddr == NULL)
|
||||
return ;
|
||||
|
||||
|
@ -971,8 +967,6 @@ void HCamDevice::HtCamWriteADCReg_ALL(bool is_gain,bool is_adc1,uint8_t addr, ui
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
void HCamDevice::HtCamWriteADCReg(uint8_t addr, uint8_t data)
|
||||
{
|
||||
uint32_t *pCamCtrlReg = virBaseAddr;
|
||||
|
@ -1332,14 +1326,10 @@ int HCamDevice::HtCamGetColorMode()
|
|||
return ((pCamCtrlReg[4] & (0x00000004)) >> 2);
|
||||
}
|
||||
|
||||
|
||||
|
||||
void HCamDevice::init_ps_regs()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
#include <iostream>
|
||||
#include <fstream>
|
||||
|
||||
|
@ -1400,10 +1390,6 @@ void HCamDevice::HtCamResizeBuffer(int width, int height, int number)
|
|||
camera_dbg("v4lWidth = %d, v4lHeight = %d, v4lBufferCount = %d\n", v4lWidth, v4lHeight, v4lBufferCount);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
void HCamDevice::HtCamOverClockClear()
|
||||
{
|
||||
uint32_t *pCamCtrlReg = virBaseAddr;
|
||||
|
|
|
@ -158,6 +158,11 @@ void MultiFrameCapture::UpdateScanParam(HG_ScanConfiguration config)
|
|||
video->HtCamSetPeriod(config.params.dc);
|
||||
|
||||
int height = config.params.dpi == 3 ? 900 :(config.params.dpi == 2?999:300);
|
||||
if (config.params.dpi == 2 && !color_mode_)
|
||||
{
|
||||
height = 210;
|
||||
}
|
||||
|
||||
compute_height(WIDTH , height);
|
||||
|
||||
video->HtCamSetClolr(color_mode_);
|
||||
|
@ -687,7 +692,7 @@ bool MultiFrameCapture::saveLutImg(int dpi, int mode, bool black)
|
|||
// diff = 170 - *((double *)values + k); //R曝光值拉低
|
||||
// }
|
||||
// else
|
||||
diff = 200 - *((double *)values + k);
|
||||
diff = 200 - *((double *)values + k); //200灰度等级
|
||||
|
||||
log += " 明场:" + std::to_string(k) + ";diff:" + std::to_string(diff) + "\r\n";
|
||||
|
||||
|
|
|
@ -330,11 +330,16 @@ void Scanner::runScan()
|
|||
printf("200DPI 图像队列过多,正在等待图像取走:%d\r\n",image_num_);
|
||||
this_thread::sleep_for(std::chrono::milliseconds(300));
|
||||
}
|
||||
while ( m_config.params.dpi == 0x02 && image_num_ >= 8)
|
||||
while ( m_config.params.dpi == 0x02 && image_num_ >= 8 && m_config.params.isColor == 1)
|
||||
{
|
||||
printf("300DPI 图像队列过多,正在等待图像取走:%d\r\n",image_num_);
|
||||
this_thread::sleep_for(std::chrono::milliseconds(300));
|
||||
}
|
||||
// while ( m_config.params.dpi == 0x02 && image_num_ >= 20 && m_config.params.isColor == 0)
|
||||
// {
|
||||
// printf("300DPI 图像队列过多,正在等待图像取走:%d\r\n",image_num_);
|
||||
// this_thread::sleep_for(std::chrono::milliseconds(300));
|
||||
// }
|
||||
while ( m_config.params.dpi == 0x03 && image_num_ >= 2)
|
||||
{
|
||||
printf("600DPI 图像队列过多,正在等待图像取走:%d\r\n",image_num_);
|
||||
|
|
Loading…
Reference in New Issue