1. 取消裁剪和memcpy,直接范围XI_IMG m_image(用于直接将影像写入到磁盘中);
This commit is contained in:
@ -31,6 +31,9 @@ namespace Iris
|
||||
void setEffectiveWindowRoi(int OffsetX, int width);
|
||||
int getBufferSizeOfOneFrame();
|
||||
float getTemperature();
|
||||
|
||||
XI_IMG m_image; // image buffer
|
||||
|
||||
public:
|
||||
//继承基类的
|
||||
IrisXimeaImager();//11111111111111111111
|
||||
@ -95,7 +98,6 @@ namespace Iris
|
||||
bool is_trigger_external();
|
||||
protected:
|
||||
private:
|
||||
XI_IMG m_image; // image buffer
|
||||
uint64_t m_timestampOfCamera;
|
||||
|
||||
int m_iSpectralBin;
|
||||
|
@ -95,7 +95,7 @@ int Iris::IrisXimeaImager::getBufferSizeOfOneFrame()
|
||||
//
|
||||
// return static_cast<int>(m_image.bp_size);
|
||||
|
||||
return m_iEffectiveWindow_height * m_iEffectiveWindowRoi_width * 2;
|
||||
return m_iEffectiveWindow_height * m_iEffectiveWindow_width * 2;
|
||||
}
|
||||
|
||||
float Iris::IrisXimeaImager::getTemperature()
|
||||
@ -236,10 +236,10 @@ unsigned short *Iris::IrisXimeaImager::get_frame(unsigned short *buffer)
|
||||
// //方法2:此做法是错误的,虽然是指针,也是传值!
|
||||
// buffer = (unsigned short *)m_image.bp;
|
||||
|
||||
for(int i=0;i<m_iEffectiveWindow_height;i++)
|
||||
{
|
||||
memcpy(buffer+i*m_iEffectiveWindowRoi_width, (unsigned short *)m_image.bp + i*m_iEffectiveWindow_width + m_iEffectiveWindowRoi_OffsetX, m_iEffectiveWindowRoi_width*2);
|
||||
}
|
||||
// for(int i=0;i<m_iEffectiveWindow_height;i++)
|
||||
// {
|
||||
// memcpy(buffer+i*m_iEffectiveWindowRoi_width, (unsigned short *)m_image.bp + i*m_iEffectiveWindow_width + m_iEffectiveWindowRoi_OffsetX, m_iEffectiveWindowRoi_width*2);
|
||||
// }
|
||||
|
||||
//强制将指针从高精度(uint64_t*)转换到低精度(unsigned short *),会有精度降低的问题???????????????????????????????????????????????????
|
||||
return (unsigned short *)&m_timestampOfCamera;
|
||||
@ -343,7 +343,7 @@ int Iris::IrisXimeaImager::get_inc_end_band()
|
||||
|
||||
int Iris::IrisXimeaImager::get_sample_count()
|
||||
{
|
||||
return m_iEffectiveWindowRoi_width;
|
||||
return m_iEffectiveWindow_width;
|
||||
}
|
||||
|
||||
int Iris::IrisXimeaImager::get_start_sample()
|
||||
|
Reference in New Issue
Block a user