예제 #1
0
        /// <summary>
        /// Resize the CudaImage. The calling GpuMat be GpuMat%lt;Byte&gt;. If stream is specified, it has to be either 1 or 4 channels.
        /// </summary>
        /// <param name="size">The new size</param>
        /// <param name="interpolationType">The interpolation type</param>
        /// <param name="stream">Use a Stream to call the function asynchronously (non-blocking) or null to call the function synchronously (blocking).</param>
        /// <returns>A CudaImage of the new size</returns>
        public CudaImage <TColor, TDepth> Resize(Size size, CvEnum.Inter interpolationType, Stream stream = null)
        {
            CudaImage <TColor, TDepth> result = new CudaImage <TColor, TDepth>(size);

            CudaInvoke.Resize(this, result, size, 0, 0, interpolationType, stream);
            return(result);
        }
예제 #2
0
 internal extern static void cveShapeTransformerWarpImage(
     IntPtr transformer,
     IntPtr transformingImage,
     IntPtr output,
     CvEnum.Inter flags,
     CvEnum.BorderType borderMode,
     ref MCvScalar borderValue);
예제 #3
0
        /// <summary>
        /// Projects the image.
        /// </summary>
        /// <param name="src">Source image</param>
        /// <param name="K">Camera intrinsic parameters</param>
        /// <param name="R">Camera rotation matrix</param>
        /// <param name="interpMode">Interpolation mode</param>
        /// <param name="borderMode">Border extrapolation mode</param>
        /// <param name="dst">Projected image</param>
        /// <returns>Project image top-left corner</returns>
        public Point Warp(IInputArray src, IInputArray K, IInputArray R, CvEnum.Inter interpMode, CvEnum.BorderType borderMode, IOutputArray dst)
        {
            Point corner = new Point();

            using (InputArray iaSrc = src.GetInputArray())
                using (InputArray iaK = K.GetInputArray())
                    using (InputArray iaR = R.GetInputArray())
                        using (OutputArray oaDst = dst.GetOutputArray())
                        {
                            StitchingInvoke.cveRotationWarperWarp(_rotationWarper, iaSrc, iaK, iaR, interpMode, borderMode, oaDst, ref corner);
                            return(corner);
                        }
        }
예제 #4
0
 /// <summary>
 /// Apply a transformation, given a pre-estimated transformation parameters, to an Image.
 /// </summary>
 /// <param name="transformer">The shape transformer</param>
 /// <param name="transformingImage">Input image.</param>
 /// <param name="output">Output image.</param>
 /// <param name="flags">Image interpolation method.</param>
 /// <param name="boarderMode">border style.</param>
 /// <param name="borderValue">border value.</param>
 public static void WarpImage(
     this IShapeTransformer transformer,
     IInputArray transformingImage,
     IOutputArray output,
     CvEnum.Inter flags            = Inter.Linear,
     CvEnum.BorderType boarderMode = BorderType.Constant,
     MCvScalar borderValue         = new MCvScalar())
 {
     using (InputArray iaTransformingImage = transformingImage.GetInputArray())
         using (OutputArray oaOutput = output.GetOutputArray())
         {
             cveShapeTransformerWarpImage(
                 transformer.ShapeTransformerPtr,
                 iaTransformingImage,
                 oaOutput,
                 flags,
                 boarderMode,
                 ref borderValue);
         }
 }
예제 #5
0
파일: Stitcher.cs 프로젝트: zanker99/emgucv
 internal static extern void cveStitcherSetInterpolationFlags(IntPtr stitcher, CvEnum.Inter interpFlags);
예제 #6
0
 internal static extern void cveRotationWarperWarp(IntPtr warper, IntPtr src, IntPtr K, IntPtr R, CvEnum.Inter interpMode, CvEnum.BorderType borderMode, IntPtr dst, ref Point corner);