Ejemplo n.º 1
0
 static extern nint vImageTentConvolve_ARGB8888(ref vImageBuffer src, ref vImageBuffer dest, IntPtr tempBuffer, vImagePixelCount srcOffsetToROI_X, vImagePixelCount srcOffsetToROI_Y, uint kernel_height, uint kernel_width, Pixel8888 backgroundColor, vImageFlags flags);
Ejemplo n.º 2
0
 public static vImageError ConvolveMultiKernelARGB8888(ref vImageBuffer src, 
     ref vImageBuffer dest,
     IntPtr tempBuffer,
     vImagePixelCount srcOffsetToROI_X,
     vImagePixelCount srcOffsetToROI_Y,
     short [] kernels, 		// must be 4
     uint kernel_height,
     uint kernel_width,
     int [] divisors, 		// must be 4
     int [] biases,		// must be 4
     Pixel8888 backgroundColor,
     vImageFlags flags)
 {
     var kern = new short [] [] { kernels, kernels, kernels, kernels };
     return ConvolveMultiKernelARGB8888 (ref src, ref dest, tempBuffer, srcOffsetToROI_X, srcOffsetToROI_Y, kern, kernel_height, kernel_width, divisors, biases, backgroundColor, flags);
 }
Ejemplo n.º 3
0
 static extern nint vImageConvolveWithBias_ARGB8888(ref vImageBuffer src, ref vImageBuffer dest, IntPtr tempBuffer, vImagePixelCount srcOffsetToROI_X, vImagePixelCount srcOffsetToROI_Y,  short *kernel, uint kernel_height, uint kernel_width, int divisor, int bias, Pixel8888 backgroundColor, vImageFlags flags);
Ejemplo n.º 4
0
 static extern nint vImageRichardsonLucyDeConvolve_ARGB8888(ref vImageBuffer src, ref vImageBuffer dest, IntPtr tempBuffer, vImagePixelCount srcOffsetToROI_X, vImagePixelCount srcOffsetToROI_Y, short *kernel, short *kernel2, uint kernel_height, uint kernel_width, uint kernel_height2, uint kernel_width2, int divisor, int divisor2, Pixel8888 backgroundColor,  uint iterationCount, vImageFlags flags);
Ejemplo n.º 5
0
 static extern nint vImageConvolveMultiKernel_ARGB8888(ref vImageBuffer src, 
     ref vImageBuffer dest,
     IntPtr tempBuffer,
     vImagePixelCount srcOffsetToROI_X,
     vImagePixelCount srcOffsetToROI_Y,
     short* [] kernels, 		// must be 4
     uint kernel_height,
     uint kernel_width,
     int [] divisors, 		// must be 4
     int [] biases,		// must be 4
     Pixel8888 backgroundColor,
     vImageFlags flags);
Ejemplo n.º 6
0
 public static vImageError TentConvolveARGB8888(ref vImageBuffer src, ref vImageBuffer dest, IntPtr tempBuffer, vImagePixelCount srcOffsetToROI_X, vImagePixelCount srcOffsetToROI_Y, uint kernel_height, uint kernel_width, Pixel8888 backgroundColor, vImageFlags flags)
 {
     return (vImageError) (long) vImageTentConvolve_ARGB8888 (ref src, ref dest, tempBuffer, srcOffsetToROI_X, srcOffsetToROI_Y, kernel_height, kernel_width, backgroundColor, flags);
 }
Ejemplo n.º 7
0
 public static vImageError RichardsonLucyDeConvolveARGB8888(ref vImageBuffer src, ref vImageBuffer dest, IntPtr tempBuffer, vImagePixelCount srcOffsetToROI_X, vImagePixelCount srcOffsetToROI_Y, short *kernel, short *kernel2, uint kernel_height, uint kernel_width, uint kernel_height2, uint kernel_width2, int divisor, int divisor2, Pixel8888 backgroundColor,  uint iterationCount, vImageFlags flags)
 {
     return (vImageError) (long) vImageRichardsonLucyDeConvolve_ARGB8888 (ref src, ref dest, tempBuffer, srcOffsetToROI_X, srcOffsetToROI_Y, kernel, kernel2, kernel_height, kernel_width, kernel_height2, kernel_width2, divisor, divisor2, backgroundColor, iterationCount, flags);
 }
Ejemplo n.º 8
0
 public static vImageError ConvolveWithBiasARGB8888(ref vImageBuffer src, ref vImageBuffer dest, IntPtr tempBuffer, vImagePixelCount srcOffsetToROI_X, vImagePixelCount srcOffsetToROI_Y,  short *kernel, uint kernel_height, uint kernel_width, int divisor, int bias, Pixel8888 backgroundColor, vImageFlags flags)
 {
     return (vImageError) (long) vImageConvolveWithBias_ARGB8888 (ref src, ref dest, tempBuffer, srcOffsetToROI_X, srcOffsetToROI_Y, kernel, kernel_height, kernel_width, divisor, bias, backgroundColor, flags);
 }
Ejemplo n.º 9
0
 public static vImageError ConvolveMultiKernelARGB8888(ref vImageBuffer src, 
     ref vImageBuffer dest,
     IntPtr tempBuffer,
     vImagePixelCount srcOffsetToROI_X,
     vImagePixelCount srcOffsetToROI_Y,
     short [][] kernels, 		// must be 4
     uint kernel_height,
     uint kernel_width,
     int [] divisors, 		// must be 4
     int [] biases,		// must be 4
     Pixel8888 backgroundColor,
     vImageFlags flags)
 {
     if (kernels == null)
         throw new ArgumentNullException ("kernels");
     if (divisors == null)
         throw new ArgumentNullException ("divisors");
     if (biases == null)
         throw new ArgumentNullException ("biases");
     if (kernels.Length < 4)
         throw new ArgumentException ("Must contain at least four elements", "kernels");
     if (divisors.Length < 4)
         throw new ArgumentException ("Must contain at least four elements", "divisors");
     if (biases.Length < 4)
         throw new ArgumentException ("Must contain at least four elements", "biases");
     unsafe {
         fixed (short* f1 = kernels [0]) {
             fixed (short* f2 = kernels [1]) {
                 fixed (short* f3 = kernels [2]) {
                     fixed (short* f4 = kernels [3]) {
                         var ptrs = new short* [4];
                         ptrs [0] = f1;
                         ptrs [1] = f2;
                         ptrs [2] = f3;
                         ptrs [3] = f4;
                         return (vImageError) (long) vImageConvolveMultiKernel_ARGB8888 (ref src, ref dest, tempBuffer, srcOffsetToROI_X, srcOffsetToROI_Y, ptrs, kernel_height, kernel_width, divisors, biases, backgroundColor, flags);
                     }
                 }
             }
         }
     }
 }