Documentation Portal      

What are you looking for?

Using Flexible Masks

Functional Guide | Reference

Computing Pixels Average

Functional Guide | Reference: PixelAverage

/////////////////////////////////////////////////////////
// This code snippet shows how to compute statistics //
// inside a region defined by a flexible mask. //
/////////////////////////////////////////////////////////
// Images constructor
EImageBW8 srcImage;
EImageBW8 mask;
// ...
// Compute the average value of the source image pixels
// corresponding to the mask do-care areas only
float average;
EasyImage::PixelAverage(&srcImage, &mask, average);
'/////////////////////////////////////////////////////////
'// This code snippet shows how to compute statistics //
'// inside a region defined by a flexible mask. //
'/////////////////////////////////////////////////////////
' EasyImage context constructor
Dim EasyImage As New EasyImage
' Images constructor
Dim srcImage As New EImageBW8
Dim mask As New EImageBW8
' ...
' Compute the average value of the source image pixels
' corresponding to the mask do-care areas only
Dim average As Single
EasyImage.PixelAverageMaskedBW8 srcImage, mask, average
/////////////////////////////////////////////////////////
// This code snippet shows how to compute statistics //
// inside a region defined by a flexible mask. //
/////////////////////////////////////////////////////////
// Images constructor
EImageBW8 srcImage= new EImageBW8();
EImageBW8 mask= new EImageBW8();
// ...
// Compute the average value of the source image pixels
// corresponding to the mask do-care areas only
float average;
EasyImage.PixelAverage(srcImage, mask, out average);

See also in the Reference

EasyImage Class

PixelAverage

Which API shall we display?

© 2019 EURESYS s.a.  -  About Documentation  -  Open Source Licenses  -  Open eVision 2.10.0.1121