mirror of
https://github.com/opencv/opencv.git
synced 2026-07-30 15:53:03 +04:00
Merge branch 4.x
This commit is contained in:
@@ -1001,6 +1001,27 @@ inline int hal_ni_meanStdDev(const uchar* src_data, size_t src_step, int width,
|
||||
#define cv_hal_meanStdDev hal_ni_meanStdDev
|
||||
//! @endcond
|
||||
|
||||
/**
|
||||
* @brief calculates dot product of two vectors (represented as 2d images)
|
||||
*
|
||||
* @param a_data Pointer to 1st 2nd image data
|
||||
* @param a_step Stride of 1st 2nd image
|
||||
* @param b_data Pointer to 1st 2nd image data
|
||||
* @param b_step Stride of 1st 2nd image
|
||||
* @param width Width of both images
|
||||
* @param height Height of both images
|
||||
* @param type Data type of both images, for example CV_8U or CV_32F
|
||||
* @param dot_val Pointer to resulting dot product value
|
||||
* @return int
|
||||
*/
|
||||
inline int hal_ni_dotProduct(const uchar* a_data, size_t a_step, const uchar* b_data, size_t b_step, int width, int height,
|
||||
int type, double *dot_val)
|
||||
{ return CV_HAL_ERROR_NOT_IMPLEMENTED; }
|
||||
|
||||
//! @cond IGNORED
|
||||
#define cv_hal_dotProduct hal_ni_dotProduct
|
||||
//! @endcond
|
||||
|
||||
/**
|
||||
@brief hal_flip
|
||||
@param src_type source and destination image type
|
||||
|
||||
@@ -995,9 +995,18 @@ double Mat::dot(InputArray _mat) const
|
||||
CV_INSTRUMENT_REGION();
|
||||
|
||||
Mat mat = _mat.getMat();
|
||||
CV_Assert_N( mat.type() == type(), mat.size == size);
|
||||
|
||||
int cn = channels();
|
||||
if (this->dims <= 2)
|
||||
{
|
||||
double product = 0;
|
||||
CALL_HAL_RET(dotProduct, cv_hal_dotProduct, product, this->data, this->step, mat.data, mat.step,
|
||||
this->cols * cn, this->rows, this->depth());
|
||||
}
|
||||
|
||||
DotProdFunc func = getDotProdFunc(depth());
|
||||
CV_Assert_N( mat.type() == type(), mat.size == size, func != 0 );
|
||||
CV_Assert(func != 0 );
|
||||
|
||||
if( isContinuous() && mat.isContinuous() )
|
||||
{
|
||||
|
||||
@@ -1303,7 +1303,7 @@ void _OutputArray::create(int d, const int* sizes, int mtype, int i,
|
||||
|
||||
if(fixedType())
|
||||
{
|
||||
if(CV_MAT_CN(mtype) == m.channels() && ((1 << CV_MAT_TYPE(flags)) & fixedDepthMask) != 0 )
|
||||
if(CV_MAT_CN(mtype) == m.channels() && ((1 << CV_MAT_DEPTH(flags)) & fixedDepthMask) != 0 )
|
||||
mtype = m.type();
|
||||
else
|
||||
CV_CheckTypeEQ(m.type(), CV_MAT_TYPE(mtype), "Can't reallocate Mat with locked type (probably due to misused 'const' modifier)");
|
||||
|
||||
@@ -318,12 +318,12 @@ Exception::Exception(int _code, const String& _err, const String& _func, const S
|
||||
formatMessage();
|
||||
}
|
||||
|
||||
Exception::~Exception() throw() {}
|
||||
Exception::~Exception() CV_NOEXCEPT {}
|
||||
|
||||
/*!
|
||||
\return the error description and the context as a text string.
|
||||
*/
|
||||
const char* Exception::what() const throw() { return msg.c_str(); }
|
||||
const char* Exception::what() const CV_NOEXCEPT { return msg.c_str(); }
|
||||
|
||||
void Exception::formatMessage()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user