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.

Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Error 1074396120 with Image To Image2

Hi, I'm trying to overlay and image I'm getting from a NI-1409 pci card over an image I'm getting from a usb camera.  I've setup the following VI to accomplish this:

 

Labview Image to Image 2 Error.JPG

 

 

As you can see, I'm getting an error with the imageToimage2 block.  The strange thing is that this VI works the first time I run it.  Once I stop it and try to run it again, I recieve the error.  After the first run, if I want it to work again, I need to stop the VI, close Labview 8.5 and reopen it, then run.

 

Any ideas as to what I'm doing incorrectly?

 

Thanks

0 Kudos
Message 1 of 14
(4,805 Views)

Hi Bad Noodle,

 

I can't do too much troubleshooting on this one without the code.  Can you post it so that I can actually see what's going on?

Stephen Meserve
National Instruments
0 Kudos
Message 2 of 14
(4,790 Views)

Sorry,  I'm new to LabView, do you mean the VI file?  I attached it just in case.

0 Kudos
Message 3 of 14
(4,778 Views)

Hi Bad Noodle,

 

Have you tried wired in an imaq image into the Image Dst on the ImagetoImage 2 VI?  My thoughts are that this might be caused by the images being different types, which you are trying to remedy with the IMAQ Cast Image.  Let's try to force the matter by wiring the Image Dst.

Stephen Meserve
National Instruments
0 Kudos
Message 4 of 14
(4,758 Views)

Thanks.  I tried wiring the Image Dst to each of the input images. The conversion one I tried to wire before the conversion and after the conversion.  I also tired creating a new Imaq image and wiring it to that.  I tired that with the Imaq create being wired and not wired to the image type from the frame grabber.  Unfortunatly none of it solved the problem. 

 

For reference, I followed instructions at:

http://www.csun.edu/~rd436460/Labview/IMAQ-Manual.pdf

 

page 23 or 2-5

0 Kudos
Message 5 of 14
(4,733 Views)

I'm starting to think that this is not a conversion block problem, but something that happens when I press the stop button. I tried getting rid of the casting block and added a property inspector block strait from the usb image aquire block, and i get the same error.  If I try to add a conversion block (a equalize image) I get an error saying that the image is too small.

 

I think that the system is not releasing the resources properly when I hit the stop button, so the next time I run it, the program can not obtain the recources for the usb camera and gives me the error. 

 

So am I releasing the resources correctly?

0 Kudos
Message 6 of 14
(4,730 Views)

There is a bug with the USB vis that they only take a RGB (U32) image.  When you use Cast Image you change the image reference to another type.

 

Add another Create Image and connect it to your Cast Image function to give it a destination.  I think this may solve your problem.

Randall Pursley
0 Kudos
Message 7 of 14
(4,728 Views)

Thanks, I tried that, but I still have the problem. I wired it up like:

 

overlayErrorFix1.JPG

 

 

Then, I took the imageToimage2 and the cast blocks out to make it look like:

 

overlayErrorFix2.JPG

 

When I did this, I saw the image the first time I ran the program, but the second time, no image appeared.  So it is a problem with the USB  camera resource being released.  It doesn't happen properly.

 

The only thing I can think of is that maybe I need to seperate loops that run in parrallel and spit out images.  I don't know how to wire that up though.

 

Message Edited by BadNoodle on 07-14-2009 09:04 AM
Message Edited by BadNoodle on 07-14-2009 09:05 AM
Download All
0 Kudos
Message 8 of 14
(4,707 Views)

I tried just the USB camera:  usbTest.JPG

 

This won't even run a second time. . . I'm stumped

0 Kudos
Message 9 of 14
(4,704 Views)
Do you know for sure what the name of the USB camera is?  These drivers do not work exactly like the others.  The name of the camera is given by the camera so usb0 is probably not right.  Use the function IMAQ USB Enumerate Cameras to get an array of camera names, verify which is yours and the index it to use that to initalize the camera.
Randall Pursley
0 Kudos
Message 10 of 14
(4,702 Views)