修改:
1. 写配置文件类修改:为了提高帧率 → 直接设置有效窗口,后期不进行roi裁剪; 2. 配合ximea采集类,修改写文件fwrite代码: 3. sbg新端口;
This commit is contained in:
@ -63,12 +63,12 @@ void XimeaImager::openImger()
|
||||
m_imager.setEffectiveWindow(offsetx, width, offsety, height);
|
||||
}
|
||||
|
||||
int width_roi = 0, offsetx_roi = 0;
|
||||
ret = m_configfile.getEffectiveWindowRoi(width_roi, offsetx_roi);
|
||||
if (ret)
|
||||
{
|
||||
m_imager.setEffectiveWindowRoi(offsetx_roi, width_roi);
|
||||
}
|
||||
// int width_roi = 0, offsetx_roi = 0;
|
||||
// ret = m_configfile.getEffectiveWindowRoi(width_roi, offsetx_roi);
|
||||
// if (ret)
|
||||
// {
|
||||
// m_imager.setEffectiveWindowRoi(offsetx_roi, width_roi);
|
||||
// }
|
||||
|
||||
setFramerate(100);
|
||||
|
||||
@ -463,7 +463,7 @@ void XimeaImager::startRecord(double TimeDifferenceBetweensOSAndSbg,QString base
|
||||
unsigned short *x=m_imager.get_frame(m_buffer);
|
||||
|
||||
//fwrite(m_buffer,2,getBandCount()*getSampleCount(),hFile);
|
||||
fwrite(m_buffer,1,m_iFrameSizeInByte,hFile);//*********************************
|
||||
fwrite(m_imager.m_image.bp,static_cast<int>(m_imager.m_image.bp_size),1,hFile);
|
||||
//fflush(hFile);//只保证了将IO缓冲写入系统缓冲中,使IO读操作能成功,但系统什么时候写入磁盘,由系统决定,一般是达到一定量时系统他就写入磁盘。
|
||||
//sync();//强制系统将系统文件缓冲的内容写入磁盘
|
||||
|
||||
|
Reference in New Issue
Block a user