OpenCvSharp.Cv2.GetRectSubPix C# (CSharp) Method

GetRectSubPix() public static method

Retrieves a pixel rectangle from an image with sub-pixel accuracy.
public static GetRectSubPix ( InputArray image, Size patchSize, Point2f center, OutputArray patch, int patchType = -1 ) : void
image InputArray Source image.
patchSize Size Size of the extracted patch.
center Point2f Floating point coordinates of the center of the extracted rectangle /// within the source image. The center must be inside the image.
patch OutputArray Extracted patch that has the size patchSize and the same number of channels as src .
patchType int Depth of the extracted pixels. By default, they have the same depth as src.
return void
        public static void GetRectSubPix(InputArray image, Size patchSize, Point2f center, 
            OutputArray patch, int patchType = -1)
        {
            if (image == null)
                throw new ArgumentNullException(nameof(image));
            if (patch == null)
                throw new ArgumentNullException(nameof(patch));
            image.ThrowIfDisposed();
            patch.ThrowIfNotReady();
            NativeMethods.imgproc_getRectSubPix(image.CvPtr, patchSize, center, patch.CvPtr, patchType);
            GC.KeepAlive(image); 
            patch.Fix();
        }
        #endregion
Cv2