ImageEn, unit ievision

TIEVisionImage.avg

TIEVisionImage.avg


Declaration

function avg(mask: TIEVisionImage): TIEVisionScalar; overload; safecall;
function avg(): TIEVisionScalar; overload; safecall;


Description

Calculate the average (mean) of image pixels.

Parameter Description
mask Operation mask (processes only pixels with mask > 0)


Example

mean := ImageEnView1.IEBitmap.GetIEVisionImage().avg();
lblMean.Caption := Format( 'Mean: %d,%d,%d,%d', [ Round(mean.val[0]), Round(mean.val[1]), Round(mean.val[2]), Round(mean.val[3]) ]);