fix:返回的曝光时间都使用微秒;
This commit is contained in:
@ -204,9 +204,14 @@ void XimeaImager::setFramerate(double framerate)
|
||||
{
|
||||
m_imager.set_framerate(framerate);
|
||||
|
||||
int exposureTimeInUs = getExposureTime();
|
||||
|
||||
int maxExposureTimeInUs=1/framerate*1000000;
|
||||
// setExposureTime(maxExposureTimeInUs);
|
||||
// setExposureTime(1000);
|
||||
|
||||
if (exposureTimeInUs > maxExposureTimeInUs)
|
||||
{
|
||||
wrapSetExposureTime(maxExposureTimeInUs);
|
||||
}
|
||||
|
||||
m_iImagerState=102;
|
||||
emit ximeaImageStatus(m_iImagerState);
|
||||
@ -249,9 +254,7 @@ double XimeaImager::setExposureTime(float exposureTime_in_us)
|
||||
//确保设置的积分时间比最大积分时间小
|
||||
if(exposureTime_in_us<maxExposureTime_in_us)
|
||||
{
|
||||
|
||||
m_imager.set_integration_time(exposureTime_in_us);
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -284,7 +287,7 @@ int XimeaImager::wrapSetExposureTime(float exposureTime_in_us)
|
||||
m_iImagerState=103;
|
||||
emit ximeaImageStatus(m_iImagerState);
|
||||
|
||||
emit autoExposeMaxValueOfOneFrame(maxValueOfOneFrame, exposureTime/1000);
|
||||
emit autoExposeMaxValueOfOneFrame(maxValueOfOneFrame, exposureTime);
|
||||
|
||||
return maxValueOfOneFrame;
|
||||
}
|
||||
@ -347,7 +350,7 @@ double XimeaImager::autoExposure()
|
||||
|
||||
m_iImagerState=103;
|
||||
emit ximeaImageStatus(m_iImagerState);
|
||||
emit autoExposeMaxValueOfOneFrame(maxValueOfOneFrame, exposureTime/1000);
|
||||
emit autoExposeMaxValueOfOneFrame(maxValueOfOneFrame, exposureTime);
|
||||
|
||||
std::cout<<"自动曝光完成!"<<std::endl;
|
||||
return exposureTime;
|
||||
@ -567,7 +570,8 @@ void XimeaImager::startRecord(double TimeDifferenceBetweensOSAndSbg,QString base
|
||||
|
||||
m_baseFileName=baseFileName;
|
||||
|
||||
std::cout << "曝光时间为:" << getExposureTime()/1000 << "ms" <<std::endl;
|
||||
std::cout << "帧率为:" << getFramerate() << "hz" <<std::endl;
|
||||
std::cout << "曝光时间为:" << getExposureTime() << "μs" <<std::endl;
|
||||
|
||||
using namespace std;
|
||||
// ofstream timesFileHandle(timesFileName.toStdString()+"_ofstream");
|
||||
|
Reference in New Issue
Block a user