Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Error -1074396073 ImageToImage 2 question

Hello,

Can someone explain this error to me?

"Error -1074396073 occurred at IMAQ Image To Image 2
  When the mask's offset was applied, the mask was entirely outside of the image."

It might help to explain this picture to me:



Thanks,
Candice
0 Kudos
Message 1 of 6
(4,287 Views)
What the picture is trying to represent is that the IMAQ ImagetoImage2 VI takes a source image (large) and another source image (small) and overlays the small image on top of the large image.  Before this is done, as mask is applied to the small image to decide which pixels to overlay on the large image.  Only those pixels in which are identical in the mask and in the small image will be copied to the large image.  I tried to reproduce the error that you were getting on my system, but was unable.  Are you applying an offset to the mask?  And if so, is the offset placing the mask image outside of the range of the large image?

Wes P
Applications Engineer
National Instruments
Wes Pierce
Principal Engineer
Pierce Controls
0 Kudos
Message 2 of 6
(4,271 Views)
Well, after monkey-ing around with it, I got rid of that error (still don't know how I got it or why it's not there anymore). However, I'm still not able to get the function to work properly. I've been toying with it for a few days and I'd really appreciate some pointers if possible. Attached is a small sample of the subvi with contants.

I have a 3D array of images in dbl array form. Each page on the array is an image with a circle on it. The circles are 1's and the rest of the image is 0. I am trying to find a way to combine all these images into one image in such a way that I can multiply each individual circle by a constant before it gets added into the image of all circles together. The reason why I cannot just build a for-loop and add them using a shift register is I need each circle to replace the value of the circle before it, if they happen to be overlapping. When adding all images together in a for-loop, if a circle intersects with another circle, their values add instead of replace.

Thanks,
Candice
0 Kudos
Message 3 of 6
(4,256 Views)
What if you set up some logic in your loop to look at the radius of your circle every iteration, then see if the distance from the center of the new circle to the distance of the old circle is greater than the sum of the current and previous radii?  Using the mask feature of the IMAQ Image2Image VI will only display portions the Small Image source that are common with the Image Mask.  Therefore, you should expect to see some sort of circle segment.  When two circles are disjoint, you should not see any pixels in common, thus, you would not draw a new circle.  Also, is your data coming in as an array, or are your options open as for as image source data?

Wes P
Applications Engineer
National Instruments
Wes Pierce
Principal Engineer
Pierce Controls
0 Kudos
Message 4 of 6
(4,228 Views)
Since I had the image coming in as array(s), I decided to ditch the IMAQ functions in lieu of just manipulating the array elements in a couple for loops. I was having trouble b/c it looked like the IMAQ function was working, but not exactly doing what I had wanted it to do. I'm still curious as to why it seemed to write over the previous image instead of copying on top of it, but as of now my problem is solved. Thanks for all your  help.

Candice
0 Kudos
Message 5 of 6
(4,219 Views)
Candice,

I am glad to hear that you were able to find a solution to your problem.  I'm sorry we couldn't get a quicker solution for you.  It sounds like the functionality of the IMAQ ImagetoImage VI was more than you were needing anyway. 

Always happy to help,

Wes P
Applications Engineer
National Instruments
Wes Pierce
Principal Engineer
Pierce Controls
0 Kudos
Message 6 of 6
(4,204 Views)