matrix_to_max_contrast_8bit_bw_image - Convert matrix to an image, linearly scaling image from black to white
Example compile flags (system dependent):
-DLINUX_X86_64 -DLINUX_X86_64_OPTERON -DGNU_COMPILER
-lKJB -lfftw3 -lgsl -lgslcblas -ljpeg -lSVM -lstdc++ -lpthread -lSLATEC -lg2c -lacml -lacml_mv -lblas -lg2c -lncursesw
const Matrix *mp,
This routine accepts a matrix and turns it into a grayscale image, with
the lowest-value matrix entry generating a pixel with R=G=B=0, and the
highest-value matrix entry generating a pixel with R=G=B=255, scaling all
other values linearly within that range. This assumes the matrix is not
If the input matrix is a constant, the output image will have constant
value R=G=B=128, since that seems reasonable (albeit hacky).
I think this also might occur if the input contains NaN -- not sure.
NO_ERROR on success, and ERROR on failure, with an appropriate error
message being set.
This software is not adequatedly tested. It is recomended that
results are checked independantly where appropriate.