class function CartesianMomentsGS(image: IPixelEnumerator; p: Byte; q: Byte; basis: MomentBasis): TFloatMatrix;
=res; end;
Calcaulates geometric (statistical) moments of the given image. p,q - maximum order class function CartesianMomentsBW(image: IImageAdapter; p, q: Byte): TFloatMatrix;
class function AreaMoments.CartesianMomentsBW(image: IImageAdapter; p, q: Byte): TFloatMatrix; var x, y, pp, qq, h, w: integer; res: TFloatMatrix; begin w := image.GetSize.Width; h := image.GetSize.Height; SetLength(res, p + 1, q + 1); for x := 1 to w - 1 do for y := 1 to h - 1 do begin if (image.GetPixel(y, x) <> image.BACKCOLOR) then for pp := 0 to p do for qq := 0 to q do res[pp, qq] := res[pp, qq] + CommonTypes.Math.IntPower(x, pp) * CommonTypes.Math.IntPower(y, qq); end;