/*
         #if LANG_JP
         * /// <summary>
         * /// 階層型 k-means tree で利用される branching ファクタ
         * /// </summary>
         #else
         * /// <summary>
         * /// The branching factor to use for the hierarchical k-means tree
         * /// </summary>
         #endif
         * public int Branching
         * {
         *  get
         *  {
         *      unsafe
         *      {
         *          return *FlannInvoke.flann_KMeansIndexParams_branching(ptr);
         *      }
         *  }
         *  set
         *  {
         *      unsafe
         *      {
         * FlannInvoke.flann_KMeansIndexParams_branching(ptr) = value;
         *      }
         *  }
         * }
         #if LANG_JP
         * /// <summary>
         * /// k-means tree を作成する際の,k-means クラスタリングステージでの反復数の上限.ここで -1 は,k-means クラスタリングが収束するまで続けられることを意味します
         * /// </summary>
         #else
         * /// <summary>
         * /// The maximum number of iterations to use in the k-means clustering
         * /// stage when building the k-means tree. A value of -1 used here means that the k-means clustering should be iterated until convergence
         * /// </summary>
         #endif
         * public int Iterations
         * {
         *  get
         *  {
         *      unsafe
         *      {
         *          return *FlannInvoke.flann_KMeansIndexParams_iterations(ptr);
         *      }
         *  }
         *  set
         *  {
         *      unsafe
         *      {
         * FlannInvoke.flann_KMeansIndexParams_iterations(ptr) = value;
         *      }
         *  }
         * }
         #if LANG_JP
         * /// <summary>
         * /// k-means クラスタリングの初期中心を選択するアルゴリズム.
         * /// </summary>
         #else
         * /// <summary>
         * /// The algorithm to use for selecting the initial centers when performing a k-means clustering step.
         * /// </summary>
         #endif
         * public FlannCentersInit CentersInit
         * {
         *  get
         *  {
         *      unsafe
         *      {
         *          return *FlannInvoke.flann_KMeansIndexParams_centers_init(ptr);
         *      }
         *  }
         *  set
         *  {
         *      unsafe
         *      {
         * FlannInvoke.flann_KMeansIndexParams_centers_init(ptr) = value;
         *      }
         *  }
         * }
         #if LANG_JP
         * /// <summary>
         * /// このパラメータ(クラスタ境界インデックス)は,階層的 k-means tree の探索方法に影響を与えます.
         * /// cb_index が0の場合,最も近い中心のクラスタが,次に探索される k-means 領域になります.0より大きい値の場合も,領域サイズが考慮されます
         * /// </summary>
         #else
         * /// <summary>
         * /// This parameter (cluster boundary index) influences the
         * /// way exploration is performed in the hierarchical kmeans tree. When cb_index is zero the next kmeans domain to be explored
         * /// is choosen to be the one with the closest center. A value greater then zero also takes into account the size of the domain.
         * /// </summary>
         #endif
         * public float CbIndex
         * {
         *  get
         *  {
         *      unsafe
         *      {
         *          return *FlannInvoke.flann_KMeansIndexParams_cb_index(ptr);
         *      }
         *  }
         *  set
         *  {
         *      unsafe
         *      {
         * FlannInvoke.flann_KMeansIndexParams_cb_index(ptr) = value;
         *      }
         *  }
         * }
         * //*/
        #endregion

        #region Init & Disposal
#if LANG_JP
        /// <summary>
        ///
        /// </summary>
        /// <param name="branching">階層型 k-means tree で利用される branching ファクタ</param>
        /// <param name="iterations">k-means tree を作成する際の,k-means クラスタリングステージでの反復数の上限.ここで -1 は,k-means クラスタリングが収束するまで続けられることを意味します</param>
        /// <param name="centersInit">k-means クラスタリングの初期中心を選択するアルゴリズム.</param>
        /// <param name="cbIndex">このパラメータ(クラスタ境界インデックス)は,階層的 k-means tree の探索方法に影響を与えます. cb_index が0の場合,最も近い中心のクラスタが,次に探索される k-means 領域になります.0より大きい値の場合も,領域サイズが考慮されます</param>
#else
        /// <summary>
        ///
        /// </summary>
        /// <param name="branching">The branching factor to use for the hierarchical k-means tree</param>
        /// <param name="iterations">The maximum number of iterations to use in the k-means clustering stage when building the k-means tree. A value of -1 used here means that the k-means clustering should be iterated until convergence</param>
        /// <param name="centersInit">The algorithm to use for selecting the initial centers when performing a k-means clustering step. </param>
        /// <param name="cbIndex">This parameter (cluster boundary index) influences the way exploration is performed in the hierarchical kmeans tree. When cb_index is zero the next kmeans domain to be explored is choosen to be the one with the closest center. A value greater then zero also takes into account the size of the domain.</param>
#endif
        public KMeansIndexParams(int branching = 32, int iterations = 11, FlannCentersInit centersInit = FlannCentersInit.Random, float cbIndex = 0.2f)
        {
            ptr = NativeMethods.flann_KMeansIndexParams_construct(branching, iterations, centersInit, cbIndex);
            if (ptr == IntPtr.Zero)
            {
                throw new OpenCvSharpException("Failed to create KMeansIndexParams");
            }
        }
        /// <summary>
        ///
        /// </summary>
        /// <param name="branching">階層型 k-means tree で利用される branching ファクタ</param>
        /// <param name="iterations">k-means tree を作成する際の,k-means クラスタリングステージでの反復数の上限.ここで -1 は,k-means クラスタリングが収束するまで続けられることを意味します</param>
        /// <param name="centersInit">k-means クラスタリングの初期中心を選択するアルゴリズム.</param>
        /// <param name="cbIndex">このパラメータ(クラスタ境界インデックス)は,階層的 k-means tree の探索方法に影響を与えます. cb_index が0の場合,最も近い中心のクラスタが,次に探索される k-means 領域になります.0より大きい値の場合も,領域サイズが考慮されます</param>
#else
        /// <summary>
        ///
        /// </summary>
        /// <param name="branching">The branching factor to use for the hierarchical k-means tree</param>
        /// <param name="iterations">The maximum number of iterations to use in the k-means clustering stage when building the k-means tree. A value of -1 used here means that the k-means clustering should be iterated until convergence</param>
        /// <param name="centersInit">The algorithm to use for selecting the initial centers when performing a k-means clustering step. </param>
        /// <param name="cbIndex">This parameter (cluster boundary index) influences the way exploration is performed in the hierarchical kmeans tree. When cb_index is zero the next kmeans domain to be explored is choosen to be the one with the closest center. A value greater then zero also takes into account the size of the domain.</param>
#endif
        public KMeansIndexParams(int branching = 32, int iterations = 11, FlannCentersInit centersInit = FlannCentersInit.Random, float cbIndex = 0.2f)
        {
            IntPtr p = NativeMethods.flann_Ptr_KMeansIndexParams_new(branching, iterations, centersInit, cbIndex);

            if (p == IntPtr.Zero)
            {
                throw new OpenCvSharpException($"Failed to create {nameof(AutotunedIndexParams)}");
            }

            PtrObj = new Ptr(p);
            ptr    = PtrObj.Get();
        }
        /// <summary>
        ///
        /// </summary>
        /// <param name="trees">並列な kd-tree の個数.[1..16] の範囲が適切な値です</param>
        /// <param name="branching">階層型 k-means tree で利用される branching ファクタ</param>
        /// <param name="iterations">k-means tree を作成する際の,k-means クラスタリングステージでの反復数の上限.ここで -1 は,k-means クラスタリングが収束するまで続けられることを意味します</param>
        /// <param name="centersInit">k-means クラスタリングの初期中心を選択するアルゴリズム.</param>
        /// <param name="cbIndex">このパラメータ(クラスタ境界インデックス)は,階層的 k-means tree の探索方法に影響を与えます. cb_index が0の場合,最も近い中心のクラスタが,次に探索される k-means 領域になります.0より大きい値の場合も,領域サイズが考慮されます</param>
#else
        /// <summary>
        ///
        /// </summary>
        /// <param name="trees">The number of parallel kd-trees to use. Good values are in the range [1..16]</param>
        /// <param name="branching">The branching factor to use for the hierarchical k-means tree</param>
        /// <param name="iterations">The maximum number of iterations to use in the k-means clustering stage when building the k-means tree. A value of -1 used here means that the k-means clustering should be iterated until convergence</param>
        /// <param name="centersInit">The algorithm to use for selecting the initial centers when performing a k-means clustering step. </param>
        /// <param name="cbIndex">This parameter (cluster boundary index) influences the way exploration is performed in the hierarchical kmeans tree. When cb_index is zero the next kmeans domain to be explored is choosen to be the one with the closest center. A value greater then zero also takes into account the size of the domain.</param>
#endif
        public CompositeIndexParams(int trees = 4, int branching = 32, int iterations = 11,
                                    FlannCentersInit centersInit = FlannCentersInit.Random, float cbIndex = 0.2f)
            : base(null)
        {
            NativeMethods.HandleException(
                NativeMethods.flann_Ptr_CompositeIndexParams_new(trees, branching, iterations, centersInit, cbIndex, out var p));
            if (p == IntPtr.Zero)
            {
                throw new OpenCvSharpException($"Failed to create {nameof(CompositeIndexParams)}");
            }

            PtrObj = new Ptr(p);
            ptr    = PtrObj.Get();
        }
 public static extern IntPtr flann_Ptr_CompositeIndexParams_new(int trees, int branching, int iterations, FlannCentersInit centersInit, float cbIndex);
 public static extern IntPtr flann_Ptr_KMeansIndexParams_new(
     int branching, int iterations, [MarshalAs(UnmanagedType.I4)] FlannCentersInit centersInit, float cbIndex);
        /*
#if LANG_JP
        /// <summary>
        /// 並列な kd-tree の個数.[1..16] の範囲が適切な値です
        /// </summary>
#else
        /// <summary>
        /// The number of parallel kd-trees to use. Good values are in the range [1..16]
        /// </summary>
#endif
        public int Trees
        {
            get
            {
                unsafe
                {
                    return *FlannInvoke.flann_CompositeIndexParams_trees(ptr);
                }
            }
            set
            {
                unsafe
                {
                    *FlannInvoke.flann_CompositeIndexParams_trees(ptr) = value;
                }
            }
        }
#if LANG_JP
        /// <summary>
        /// 階層型 k-means tree で利用される branching ファクタ
        /// </summary>
#else
        /// <summary>
        /// The branching factor to use for the hierarchical k-means tree
        /// </summary>
#endif
        public int Branching
        {
            get
            {
                unsafe
                {
                    return *FlannInvoke.flann_CompositeIndexParams_branching(ptr);
                }
            }
            set
            {
                unsafe
                {
                    *FlannInvoke.flann_CompositeIndexParams_branching(ptr) = value;
                }
            }
        }
#if LANG_JP
        /// <summary>
        /// k-means tree を作成する際の,k-means クラスタリングステージでの反復数の上限.ここで -1 は,k-means クラスタリングが収束するまで続けられることを意味します
        /// </summary>
#else
        /// <summary>
        /// The maximum number of iterations to use in the k-means clustering
        /// stage when building the k-means tree. A value of -1 used here means that the k-means clustering should be iterated until convergence
        /// </summary>
#endif
        public int Iterations
        {
            get
            {
                unsafe
                {
                    return *FlannInvoke.flann_CompositeIndexParams_iterations(ptr);
                }
            }
            set
            {
                unsafe
                {
                    *FlannInvoke.flann_CompositeIndexParams_iterations(ptr) = value;
                }
            }
        }
#if LANG_JP
        /// <summary>
        /// k-means クラスタリングの初期中心を選択するアルゴリズム.
        /// </summary>
#else
        /// <summary>
        /// The algorithm to use for selecting the initial centers when performing a k-means clustering step. 
        /// </summary>
#endif
        public FlannCentersInit CentersInit
        {
            get
            {
                unsafe
                {
                    return *FlannInvoke.flann_CompositeIndexParams_centers_init(ptr);
                }
            }
            set
            {
                unsafe
                {
                    *FlannInvoke.flann_CompositeIndexParams_centers_init(ptr) = value;
                }
            }
        }
#if LANG_JP
        /// <summary>
        /// このパラメータ(クラスタ境界インデックス)は,階層的 k-means tree の探索方法に影響を与えます. 
        /// cb_index が0の場合,最も近い中心のクラスタが,次に探索される k-means 領域になります.0より大きい値の場合も,領域サイズが考慮されます
        /// </summary>
#else
        /// <summary>
        /// This parameter (cluster boundary index) influences the
        /// way exploration is performed in the hierarchical kmeans tree. When cb_index is zero the next kmeans domain to be explored 
        /// is choosen to be the one with the closest center. A value greater then zero also takes into account the size of the domain.
        /// </summary>
#endif
        public float CbIndex
        {
            get
            {
                unsafe
                {
                    return *FlannInvoke.flann_CompositeIndexParams_cb_index(ptr);
                }
            }
            set
            {
                unsafe
                {
                    *FlannInvoke.flann_CompositeIndexParams_cb_index(ptr) = value;
                }
            }
        }
        //*/
        #endregion

        #region Init & Disposal
#if LANG_JP
        /// <summary>
        /// 
        /// </summary>
        /// <param name="trees">並列な kd-tree の個数.[1..16] の範囲が適切な値です</param>
        /// <param name="branching">階層型 k-means tree で利用される branching ファクタ</param>
        /// <param name="iterations">k-means tree を作成する際の,k-means クラスタリングステージでの反復数の上限.ここで -1 は,k-means クラスタリングが収束するまで続けられることを意味します</param>
        /// <param name="centersInit">k-means クラスタリングの初期中心を選択するアルゴリズム.</param>
        /// <param name="cbIndex">このパラメータ(クラスタ境界インデックス)は,階層的 k-means tree の探索方法に影響を与えます. cb_index が0の場合,最も近い中心のクラスタが,次に探索される k-means 領域になります.0より大きい値の場合も,領域サイズが考慮されます</param>
#else
        /// <summary>
        /// 
        /// </summary>
        /// <param name="trees">The number of parallel kd-trees to use. Good values are in the range [1..16]</param>
        /// <param name="branching">The branching factor to use for the hierarchical k-means tree</param>
        /// <param name="iterations">The maximum number of iterations to use in the k-means clustering stage when building the k-means tree. A value of -1 used here means that the k-means clustering should be iterated until convergence</param>
        /// <param name="centersInit">The algorithm to use for selecting the initial centers when performing a k-means clustering step. </param>
        /// <param name="cbIndex">This parameter (cluster boundary index) influences the way exploration is performed in the hierarchical kmeans tree. When cb_index is zero the next kmeans domain to be explored is choosen to be the one with the closest center. A value greater then zero also takes into account the size of the domain.</param>
#endif
        public CompositeIndexParams(int trees = 4, int branching = 32, int iterations = 11, FlannCentersInit centersInit = FlannCentersInit.Random, float cbIndex = 0.2f)
        {
            ptr = NativeMethods.flann_CompositeIndexParams_new(trees, branching, iterations, centersInit, cbIndex);
            if (ptr == IntPtr.Zero)
                throw new OpenCvSharpException("Failed to create CompositeIndexParams");
        }
        /*
#if LANG_JP
        /// <summary>
        /// 階層型 k-means tree で利用される branching ファクタ
        /// </summary>
#else
        /// <summary>
        /// The branching factor to use for the hierarchical k-means tree
        /// </summary>
#endif
        public int Branching
        {
            get
            {
                unsafe
                {
                    return *FlannInvoke.flann_KMeansIndexParams_branching(ptr);
                }
            }
            set
            {
                unsafe
                {
                    *FlannInvoke.flann_KMeansIndexParams_branching(ptr) = value;
                }
            }
        }
#if LANG_JP
        /// <summary>
        /// k-means tree を作成する際の,k-means クラスタリングステージでの反復数の上限.ここで -1 は,k-means クラスタリングが収束するまで続けられることを意味します
        /// </summary>
#else
        /// <summary>
        /// The maximum number of iterations to use in the k-means clustering
        /// stage when building the k-means tree. A value of -1 used here means that the k-means clustering should be iterated until convergence
        /// </summary>
#endif
        public int Iterations
        {
            get
            {
                unsafe
                {
                    return *FlannInvoke.flann_KMeansIndexParams_iterations(ptr);
                }
            }
            set
            {
                unsafe
                {
                    *FlannInvoke.flann_KMeansIndexParams_iterations(ptr) = value;
                }
            }
        }
#if LANG_JP
        /// <summary>
        /// k-means クラスタリングの初期中心を選択するアルゴリズム.
        /// </summary>
#else
        /// <summary>
        /// The algorithm to use for selecting the initial centers when performing a k-means clustering step. 
        /// </summary>
#endif
        public FlannCentersInit CentersInit
        {
            get
            {
                unsafe
                {
                    return *FlannInvoke.flann_KMeansIndexParams_centers_init(ptr);
                }
            }
            set
            {
                unsafe
                {
                    *FlannInvoke.flann_KMeansIndexParams_centers_init(ptr) = value;
                }
            }
        }
#if LANG_JP
        /// <summary>
        /// このパラメータ(クラスタ境界インデックス)は,階層的 k-means tree の探索方法に影響を与えます. 
        /// cb_index が0の場合,最も近い中心のクラスタが,次に探索される k-means 領域になります.0より大きい値の場合も,領域サイズが考慮されます
        /// </summary>
#else
        /// <summary>
        /// This parameter (cluster boundary index) influences the
        /// way exploration is performed in the hierarchical kmeans tree. When cb_index is zero the next kmeans domain to be explored 
        /// is choosen to be the one with the closest center. A value greater then zero also takes into account the size of the domain.
        /// </summary>
#endif
        public float CbIndex
        {
            get
            {
                unsafe
                {
                    return *FlannInvoke.flann_KMeansIndexParams_cb_index(ptr);
                }
            }
            set
            {
                unsafe
                {
                    *FlannInvoke.flann_KMeansIndexParams_cb_index(ptr) = value;
                }
            }
        }
        //*/
        #endregion

        #region Init & Disposal
#if LANG_JP
        /// <summary>
        /// 
        /// </summary>
        /// <param name="branching">階層型 k-means tree で利用される branching ファクタ</param>
        /// <param name="iterations">k-means tree を作成する際の,k-means クラスタリングステージでの反復数の上限.ここで -1 は,k-means クラスタリングが収束するまで続けられることを意味します</param>
        /// <param name="centersInit">k-means クラスタリングの初期中心を選択するアルゴリズム.</param>
        /// <param name="cbIndex">このパラメータ(クラスタ境界インデックス)は,階層的 k-means tree の探索方法に影響を与えます. cb_index が0の場合,最も近い中心のクラスタが,次に探索される k-means 領域になります.0より大きい値の場合も,領域サイズが考慮されます</param>
#else
        /// <summary>
        /// 
        /// </summary>
        /// <param name="branching">The branching factor to use for the hierarchical k-means tree</param>
        /// <param name="iterations">The maximum number of iterations to use in the k-means clustering stage when building the k-means tree. A value of -1 used here means that the k-means clustering should be iterated until convergence</param>
        /// <param name="centersInit">The algorithm to use for selecting the initial centers when performing a k-means clustering step. </param>
        /// <param name="cbIndex">This parameter (cluster boundary index) influences the way exploration is performed in the hierarchical kmeans tree. When cb_index is zero the next kmeans domain to be explored is choosen to be the one with the closest center. A value greater then zero also takes into account the size of the domain.</param>
#endif
        public KMeansIndexParams(int branching = 32, int iterations = 11, FlannCentersInit centersInit = FlannCentersInit.Random, float cbIndex = 0.2f)
        {
            ptr = NativeMethods.flann_KMeansIndexParams_construct(branching, iterations, centersInit, cbIndex);
            if (ptr == IntPtr.Zero)
                throw new OpenCvSharpException("Failed to create KMeansIndexParams");
        }
        /*
         #if LANG_JP
         * /// <summary>
         * /// 並列な kd-tree の個数.[1..16] の範囲が適切な値です
         * /// </summary>
         #else
         * /// <summary>
         * /// The number of parallel kd-trees to use. Good values are in the range [1..16]
         * /// </summary>
         #endif
         * public int Trees
         * {
         *  get
         *  {
         *      unsafe
         *      {
         *          return *FlannInvoke.flann_CompositeIndexParams_trees(ptr);
         *      }
         *  }
         *  set
         *  {
         *      unsafe
         *      {
         * FlannInvoke.flann_CompositeIndexParams_trees(ptr) = value;
         *      }
         *  }
         * }
         #if LANG_JP
         * /// <summary>
         * /// 階層型 k-means tree で利用される branching ファクタ
         * /// </summary>
         #else
         * /// <summary>
         * /// The branching factor to use for the hierarchical k-means tree
         * /// </summary>
         #endif
         * public int Branching
         * {
         *  get
         *  {
         *      unsafe
         *      {
         *          return *FlannInvoke.flann_CompositeIndexParams_branching(ptr);
         *      }
         *  }
         *  set
         *  {
         *      unsafe
         *      {
         * FlannInvoke.flann_CompositeIndexParams_branching(ptr) = value;
         *      }
         *  }
         * }
         #if LANG_JP
         * /// <summary>
         * /// k-means tree を作成する際の,k-means クラスタリングステージでの反復数の上限.ここで -1 は,k-means クラスタリングが収束するまで続けられることを意味します
         * /// </summary>
         #else
         * /// <summary>
         * /// The maximum number of iterations to use in the k-means clustering
         * /// stage when building the k-means tree. A value of -1 used here means that the k-means clustering should be iterated until convergence
         * /// </summary>
         #endif
         * public int Iterations
         * {
         *  get
         *  {
         *      unsafe
         *      {
         *          return *FlannInvoke.flann_CompositeIndexParams_iterations(ptr);
         *      }
         *  }
         *  set
         *  {
         *      unsafe
         *      {
         * FlannInvoke.flann_CompositeIndexParams_iterations(ptr) = value;
         *      }
         *  }
         * }
         #if LANG_JP
         * /// <summary>
         * /// k-means クラスタリングの初期中心を選択するアルゴリズム.
         * /// </summary>
         #else
         * /// <summary>
         * /// The algorithm to use for selecting the initial centers when performing a k-means clustering step.
         * /// </summary>
         #endif
         * public FlannCentersInit CentersInit
         * {
         *  get
         *  {
         *      unsafe
         *      {
         *          return *FlannInvoke.flann_CompositeIndexParams_centers_init(ptr);
         *      }
         *  }
         *  set
         *  {
         *      unsafe
         *      {
         * FlannInvoke.flann_CompositeIndexParams_centers_init(ptr) = value;
         *      }
         *  }
         * }
         #if LANG_JP
         * /// <summary>
         * /// このパラメータ(クラスタ境界インデックス)は,階層的 k-means tree の探索方法に影響を与えます.
         * /// cb_index が0の場合,最も近い中心のクラスタが,次に探索される k-means 領域になります.0より大きい値の場合も,領域サイズが考慮されます
         * /// </summary>
         #else
         * /// <summary>
         * /// This parameter (cluster boundary index) influences the
         * /// way exploration is performed in the hierarchical kmeans tree. When cb_index is zero the next kmeans domain to be explored
         * /// is choosen to be the one with the closest center. A value greater then zero also takes into account the size of the domain.
         * /// </summary>
         #endif
         * public float CbIndex
         * {
         *  get
         *  {
         *      unsafe
         *      {
         *          return *FlannInvoke.flann_CompositeIndexParams_cb_index(ptr);
         *      }
         *  }
         *  set
         *  {
         *      unsafe
         *      {
         * FlannInvoke.flann_CompositeIndexParams_cb_index(ptr) = value;
         *      }
         *  }
         * }
         * //*/
        #endregion

        #region Init & Disposal
#if LANG_JP
        /// <summary>
        ///
        /// </summary>
        /// <param name="trees">並列な kd-tree の個数.[1..16] の範囲が適切な値です</param>
        /// <param name="branching">階層型 k-means tree で利用される branching ファクタ</param>
        /// <param name="iterations">k-means tree を作成する際の,k-means クラスタリングステージでの反復数の上限.ここで -1 は,k-means クラスタリングが収束するまで続けられることを意味します</param>
        /// <param name="centersInit">k-means クラスタリングの初期中心を選択するアルゴリズム.</param>
        /// <param name="cbIndex">このパラメータ(クラスタ境界インデックス)は,階層的 k-means tree の探索方法に影響を与えます. cb_index が0の場合,最も近い中心のクラスタが,次に探索される k-means 領域になります.0より大きい値の場合も,領域サイズが考慮されます</param>
#else
        /// <summary>
        ///
        /// </summary>
        /// <param name="trees">The number of parallel kd-trees to use. Good values are in the range [1..16]</param>
        /// <param name="branching">The branching factor to use for the hierarchical k-means tree</param>
        /// <param name="iterations">The maximum number of iterations to use in the k-means clustering stage when building the k-means tree. A value of -1 used here means that the k-means clustering should be iterated until convergence</param>
        /// <param name="centersInit">The algorithm to use for selecting the initial centers when performing a k-means clustering step. </param>
        /// <param name="cbIndex">This parameter (cluster boundary index) influences the way exploration is performed in the hierarchical kmeans tree. When cb_index is zero the next kmeans domain to be explored is choosen to be the one with the closest center. A value greater then zero also takes into account the size of the domain.</param>
#endif
        public CompositeIndexParams(int trees = 4, int branching = 32, int iterations = 11, FlannCentersInit centersInit = FlannCentersInit.Random, float cbIndex = 0.2f)
        {
            ptr = NativeMethods.flann_CompositeIndexParams_new(trees, branching, iterations, centersInit, cbIndex);
            if (ptr == IntPtr.Zero)
            {
                throw new OpenCvSharpException("Failed to create CompositeIndexParams");
            }
        }
 public static extern IntPtr flann_CompositeIndexParams_new(int trees, int branching, int iterations, FlannCentersInit centers_init, float cb_index);
Exemple #10
0
 public static extern IntPtr flann_CompositeIndexParams_construct(int trees, int branching, int iterations, FlannCentersInit centers_init, float cb_index);
 public static extern ExceptionStatus flann_Ptr_CompositeIndexParams_new(
     int trees, int branching, int iterations, FlannCentersInit centersInit, float cbIndex, out IntPtr returnValue);
 public static extern ExceptionStatus flann_Ptr_KMeansIndexParams_new(
     int branching, int iterations, [MarshalAs(UnmanagedType.I4)] FlannCentersInit centersInit, float cbIndex, out IntPtr returnValue);