Jump to content

IMAQ Copy Equivalent


Recommended Posts

I recently 'discovered' a way to copy an IMAQ image without using 'IMAQ Copy'.

The problem -- using only 'IMAQ VIs' (ie, not using anything that comes with Vision Builder) there is no 'IMAQ Copy' available so if you want to acquire images in a loop and have another loop to say, store them to disk, you are sort of stuck (unless you can save the image in the same loop because your camera will overwrite the image reference on the next Grab).

The workaround -- using 'IMAQ Merge Overlay' you can essentially copy an image that has no overlays onto a new blank image. In my snippet below, you can see exactly what I mean. Once I've used the new reference to save the image to disk, I destroy the reference.

post-5746-1206372491.png?width=400

Link to comment

I don't think this works for non-color images. :(

From the help:

IMAQ Merge Overlay

Makes a nondestructive overlay part of the image content. This process creates a destructive overlay. The VI then removes the nondestructive overlay. The resulting image is an RGB image.

Any workarounds you can think of?

Bruce

Link to comment

Are you using the IMAQ driver for acquisition? If so, that's what IMAQ Copy Acquired Buffer.vi is for. You also should be using a Ring or Sequence Grab, so that you can make a buffer large enough to let your program recover if it falls behind a bit.

Did I understand your issue correctly?

Link to comment

I use the IMAQ copy when saving snapshots of live images so that the image displayed when the user clicks the "save" button is the image stored (not what the image is after they finish typing in the filename). You'll notice that when you save images in MAX, you can't actually get the image when you click the Save Image button, it's the current image when you acknowledge the File Dialog (not what one would expect).

Bruce

Link to comment

QUOTE (jdunham @ Mar 24 2008, 10:55 AM)

I'm not using an NI Camera nor am I using the NI Grab or acquisition functions so IMAQ Copy Acquired Buffer.vi is useless in my case (I'm using a 3rd party camera/driver).

QUOTE (bmoyer @ Mar 24 2008, 09:08 AM)

I don't think this works for non-color images.
:(

From the help:

IMAQ Merge Overlay

Makes a nondestructive overlay part of the image content. This process creates a destructive overlay. The VI then removes the nondestructive overlay. The resulting image is an
RGB image
.

Any workarounds you can think of?

Bruce

I may have to do a bit more testing. I was able to do this without errors but what I don't know is whether or not the images are good because I left the lens cap on :headbang:

I will test this again tonight. The main thing I do know is that I wasn't getting any LabVIEW errors, my output files are readable and the IMAQ refs were Grayscale (U8).

Link to comment

QUOTE

The problem -- using only 'IMAQ VIs' (ie, not using anything that comes with Vision Builder) there is no 'IMAQ Copy' available

Are you saying that this VI

post-3076-1206436029.png?width=400

Is only included when the VIsion builder is installed?

That's a bit weak from NI. What are we supposed to be able to do without a simply copy function?

Are these VIs at least included in the run-time licence for the vision module?

Shane.

Link to comment

QUOTE (shoneill @ Mar 25 2008, 01:08 AM)

Yes, and I agree it is weak. I did testing and realized that my black and white images are coming out as RGB now (so they are 3x the size). So, I'm now using 'IMAQ Write String.VI' and queueing the file string of the image so that I can dequeue and write it to disk in another loop (basically I'm passing the value by value instead of by reference). It works fine this way so I guess my original workaround is only good if you're capturing RGB images to begin with.

Link to comment
  • 6 years later...

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.