/// <summary> /// Create a flann index using Kmeans /// </summary> /// <param name="values">A row by row matrix of descriptors</param> /// <param name="branching">Branching factor (for kmeans tree), use 32 for default</param> /// <param name="iterations">Max iterations to perform in one kmeans clustering (kmeans tree), use 11 for deafault</param> /// <param name="centersInitType">Algorithm used for picking the initial cluster centers for kmeans tree, use Random for default</param> /// <param name="cbIndex">Cluster boundary index. Used when searching the kmeans tree. Use 0.2 for default</param> public Index(IInputArray values, int branching, int iterations, CenterInitType centersInitType, float cbIndex) { using (InputArray iaValues = values.GetInputArray()) _ptr = CvFlannIndexCreateKMeans(iaValues, branching, iterations, centersInitType, cbIndex); }
/// <summary> /// Create a flann index using Kmeans /// </summary> /// <param name="values">A row by row matrix of descriptors</param> /// <param name="branching">Branching factor (for kmeans tree), use 32 for default</param> /// <param name="iterations">Max iterations to perform in one kmeans clustering (kmeans tree), use 11 for deafault</param> /// <param name="centersInitType">Algorithm used for picking the initial cluster centers for kmeans tree, use RANDOM for default</param> /// <param name="cbIndex">Cluster boundary index. Used when searching the kmeans tree. Use 0.2 for default</param> public Index(Matrix <float> values, int branching, int iterations, CenterInitType centersInitType, float cbIndex) { _ptr = CvFlannIndexCreateKMeans(values, branching, iterations, centersInitType, cbIndex); }
/// <summary> /// Create a flann index using a composition of KDTreee and KMeans tree /// </summary> /// <param name="numberOfKDTrees">The number of KDTrees to be used</param> /// <param name="values">A row by row matrix of descriptors</param> /// <param name="branching">Branching factor (for kmeans tree), use 32 for default</param> /// <param name="iterations">Max iterations to perform in one kmeans clustering (kmeans tree), use 11 for deafault</param> /// <param name="centersInitType">Algorithm used for picking the initial cluster centers for kmeans tree, use Random for default</param> /// <param name="cbIndex">Cluster boundary index. Used when searching the kmeans tree. Use 0.2 for default</param> public Index(IInputArray values, int numberOfKDTrees, int branching, int iterations, CenterInitType centersInitType, float cbIndex) { using (InputArray iaValues = values.GetInputArray()) _ptr = CvFlannIndexCreateComposite(iaValues, numberOfKDTrees, branching, iterations, centersInitType, cbIndex); }
private static extern IntPtr CvFlannIndexCreateComposite(IntPtr features, int numberOfKDTrees, int branching, int iterations, CenterInitType centersInitType, float cbIndex);
/// <summary> /// Create a flann index using a composition of KDTreee and KMeans tree /// </summary> /// <param name="numberOfKDTrees">The number of KDTrees to be used</param> /// <param name="values">A row by row matrix of descriptors</param> /// <param name="branching">Branching factor (for kmeans tree), use 32 for default</param> /// <param name="iterations">Max iterations to perform in one kmeans clustering (kmeans tree), use 11 for deafault</param> /// <param name="centersInitType">Algorithm used for picking the initial cluster centers for kmeans tree, use RANDOM for default</param> /// <param name="cbIndex">Cluster boundary index. Used when searching the kmeans tree. Use 0.2 for default</param> public Index(Matrix <float> values, int numberOfKDTrees, int branching, int iterations, CenterInitType centersInitType, float cbIndex) { _ptr = CvFlannIndexCreateComposite(values, numberOfKDTrees, branching, iterations, centersInitType, cbIndex); }
private static extern IntPtr CvFlannIndexCreateKMeans(IntPtr features, int branching, int iterations, CenterInitType centersInitType, float cbIndex);
/// <summary> /// Create a flann index using Kmeans /// </summary> /// <param name="values">A row by row matrix of descriptors</param> /// <param name="branching">Branching factor (for kmeans tree), use 32 for default</param> /// <param name="iterations">Max iterations to perform in one kmeans clustering (kmeans tree), use 11 for deafault</param> /// <param name="centersInitType">Algorithm used for picking the initial cluster centers for kmeans tree, use RANDOM for default</param> /// <param name="cbIndex">Cluster boundary index. Used when searching the kmeans tree. Use 0.2 for default</param> public Index(Matrix<float> values, int branching, int iterations, CenterInitType centersInitType, float cbIndex) { _ptr = CvInvoke.CvFlannIndexCreateKMeans(values, branching, iterations, centersInitType, cbIndex); }
/// <summary> /// Create a flann index using a composition of KDTreee and KMeans tree /// </summary> /// <param name="numberOfKDTrees">The number of KDTrees to be used</param> /// <param name="values">A row by row matrix of descriptors</param> /// <param name="branching">Branching factor (for kmeans tree), use 32 for default</param> /// <param name="iterations">Max iterations to perform in one kmeans clustering (kmeans tree), use 11 for deafault</param> /// <param name="centersInitType">Algorithm used for picking the initial cluster centers for kmeans tree, use RANDOM for default</param> /// <param name="cbIndex">Cluster boundary index. Used when searching the kmeans tree. Use 0.2 for default</param> public Index(Matrix<float> values, int numberOfKDTrees, int branching, int iterations, CenterInitType centersInitType, float cbIndex) { _ptr = CvInvoke.CvFlannIndexCreateComposite(values, numberOfKDTrees, branching, iterations, centersInitType, cbIndex); }