Hi!
In my application, I use imaqConvolve -or at least, I try to use it.
I get the error "Invalid image border", although I am certain that I have a border of half the size of the kernel used with imaqConvolve().
This is basically what I do (although in my application some of the steps are placed in different functions):
---------------------------------------
Image *srcImage;
srcImage = imaqCreateImage (IMAQ_IMAGE_U8, 3);
//Make a copy of the image
if(!imaqDuplicate (srcImage, theCartCamera->getFrame())){
printf("%s\n",imaqGetErrorText(imaqGetLastError()));
}
//Smooth the image
if(!imaqConvolve(srcImage,srcImage,imaqGetKernel(IMAQ_SMOOTHING_FAMILY,3,5),3,3,(float)(0.5)*3
,NULL)){
printf("ERROR: imaqConvolve(): '%s'\n",imaqGetErrorText(imaqGetLastError()));
return 1;//Error
}
-------------------------------------
theCartCamera->getFrame() returns a pointer to an image with 0 border. Since srcImage has border of 3, I guess that wouldn't be a problem? Anyway, I have tried altering the border of the image returned by theCartCamera->getFrame() to 3, but this did not help either.
What am I doing wrong?
Thanks!