Jump to content

NI-IMAQ for USB - multiple sessions?


Recommended Posts

If you are just taking snapshots, not simultaneously, can you have multiple sessions open and leave them open? My application requires 12 cheap USB cameras each taking a snapshot twice per minute.

I've tried NI-IMAQ for USB successfully with one camera. I only have one camera to experiment with at the moment. A session is opened with 'IMAQ USB Init.vi' and closed with 'IMAQ USB Close.vi'. I'm wondering if I can call Init 12 times, keeping 12 distinct session refnums alive, and cycle through taking snaps with at least 2 seconds pause in between snaps, successfully.

Thanks.

Link to comment

QUOTE (AutoMeasure @ Jun 3 2008, 05:56 PM)

I'm wondering if I can call Init 12 times, keeping 12 distinct session refnums alive, and cycle through taking snaps with at least 2 seconds pause in between snaps, successfully.

No, that's not possible. The interface is capable of supporting this, and I think this is relatively little work for NI to implement it. From a sales point of view there should not be too big a problem either, as you need IMAQ anyway if you want to do image manipulations, so many people would be happy (including me !).

What you can do in your case (slow capture) is open and close a camera each time. You are able to select from multiple cameras/sources if they have a different name.

Joris

Link to comment

Thanks, Joris. That's very good to know. However, it's very disappointing. Regarding opening and closing the camera for each snap, I read this information from the NI-IMAQ for USB Cameras support page:

"Known Issues:

"Opening and closing a camera session causes a small memory leak, so it is not recommended to do this repeatedly."

My application would be opening and closing on the order of 20 times per minute for up to a month, so the memory leak is a concern.

Link to comment

I understand that one of the issues is that the consumer USB cameras are not made for taking snapshots but for streaming live video. A driver would likely have to keep up live video streaming from all the cameras simultaneously in order to be ready to grab a frame when it's time to take a snapshot. There is then an issue of USB controller bandwidth. Irene He of Hytek Automation explained this to me. They have a software product that handles these issues, which I might try.

Link to comment

Since snapshots are what you are looking for, you might take a look at this thread which mentions a DLink wired ethernet based camera. They are more expensive than decent USB webcams, but they may not be out of your ballpark. The beauty is that you can get the most current image from the camera using Datasocket as a JPG file so your snapshot capture code will be relatively simple to impliment. You haven't really mentioned what you are doing with the images, but it might save you from the 300-400 IMAQ run-time liscense that you would need to purchase for this project as well.

Chris

Link to comment

QUOTE (Chris Davis @ Jun 5 2008, 05:57 AM)

You haven't really mentioned what you are doing with the images, but it might save you from the 300-400 IMAQ run-time liscense that you would need to purchase for this project as well.

Chris

I doubt he's going to need that many licences.. he's probably going to use a single PC to talk to those cameras so he would probably need one licence. But I do wish they would make it easier to use the Vision stuff without all the complicated licencing.

Neville.

Link to comment

I personally don't have a problem with the liscensing process nor, in most cases the cost, for liscensing a runtime of IMAQ. If memory serves, the unsupported NI-IMAQ for USB requires a valid NI-IMAQ liscense. Which means using 12 "cheap" USB webcams means adding a $300 or $400 liscense, which is 50% of the cost (12 x $50) of the hardware. If there is no IMAQ processing going on, that adds to the cost just to capture the images. My assumption was he would probably want to purchase a seperate liscense to cover this setup, which may not be the case, if its only a short term project. Anyway, an ethernet setup certainly relives the issues with USB host bandwidth, that the OP mentioned.

Link to comment

QUOTE (Neville D @ Jun 5 2008, 12:32 PM)

I doubt he's going to need that many licences.. he's probably going to use a single PC to talk to those cameras so he would probably need one licence. But I do wish they would make it easier to use the Vision stuff without all the complicated licencing.

It's how Vision software generally works. And after all it is some serious engineering to do Vision software so I can understand that the vendors want to get some form of return of investment. You could argument that LabVIEW is probably just as expensive to develop and its licensing is quite a bit simpler since it does not require seperate runtime licenses. But it's not the same industry really, with LabVIEW competing with traditional development environments like Visual Studio, Borland, etc, that do usually not require runtime licenses and we've been through that already in the past when NI tried to get runtime licenses for build LabVIEW executables.

Rolf Kalbermatter

Link to comment

QUOTE (crelf @ Jun 5 2008, 09:48 AM)

What about it do you find complicated?

Well, if your using Vision you need a vision licence. If your using camera hardware you need an IMAQ licence. God knows if you use Vision Builder you probably need a licence for that too. Along with that the headaches of activation which is troublesome when your customers frequently don't allow internet access on-site.

Most annoying is, if you build a utility that uses the IMAQ image display, to be installed as an executable, it doesn't work unless you install some licenced version of IMAQ (or a subset of it).

Neville.

Link to comment

QUOTE (Neville D @ Jun 6 2008, 05:05 AM)

Well, if your using Vision you need a vision licence. If your using camera hardware you need an IMAQ licence.

I understand. I'm not justifying anything, but my opinion on the history is:

  • I beleive that NI didn't write the NI-Vision toolkit, so a license has to be paid to the author by them (and they pass the savings on to you!).
  • The motivation behind the IMAQ hardware license might be based on hardware sales - if you buy one of their IMAQ cards (IMAQ, FireWire, &c) then you get a license for free, but if you're using someone else's hardware (including buses built into your motherboard) then you get hit with a license fee.

That said, I'm totally ignorant on the real motivations behind licensing.

Link to comment

QUOTE (crelf @ Jun 6 2008, 07:26 AM)

I understand. I'm not justifying anything, but my opinion on the history is:

  • I beleive that NI didn't write the NI-Vision toolkit, so a license has to be paid to the author by them (and they pass the savings on to you!).
  • The motivation behind the IMAQ hardware license might be based on hardware sales - if you buy one of their IMAQ cards (IMAQ, FireWire, &c) then you get a license for free, but if you're using someone else's hardware (including buses built into your motherboard) then you get hit with a license fee.

Actually I think the story behind it is a little different. First IMAQ Vision was indeed bought from Graftek and was at that time called Concept V.I. However I'm pretty sure NI acquired all rights on Concept V.I. and consequently does not pay royalities to Graftek. They also bought at a later time ViTA from them and added it to IMAQ Vision and also another software that was the base for IMAQ Vision Builder.

NI-IMAQ, the traditional driver for NI image acquisition boards is free to use (and makes only sense with NI boards). IMAQdx the new style API to control NI image acquisition boards seems to require a license activation which may or may not come with the NI image acquisition board. Not sure about this last part.

Rolf Kalbermatter

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.