Example #1
0
 static extern nint vImageRichardsonLucyDeConvolve_ARGBFFFF(ref vImageBuffer src, ref vImageBuffer dest, IntPtr tempBuffer, vImagePixelCount srcOffsetToROI_X, vImagePixelCount srcOffsetToROI_Y, float *kernel, float *kernel2, uint kernel_height, uint kernel_width, uint kernel_height2, uint kernel_width2, PixelFFFF backgroundColor,  uint iterationCount, vImageFlags flags);
Example #2
0
 public static vImageError ConvolveMultiKernelARGBFFFF(ref vImageBuffer src,
     ref vImageBuffer dest,
     IntPtr tempBuffer,
     vImagePixelCount srcOffsetToROI_X,
     vImagePixelCount srcOffsetToROI_Y,
     float [] kernels,   //must be 4
     uint kernel_height,
     uint kernel_width,
     float [] biases,    // must be 4
     PixelFFFF backgroundColor,
     vImageFlags flags)
 {
     var kern = new float [] [] { kernels, kernels, kernels, kernels };
     return ConvolveMultiKernelARGBFFFF (ref src, ref dest, tempBuffer, srcOffsetToROI_X, srcOffsetToROI_Y, kern, kernel_height, kernel_width, biases, backgroundColor, flags);
 }
Example #3
0
 static extern nint vImageConvolve_ARGBFFFF(ref vImageBuffer src, ref vImageBuffer dest, IntPtr tempBuffer, vImagePixelCount srcOffsetToROI_X, vImagePixelCount srcOffsetToROI_Y,  float *kernel, uint kernel_height, uint kernel_width, PixelFFFF backgroundColor, vImageFlags flags);
Example #4
0
 static extern nint vImageConvolveMultiKernel_ARGBFFFF(ref vImageBuffer src,
     ref vImageBuffer dest,
     IntPtr tempBuffer,
     vImagePixelCount srcOffsetToROI_X,
     vImagePixelCount srcOffsetToROI_Y,
     float* [] kernels,   //must be 4, defined as 'float*[4]'
     uint kernel_height,
     uint kernel_width,
     float [] biases,    // must be 4
     PixelFFFF backgroundColor,
     vImageFlags flags);
Example #5
0
 public static vImageError RichardsonLucyDeConvolveARGBFFFF(ref vImageBuffer src, ref vImageBuffer dest, IntPtr tempBuffer, vImagePixelCount srcOffsetToROI_X, vImagePixelCount srcOffsetToROI_Y, float *kernel, float *kernel2, uint kernel_height, uint kernel_width, uint kernel_height2, uint kernel_width2, PixelFFFF backgroundColor,  uint iterationCount, vImageFlags flags)
 {
     return (vImageError) (long) vImageRichardsonLucyDeConvolve_ARGBFFFF (ref src, ref dest, tempBuffer, srcOffsetToROI_X, srcOffsetToROI_Y, kernel, kernel2, kernel_height, kernel_width, kernel_height2, kernel_width2, backgroundColor, iterationCount, flags);
 }
Example #6
0
 public static vImageError ConvolveWithBiasARGBFFFF(ref vImageBuffer src, ref vImageBuffer dest, IntPtr tempBuffer, vImagePixelCount srcOffsetToROI_X, vImagePixelCount srcOffsetToROI_Y,  float *kernel, uint kernel_height, uint kernel_width, float bias,  PixelFFFF backgroundColor, vImageFlags flags)
 {
     return (vImageError) (long) vImageConvolveWithBias_ARGBFFFF (ref src, ref dest, tempBuffer, srcOffsetToROI_X, srcOffsetToROI_Y, kernel, kernel_height, kernel_width, bias, backgroundColor, flags);
 }
Example #7
0
 public static vImageError ConvolveMultiKernelARGBFFFF(ref vImageBuffer src,
     ref vImageBuffer dest,
     IntPtr tempBuffer,
     vImagePixelCount srcOffsetToROI_X,
     vImagePixelCount srcOffsetToROI_Y,
     float [][] kernels,   //must be 4
     uint kernel_height,
     uint kernel_width,
     float [] biases,    // must be 4
     PixelFFFF backgroundColor,
     vImageFlags flags)
 {
     if (kernels == null)
         throw new ArgumentNullException ("kernels");
     if (biases == null)
         throw new ArgumentNullException ("biases");
     if (kernels.Length < 4)
         throw new ArgumentException ("Must contain at least four elements", "kernels");
     if (biases.Length < 4)
         throw new ArgumentException ("Must contain at least four elements", "biases");
     unsafe {
         fixed (float* f1 = kernels [0]) {
             fixed (float* f2 = kernels [1]) {
                 fixed (float* f3 = kernels [2]) {
                     fixed (float* f4 = kernels [3]) {
                         var ptrs = new float* [4];
                         ptrs [0] = f1;
                         ptrs [1] = f2;
                         ptrs [2] = f3;
                         ptrs [3] = f4;
                         return (vImageError) (long) vImageConvolveMultiKernel_ARGBFFFF (ref src, ref dest, tempBuffer, srcOffsetToROI_X, srcOffsetToROI_Y, ptrs, kernel_height, kernel_width, biases, backgroundColor, flags);
                     }
                 }
             }
         }
     }
 }