- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi, I use the following Delphi code for calculating the histogram (with 255 bins) of an image using ippiHistogramEven_8u_C3R.
-------------------------
var
LowerLevel,UpperLevel,nLevels:array[0..2] of IPP32s;
pHist,pLevels:array[0..2] of array[0..255] of IPP32s;
begin
LowerLevel[0]:=0;
LowerLevel[1]:=0;
LowerLevel[2]:=0;
UpperLevel[0]:=255;
UpperLevel[1]:=255;
UpperLevel[2]:=255;
nLevels[0]:=256;
nLevels[1]:=256;
nLevels[2]:=256;
.....
ippiHistogramEven_8u_C3R(pSrc,scanline,roisize,@pHist,@pLevels,@nlevels,@LowerLevel,@UpperLevel);
end;
but when I run it I get this message from ippGetStatusString: "Null Pointer Error". But what is the problem? Thanks
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I may guess the problem is that one of the pointers passed to the function as a parameter is NULL.
Vladimir
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Please find an example how to callippiHistogramEven function on the page 11-28 of IPP 5.3 manual, volume 2.
Vladimir
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
there is example from IPP 5.3 manual
Example 11-5 Computing the Even Histogram of an Image
// Compute histogram of an image for 4 bins in the range [28, 127];
// compute level values for the bins.
{
Ipp8u img[WIDTH*HEIGHT];
IppiSize imgSize = {WIDTH, HEIGHT};
Ipp32s levels[5], histo[5];
ippiHistogramEven_8u_C1R(img, WIDTH, imgSize, levels,
histo, 5, 28, 128);
// When the function completes operation the array histo will // contain a
histogram in specified range, and the array
// levels will contain the level values {28, 53, 78, 103, 128}
}
Regards,
Vladimir
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks. But I need an exxample for ippiHistogramEven_8u_C3R. Unfortunately, my problem is still remained! If you show me an example in Delphi, it can help me a lot!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Please take a look on IPP Delphi sample. Although it does not show you exactly that function, but I think your the main problem is converting memory pointers from Delphi environment to IPP call
Vladimir
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page