next up previous contents
Next: Function normalize_picture() Up: GRASP Routines: Time-Frequency Methods Previous: Function compute_scalefactor()   Contents

Function rescale()

void rescale(float **pic, int pdim, float rescale)

This function is used to rescale and threshold TF maps so that the pixel values lie between zero and unity. The routine simply divides each pixel by the argument rescale and sets any value greater than unity to unity. Since the TF maps contain noise, it is possible for the pixels to attain values which are much higher than the average. To avoid losing information the argument rescale should be obtained by averaging the maximum pixel value in a large number of maps. The routine compute_scalefactor() can be used for this purpose. The arguments are:

float **pic: Input/Output. The pointer to the TF map.
int pdim: Input. The size of the TF map.
float rescale: Input. The factor by which to divide each pixel of the TF map.

Author: R. Balasubramanian,

Bruce Allen 2000-11-19