Intel® Integrated Performance Primitives
Deliberate problems developing high-performance vision, signal, security, and storage applications.

IPP with NI-IMAQ Devices

j_bossu
Beginner
388 Views
Well, I use IPP and a camera Sony U1000 connected to an acquisition card NI-IMAQ (NAtional Instrument). When I make a snap, the image data issues of the camera are copied to a buffer created with Ipp. On this buffer, I apply a Laplace Filter, but I have a problem, when I run the program, it crashes.
The programm source is :
Ipp16s *IppBuffer, *IppResult;
IppiSize size;
int StepBuffer,StepResult;

size.width=1596;
size.height=1200;

//config camera

IppBuffer=ippiMalloc_16s_C1(size.width,size.height,&StepBuffer);
IppResult=ippiMalloc_16s_C1(size.width,size.height,&StepResult);

//snap
imgSnap(Sid,(void**)&IpBuffer);

//laplace filter
ippiFilterLaplace_8u_C1R(IppBuffer,StepBuffer,IppResult,StepResult,
size,ippMskSize3x3);


When I run programm step by step, the crashes appears here, and the error is
"Unhandled exception in hlgrab.exe(IPPIW7.DLL): 0x0000005: Access Violation."

The IppBuffer is correct. Where is my problem. Thanks.
OS : windows XP home edition sp1
processor : Intel Celeron 2.4 GHz.
0 Kudos
3 Replies
Vladimir_Dudnik
Employee
388 Views
Hi,
I recommend you to start from IPP manual, please see ippman.pdf file, chapter 9 Filtering Functions, article Fixed Filters, FilterLaplace. In description of function:

To ensure valid operation when image boundary pixels are processed, the application should correctly define additional border pixels (see

Borders).

You need to allocate more memory because of need some room for image borders.
Regards,
Vladimir
0 Kudos
j_bossu
Beginner
388 Views
Thanks Vdudnik,

But, whitout using BORDERS, my program runs correctly if I replace the size of my ippBuffer as :

size.width=800;
size.height600;

I think that another problem exists !!!
0 Kudos
Vladimir_Dudnik
Employee
388 Views
I want to notice once more, this filter requires image contain border pixels available. It is responsibility of caller to provide such conditions. If your buffer have no enough place - there will be access violation because function relies that there is extra memory in buffer.
Vladimir
0 Kudos
Reply