- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
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.
Link Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
Vladimir
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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 !!!
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 !!!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page