User Documentation
Centre for Vision, Speech & Signal Processing
DEVELOP IN NAMESPACE AMMA TREE ROOT AMMA SEARCH AMMA HOME
 

  PUBLIC
IntDensity2dC::IntDensity2dC(void)
IntDensity2dC::IntDensity2dC(const ByteImageC &)
IntDensity2dC::IntDensity2dC(const IntDensity2dC &)
IntDensity2dC::operator=(const IntDensity2dC &)
IntDensity2dC::operator=(const ByteImageC &)
IntDensity2dC::Build(const ByteImageC &)
IntDensity2dC::Sum(ImageRectangleC) const
IntDensity2dC::Density(ImageRectangleC) const
IntDensity2dC::GetRandomRect(ImageRectangleC,IntT) const
IntDensity2dC::GetRandomPix(ImageRectangleC) const
IntDensity2dC
 
Density image.
 
include "amma/IDens2d.hh"
User Level:Default
Library:Density
Example:exImgSeq.cc
Section:Image.Image Processing.Operators
In Scope:std

Comments:
This structure allows the sum of the values in any rectangle to found with very little computation. The major cost is setting up the structure which involves suming every value in the input image.

Derived Classes: Variables:
Methods:
IntDensity2dC()
Construct an empty map.

IntDensity2dC(const ByteImageC & Img)
Construct from a byte image.

IntDensity2dC(const IntDensity2dC & Img)
Copy constructor.

const IntDensity2dC & operator=(const IntDensity2dC & oth)
Assignment.

const IntDensity2dC & operator=(const ByteImageC & Img)
Assign to a byte image.

void Build(const ByteImageC & Img)
Build a new map from Image ByteImageC,

IntT Sum(ImageRectangleC Rect) const
Get sum of pixel in Rect. Rect is clipped to lie within Map.

RealT Density(ImageRectangleC Rect) const
Get the density of points within the rectangle. Any part of the rectangle outside the image is considered to contain nothing.

ImageRectangleC GetRandomRect(ImageRectangleC Rect,IntT MinArea = 12) const
Pick a Rectangle inside 'Rect' with a probality propoportional the magnatude the sum of the pixels in that area. This is for making a more efficent 'GetRandomPix' when dealing with binary images. When the area drops below MinArea it is more efficent to scan the image an pick from the pixels found. NB. - The returned rectangle isn't random in posision !! - The returned rectangle may not be entirly inside the map if the original rectangle wasn't.

PixelC GetRandomPix(ImageRectangleC Rect) const
Pick a pixel inside 'Rect' with a probality propoportional the magnatude of the pixel.


Programmer:Charles Galambos, Documentation by CxxDoc: Tue Mar 20 10:48:08 2001