Пример #1
0
        public static IDescriptorMatcher bindTo_IDescriptorMatcher(IComponentIntrospect component)
        {
            global::System.IntPtr cPtr = solarPINVOKE.bindTo_IDescriptorMatcher(IComponentIntrospect.getCPtr(component));
            IDescriptorMatcher    ret  = (cPtr == global::System.IntPtr.Zero) ? null : new IDescriptorMatcher(cPtr, true);

            if (solarPINVOKE.SWIGPendingException.Pending)
            {
                throw solarPINVOKE.SWIGPendingException.Retrieve();
            }
            return(ret);
        }
Пример #2
0
        /// <summary>
        /// Finds the best match for each descriptor in <paramref name="queryDescriptors"/>.
        /// </summary>
        /// <param name="matcher">The descriptor matcher used to find correspondences between descriptor sets.</param>
        /// <param name="queryDescriptors">The set of descriptors for which to find the best match.</param>
        /// <param name="trainDescriptors">The training set of descriptors.</param>
        /// <param name="mask">
        /// The optional operation mask specifying permissible matches between input query descriptors
        /// and stored training descriptors.
        /// </param>
        /// <returns>
        /// The collection of best matches found for each permissible descriptor in
        /// <paramref name="queryDescriptors"/>.
        /// </returns>
        public static DMatchCollection Match(this IDescriptorMatcher matcher, Arr queryDescriptors, Arr trainDescriptors, Arr mask = null)
        {
            if (matcher == null)
            {
                throw new ArgumentNullException("matcher");
            }

            var matches = new DMatchCollection();

            matcher.Match(queryDescriptors, trainDescriptors, matches, mask);
            return(matches);
        }