mirror of
https://github.com/opencv/opencv.git
synced 2025-06-13 13:13:26 +08:00
fix Mat_ release #8680
This commit is contained in:
parent
0e60b26513
commit
003745432f
@ -2185,6 +2185,8 @@ public:
|
|||||||
void create(Size _size);
|
void create(Size _size);
|
||||||
//! equivalent to Mat::create(_ndims, _sizes, DatType<_Tp>::type)
|
//! equivalent to Mat::create(_ndims, _sizes, DatType<_Tp>::type)
|
||||||
void create(int _ndims, const int* _sizes);
|
void create(int _ndims, const int* _sizes);
|
||||||
|
//! equivalent to Mat::release()
|
||||||
|
void release();
|
||||||
//! cross-product
|
//! cross-product
|
||||||
Mat_ cross(const Mat_& m) const;
|
Mat_ cross(const Mat_& m) const;
|
||||||
//! data type conversion
|
//! data type conversion
|
||||||
@ -2676,11 +2678,11 @@ public:
|
|||||||
/*!
|
/*!
|
||||||
@param [out] m - output matrix; if it does not have a proper size or type before the operation,
|
@param [out] m - output matrix; if it does not have a proper size or type before the operation,
|
||||||
it is reallocated
|
it is reallocated
|
||||||
@param [in] rtype – desired output matrix type or, rather, the depth since the number of channels
|
@param [in] rtype - desired output matrix type or, rather, the depth since the number of channels
|
||||||
are the same as the input has; if rtype is negative, the output matrix will have the
|
are the same as the input has; if rtype is negative, the output matrix will have the
|
||||||
same type as the input.
|
same type as the input.
|
||||||
@param [in] alpha – optional scale factor
|
@param [in] alpha - optional scale factor
|
||||||
@param [in] beta – optional delta added to the scaled values
|
@param [in] beta - optional delta added to the scaled values
|
||||||
*/
|
*/
|
||||||
void convertTo( Mat& m, int rtype, double alpha=1, double beta=0 ) const;
|
void convertTo( Mat& m, int rtype, double alpha=1, double beta=0 ) const;
|
||||||
|
|
||||||
|
@ -1625,6 +1625,15 @@ void Mat_<_Tp>::create(int _dims, const int* _sz)
|
|||||||
Mat::create(_dims, _sz, DataType<_Tp>::type);
|
Mat::create(_dims, _sz, DataType<_Tp>::type);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template<typename _Tp> inline
|
||||||
|
void Mat_<_Tp>::release()
|
||||||
|
{
|
||||||
|
Mat::release();
|
||||||
|
#ifdef _DEBUG
|
||||||
|
flags = (flags & ~CV_MAT_TYPE_MASK) | DataType<_Tp>::type;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
template<typename _Tp> inline
|
template<typename _Tp> inline
|
||||||
Mat_<_Tp> Mat_<_Tp>::cross(const Mat_& m) const
|
Mat_<_Tp> Mat_<_Tp>::cross(const Mat_& m) const
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user