Table of Contents
QccMatrixAddNoiseToRegion - corrupt region of matrix with random
noise
#include "libQccPack.h"
int QccMatrixAddNoiseToRegion(QccMatrix
matrix, int num_rows, int num_cols, int start_row, int start_col, int
region_num_rows, int region_num_cols, double noise_variance);
QccMatrixAddNoiseToRegion() adds uniformly-distributed random noise of
variance noise_variance to a rectangular region in matrix. num_rows and
num_cols give the dimensions of matrix, start_row and start_row give the
coordinates (within matrix) of the upper-left corner of the region to
be corrupted with noise, and region_num_rows and region_num_cols give
the size of the noise-corrupted region. QccMatrixAddNoiseToRegion() will
properly handle cases in which the specified rectangular region extends
beyond the boundaries of matrix.
The random noise added to matrix is uniform,
has zero mean, and has variance noise_variance. The noise is generated
using QccMathRand(3)
.
QccMatrix(3)
, QccMathRand(3)
, QccPack(3)
Copyright (C) 1997-2021 James E. Fowler
Table of Contents