Intel® Integrated Performance Primitives
Community support and discussions relating to developing high-performance vision, signal, security, and storage applications.
6633 Discussions

IPP Histogram image size limitation (seg fault)

peter03436
Beginner
218 Views
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);
}
0 Kudos
6 Replies
Rob_Ottenhoff
New Contributor I
218 Views
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
peter03436
Beginner
218 Views
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.

Rob_Ottenhoff
New Contributor I
218 Views
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.
peter03436
Beginner
218 Views
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.
Vladimir_Dudnik
Employee
218 Views

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

peter03436
Beginner
218 Views
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.
Reply