Function

vDSP_imgfir(_:_:_:_:_:_:_:)

Filters a single-precision image by performing a 2D convolution with an arbitrarily sized kernel.

Declaration

func vDSP_imgfir(_ __A: UnsafePointer<Float>, _ __NR: vDSP_Length, _ __NC: vDSP_Length, _ __F: UnsafePointer<Float>, _ __C: UnsafeMutablePointer<Float>, _ __P: vDSP_Length, _ __Q: vDSP_Length)

Parameters

__A

Single-precision real input matrix.

__NR

Number of rows in A.

__NC

Number of columns in A.

__F

Single-precision real matrix containing the filter.

__C

Single-precision real output matrix.

__P

Number of rows in B; the value of P must be odd.

__Q

Number of columns in B; the value of Q must be odd.

Discussion

This function performs a two-dimensional convolution on the signal A using the kernel B, leaving results in C. The function pads the perimeter of the output image with a border of (P-1)/2 rows of zeros on the top and bottom and (Q-1)/2 columns of zeros on the left and right:

mathematical formula

See Also

Arbitrary-Size Kernel