NAME
fix_sharpen_map - Adjusts sharpening map so that is is more diagonal
SYNOPSIS
#include "c2/c2_sharp.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 fix_sharpen_map
(
Matrix **new_post_map_mpp,
const Matrix *post_map_mp
);
DESCRIPTION
The routine adjusts a sharpening map so that it is more diagonal. Since a
sharpening transform is normally from an eigen-value decomposition, the
columns may be swapped and multiplied by any scalar. However, since the
columns are already normalized we only reverse the sign of chosen columns.
The basic idea is to put the element with largest absolute value on the
diagonal, and switch the sine of the column to make that element positive.
The same is then done with the remaining two columns, but now one of the rows
(the one used by the first step) cannot be used.
RETURNS
NO_ERRO on success, and ERROR on failure, with an error message being
set.
DISCLAIMER
This software is not adequatedly tested. It is recomended that
results are checked independantly where appropriate.
AUTHOR
Kobus Barnard
DOCUMENTER
Kobus Barnard