- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I am using IPP in Delphi environment and want to compute standard deviation of the image. This is how I try to do this:
roiSize := CreateSize(Source.Width, Source.Height);
Mean := 0;
StdDev := 0;
case Source.PixelFormat of
pf8bit:
begin
pSrc := GetPointer8(Source);
srcStep := GetStep8(Source);
ippiMean_8u_C1R(pSrc,
srcStep,
roiSize,
@Mean
);
ippiMean_StdDev_8u_C1R(pSrc,
srcStep,
roiSize,
@Mean,
@StdDev
);
....
and function declarations :
ippiMean_StdDev_8u_C1R:
function(
const pSrc: PIpp8u;
srcStep: Integer;
roiSize: TIppiSize;
pMean: PIpp64f;
pStdDev: PIpp64f): TIppStatus; stdcall;
ippiMean_8u_C1R, ippiMean_8u_C3R:
function(
const pSrc: PIpp8u;
src1Step: Integer;
roiSize: TIppiSize;
pMean: PIpp64f): TIppStatus; stdcall;
...and addresses assigned:
ippiMean_StdDev_8u_C1R := GetProcAddress(ippidll, 'ippiMean_StdDev_8u_C1R');
ippiMean_8u_C1R := GetProcAddress(ippidll, 'ippiMean_8u_C1R');
========================================================
While calling ippiMean_StdDev_8u_C1R, I keep getting access violation at address 0, but for comparison ippiMean_8u_C1R works fine. Any idea what can be the problem? Thanks a lot in advance. There can be some stupidities in the code, because I am new to the topic.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
First, you can declare TIppiSize = TPoint, and just directly pass Point types (no need for CreateSize).
Next, GetPointer8 must return a pointer to the start of the image buffer, and GetStep8 must return the size in bytes of one scanline.
Also, you must use stdcall in IPP function declarations.
And needless to say, do you check for nil when calling GetProcAddress?
- 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
Hi,
ippiMean_StdDev_8u_C1R located in the ippcv library. You try to load it from ippi.
Igor.
- 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
You can view available function names in a DLL or OCX using "Depends", a tool from Microsoft, part of their Windows SDK.

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page