/// <summary>
 /// Converts a collection of keypoints to an array of points.
 /// </summary>
 /// <param name="keyPoints">The collection of keypoints to convert.</param>
 /// <param name="points">The array of points that is the destination of the converted keypoints.</param>
 /// <param name="keyPointIndices">The optional array containing the keypoint indices to convert.</param>
 public static void Convert(KeyPointCollection keyPoints, Point2f[] points, int[] keyPointIndices)
 {
     using (var pointVector = new Point2fCollection())
         using (var indexVector = keyPointIndices != null ? new Int32Collection(keyPointIndices) : null)
         {
             Convert(keyPoints, pointVector, indexVector);
             pointVector.CopyTo(points);
         }
 }
 /// <summary>
 /// Converts an array of points to a collection of keypoints, where each
 /// keypoint is assigned the same size, response and orientation.
 /// </summary>
 /// <param name="points">The array of points to convert.</param>
 /// <param name="keyPoints">The collection that is the destination of the converted keypoints.</param>
 /// <param name="size">The shared size of the converted keypoints.</param>
 /// <param name="response">The shared response of the converted keypoints.</param>
 /// <param name="octave">The shared octave, or pyramid level, of the converted keypoints.</param>
 /// <param name="classId">The shared class id of the converted keypoints.</param>
 public static void Convert(
     Point2f[] points,
     KeyPointCollection keyPoints,
     float size     = 1,
     float response = 1,
     int octave     = 0,
     int classId    = -1)
 {
     using (var vector = new Point2fCollection(points))
     {
         Convert(vector, keyPoints, size, response, octave, classId);
     }
 }
 /// <summary>
 /// Converts a collection of points to a collection of keypoints, where each
 /// keypoint is assigned the same size, response and orientation.
 /// </summary>
 /// <param name="points">The collection of points to convert.</param>
 /// <param name="keyPoints">The collection that is the destination of the converted keypoints.</param>
 /// <param name="size">The shared size of the converted keypoints.</param>
 /// <param name="response">The shared response of the converted keypoints.</param>
 /// <param name="octave">The shared octave, or pyramid level, of the converted keypoints.</param>
 /// <param name="classId">The shared class id of the converted keypoints.</param>
 public static void Convert(
     Point2fCollection points,
     KeyPointCollection keyPoints,
     float size     = 1,
     float response = 1,
     int octave     = 0,
     int classId    = -1)
 {
     NativeMethods.cv_features2d_KeyPoint_convert_vector_Point2f(
         points,
         keyPoints,
         size,
         response,
         octave,
         classId);
 }
 /// <summary>
 /// Converts a collection of keypoints to a collection of points.
 /// </summary>
 /// <param name="keyPoints">The collection of keypoints to convert.</param>
 /// <param name="points">The collection of points that is the destination of the converted keypoints.</param>
 /// <param name="keyPointIndices">The optional collection of the keypoint indices to convert.</param>
 public static void Convert(KeyPointCollection keyPoints, Point2fCollection points, Int32Collection keyPointIndices)
 {
     NativeMethods.cv_features2d_KeyPoint_convert_vector_KeyPoint(keyPoints, points, keyPointIndices ?? Int32Collection.Null);
 }
 /// <summary>
 /// Converts a collection of keypoints to a collection of points.
 /// </summary>
 /// <param name="keyPoints">The collection of keypoints to convert.</param>
 /// <param name="points">The collection of points that is the destination of the converted keypoints.</param>
 public static void Convert(KeyPointCollection keyPoints, Point2fCollection points)
 {
     Convert(keyPoints, points, null);
 }