make_int_matrix_image - Makes an image from an integer matrix.


#include "i/i_int_matrix.h"

Example compile flags (system dependent):
   -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 make_int_matrix_image
	KJB_image **ipp,
	const Int_matrix *mp,
	int color_width,
	int bw_width,
	int bw_brightness_factor


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.


Kobus Barnard


Kobus Barnard