The following routines can be used for the removal of various forms of noise and unwanted data variation from images.
Imrect *im_bthresh(double k,Imrect *im)Returns an image which is a binary thresholded version of the input image around the value defined by .
Imrect *im_thresh(double k,Imrect *im)Returns an image which has been thresholded to set all pixel values below to zero. This is useful, for example, in the elimination of unwanted terms in the 2D Fourier domain of an image.
Imrect *im_corrupt(Imrect * im, int dx, int dy, double a, double b)Generate an image by adding uniform random noise (generated by imf_unif_noise(im->width, im->height, dx, dy, a, b)) to the input image. Useful in the generation of simulated test data for the evaluation of algorithm stability.
Imrect *im_rank(Imrect *im, int range, double noise)Returns an image with each pixel (of measurement accuracy ) given by the rank of its value in the surrounding x patch. Useful for enhancing the spatial information content of an image before the process of cross correlation or template matching.
Imrect *im_median(Imrect *im)Returns a median filtered (discontinuity preserving) version of the input image (each pixel replaced by the median value of the 3x3 neighbourhood). Useful for the removal of sensor or aliasing derived pixel dropout. This technique should only be used when there is no alternative, generally it is better to eliminate the problem at source).
Imrect *im_tsmooth(Imrect * im1)Returns an image which has been smoothed by averaging in a direction tangential to the image gradient at each point (discontinuity preserving).