fix:make zerocolor edge
This commit is contained in:
@@ -79,10 +79,9 @@ It is defined as:
|
||||
@code
|
||||
typedef const _InputArray& InputArray;
|
||||
@endcode
|
||||
where \ref cv::_InputArray is a class that can be constructed from \ref cv::Mat, \ref cv::Mat_<T>,
|
||||
\ref cv::Matx<T, m, n>, std::vector<T>, std::vector<std::vector<T>>, std::vector<Mat>,
|
||||
std::vector<Mat_<T>>, \ref cv::UMat, std::vector<UMat> or `double`. It can also be constructed from
|
||||
a matrix expression.
|
||||
where _InputArray is a class that can be constructed from `Mat`, `Mat_<T>`, `Matx<T, m, n>`,
|
||||
`std::vector<T>`, `std::vector<std::vector<T> >`, `std::vector<Mat>`, `std::vector<Mat_<T> >`,
|
||||
`UMat`, `std::vector<UMat>` or `double`. It can also be constructed from a matrix expression.
|
||||
|
||||
Since this is mostly implementation-level class, and its interface may change in future versions, we
|
||||
do not describe it in details. There are a few key things, though, that should be kept in mind:
|
||||
@@ -185,8 +184,7 @@ public:
|
||||
#if OPENCV_ABI_COMPATIBILITY < 500
|
||||
STD_ARRAY =14 << KIND_SHIFT, //!< removed: https://github.com/opencv/opencv/issues/18897
|
||||
#endif
|
||||
STD_ARRAY_MAT =15 << KIND_SHIFT,
|
||||
CUDA_GPU_MATND =16 << KIND_SHIFT
|
||||
STD_ARRAY_MAT =15 << KIND_SHIFT
|
||||
};
|
||||
|
||||
_InputArray();
|
||||
@@ -205,7 +203,6 @@ public:
|
||||
_InputArray(const double& val);
|
||||
_InputArray(const cuda::GpuMat& d_mat);
|
||||
_InputArray(const std::vector<cuda::GpuMat>& d_mat_array);
|
||||
_InputArray(const cuda::GpuMatND& d_mat);
|
||||
_InputArray(const ogl::Buffer& buf);
|
||||
_InputArray(const cuda::HostMem& cuda_mem);
|
||||
template<typename _Tp> _InputArray(const cudev::GpuMat_<_Tp>& m);
|
||||
@@ -225,7 +222,6 @@ public:
|
||||
void getUMatVector(std::vector<UMat>& umv) const;
|
||||
void getGpuMatVector(std::vector<cuda::GpuMat>& gpumv) const;
|
||||
cuda::GpuMat getGpuMat() const;
|
||||
cuda::GpuMatND getGpuMatND() const;
|
||||
ogl::Buffer getOGlBuffer() const;
|
||||
|
||||
int getFlags() const;
|
||||
@@ -246,7 +242,6 @@ public:
|
||||
bool isContinuous(int i=-1) const;
|
||||
bool isSubmatrix(int i=-1) const;
|
||||
bool empty() const;
|
||||
bool empty(int i) const;
|
||||
void copyTo(const _OutputArray& arr) const;
|
||||
void copyTo(const _OutputArray& arr, const _InputArray & mask) const;
|
||||
size_t offset(int i=-1) const;
|
||||
@@ -259,7 +254,6 @@ public:
|
||||
bool isVector() const;
|
||||
bool isGpuMat() const;
|
||||
bool isGpuMatVector() const;
|
||||
bool isGpuMatND() const;
|
||||
~_InputArray();
|
||||
|
||||
protected:
|
||||
@@ -323,7 +317,6 @@ public:
|
||||
_OutputArray(std::vector<Mat>& vec);
|
||||
_OutputArray(cuda::GpuMat& d_mat);
|
||||
_OutputArray(std::vector<cuda::GpuMat>& d_mat);
|
||||
_OutputArray(cuda::GpuMatND& d_mat);
|
||||
_OutputArray(ogl::Buffer& buf);
|
||||
_OutputArray(cuda::HostMem& cuda_mem);
|
||||
template<typename _Tp> _OutputArray(cudev::GpuMat_<_Tp>& m);
|
||||
@@ -342,7 +335,6 @@ public:
|
||||
_OutputArray(const std::vector<Mat>& vec);
|
||||
_OutputArray(const cuda::GpuMat& d_mat);
|
||||
_OutputArray(const std::vector<cuda::GpuMat>& d_mat);
|
||||
_OutputArray(const cuda::GpuMatND& d_mat);
|
||||
_OutputArray(const ogl::Buffer& buf);
|
||||
_OutputArray(const cuda::HostMem& cuda_mem);
|
||||
template<typename _Tp> _OutputArray(const cudev::GpuMat_<_Tp>& m);
|
||||
@@ -370,7 +362,6 @@ public:
|
||||
UMat& getUMatRef(int i=-1) const;
|
||||
cuda::GpuMat& getGpuMatRef() const;
|
||||
std::vector<cuda::GpuMat>& getGpuMatVecRef() const;
|
||||
cuda::GpuMatND& getGpuMatNDRef() const;
|
||||
ogl::Buffer& getOGlBufferRef() const;
|
||||
cuda::HostMem& getHostMemRef() const;
|
||||
void create(Size sz, int type, int i=-1, bool allowTransposed=false, _OutputArray::DepthMask fixedDepthMask=static_cast<_OutputArray::DepthMask>(0)) const;
|
||||
@@ -380,7 +371,6 @@ public:
|
||||
void release() const;
|
||||
void clear() const;
|
||||
void setTo(const _InputArray& value, const _InputArray & mask = _InputArray()) const;
|
||||
Mat reinterpret( int type ) const;
|
||||
|
||||
void assign(const UMat& u) const;
|
||||
void assign(const Mat& m) const;
|
||||
@@ -401,7 +391,6 @@ public:
|
||||
_InputOutputArray(Mat& m);
|
||||
_InputOutputArray(std::vector<Mat>& vec);
|
||||
_InputOutputArray(cuda::GpuMat& d_mat);
|
||||
_InputOutputArray(cuda::GpuMatND& d_mat);
|
||||
_InputOutputArray(ogl::Buffer& buf);
|
||||
_InputOutputArray(cuda::HostMem& cuda_mem);
|
||||
template<typename _Tp> _InputOutputArray(cudev::GpuMat_<_Tp>& m);
|
||||
@@ -419,7 +408,6 @@ public:
|
||||
_InputOutputArray(const std::vector<Mat>& vec);
|
||||
_InputOutputArray(const cuda::GpuMat& d_mat);
|
||||
_InputOutputArray(const std::vector<cuda::GpuMat>& d_mat);
|
||||
_InputOutputArray(const cuda::GpuMatND& d_mat);
|
||||
_InputOutputArray(const ogl::Buffer& buf);
|
||||
_InputOutputArray(const cuda::HostMem& cuda_mem);
|
||||
template<typename _Tp> _InputOutputArray(const cudev::GpuMat_<_Tp>& m);
|
||||
@@ -458,22 +446,6 @@ typedef OutputArray OutputArrayOfArrays;
|
||||
typedef const _InputOutputArray& InputOutputArray;
|
||||
typedef InputOutputArray InputOutputArrayOfArrays;
|
||||
|
||||
/** @brief Returns an empty InputArray or OutputArray.
|
||||
|
||||
This function is used to provide an "empty" or "null" array when certain functions
|
||||
take optional input or output arrays that you don't want to provide.
|
||||
|
||||
Many OpenCV functions accept optional arguments as `cv::InputArray` or `cv::OutputArray`.
|
||||
When you don't want to pass any data for these optional parameters, you can use `cv::noArray()`
|
||||
to indicate that you are omitting them.
|
||||
|
||||
@return An empty `cv::InputArray` or `cv::OutputArray` that can be used as a placeholder.
|
||||
|
||||
@note This is often used when a function has optional arrays, and you do not want to
|
||||
provide a specific input or output array.
|
||||
|
||||
@see cv::InputArray, cv::OutputArray
|
||||
*/
|
||||
CV_EXPORTS InputOutputArray noArray();
|
||||
|
||||
/////////////////////////////////// MatAllocator //////////////////////////////////////
|
||||
@@ -1247,13 +1219,8 @@ public:
|
||||
|
||||
When the operation mask is specified, if the Mat::create call shown above reallocates the matrix,
|
||||
the newly allocated matrix is initialized with all zeros before copying the data.
|
||||
|
||||
If (re)allocation of destination memory is not necessary (e.g. updating ROI), use copyAt() .
|
||||
|
||||
@param m Destination matrix. If it does not have a proper size or type before the operation, it is
|
||||
reallocated.
|
||||
|
||||
@sa copyAt
|
||||
*/
|
||||
void copyTo( OutputArray m ) const;
|
||||
|
||||
@@ -1265,30 +1232,6 @@ public:
|
||||
*/
|
||||
void copyTo( OutputArray m, InputArray mask ) const;
|
||||
|
||||
/** @brief Overwrites the existing matrix
|
||||
|
||||
This method writes existing matrix data, just like copyTo().
|
||||
But if it does not have a proper size or type before the operation, an exception is thrown.
|
||||
This function is helpful to update ROI in an existing matrix.
|
||||
|
||||
If (re)allocation of destination memory is necessary, use copyTo() .
|
||||
|
||||
@param m Destination matrix.
|
||||
If it does not have a proper size or type before the operation, an exception is thrown.
|
||||
|
||||
@sa copyTo
|
||||
|
||||
*/
|
||||
void copyAt( OutputArray m ) const;
|
||||
|
||||
/** @overload
|
||||
@param m Destination matrix.
|
||||
If it does not have a proper size or type before the operation, an exception is thrown.
|
||||
@param mask Operation mask of the same size as \*this. Its non-zero elements indicate which matrix
|
||||
elements need to be copied. The mask has to be of type CV_8U and can have 1 or multiple channels.
|
||||
*/
|
||||
void copyAt( OutputArray m, InputArray mask ) const;
|
||||
|
||||
/** @brief Converts an array to another data type with optional scaling.
|
||||
|
||||
The method converts source pixel values to the target data type. saturate_cast\<\> is applied at
|
||||
@@ -1366,28 +1309,19 @@ public:
|
||||
|
||||
/** @overload
|
||||
* @param cn New number of channels. If the parameter is 0, the number of channels remains the same.
|
||||
* @param newndims New number of dimensions.
|
||||
* @param newsz Array with new matrix size by all dimensions. If some sizes are zero,
|
||||
* @param newndims New number of dimentions.
|
||||
* @param newsz Array with new matrix size by all dimentions. If some sizes are zero,
|
||||
* the original sizes in those dimensions are presumed.
|
||||
*/
|
||||
Mat reshape(int cn, int newndims, const int* newsz) const;
|
||||
|
||||
/** @overload
|
||||
* @param cn New number of channels. If the parameter is 0, the number of channels remains the same.
|
||||
* @param newshape Vector with new matrix size by all dimensions. If some sizes are zero,
|
||||
* @param newshape Vector with new matrix size by all dimentions. If some sizes are zero,
|
||||
* the original sizes in those dimensions are presumed.
|
||||
*/
|
||||
Mat reshape(int cn, const std::vector<int>& newshape) const;
|
||||
|
||||
/** @brief Reset the type of matrix.
|
||||
|
||||
The methods reset the data type of matrix. If the new type and the old type of the matrix
|
||||
have the same element size, the current buffer can be reused. The method needs to consider whether the
|
||||
current mat is a submatrix or has any references.
|
||||
@param type New data type.
|
||||
*/
|
||||
Mat reinterpret( int type ) const;
|
||||
|
||||
/** @brief Transposes a matrix.
|
||||
|
||||
The method performs matrix transposition by means of matrix expressions. It does not perform the
|
||||
@@ -2185,7 +2119,7 @@ public:
|
||||
/** @overload */
|
||||
template<typename _Tp, typename Functor> void forEach(const Functor& operation) const;
|
||||
|
||||
Mat(Mat&& m) CV_NOEXCEPT;
|
||||
Mat(Mat&& m);
|
||||
Mat& operator = (Mat&& m);
|
||||
|
||||
enum { MAGIC_VAL = 0x42FF0000, AUTO_STEP = 0, CONTINUOUS_FLAG = CV_MAT_CONT_FLAG, SUBMATRIX_FLAG = CV_SUBMAT_FLAG };
|
||||
@@ -2521,8 +2455,8 @@ public:
|
||||
UMat(const UMat& m, const Range* ranges);
|
||||
UMat(const UMat& m, const std::vector<Range>& ranges);
|
||||
|
||||
//! builds matrix from std::vector. The data is always copied. The copyData
|
||||
//! parameter is deprecated and will be removed in OpenCV 5.0.
|
||||
// FIXIT copyData=false is not implemented, drop this in favor of cv::Mat (OpenCV 5.0)
|
||||
//! builds matrix from std::vector with or without copying the data
|
||||
template<typename _Tp> explicit UMat(const std::vector<_Tp>& vec, bool copyData=false);
|
||||
|
||||
//! destructor - calls release()
|
||||
@@ -3605,7 +3539,7 @@ public:
|
||||
/** @brief Matrix expression representation
|
||||
@anchor MatrixExpressions
|
||||
This is a list of implemented matrix operations that can be combined in arbitrary complex
|
||||
expressions (here A, B stand for matrices ( cv::Mat ), s for a cv::Scalar, alpha for a
|
||||
expressions (here A, B stand for matrices ( Mat ), s for a scalar ( Scalar ), alpha for a
|
||||
real-valued scalar ( double )):
|
||||
- Addition, subtraction, negation: `A+B`, `A-B`, `A+s`, `A-s`, `s+A`, `s-A`, `-A`
|
||||
- Scaling: `A*alpha`
|
||||
@@ -3620,13 +3554,13 @@ real-valued scalar ( double )):
|
||||
0.
|
||||
- Bitwise logical operations: `A logicop B`, `A logicop s`, `s logicop A`, `~A`, where *logicop* is one of
|
||||
`&`, `|`, `^`.
|
||||
- Element-wise minimum and maximum: cv::min(A, B), cv::min(A, alpha), cv::max(A, B), cv::max(A, alpha)
|
||||
- Element-wise absolute value: cv::abs(A)
|
||||
- Element-wise minimum and maximum: `min(A, B)`, `min(A, alpha)`, `max(A, B)`, `max(A, alpha)`
|
||||
- Element-wise absolute value: `abs(A)`
|
||||
- Cross-product, dot-product: `A.cross(B)`, `A.dot(B)`
|
||||
- Any function of matrix or matrices and scalars that returns a matrix or a scalar, such as cv::norm,
|
||||
cv::mean, cv::sum, cv::countNonZero, cv::trace, cv::determinant, cv::repeat, and others.
|
||||
- Any function of matrix or matrices and scalars that returns a matrix or a scalar, such as norm,
|
||||
mean, sum, countNonZero, trace, determinant, repeat, and others.
|
||||
- Matrix initializers ( Mat::eye(), Mat::zeros(), Mat::ones() ), matrix comma-separated
|
||||
initializers, matrix constructors and operators that extract sub-matrices (see cv::Mat description).
|
||||
initializers, matrix constructors and operators that extract sub-matrices (see Mat description).
|
||||
- Mat_<destination_type>() constructors to cast the result to the proper type.
|
||||
@note Comma-separated initializers and probably some other operations may require additional
|
||||
explicit Mat() or Mat_<T>() constructor calls to resolve a possible ambiguity.
|
||||
|
||||
Reference in New Issue
Block a user