JWS C Library
C language utility library
|
Definitions for matrix 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/prob/pdf.h"
#include "jwsc/matrix/matrix.h"
#include "jwsc/matrix/matrix_math.h"
#include "jwsc/filter/2d.h"
Go to the source code of this file.
Defines | |
#define | PI 3.14159265358979323846 |
Estimate of pi. | |
Functions | |
create_sobel_x_filter | |
Creates a Sobel operator for the x direction. | |
void | create_sobel_x_filter_f (Matrix_f **sobel_out) |
Creates a single precision Sobel operator for the x direction. | |
void | create_sobel_x_filter_d (Matrix_d **sobel_out) |
Creates a double precision Sobel operator for the x direction. | |
create_sobel_y_filter | |
Creates a Sobel operator for the y direction. | |
void | create_sobel_y_filter_f (Matrix_f **sobel_out) |
Creates a single precision Sobel operator for the y direction. | |
void | create_sobel_y_filter_d (Matrix_d **sobel_out) |
Creates a double precision Sobel operator for the y direction. | |
create_LoG_filter | |
Creates a Laplacian of Gaussian filter. | |
Error * | create_LoG_filter_f (Matrix_f **LoG_out, float sigma) |
Creates a single precision Laplacian of Gaussian filter. | |
create_auto_2d_gaussian_filter | |
Creates a 2D Gaussian filter automatically sized to sqrt(2)*6*sigma. | |
Error * | create_auto_2d_gaussian_filter_f (Matrix_f **h_out, float row_sigma, float col_sigma) |
Creates a single precision 2D Gaussian filter automatically sized. | |
Error * | create_auto_2d_gaussian_filter_d (Matrix_d **h_out, double row_sigma, double col_sigma) |
Creates a double precision 2D Gaussian filter automatically sized. | |
create_2d_gaussian_filter | |
Creates a 2D Gaussian filter. | |
Error * | create_2d_gaussian_filter_f (Matrix_f **h_out, float row_sigma, float col_sigma, uint32_t num_rows, uint32_t num_cols) |
Creates a single precision 2D Gaussian filter. | |
Error * | create_2d_gaussian_filter_d (Matrix_d **h_out, double row_sigma, double col_sigma, uint32_t num_rows, uint32_t num_cols) |
Creates a double precision 2D Gaussian filter. | |
create_auto_2d_gaussian_dx_filter | |
Creates a 2D Gaussian filter with a partial derivative along columns automatically sized to sqrt(2)*6*sigma. | |
Error * | create_auto_2d_gaussian_dx_filter_f (Matrix_f **h_out, float row_sigma, float col_sigma) |
Creates a single precision 2D Gaussian filter with a partial derivative in the x-direction (column) automatically sized. | |
Error * | create_auto_2d_gaussian_dx_filter_d (Matrix_d **h_out, double row_sigma, double col_sigma) |
Creates a double precision 2D Gaussian filter with a partial derivative in the x-direction (column) automatically sized. | |
create_2d_gaussian_dx_filter | |
Creates a 2D Gaussian filter with a partial derivative along columns. | |
Error * | create_2d_gaussian_dx_filter_f (Matrix_f **h_out, float row_sigma, float col_sigma, uint32_t num_rows, uint32_t num_cols) |
Creates a single precision 2D Gaussian filter with a partial derivative in the x-direction (column). | |
Error * | create_2d_gaussian_dx_filter_d (Matrix_d **h_out, double row_sigma, double col_sigma, uint32_t num_rows, uint32_t num_cols) |
Creates a double precision 2D Gaussian filter with a partial derivative in the x-direction (column). | |
create_auto_2d_gaussian_dy_filter | |
Creates a 2D Gaussian filter with a partial derivative along rows automatically sized to sqrt(2)*6*sigma. | |
Error * | create_auto_2d_gaussian_dy_filter_f (Matrix_f **h_out, float row_sigma, float col_sigma) |
Creates a single precision 2D Gaussian filter with a partial derivative in the y-direction (row) automatically sized. | |
Error * | create_auto_2d_gaussian_dy_filter_d (Matrix_d **h_out, double row_sigma, double col_sigma) |
Creates a double precision 2D Gaussian filter with a partial derivative in the y-direction (row) automatically sized. | |
create_2d_gaussian_dy_filter | |
Creates a 2D Gaussian filter with a partial derivative along rows. | |
Error * | create_2d_gaussian_dy_filter_f (Matrix_f **h_out, float row_sigma, float col_sigma, uint32_t num_rows, uint32_t num_cols) |
Creates a single precision 2D Gaussian filter with a partial derivative in the y direction (row). | |
Error * | create_2d_gaussian_dy_filter_d (Matrix_d **h_out, double row_sigma, double col_sigma, uint32_t num_rows, uint32_t num_cols) |
Creates a double precision 2D Gaussian filter with a partial derivative in the y direction (row). |
void create_sobel_x_filter_f | ( | Matrix_f ** | sobel_out | ) |
void create_sobel_x_filter_d | ( | Matrix_d ** | sobel_out | ) |
void create_sobel_y_filter_f | ( | Matrix_f ** | sobel_out | ) |
void create_sobel_y_filter_d | ( | Matrix_d ** | sobel_out | ) |
Creates a single precision Laplacian of Gaussian filter.
LoG_out | Result parameter. If *LoG_out is NULL, a matrix is allocated; otherwise its space is re-used. |
sigma | Sigma to the Laplacian. |
Creates a single precision 2D Gaussian filter automatically sized.
h_out | Result parameter. If *h_out is NULL, a matrix is allocated; otherwise its space is re-used. |
row_sigma | Sigma to the Gaussian along rows. |
col_sigma | Sigma to the Gaussian along columns. |
Creates a double precision 2D Gaussian filter automatically sized.
h_out | Result parameter. If *h_out is NULL, a matrix is allocated; otherwise its space is re-used. |
row_sigma | Sigma to the Gaussian along rows. |
col_sigma | Sigma to the Gaussian along columns. |
Error* create_2d_gaussian_filter_f | ( | Matrix_f ** | h_out, |
float | row_sigma, | ||
float | col_sigma, | ||
uint32_t | num_rows, | ||
uint32_t | num_cols | ||
) |
Creates a single precision 2D Gaussian filter.
h_out | Result parameter. If *h_out is NULL, a matrix is allocated; otherwise its space is re-used. |
row_sigma | Sigma to the Gaussian along rows. |
col_sigma | Sigma to the Gaussian along columns. |
num_rows | Number of rows. |
num_cols | Number of columns. |
Error* create_2d_gaussian_filter_d | ( | Matrix_d ** | h_out, |
double | row_sigma, | ||
double | col_sigma, | ||
uint32_t | num_rows, | ||
uint32_t | num_cols | ||
) |
Creates a double precision 2D Gaussian filter.
h_out | Result parameter. If *h_out is NULL, a matrix is allocated; otherwise its space is re-used. |
row_sigma | Sigma to the Gaussian along rows. |
col_sigma | Sigma to the Gaussian along columns. |
num_rows | Number of rows. |
num_cols | Number of columns. |
Creates a single precision 2D Gaussian filter with a partial derivative in the x-direction (column) automatically sized.
The x direction is across matrix columns.
h_out | Result parameter. If *h_out is NULL, a matrix is allocated; otherwise its space is re-used. |
row_sigma | Sigma to the Gaussian along rows. |
col_sigma | Sigma to the Gaussian along columns. |
Error* create_auto_2d_gaussian_dx_filter_d | ( | Matrix_d ** | h_out, |
double | row_sigma, | ||
double | col_sigma | ||
) |
Creates a double precision 2D Gaussian filter with a partial derivative in the x-direction (column) automatically sized.
The x direction is across matrix columns.
h_out | Result parameter. If *h_out is NULL, a matrix is allocated; otherwise its space is re-used. |
row_sigma | Sigma to the Gaussian along rows. |
col_sigma | Sigma to the Gaussian along columns. |
Error* create_2d_gaussian_dx_filter_f | ( | Matrix_f ** | h_out, |
float | row_sigma, | ||
float | col_sigma, | ||
uint32_t | num_rows, | ||
uint32_t | num_cols | ||
) |
Creates a single precision 2D Gaussian filter with a partial derivative in the x-direction (column).
The x direction is across matrix columns.
h_out | Result parameter. If *h_out is NULL, a matrix is allocated; otherwise its space is re-used. |
row_sigma | Sigma to the Gaussian along rows. |
col_sigma | Sigma to the Gaussian along columns. |
num_rows | Number of rows. |
num_cols | Number of columns. |
Error* create_2d_gaussian_dx_filter_d | ( | Matrix_d ** | h_out, |
double | row_sigma, | ||
double | col_sigma, | ||
uint32_t | num_rows, | ||
uint32_t | num_cols | ||
) |
Creates a double precision 2D Gaussian filter with a partial derivative in the x-direction (column).
The x direction is across matrix columns.
h_out | Result parameter. If *h_out is NULL, a matrix is allocated; otherwise its space is re-used. |
row_sigma | Sigma to the Gaussian along rows. |
col_sigma | Sigma to the Gaussian along columns. |
num_rows | Number of rows. |
num_cols | Number of columns. |
Creates a single precision 2D Gaussian filter with a partial derivative in the y-direction (row) automatically sized.
The y direction is across matrix rows.
h_out | Result parameter. If *h_out is NULL, a matrix is allocated; otherwise its space is re-used. |
row_sigma | Sigma to the Gaussian along rows. |
col_sigma | Sigma to the Gaussian along columns. |
Error* create_auto_2d_gaussian_dy_filter_d | ( | Matrix_d ** | h_out, |
double | row_sigma, | ||
double | col_sigma | ||
) |
Creates a double precision 2D Gaussian filter with a partial derivative in the y-direction (row) automatically sized.
The y direction is across matrix rows.
h_out | Result parameter. If *h_out is NULL, a matrix is allocated; otherwise its space is re-used. |
row_sigma | Sigma to the Gaussian along rows. |
col_sigma | Sigma to the Gaussian along columns. |
Error* create_2d_gaussian_dy_filter_f | ( | Matrix_f ** | h_out, |
float | row_sigma, | ||
float | col_sigma, | ||
uint32_t | num_rows, | ||
uint32_t | num_cols | ||
) |
Creates a single precision 2D Gaussian filter with a partial derivative in the y direction (row).
The y direction is across matrix rows.
h_out | Result parameter. If *h_out is NULL, a matrix is allocated; otherwise its space is re-used. |
row_sigma | Sigma to the Gaussian along rows. |
col_sigma | Sigma to the Gaussian along columns. |
num_rows | Number of rows. |
num_cols | Number of columns. |
Error* create_2d_gaussian_dy_filter_d | ( | Matrix_d ** | h_out, |
double | row_sigma, | ||
double | col_sigma, | ||
uint32_t | num_rows, | ||
uint32_t | num_cols | ||
) |
Creates a double precision 2D Gaussian filter with a partial derivative in the y direction (row).
The y direction is across matrix rows.
h_out | Result parameter. If *h_out is NULL, a matrix is allocated; otherwise its space is re-used. |
row_sigma | Sigma to the Gaussian along rows. |
col_sigma | Sigma to the Gaussian along columns. |
num_rows | Number of rows. |
num_cols | Number of columns. |