Hi there,
i've got the following problem:
I have an 1D-Array with all Pixelvalues for an U8-Greyscale-Image. Now i want to use the imaqArrayToImage-function from the vision-Addon.
Now i want to create the 2D-Array at run time. I use the following Code:
data = (unsigned char**) malloc (sizeof(unsigned char*)*nboflines);
for (i=0; i<(nboflines) ;i++)
{
data[i] = (unsigned char *) malloc (sizeof(unsigned char)*nboftabs_line);
}
Then i sort all the values from the 1D-Array to the 2D-Array. When i now use the imaqArrayToImage-function in this way:
maqArrayToImage (picture, data, nboftabs_line, nboflines);
I get the following error: "Array argument too small (xyz Bytes). Argument must contain at least abcdef Bytes (abdcf elements)"
When i take a look at the created 2D-Array. I'll see that all the values was read right, but the size isn't right. I'll become an Array with more lines than i need....
Please help..
mfg
Dodo
"For every complex and difficult problem there's a simple, straightforward solution that's absolutely wrong. " - www.uni-soest.de