NAME
ave_image_without_invalid - Averages an image
SYNOPSIS
#include "i/i_ave.h"
Example compile flags (system dependent):
-DLINUX_X86_64 -DLINUX_X86_64_OPTERON -DGNU_COMPILER
-I/home/kobus/include
-L/home/kobus/misc/load/linux_x86_64_opteron -L/usr/lib/x86_64-linux-gnu
-lKJB -lfftw3 -lgsl -lgslcblas -ljpeg -lSVM -lstdc++ -lpthread -lSLATEC -lg2c -lacml -lacml_mv -lblas -lg2c -lncursesw
int ave_image_without_invalid
(
KJB_image **out_ipp,
const KJB_image *in_ip,
int row_count,
int col_count,
int min_good_pixels
);
DESCRIPTION
This routine averages each row_count by col_count rectangle of an images,
ignoring the data from invalid pixels, unless all pixels in the block are
invalid, in which case the invalid pixel values are used to compute the
invalid average. The average will also be invalid if less than
min_good_pixels have all valid components. If min_good_pixels is less than
one, one is used. If it is more than row_count*col_count, then
row_count*col_count is used.
Thus, unlike ave_image(), this routine can output a valid pixel provided that
some of the pixels in a block are OK. Also unlike ave_image(), this routine
only uses invalid pixels if all pixels in the block are invalid.
The output is put into the *out_ipp. If *out_ipp is NULL, then it is
created. If it is the wrong size, then it is resized. If it is the right
size, the storage is recycled as is.
RETURNS
NO_ERROR on success and ERROR on failure, with an error message being set.
images, image average, image sampling, image smoothing
DISCLAIMER
This software is not adequatedly tested. It is recomended that
results are checked independantly where appropriate.
AUTHOR
Kobus Barnard
DOCUMENTER
Kobus Barnard
SEE ALSO
set_image_average_options
,
ave_image
,
sample_image
,
median_filter_image