ComputeHistogram

#include "BIFILTER.H"

 

HANDLE CALLBACK ComputeHistogram( HANDLE   hDib,
int               nMode,
HANDLE   hHistogram,
LPPOINT   lpnLeftTopCorner,
LPINT        lpnErrorFlag)

Description

Compute the histogram on a 256x256 window (further on: AOI, area of interest) of the (8 bits/pixel) input grayscale device independent bitmap due to the special way of computing, it is very fast to actualize the histogram after changing a little bit the position of area of interest (AOI)

nMode set the way of working

     OPEN               Create the histogram.

     COMPUTE     Compute the actual histogram.

     CLOSE            Destroy the histogram

Parameters

HANDLE

hDib

Handle to a device independent bitmap.

int

nMode

Create, destroy or compute histogram.

HANDLE

hHistogram

Handle to a histogram.(256 unsigned byte).

LPPOINT

lpnLeftTopCorner

Coordinates of the left-top corner of 256x256 area of interest.

LPINT

lpnErrorFlag

Pointer to an error code. If IOK there is no error.

Return values

Return a handle to a HISTOGRAM if successful or NULL if fails.

Programming notes

None.

Requirements

Header :     Declared in BIFilter.h; include BIFilter.h.

Library :    Use BIFilter.lib.

DLLs :       BIFilter.dll.

Code example

None at present.