OpenCvSharp.HOGDescriptor.DetectROI C# (CSharp) Method

DetectROI() public method

evaluate specified ROI and return confidence value for each location
public DetectROI ( OpenCvSharp.Mat img, System.Point locations, System.Point &foundLocations, double &confidences, double hitThreshold, Size winStride = null, Size padding = null ) : void
img OpenCvSharp.Mat
locations System.Point
foundLocations System.Point
confidences double
hitThreshold double
winStride Size
padding Size
return void
        public void DetectROI(
            Mat img, Point[] locations, out Point[] foundLocations, out double[] confidences,
            double hitThreshold = 0, Size? winStride = null, Size? padding = null)
        {
            if (disposed)
                throw new ObjectDisposedException("HOGDescriptor");
            if (img == null)
                throw new ArgumentNullException(nameof(img));
            if (locations == null)
                throw new ArgumentNullException(nameof(locations));
            img.ThrowIfDisposed();

            Size winStride0 = winStride.GetValueOrDefault(new Size());
            Size padding0 = padding.GetValueOrDefault(new Size());
            using (var flVec = new VectorOfPoint())
            using (var cVec = new VectorOfDouble())
            {
                NativeMethods.objdetect_HOGDescriptor_detectROI(ptr, img.CvPtr, locations, locations.Length,
                    flVec.CvPtr, cVec.CvPtr, hitThreshold, winStride0, padding0);
                foundLocations = flVec.ToArray();
                confidences = cVec.ToArray();
            }
        }