/// <summary>
        /// Train the calonder classifier with the specific images
        /// </summary>
        /// <param name="trainImage">The traning image</param>
        /// <param name="keypoints">The keypoints on this image</param>
        /// <param name="numTrees">Use 48 for default</param>
        /// <param name="depth">Use 9 for default</param>
        /// <param name="views">Use 5000 for default</param>
        /// <param name="reducedNumDim">use 176 for default</param>
        /// <param name="numQuantBits">Use 4 for default</param>
        public void Train(
            Image <TColor, Byte> trainImage,
            Point[] keypoints,
            int numTrees, int depth,
            int views, int reducedNumDim,
            int numQuantBits)
        {
            Debug.Assert(reducedNumDim <= keypoints.Length, "ReducedNumDim should be smaller or equals the number of keypoints");

            Random   r      = new Random();
            UInt64   rng    = (UInt64)r.Next();
            GCHandle handle = GCHandle.Alloc(keypoints, GCHandleType.Pinned);

            RTreeClassifierExtern.CvRTreeClassifierTrain(
                _ptr,
                trainImage,
                handle.AddrOfPinnedObject(),
                keypoints.Length,
                ref rng,
                numTrees,
                depth,
                views,
                new IntPtr(reducedNumDim),
                numQuantBits,
                false);

            handle.Free();
        }