Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

IMAQ Edge Tool errors

I am getting two different error messages from the IMAQ Edge Tool function.
Error -1074395317 specified point that lies outside image.
Error -1074395318 insufficient points.
I am intentionally feeding my algorithm bad images to test its robustness.
Bad measurements are OK, a program that hangs is not. These errors are occurring in the DLL function
call. Is there a way to trap the error there? Or, what exactly are the requirements of the input
point array, so that the error can be trapped in front of the function. I am using IMAQ vision 6.1
and my images are 1600 x 1200. I have already found out that filter width affects the first error.
What are the effects of steepness on these two errors.
0 Kudos
Message 1 of 5
(5,066 Views)
Hallo RichardR,

the IMAQ Edge Tool VI finds edges along a path defined in the image. Edges are determined based on their contrast, slope, and steepness.
Edge Parameters is a cluster defining the characteristics of the filter used to detect the edges. This cluster consists of the following parameters:
1) Contrast specifies the threshold for the contrast of the edge. Only edges with a contrast greater than this value are used in the detection process.
2) Contrast is defined as the difference between the average pixel intensity before the edge and the average pixel intensity after the edge.
3) Filter width specifies the number of pixels that the VI averages to find the contrast at either side of the edge.
4) Steepness specifies the slope of the edge. This value represents the number of pixels that correspond to the transition area of the edge.

You can find additional information here:

http://zone.ni.com/devzone/devzoneweb.nsf/Opendoc?openagent&6E82687C307F60CD862567FA007A0F05

Regards

Kai Kratt
NI
0 Kudos
Message 2 of 5
(5,041 Views)
Hello Kai,

Thanks for the response. I was able to find a condition in the input point array that would allow me to trap the error prior to calling the function. I viewed the link that you posted but this was information I have already looked at. To be a little bit more clear about the problem I was having, in particular the input point array. If I have an image of 1600 x 1200 and I limit the input points to 0 and 1600 for x and 0 and 1200 for y, applying a filter value could create a condition where you are now out of bounds the width of the filter. I wanted to know what effects steepness would also have on these boundary conditions. The second error `insufficient points´ was not clearly explained in the documentation. I tried a few things to generate this error intentionally. A two point coordinate array with indentical coordinates, two different points (500,500),(501,501); three different points (500,500),(510,510),(520,520); all of these conditions generate error -1074395318 insufficient points. What exactly are the requirements for this point array input parameter with respect to the edge parameters? This is the information I am having a difficult time finding.
0 Kudos
Message 3 of 5
(5,034 Views)
Hello Richard

I think you are having issues because of two things. The image is like a 0 based array so a 1600 x 1200 image is really 0 to 1599 and 0 to 1199. The edge tool you are using requires all of the points along the line. Use the IMAQ Profile ROI tool under the analysis palette to get all of these points. Because the edge tool filters the line, if you have less points than the size of the filter it will throw out an error because there are not enough points to work on.

Hope this makes things clearer.

Mike
Message 4 of 5
(5,031 Views)
Thanks Mike,
In my program I am actually limiting at 1599 and 1199. The second part of your answer helps a lot. Thanks again.
0 Kudos
Message 5 of 5
(5,026 Views)