Super-resolution benchmarking
The super-resolution module contains sample codes for benchmarking, in order to compare different models and algorithms. Here is presented a sample code for performing benchmarking, and then a few benchmarking results are collected. It was performed on an Intel i7-9700K CPU on an Ubuntu 18.04.02 OS.
Source Code of the sample
// This file is part of OpenCV project.
// It is subject to the license terms in the LICENSE file found in the top-level directory
// of this distribution and at http://opencv.org/license.html.
#include <iostream>
#include <opencv2/opencv_modules.hpp>
#ifdef HAVE_OPENCV_QUALITY
#include <opencv2/dnn_superres.hpp>
#include <opencv2/quality.hpp>
# </.>
# </.>
;
;
;
(<> , , ,
<> ,
<> ,
<> )
{
= ;
= ;
= (, , );
= <>(.());
= , = ;
= ::((( * ) + . * , ( * ) + . * ),
[].());
;
= -;
( = ; < ; ++) {
= ;
= % ;
( % == )
++;
(( * ( + .)), ( * ( + .)), ., .);
;
([], , (., .));
<< [];
(,
.(),
(, ),
,
,
,
,
);
.();
+= ;
<< << [];
(,
.(),
(, ),
,
,
,
,
);
.();
+= ;
<< << [];
(,
.(),
(, ),
,
,
,
,
);
.();
+= ;
.(());
}
(, );
(, );
();
}
( , )
{
= (, );
= ::::(, , ());
= ((([]), [], []))[];
(, );
}
( , *[])
{
( < ) {
<< << ;
<< << ;
<< ;
<< ;
-;
}
= ([]);
= ([]);
= ([]);
= ([]);
= ();
(.()) {
<< << << ;
-;
}
= . - (. % );
= . - (. % );
= ((, , , ));
;
(, , (), / , / );
;
<> ;
;
.();
.(, );
.(, );
<> = <>();
<> = <>();
= (, );
.([]);
.([]);
<< .() << << ;
<< << [] << << [] << ;
<< << ;
;
(, , (), , , );
= (, );
.([]);
.([]);
<< << ;
<< << [] << << [] << ;
<< << ;
;
(, , (), , , );
= (, );
.([]);
.([]);
<< << ;
<< << [] << << [] << ;
<< << ;
;
(, , (), , , );
= (, );
.([]);
.([]);
<< << ;
<< << [] << << [] << ;
<< << ;
<> {, , , };
<> {.(), , , };
(, , (., .), , , );
();
;
}
#
()
{
:: << << ::;
;
}
#