make_int_matrix_image - Makes an image from an integer matrix.
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 Int_matrix *mp,
This routine makes an image from an integer matrix, mostly for
debuging/visualization purposes. The image created has blocks for each
element of the matrix. There are two different kinds of encodings: color and
black and white. To specify which are wanted, there are two corresponding
width arguments, color_width and bw_width. If either is zero or less, than
the corresponding encoding is ignored. However, at least one has to be
positive. The width of the blocks corresponding to an element in the integer
array is the maximum of the two widths.
If both widths are none zero, the smaller of the two widths becoms a block
inside the larger. It does not make sense to have the sizes the same (the
black and white encoding overwrites the color one). Further, if both widths
are non zero, it is recomended that they are
both odd or even.
The color encoding is adjusted so that their is at least on color with one of
R,G,B at roughly 255.
The black and white encoding is the value scaled by bw_brightness_factor. If
bw_brightness_factor is 1 or less, then 1 is used.
A typical use of this is to have a small black and white square whose RGB
value can be used to look up the value in the array inside a larger color
squares which are coded to easily visualize where values are different.
This software is not adequatedly tested. It is recomended that
results are checked independantly where appropriate.