Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Potential bug in "IMAQ Copy"

I am trying to copy a source image to a destination image using "IMAQ Copy". Suppose the source image handle is "img1" and the destination handle is "img2". Both images have been created in advance as RGB images with 0 border. Sometimes the handle of the output image is "img2", which is what I would expect, but often times it is "img1", which is erroneous. Is this a known problem? Is there a workaround for it?

I use LabVIEW 7 and Vision 7.0.1 under Windows 2000.

TIA, -- Sergey Liberman
0 Kudos
Message 1 of 6
(3,644 Views)
Hi, Sergey,

Thank you for contacting National Instruments. I ran several tests, but unfortunately I cannot reproduce the problem you are seeing. I am also not aware of any such reported behavior. Can you please provide any additional details about when this error occurs, or a VI that reproduces the behavior?

Thank you!
Dawna Putnam
Applications Engineer
National Instruments
0 Kudos
Message 2 of 6
(3,644 Views)
Probably before ImageCopy an error occured in your code, which produced "Not an Image" error or something like that. Then it is possible to get src as output of IMAQ copy. Take a look in attachment.
Message 3 of 6
(3,644 Views)
This is a very good catch. Interesting to note that in the case of copying a valid image to an invalid image, the IMAQ Copy does not report an error. It is not exactly my case, but it must be closely related to it. What I found out is that I have some strange typecasting going on between image handles. I deleted all offending handles and replaced them with new handles, and the typecasting dots were gone. Everything operates correctly now.

I still don't know what caused this typecasting or how I was able to create "bad" handles (previous version?). I have attached a VI that shows this typecasting between handles. Any ideas where it comes from?

Thanks,

-- Sergey.
0 Kudos
Message 4 of 6
(3,644 Views)
In this case typecasting occured because your control connected to the IMAQ Image.ctl typedef, but indicator - not. There are two different types. Look at my example.
0 Kudos
Message 5 of 6
(3,644 Views)
Yes, I see. Still, it does not explain why IMAQ Copy would fail. Anyway, in a brief test, the program seems to work fine now. I'll have to test it more thoroughly, but I hope that the problem is fixed now. Thanks a lot for your help.

-- Sergey.
0 Kudos
Message 6 of 6
(3,644 Views)