| Bsoft 1.9 Bernard's software package

- Main Page
- Namespaces
- Classes
- Files

- File List
- File Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Functions | Variables
img_norm.cpp File Reference

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

`#include "rwimg.h"`
`#include "img_background.h"`
`#include "img_extract.h"`
`#include "img_rescale.h"`
`#include "img_histogram.h"`
`#include "utilities.h"`

Go to the source code of this file.

## Functions
int | img_mass_normalize_subimage (Bimage *p, int imgnum, float avg, float std, int norm_type, int bins)
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...

## Variables
int | verbose

## Detailed Description

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

Author
  Bernard Heymann

Date
  Created: 20030411
  Modified: 20131122

Definition in file img_norm.cpp.

## 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

  *p | image (not altered).
  avg | desired average.
  std | desired standard deviation (if 0, use defaults).
  norm_type | type 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.

int img_mass_normalize_subimage | ( | Bimage * | p,
|  | int | imgnum,
|  | float | avg,
|  | float | std,
|  | int | norm_type,
|  | int | bins
| ) |  |

Definition at line 104 of file img_norm.cpp.

## Variable Documentation

int verbose