ImgHistoCreate

Top  Previous  Next

Prototype

 

intHistoHandle:=ImgHistoCreate(intImageHandle)

 

Description

 

Create an histogram of gray levels value counting image pixels.

 

Parameters

 

intImageHandle: integer value corresponding to the image handle.

 

Returned value

 

Integer value representing the histogram handle to be used with ImgHistoValue an ImgHistoDelete.

 

Notes

 

This fuction can work only in grayscale images.

 

Example

 

// Show the number of pixels for each gray level

HistoHandle:=ImgHistoCreate(_CurrentImage);

 

for Level:=0 to 255 do

begin

 PixelCount:=ImgHistoValue(HistoHandle,Level);

 ApplicationLog('The graylevel ' + IntToStr(Level) + ' counts '+ IntToStr(PixelCount)+ ' pixels.');

end;

 

ImgHistoDelete(HistoHandle);