本文整理汇总了C++中Sensor::getF2Frame方法的典型用法代码示例。如果您正苦于以下问题:C++ Sensor::getF2Frame方法的具体用法?C++ Sensor::getF2Frame怎么用?C++ Sensor::getF2Frame使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Sensor
的用法示例。
在下文中一共展示了Sensor::getF2Frame方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: roiTimingTest
//.........这里部分代码省略.........
srcShot.roiStartY = roiYstd;
srcShot.rowSkip = rowSkips[sb]; srcShot.colSkip = colSkips[sb];
srcShot.rowBin = rowBins[sb]; srcShot.colBin = colBins[sb];
srcShot.frameTime = *fTime;
srcShot.exposure = *exp;
for (vector<int>::iterator fTime2 = frameTimes.begin(); fTime2 != frameTimes.end(); fTime2++) {
for (vector<int>::iterator exp2 = exposures.begin(); exp2 != exposures.end(); exp2++) {
for (int sb2 =0; sb2< 3; sb2++) {
dstShot.roiStartX = roiXstd; //*rXY ? roiXchg : roiXstd;
dstShot.roiStartY = roiYstd; //*rXY ? roiYchg : roiYstd;
dstShot.rowSkip = rowSkips[sb2]; dstShot.colSkip = colSkips[sb2];
dstShot.rowBin = rowBins[sb2]; dstShot.colBin = colBins[sb2];
dstShot.frameTime = *fTime2;
dstShot.exposure = *exp2;
std::vector<Shot> testBurst(n);
unsigned int i=0;
for (; i < n/2; i++) {
testBurst[i] = srcShot;
}
for (; i < n; i++) {
testBurst[i] = dstShot;
}
int chgIndex = n/2;
sensor.debugTiming(true);
sensor.capture(dstShot); // Extra frame to allow for nice deltaTs
for (unsigned int i=0; i< burstCount; i++) sensor.capture(testBurst);
FCam::Time prevT;
{
Frame::Ptr f = sensor.getF2Frame();
prevT = f->processingDoneTime;
}
vector<float> dT[n];
float driverExp[n], driverFT[n];
for (unsigned int i=0;i<n;i++) driverExp[i] = driverFT[i] = 0;
int testFrames = burstCount * n;
int index = 0;
while (testFrames-- > 0) {
Frame::Ptr f = sensor.getF2Frame();
float deltaT = (f->processingDoneTime - prevT) / 1000.0;
prevT = f->processingDoneTime;
dT[index].push_back(deltaT);
driverExp[index] += f->exposure;
driverFT[index] += f->frameTime;
index = (index + 1) % n;
}
float avg[n];
float std[n];
for (unsigned int k=0;k<n;k++) {
avg[k] = 0;
for (unsigned int i=0; i < dT[k].size(); i++)
avg[k] += dT[k][i];
avg[k] /= dT[k].size();
std[k] = 0;
for (unsigned int i=0; i < dT[k].size(); i++)
std[k] += (dT[k][i] - avg[k])*(dT[k][i] - avg[k]);
std[k] = sqrt( std[k] / dT[k].size());