Thanks, I have found the crashing problem, it is becaues the correction data are somehow mismatching. some I make the correction data of size 0 array and the program doesn't crash any more.(it is ok to acquire image without correction)
Now the thing is the pProcessData, I have a demo C program provided by the company(the attached file, also include a libaray file which you need if you try to run the demo and a header file and my vi). The one named " pAcqBuffer" is equal to my "pProcessData". The thing to note is that:
1. this is how they call DefinedescBuffer:
pAcqBuffer = malloc(dwFrames*dwRows*dwColumns*sizeof(short));
if (!pAcqBuffer)
{
//error handling
goto Exit;
}
//route acquisition buffer to HSL
if ((nRet=Acquisition_DefineDestBuffers(hAcqDesc, pAcqBuffer, dwFrames, dwRows, dwColumns))!=HIS_ALL_OK)
and this is how they require image:
if ((nRet=Acquisition_Acquire_Image(hAcqDesc, dwFrames, 0,
HIS_SEQ_ONE_BUFFER, NULL, NULL, NULL))!=HIS_ALL_OK)
HIS_SEQ_ONE_BUFFER is just an int number(valued 1, in this case)
so Acquire_Image doesn't take the buffer as a parameter directly; however I when try to acquire image without defining buffer, the program crashes.
However, the image must be acquired because they have a printf statement:
sprintf(strBuffer, "acq buffer frame: %d, dest frame %d, row: %d, col: %d, value: %d\n",
dwActFrame, dwSecFrame,
dwRow, dwCol, pAcqBuffer[dwColumns*dwRow+dwCol]);
so, they print pAcqBuffer and get a value...
Guess my question is how would I aquire the image in labview. my vi runs but I can't get the image.
Can a computer learn how to program?