本文整理汇总了C++中Stat::push_back方法的典型用法代码示例。如果您正苦于以下问题:C++ Stat::push_back方法的具体用法?C++ Stat::push_back怎么用?C++ Stat::push_back使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Stat
的用法示例。
在下文中一共展示了Stat::push_back方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: timeBilateralTest
void timeBilateralTest(Mat& src)
{
int iteration = 10;
Mat dest;
ofstream out("birateraltime.csv");
double time_opencv;
double time_opencp;
double time_opencp_sp;
double time_opencp_sl;
for(int r=0;r<200;r++)
{
cout<<"r:"<<r<<" :";
int d = 2*r+1;
double sigma_color = 30.0;
double sigma_space = d/3.0;
{
Stat st;
for(int i=0;i<iteration;i++)
{
CalcTime t("time",TIME_SEC,false);
bilateralFilter(src, dest, d, sigma_color, sigma_space);
st.push_back(t.getTime());
}
time_opencv=st.getMedian();
}
{
Stat st;
for(int i=0;i<iteration;i++)
{
CalcTime t("time",TIME_SEC,false);
bilateralFilter(src, dest, Size(d,d), sigma_color, sigma_space, FILTER_DEFAULT);
st.push_back(t.getTime());
}
time_opencp=st.getMedian();
}
{
Stat st;
for(int i=0;i<iteration;i++)
{
CalcTime t("time",TIME_SEC,false);
bilateralFilter(src, dest, Size(d,d), sigma_color, sigma_space, FILTER_SEPARABLE);
st.push_back(t.getTime());
}
time_opencp_sp=st.getMedian();
}
{
Stat st;
for(int i=0;i<iteration;i++)
{
CalcTime t("time",TIME_SEC,false);
bilateralFilter(src, dest, Size(d,d), sigma_color, sigma_space, FILTER_SLOWEST);
st.push_back(t.getTime());
}
time_opencp_sl=st.getMedian();
}
out<<time_opencv<<","<<time_opencp<<","<<time_opencp_sp<<","<<time_opencp_sl<<endl;
cout<<time_opencv<<","<<time_opencp<<","<<time_opencp_sp<<","<<time_opencp_sl<<","<<endl;
}
}