In Response To: "In an attempt to perform a Dilation operation using the GrayMorphology() method, I get an error 31088 'Invalid Image Border'. This happens when I try to initialize the CWIMAQStructuringElement argument to a width and height greater than 5 (odd sizes only). Only sizes of 3 or 5 seem to work. My images are 8-bit with size of 750x750."
Hey mpu,
The morphology functions require some blank space at the edges of the image, which is considered a border. You can set the size of the border, and you can adjust the size of the border using IMAQ ImageBorderSize. Try calling the imaqSetBorderSize(srcImage,3); function before you initialize the CWIMAQStructuringElement. What might be happening is you might be setting a boarder size that would cause the images to not fit in the area that is allotted for them. The sizes 3 or 5 probably work because they are still within the limits of the border with the image. Is there a reason that you need a larger border size?
Check out the following Discusstion Forums where others have run into this same error:
-
"Invalid image border" when running imaqConvolve() despite correct borders...-
I get error 1074396072: imaq morphlogy invalid image borderI hope this helps. Please let me know if you have any other questions. Thanks and have a great day.
Regards,
DJ
Applications Engineer
National Instruments