protected IntegralImage2(int width, int height, bool computeTilted)
{
this.width = width;
this.height = height;
this.nWidth = width + 1;
this.nHeight = height + 1;
this.tWidth = width + 2;
this.tHeight = height + 2;
this.nSumImage = new long[nHeight, nWidth];
this.nSumHandle = GCHandle.Alloc(nSumImage, GCHandleType.Pinned);
this.nSum = (long*)nSumHandle.AddrOfPinnedObject().ToPointer();
this.sSumImage = new long[nHeight, nWidth];
this.sSumHandle = GCHandle.Alloc(sSumImage, GCHandleType.Pinned);
this.sSum = (long*)sSumHandle.AddrOfPinnedObject().ToPointer();
if (computeTilted)
{
this.tSumImage = new long[tHeight, tWidth];
this.tSumHandle = GCHandle.Alloc(tSumImage, GCHandleType.Pinned);
this.tSum = (long*)tSumHandle.AddrOfPinnedObject().ToPointer();
}
}