08-29-2005 03:30 AM
Hi all,
I am using IMAQ for 1394 cameras API v2.0.1 with VC++ .net 2003 to develop a real time image acquisition application with an IIDC firewire camera. I can not find in the included reference help file a function to get raw data from an internal buffer in .net languages. It only exists for labwindows/cvi...
How cat I get raw data from .net languages? The documentation unfortunately is very poor, and the commands set for .net enviroment is not clear...
Thank you in advance.
08-30-2005 02:20 PM
Hello,
Accessing the internal buffers of your camera in .NET is possible, but it is not officially supported by NI. To do this, you would need to make use of the C functions installed with the NI IMAQ for IEEE 1394 drivers. This would involve building your own wrappers to make use of the existing C API functions.
The only supported method of using the 1394 drivers in .NET is through the use of the library functions that were installed with the driver.
Regards,
Scott R.
Applications Engineer
National Instruments
09-07-2005 04:10 AM
Dear Mr. Scott,
Thank you for your reply. Are there any plans for a better .net support of this driver in the future?
best regards,
Spiros.
09-08-2005 07:29 AM
09-09-2005 07:32 AM
Dear Mr Scott,
thank you for your information. I have two questions about C API :
a) when i use the imaq1394GetImageData() function to get raw image data, the function exits with error code : -1074364378 (IMG1394_ERR_BAD_POINTER). I don't get this error with imaq1394GetBuffer2(). What is this error and why do i get it only with GetImageData?
this is a piece my code:
unsigned char *buf1;
buf1=new unsigned char[2048];
imaq1394GetImageData(...,....,...., (void**)&buf1);
delete [] buf1;
I tried the above also with malloc with the same results..
b) I use the IMG1394_ONOVERWRITE_FAIL parameter in GetBuffer2 in order to get an error on every buffer overwrite (according to manual). Is it an error that I get on the return value of GetBuffer2? And what is the error code that I expect? I use this command in high load conditions with only 2 buffers defined in imaq1394ConfigureAcquisition, but I don't get any error from GetBuffer2.. Is this normal?
This is my syntax for GetBuffer2: imaq1394GetBuffer2(sid, IMG_LASTBUFFER, &bufn, IMG1394_ONOVERWRITE_FAIL, (void**)&data1)
Thank you and best regards.
Spiros.