From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

acquire images with labview via firewire and TWAIN

Hi,

I have a camera from optronics. This camera is plugged to my computer via a FireWire IEEE-1394 connection. The company optronics offers a TWAIN driver for this camera: some files like TWAIN.dll and TWAIN_32.dll. I would like to acquire images with labview and communicate with the camera but I have no idea on how I should get started.

The 3 main things I'd like to do are: 1) change the exposure time 2) snap images 3) see the images in labview.

I will really appreciate if someone could give me some ideas to get started...

Michael
Message 1 of 5
(3,803 Views)

Michael,

From a more general standpoint, what you'll need to do is use a Call Library Function Node (located in the All Functions>>Advanced palette) to call the necessary functions out of those DLLs. Before you can do this, you'll need to know some specifics about what functions are available in those DLLs and what parameters/outputs are associated with them. This information is typically available in the product manual or perhaps someone else with experience with your specific device can speak to that. Once you know the functions necessary to execute the desired operations, you simply configure a Call Library Function Node for each of them and place them in your LabVIEW code.

Kind Regards,

E. Sulzer
Applications Engineer
National Instruments
0 Kudos
Message 2 of 5
(3,791 Views)

I have the same problem: I need a Twain driver for LabView. We purchased a Leica firewire camera for a microscope, but the software supplied with the camera is useless. Therefore I want to develop a LabView program, which can do video recording. The camera probably does not work with the IMAQ IEEE 1394 package but it is Twain compatible.

I hope someone can help me

Morten Bo Mikkelsen

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

Hi

There is a company in France that does a twain driver that works with IMAQ.

http://www.alliancevision.com/us/products/software_alv/twain/fr_twain.htm

Hope this helps

David

0 Kudos
Message 4 of 5
(3,694 Views)


@AESulzer wrote:

Michael,

From a more general standpoint, what you'll need to do is use a Call Library Function Node (located in the All Functions>>Advanced palette) to call the necessary functions out of those DLLs. Before you can do this, you'll need to know some specifics about what functions are available in those DLLs and what parameters/outputs are associated with them. This information is typically available in the product manual or perhaps someone else with experience with your specific device can speak to that. Once you know the functions necessary to execute the desired operations, you simply configure a Call Library Function Node for each of them and place them in your LabVIEW code.


Just saw this and want to clarify on this. This is a total no-go! The Twain interface is a very old technology from the days when Windows was a cooperative multitasking environment without real tasks or threads. In order for Twain to allow for some sort of multitasked integration into an application it requires you to integrate the Twain handling into the message loop of your application. As you do not have direct control over the source code LabVIEW is written from, this is a very tedious operation, with Windows message hooks and such, lots and lots of semaphore protection to avoid race conditions etc. etc.

There is simply no way that you can do anything even remotely workable just by using the Call Library Node. You will need a (rather complex) external shared library that goes in between Twain and LabVIEW and takes care of all the subtleties. I know for sure because I wrote such a beast in the past.

Now there is a Toolkit from the French Alliance member Alliance Vision http://www.alliancevision.com/us/index.html
that does this. If you need Twain I would definitely go for this. My own library is only to the point of what I had needed for a particular project, (meaning it supports two specific scanners without issues) and without any documentation for external users and I couldn't give it away for free either.

Just want to warn you but there is a good chance that the Alliance Vision Twain Toolkit does not really give you full programmatic control of all the parameters of non-scanner devices and you won't be able to avoid letting the Twain driver show the device specific configuration dialog to manipulate specific settings.

In my own library I have low level functions to directly manipulate Twain attributes but in order to be able to use that you would need a through knowledge of the Twain specifications down to the API. That together with the difficulties to support other devices I don't have available, made us decide to not try to sell this Toolkit yet.

Rolf Kalbermatter
Rolf Kalbermatter
My Blog
0 Kudos
Message 5 of 5
(3,687 Views)