- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm running ippiHistogramEven_8u_C1R on images of various sizes (Code Below). When I try images greater than 1000 x 1000 pixels, this routine crashes with Segmentation Fault. Is this a known limitation/problem or am I doing something drastically wrong? Any help would be greatly appreciated. I'd like to profile this function up to images of 3000 x 3000 pixels.
void ippHist(IplImage * pic)
{
int i;
IppiSize imgSize = {image->width,image->height};
Ipp32s levels[256],histo[256];
ippiHistogramEven_8u_C1R(pic,image->width,imgSize,levels,histo,256,0,255);
}
void ippHist(IplImage * pic)
{
int i;
IppiSize imgSize = {image->width,image->height};
Ipp32s levels[256],histo[256];
ippiHistogramEven_8u_C1R(pic,image->width,imgSize,levels,histo,256,0,255);
}
Link Copied
6 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Peter,
You could try the following:
At least you have to use the widthStep and the width of the image.
void ippHist(IplImage * pic)
{
int i;
IppiSize imgSize = {pic->width, pic->height};
Ipp32s levels[256],histo[256];
ippiHistogramEven_8u_C1R(pic->imageData, pic->widthStep ,imgSize,levels,histo,256,0,255);
}
Hope this helps.
Rob
You could try the following:
At least you have to use the widthStep and the width of the image.
void ippHist(IplImage * pic)
{
int i;
IppiSize imgSize = {pic->width, pic->height};
Ipp32s levels[256],histo[256];
ippiHistogramEven_8u_C1R(pic->imageData, pic->widthStep ,imgSize,levels,histo,256,0,255);
}
Hope this helps.
Rob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Although that would be more technically correct, I don't think it will solve the problem. image is the global variable that is passed into that function so pic->width and image-> width are the same thing. Thanks for trying though, so far I havn't seen much guidance on this.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Ok. But make sure you use the widthStep and not the width. This will cause memory trouble if your image width is not a multiple of 32.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I made the changes just to see, but it didn't change the performance. It works fine up to 1000x1000 pixels. BTW, I have a 64 bit system not 32. So i'm still stuck.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Do you mean it work not so fast or you still have crash on 3kx3k image?
What version of IPP do you use and what is your linkage model (do you use IPP as dynamic or static libraries)?
Regards,
Vladimir
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It still crashes with a seg fault on any image larger than 1000 x 1000.
I'm using IPP 5.3.1.062 dynamic linking on a 64 bit linux system.
I'm using IPP 5.3.1.062 dynamic linking on a 64 bit linux system.
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