fix:make zerocolor edge
This commit is contained in:
@@ -60,16 +60,11 @@
|
||||
|
||||
/**
|
||||
@defgroup core Core functionality
|
||||
|
||||
The Core module is the backbone of OpenCV, offering fundamental data structures, matrix operations,
|
||||
and utility functions that other modules depend on. It’s essential for handling image data,
|
||||
performing mathematical computations, and managing memory efficiently within the OpenCV ecosystem.
|
||||
|
||||
@{
|
||||
@defgroup core_basic Basic structures
|
||||
@defgroup core_array Operations on arrays
|
||||
@defgroup core_async Asynchronous API
|
||||
@defgroup core_xml XML/YAML/JSON Persistence
|
||||
@defgroup core_xml XML/YAML Persistence
|
||||
@defgroup core_cluster Clustering
|
||||
@defgroup core_utils Utility and system functions and macros
|
||||
@{
|
||||
@@ -81,6 +76,7 @@ performing mathematical computations, and managing memory efficiently within the
|
||||
@defgroup core_utils_samples Utility functions for OpenCV samples
|
||||
@}
|
||||
@defgroup core_opengl OpenGL interoperability
|
||||
@defgroup core_ipp Intel IPP Asynchronous C/C++ Converters
|
||||
@defgroup core_optim Optimization Algorithms
|
||||
@defgroup core_directx DirectX interoperability
|
||||
@defgroup core_eigen Eigen support
|
||||
@@ -100,7 +96,6 @@ performing mathematical computations, and managing memory efficiently within the
|
||||
@{
|
||||
@defgroup core_parallel_backend Parallel backends API
|
||||
@}
|
||||
@defgroup core_quaternion Quaternion
|
||||
@}
|
||||
*/
|
||||
|
||||
@@ -128,12 +123,12 @@ public:
|
||||
Instead, the macros CV_Error(), CV_Error_() and CV_Assert() are used.
|
||||
*/
|
||||
Exception(int _code, const String& _err, const String& _func, const String& _file, int _line);
|
||||
virtual ~Exception() CV_NOEXCEPT;
|
||||
virtual ~Exception() throw();
|
||||
|
||||
/*!
|
||||
\return the error description and the context as a text string.
|
||||
*/
|
||||
virtual const char *what() const CV_NOEXCEPT CV_OVERRIDE;
|
||||
virtual const char *what() const throw() CV_OVERRIDE;
|
||||
void formatMessage();
|
||||
|
||||
String msg; ///< the formatted error message
|
||||
@@ -168,7 +163,7 @@ enum SortFlags { SORT_EVERY_ROW = 0, //!< each matrix row is sorted independe
|
||||
|
||||
//! @} core_utils
|
||||
|
||||
//! @addtogroup core_array
|
||||
//! @addtogroup core
|
||||
//! @{
|
||||
|
||||
//! Covariation flags
|
||||
@@ -207,6 +202,27 @@ enum CovarFlags {
|
||||
COVAR_COLS = 16
|
||||
};
|
||||
|
||||
//! @addtogroup core_cluster
|
||||
//! @{
|
||||
|
||||
//! k-Means flags
|
||||
enum KmeansFlags {
|
||||
/** Select random initial centers in each attempt.*/
|
||||
KMEANS_RANDOM_CENTERS = 0,
|
||||
/** Use kmeans++ center initialization by Arthur and Vassilvitskii [Arthur2007].*/
|
||||
KMEANS_PP_CENTERS = 2,
|
||||
/** During the first (and possibly the only) attempt, use the
|
||||
user-supplied labels instead of computing them from the initial centers. For the second and
|
||||
further attempts, use the random or semi-random centers. Use one of KMEANS_\*_CENTERS flag
|
||||
to specify the exact method.*/
|
||||
KMEANS_USE_INITIAL_LABELS = 1
|
||||
};
|
||||
|
||||
//! @} core_cluster
|
||||
|
||||
//! @addtogroup core_array
|
||||
//! @{
|
||||
|
||||
enum ReduceTypes { REDUCE_SUM = 0, //!< the output is the sum of all rows/columns of the matrix.
|
||||
REDUCE_AVG = 1, //!< the output is the mean vector of all rows/columns of the matrix.
|
||||
REDUCE_MAX = 2, //!< the output is the maximum (column/row-wise) of all rows/columns of the matrix.
|
||||
@@ -214,12 +230,19 @@ enum ReduceTypes { REDUCE_SUM = 0, //!< the output is the sum of all rows/column
|
||||
REDUCE_SUM2 = 4 //!< the output is the sum of all squared rows/columns of the matrix.
|
||||
};
|
||||
|
||||
//! @} core_array
|
||||
|
||||
/** @brief Swaps two matrices
|
||||
*/
|
||||
CV_EXPORTS void swap(Mat& a, Mat& b);
|
||||
/** @overload */
|
||||
CV_EXPORTS void swap( UMat& a, UMat& b );
|
||||
|
||||
//! @} core
|
||||
|
||||
//! @addtogroup core_array
|
||||
//! @{
|
||||
|
||||
/** @brief Computes the source location of an extrapolated pixel.
|
||||
|
||||
The function computes and returns the coordinate of a donor pixel corresponding to the specified
|
||||
@@ -463,6 +486,10 @@ The function can also be emulated with a matrix expression, for example:
|
||||
*/
|
||||
CV_EXPORTS_W void scaleAdd(InputArray src1, double alpha, InputArray src2, OutputArray dst);
|
||||
|
||||
/** @example samples/cpp/tutorial_code/HighGUI/AddingImagesTrackbar.cpp
|
||||
Check @ref tutorial_trackbar "the corresponding tutorial" for more details
|
||||
*/
|
||||
|
||||
/** @brief Calculates the weighted sum of two arrays.
|
||||
|
||||
The function addWeighted calculates the weighted sum of two arrays as follows:
|
||||
@@ -530,19 +557,15 @@ The format of half precision floating point is defined in IEEE 754-2008.
|
||||
*/
|
||||
CV_EXPORTS_W void convertFp16(InputArray src, OutputArray dst);
|
||||
|
||||
/** @example samples/cpp/tutorial_code/core/how_to_scan_images/how_to_scan_images.cpp
|
||||
Check @ref tutorial_how_to_scan_images "the corresponding tutorial" for more details
|
||||
*/
|
||||
|
||||
/** @brief Performs a look-up table transform of an array.
|
||||
|
||||
The function LUT fills the output array with values from the look-up table. Indices of the entries
|
||||
are taken from the input array. That is, the function processes each element of src as follows:
|
||||
\f[\texttt{dst} (I) \leftarrow \texttt{lut(src(I) + d)}\f]
|
||||
where
|
||||
\f[d = \forkthree{0}{if \(\texttt{src}\) has depth \(\texttt{CV_8U}\) or \(\texttt{CV_16U}\)}{128}{if \(\texttt{src}\) has depth \(\texttt{CV_8S}\)}{32768}{if \(\texttt{src}\) has depth \(\texttt{CV_16S}\)}\f]
|
||||
@param src input array of 8-bit or 16-bit integer elements.
|
||||
@param lut look-up table of 256 elements (if src has depth CV_8U or CV_8S) or 65536 elements(if src has depth CV_16U or CV_16S); in case of multi-channel input array, the table should
|
||||
\f[d = \fork{0}{if \(\texttt{src}\) has depth \(\texttt{CV_8U}\)}{128}{if \(\texttt{src}\) has depth \(\texttt{CV_8S}\)}\f]
|
||||
@param src input array of 8-bit elements.
|
||||
@param lut look-up table of 256 elements; in case of multi-channel input array, the table should
|
||||
either have a single channel (in this case the same table is used for all channels) or the same
|
||||
number of channels as in the input array.
|
||||
@param dst output array of the same size and number of channels as src, and the same depth as lut.
|
||||
@@ -805,11 +828,6 @@ Possible usage with some positive example data:
|
||||
normalize(positiveData, normalizedData_minmax, 1.0, 0.0, NORM_MINMAX);
|
||||
@endcode
|
||||
|
||||
@note Due to rounding issues, min-max normalization can result in values outside provided boundaries.
|
||||
If exact range conformity is needed, following workarounds can be used:
|
||||
- use double floating point precision (dtype = CV_64F)
|
||||
- manually clip values (`cv::max(res, left_bound, res)`, `cv::min(res, right_bound, res)` or `np.clip`)
|
||||
|
||||
@param src input array.
|
||||
@param dst output array of the same size as src .
|
||||
@param alpha norm value to normalize to or the lower range boundary in case of the range
|
||||
@@ -837,21 +855,13 @@ CV_EXPORTS void normalize( const SparseMat& src, SparseMat& dst, double alpha, i
|
||||
/** @brief Finds the global minimum and maximum in an array.
|
||||
|
||||
The function cv::minMaxLoc finds the minimum and maximum element values and their positions. The
|
||||
extrema are searched across the whole array or, if mask is not an empty array, in the specified
|
||||
extremums are searched across the whole array or, if mask is not an empty array, in the specified
|
||||
array region.
|
||||
|
||||
In C++, if the input is multi-channel, you should omit the minLoc, maxLoc, and mask arguments
|
||||
(i.e. leave them as NULL, NULL, and noArray() respectively). These arguments are not
|
||||
supported for multi-channel input arrays. If working with multi-channel input and you
|
||||
need the minLoc, maxLoc, or mask arguments, then use Mat::reshape first to reinterpret
|
||||
the array as single-channel. Alternatively, you can extract the particular channel using either
|
||||
extractImageCOI, mixChannels, or split.
|
||||
|
||||
In Python, multi-channel input is not supported at all due to a limitation in the
|
||||
binding generation process (there is no way to set minLoc and maxLoc to NULL). A
|
||||
workaround is to operate on each channel individually or to use NumPy to achieve the same
|
||||
functionality.
|
||||
|
||||
The function do not work with multi-channel arrays. If you need to find minimum or maximum
|
||||
elements across all the channels, use Mat::reshape first to reinterpret the array as
|
||||
single-channel. Or you may extract the particular channel using either extractImageCOI, or
|
||||
mixChannels, or split.
|
||||
@param src input single-channel array.
|
||||
@param minVal pointer to the returned minimum value; NULL is used if not required.
|
||||
@param maxVal pointer to the returned maximum value; NULL is used if not required.
|
||||
@@ -1711,13 +1721,10 @@ elements.
|
||||
*/
|
||||
CV_EXPORTS_W bool checkRange(InputArray a, bool quiet = true, CV_OUT Point* pos = 0,
|
||||
double minVal = -DBL_MAX, double maxVal = DBL_MAX);
|
||||
/** @brief Replaces NaNs (Not-a-Number values) in a matrix with the specified value.
|
||||
|
||||
This function modifies the input matrix in-place.
|
||||
The input matrix must be of type `CV_32F` or `CV_64F`; other types are not supported.
|
||||
|
||||
@param a Input/output matrix (CV_32F or CV_64F type).
|
||||
@param val Value used to replace NaNs (defaults to 0).
|
||||
/** @brief Replaces NaNs by given number
|
||||
@param a input/output matrix (CV_32F type).
|
||||
@param val value to convert the NaNs
|
||||
*/
|
||||
CV_EXPORTS_W void patchNaNs(InputOutputArray a, double val = 0);
|
||||
|
||||
@@ -2012,8 +2019,8 @@ The function solveCubic finds the real roots of a cubic equation:
|
||||
|
||||
The roots are stored in the roots array.
|
||||
@param coeffs equation coefficients, an array of 3 or 4 elements.
|
||||
@param roots output array of real roots that has 0, 1, 2 or 3 elements.
|
||||
@return number of real roots. It can be -1 (all real numbers), 0, 1, 2 or 3.
|
||||
@param roots output array of real roots that has 1 or 3 elements.
|
||||
@return number of real roots. It can be 0, 1 or 2.
|
||||
*/
|
||||
CV_EXPORTS_W int solveCubic(InputArray coeffs, OutputArray roots);
|
||||
|
||||
@@ -3070,21 +3077,8 @@ private:
|
||||
//! @addtogroup core_cluster
|
||||
//! @{
|
||||
|
||||
//! k-means flags
|
||||
enum KmeansFlags {
|
||||
/** Select random initial centers in each attempt.*/
|
||||
KMEANS_RANDOM_CENTERS = 0,
|
||||
/** Use kmeans++ center initialization by Arthur and Vassilvitskii [Arthur2007].*/
|
||||
KMEANS_PP_CENTERS = 2,
|
||||
/** During the first (and possibly the only) attempt, use the
|
||||
user-supplied labels instead of computing them from the initial centers. For the second and
|
||||
further attempts, use the random or semi-random centers. Use one of KMEANS_\*_CENTERS flag
|
||||
to specify the exact method.*/
|
||||
KMEANS_USE_INITIAL_LABELS = 1
|
||||
};
|
||||
|
||||
/** @example samples/cpp/kmeans.cpp
|
||||
An example on k-means clustering
|
||||
An example on K-means clustering
|
||||
*/
|
||||
|
||||
/** @brief Finds centers of clusters and groups input samples around the clusters.
|
||||
@@ -3094,7 +3088,7 @@ and groups the input samples around the clusters. As an output, \f$\texttt{bestL
|
||||
0-based cluster index for the sample stored in the \f$i^{th}\f$ row of the samples matrix.
|
||||
|
||||
@note
|
||||
- (Python) An example on k-means clustering can be found at
|
||||
- (Python) An example on K-means clustering can be found at
|
||||
opencv_source_code/samples/python/kmeans.py
|
||||
@param data Data for clustering. An array of N-Dimensional points with float coordinates is needed.
|
||||
Examples of this array can be:
|
||||
|
||||
Reference in New Issue
Block a user