|
-
May 17th, 2012, 03:47 PM
#8
Re: Quick Array Copy
UInt16 is used since I know it works in the Bitmapsource derived object for display within an image control (WPF). The very prototype code is as follows. This is very rough just wanted to get something that would convert the data from one source array to the destination. The 90+ seconds is in debug mode.
int i = 0;
int ImageSize= CameraXSize * CameraYSize;
while (i < ImageSize)
{
iXPosition = 0;
//Go across row doing copy/conversion
while (iXPosition < CameraXSize)
{
img2Array[i] = (UInt16)(imgArray[iYPosition, iXPosition]);//Note: x and y position appear reversed for preloaded array from driver
i++;
iXPosition++;
}
//Increment row
iYPosition++;
}
Thanks!!!
Alan
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|