Functions :
1、计算程序执行时间 : getTickCount( ) 、 getTickFrequency( )
C/C++ : int64 cv::getTickCount( )
Python : retval = cv.getTickCount( )
Returns the number of ticks .
The function returns the number of ticks after the certain event ( for example, when the machine was turned on). It can be used to initiallize RNG or to measure a function execution time by reading the tick count befor and after the function call .
C/C++ : double cv::getTickFrequency( )
Python : retval = cv.getTickFrequency( )
Returns the number of ticks per second .
The function returns the number of ticks per second. That is , the following code computes the execution time in seconds :
double t = (double)getTickCount();
// do something ...
t = ((double)getTickCount() - t) / getTickFrequency() ;
2、cvRound( )
C/C++ : int cvRound(double value) [1 / 3]
Rounds floating-point number to the nearest integer .
Parameters :
value floating-point number. If the value is outside of INT_MIN…INT_MAX range, the result is not defined .
C/C++ : int cvRound(float value) [2 / 3]
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
C/C++ : int cvRound(int value) [3 / 3]
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts .
3、