/// <summary> /// Detect keypoints in an image and compute the descriptors on the image from the keypoint locations. /// </summary> /// <param name="image">The image</param> /// <param name="mask">The optional mask, can be null if not needed</param> /// <param name="keyPoints">The detected keypoints will be stored in this vector</param> /// <param name="descriptors">The descriptors from the keypoints</param> /// <param name="useProvidedKeyPoints">If true, the method will skip the detection phase and will compute descriptors for the provided keypoints</param> public void DetectAndCompute(IInputArray image, IInputArray mask, VectorOfKeyPoint keyPoints, IOutputArray descriptors, bool useProvidedKeyPoints) { using (InputArray iaImage = image.GetInputArray()) using (InputArray iaMask = mask == null ? InputArray.GetEmpty() : mask.GetInputArray()) using (OutputArray oaDescriptors = descriptors.GetOutputArray()) Features2DInvoke.CvFeature2DDetectAndCompute(_ptr, iaImage, iaMask, keyPoints, oaDescriptors, useProvidedKeyPoints); }