GetStatisticsInfo example for C++ Builder
void __fastcall TForm1::Button1Click(TObject *Sender)
{
L_DOUBLE dStdDev;
L_DOUBLE dMean;
L_INT nMedian;
L_INT nMax;
L_INT nMin;
L_UINT uPixelCnt;
L_UINT uTotalPixelCnt;
L_DOUBLE dPercent;
/* Load a bitmap at 24 bits per pixel */
LEADImage1->Load("image1.cmp", 0, 1, 1 );
/*Get statistical image information */
L_INT nRet= LEADImage1->GetStatisticsInfo( CHANNEL_MASTER, 0, 255, dStdDev, dMean, nMedian, nMax, nMin, uPixelCnt, uTotalPixelCnt, dPercent);
if(nRet == SUCCESS)
{
ShowMessage ( "Standard deviation value = " + FloatToStr(dStdDev) + "\n" + "Mean value = " + FloatToStr(dMean)+ "\n" + "Median value = " + IntToStr(nMedian)+ "\n" + "Maximum value = " + IntToStr(nMax)+ "\n" + "Minimum value = " + IntToStr(nMin)+ "\n" + "Pixel number value = " + IntToStr(uPixelCnt)+ "\n" + "Whole image Pixel number value = " + IntToStr(uTotalPixelCnt) + "\n" + "Percent value = " + FloatToStr(dPercent) + "\n" );
}
}