JWS C Library
C language utility library
|
Definitions for matrix convolution operations and filters. More...
#include <jwsc/config.h>
#include <stdlib.h>
#include <inttypes.h>
#include <math.h>
#include <assert.h>
#include "jwsc/base/error.h"
#include "jwsc/matrix/matrix.h"
#include "jwsc/matrix/matrix_math.h"
#include "jwsc/matrix/matrix_fft.h"
#include "jwsc/matrix/matrix_conv.h"
Go to the source code of this file.
Defines | |
#define | PI 3.14159265358979323846 |
Estimate of pi. | |
Functions | |
convolve_matrix | |
Convolves a matrix with a filter. | |
Error * | convolve_matrix_f (Matrix_f **m_out, const Matrix_f *m_in, const Matrix_f *h) |
Convolves a single precision matrix with a filter. | |
Error * | convolve_matrix_d (Matrix_d **m_out, const Matrix_d *m_in, const Matrix_d *h) |
Convolves a double precision matrix with a filter. |
Definitions for matrix convolution operations and filters.
Definition in file matrix_conv.c.
#define PI 3.14159265358979323846 |
Estimate of pi.
Definition at line 61 of file matrix_conv.c.
Convolves a single precision matrix with a filter.
Uses reflection to handle boundary cases. The convolution filter must be no larger than the size of m_in.
If the dimension(s) of h are even, the center of the filter is the in upper-left of the central quadrant/pair. For example,
1 0 0 0
Does not use FFT.
m_out | Result parameter. If *m_out is NULL, a matrix is allocated; otherwise its space is re-used. |
m_in | Matrix to convolve. |
h | Filter to use in convolution. |
Definition at line 98 of file matrix_conv.c.
Convolves a double precision matrix with a filter.
Uses reflection to handle boundary cases. The convolution filter must be no larger than the size of m_in.
If the dimension(s) of h are even, the center of the filter is the in upper-left of the central quadrant/pair. For example,
1 0 0 0
Does not use FFT.
m_out | Result parameter. If *m_out is NULL, a matrix is allocated; otherwise its space is re-used. |
m_in | Matrix to convolve. |
h | Filter to use in convolution. |
Definition at line 213 of file matrix_conv.c.