Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

IMAQ Merge Overlay -- internal error

I'm not sure if this is a bug or not. I'm noticing some odd behavior with IMAQ Merge Overlay, when the overlay has a line with odd coordinates. In the attached VI, I use IMAQ Overlay Line to draw a line from (480, 2147483647) to (-1, -2147483648). When the Image hits IMAQ Merge Overlay, it returns an error. When Merge Overlay is not used, no error. 

My initial thought was that Merge Overlay doesn't like having an overlay that's entirely outside the visible part of the image, but that's not the case, as you can see in case 3 in the attached VI.

It's also not a problem with the y values being very close to their I32 limits. Change the coordinates to (10, 2147483647) and (10, -2147483648), the line draws just fine, is visible in the image, and the error goes away.

Does anyone have any idea what's going on here?
0 Kudos
Message 1 of 3
(3,420 Views)
Hi eaolson,
 
It seems that the Merge Overlay function is only allowing overlay lines of a certain length.  At some times the maximum is 4294967295 (2147483647+2147483648), which is why everything works when you set the coordinates to (10, 2147483647) and (-10, -2147483648).  If you change the x-coordinate on either the start or end position by 1 value, then you will get the same error.  Diagonal lines seem to have a smaller tolerance as far as maximum length.  I am going to forward this issue on to our R&D department so they can take a look at the source code and see if there is some type of mathematical issue with Merge Overlay.  Is there any specific reason you need to work that close to the x and y limits?
Carlton
CLA
0 Kudos
Message 2 of 3
(3,403 Views)


Is there any specific reason you need to work that close to the x and y limits?



Not really. I have a cluster with some variables the user inputs. On a Value Change to that cluster, some annotations are calculated and and added to the overlay. The image and overlay are duplicated, the duplicate's overlay is merged with Merge Overlay, and then the duplicate is resized and displayed. The problem was cropping up when the user started new entries to the cluster, but hadn't finished. The calculated annotations then had some values that threw this error. Once all the correct values are entered, the points for the overlay should be well-behaved.
0 Kudos
Message 3 of 3
(3,383 Views)