1
0
mirror of https://github.com/opencv/opencv_contrib.git synced 2025-10-22 07:31:26 +08:00

Merge branch 4.x

This commit is contained in:
Alexander Smorkalov
2025-09-10 09:34:12 +03:00
13 changed files with 77 additions and 44 deletions

View File

@@ -1796,7 +1796,7 @@ contains a 0-based cluster index for the \f$i^{th}\f$ sample.
@note
- Function textual ID is "org.opencv.core.kmeansND"
- In case of an N-dimentional points' set given, input GMat can have the following traits:
- In case of an N-dimensional points' set given, input GMat can have the following traits:
2 dimensions, a single row or column if there are N channels,
or N columns if there is a single channel. Mat should have @ref CV_32F depth.
- Although, if GMat with height != 1, width != 1, channels != 1 given as data, n-dimensional
@@ -1806,7 +1806,7 @@ samples are considered given in amount of A, where A = height, n = width * chann
width = 1, height = A, where A is samples amount, or width = bestLabels.width,
height = bestLabels.height if bestLabels given;
- the cluster centers are returned as 1-channel GMat with sizes
width = n, height = K, where n is samples' dimentionality and K is clusters' amount.
width = n, height = K, where n is samples' dimensionality and K is clusters' amount.
- As one of possible usages, if you want to control the initial labels for each attempt
by yourself, you can utilize just the core of the function. To do that, set the number
of attempts to 1, initialize labels each time using a custom algorithm, pass them with the
@@ -1814,7 +1814,7 @@ of attempts to 1, initialize labels each time using a custom algorithm, pass the
@param data Data for clustering. An array of N-Dimensional points with float coordinates is needed.
Function can take GArray<Point2f>, GArray<Point3f> for 2D and 3D cases or GMat for any
dimentionality and channels.
dimensionality and channels.
@param K Number of clusters to split the set by.
@param bestLabels Optional input integer array that can store the supposed initial cluster indices
for every sample. Used when ( flags = #KMEANS_USE_INITIAL_LABELS ) flag is set.