OpenCV  4.0.1-dev Open Source Computer Vision
• What is InputArray?

It can be seen that almost all OpenCV functions receive InputArray type.
What is it, and how can I understand the actual input types of parameters?


This is the proxy class for passing read-only input arrays into OpenCV functions.

Inside a function you should use cv::_InputArray::getMat() method to construct a matrix header for the array (without copying data). cv::_InputArray::kind() can be used to distinguish Mat from vector<> etc. but normally it is not needed.

In a case where you only want relative areas, which one is faster to compute: