Bsoft  1.9
Bernard's software package
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
img_norm.h File Reference

Function to normalize a set of images based on their histograms. More...

#include "rwimg.h"

Go to the source code of this file.

Functions

int img_mass_normalize (Bimage *p, float avg, float std, int norm_type)
 Normalizes a set of images to a desired average and standard deviation. More...
 

Detailed Description

Function to normalize a set of images based on their histograms.

Author
Bernard Heymann
Date
Created: 20030411 Modified: 20040408

Definition in file img_norm.h.

Function Documentation

int img_mass_normalize ( Bimage *  p,
float  avg,
float  std,
int  norm_type 
)

Normalizes a set of images to a desired average and standard deviation.

Parameters
*pimage (not altered).
avgdesired average.
stddesired standard deviation (if 0, use defaults).
norm_typetype of determining the effective average and standard deviation: 0=simple, 1=Gaussian, 2=Poisson.
Returns
int 0.
The effective average and standard deviation for each image is obtained
in one of three ways:
    0.      The simple avergae and standard devaition for the image.
    1.      Gaussian fit of the histogram.
    2.      Poisson fit of the histogram.
A histogram of an image is calculated with a given number of bins.
The histogram is fit to a Gaussian or Poisson function with exclusion of a
small number of bins in the histogram (defined as outliers).
The effective average and standard deviation are used to 
rescale the data for each image.

Definition at line 42 of file img_norm.cpp.