Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Get raw data in VC++ .net 2003

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.

 

0 Kudos
Message 1 of 5
(3,720 Views)

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

Scott Romine
Course Development Engineer
National Instruments
0 Kudos
Message 2 of 5
(3,690 Views)

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.

 

0 Kudos
Message 3 of 5
(3,678 Views)
Spiros,
 
We are aware of the desire of a number of customers for native .NET support for IMAQ and IMAQ for IEEE 1394.  While development on these drivers is ongoing, there are no concrete plans for the future implementation of that functionality.
 
Regards,
Scott R.
Applications Engineer
National Instruments
Scott Romine
Course Development Engineer
National Instruments
0 Kudos
Message 4 of 5
(3,668 Views)

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.

0 Kudos
Message 5 of 5
(3,660 Views)