View Full Version : IC Control in LabView
April 3, 2003, 23:04:01
Has anyone ever used IC Imaging ActiveX in National Instruments LabView? I can't access to image information other than with "GetImageData" property. But conversion from variant type to pixels matrix is extremely slow (about 800 ms for an 800x600 image), and furthermore byte conversion must take place to convert the image into RGB. I'd like to try one of the two other ways: either with the "Picture" property or by means of the DIB handler, but I don't know how to do it. Should I use DirectX ActiveX to get the handler? Or a VB ActiveX picture control?
Any advice would be great.
May 28, 2003, 20:52:47
I tried the EXACT same thing and got the same results. I wonder if you can get directly at the image in memory somehow ,should be faster than the whole Variant - conversion thing.
I tried the 1394 Driver for NI-IMAQ , it works , but has problems with multiple cameras. The FIRE-I API from Unibrain might be another way or the Basler BCAM driver , if you can program C++
June 2, 2003, 10:54:34
It is not the conversion in IC that takes so long. It is LabView. The image data variant is a small data structure containig just a pointer to the image data. Therefore, no image data is copied in IC. The DIB and Picture methods return a copy of the image data. Obviously, these methods take need far more precossor time (but far less than 800 ms!).
If you can program C or C++, all you have to do is to write a C-function, put it in a DLL and call it from VB. The function should get the image data variant and a LabView image as parameters. The function can extract the pointer to the image data and information about the pixel layout from the variant and copy the image data to the LabView image.
The NI support should know a way how to access the image data in a fast way by using the pointer to the image data contained in the variant.
October 1, 2003, 17:48:14
I'll try to work it out that way. However, you say: "The function can extract the pointer to the image data and information about the pixel layout from the variant.." Which is the data structure of that variant? I couldn't find any reference to it in the help files. I think I'll need that to write the C function.
October 2, 2003, 09:23:56
Please refer to the MSDN Library and search in the Index for “VARIANT” you will find a detailed documentation of the structure.
The structure is defined in the header file OAIDL.H, that is automatically included to your C++ projects (Microsoft).
December 23, 2003, 11:18:15
I´ve also worked with "GetImageData". The time for "MemorySnapImage" were 500ms and the LabView Converting: "Variant to Data" plus "IMAQ ArraytoImage" were 300 ms.
Why is the time for "MemorySnapImage" so large ?
December 23, 2003, 11:35:41
How did you setup the control ? Did you start the live stream with a call to LiveStart ? If you did not call LiveStart before you call MemorySnapImage, the video stream has to be initialized, which can take a few 100ms.
Powered by vBulletin® Version 4.2.3 Copyright © 2015 vBulletin Solutions, Inc. All rights reserved.