Community
cancel
Showing results for 
Search instead for 
Did you mean: 
amyron
Beginner
101 Views

DMIP problem

I can't compile even the DMIP Harmonizing filter example,
I'm getting several errors similar to:

error C2065: 'IppC1' : undeclared identifier
error C2275: 'Ipp8u' : illegal use of this type as an expression

I'm using VC++ 2005 with MS native compiler. My other IPP code (without DMIP)
works just fine.

Here is what I did to add DMIP:
1) Included folder %DMIP%\image-processing\dmip\include
2) Coppied 'dmip.lib' in the IPP folder that is already included in library path
3) Added to my code
#include
#pragma comment(lib, "dmip.lib")

PS:I'm trying to link DMIP statically.

The code with only IPP functions compiles and works fine.
But when I add,e.g.

Ipp8u *inData;
IppiSize roi, size7x7={7,7};
int step;
Image A(inData,Ipp8u,IppC1,roi,step);

Then I'm getting the errors above. I guess my static linking is wrong ??

Please advice,
Thanks,

Andriy
0 Kudos
5 Replies
Vladimir_Dudnik
Employee
101 Views

Hello,

first of all, let's check if you are able to compile DMIP sample with build scripts which comes with it. If that work, then you most probably have missed something in project settings.

Regards,
Vladimir
Sergey_K_Intel
Employee
101 Views

Hello,

first of all, let's check if you are able to compile DMIP sample with build scripts which comes with it. If that work, then you most probably have missed something in project settings.

Regards,
Vladimir
P.S. Why can't I reply to the origin message?

Hi,

Your piece of code looks OK. But, try to use low-letters type identifier. I.e. "ippC1" for channel number and "ipp8u" for pixel type. "Ipp8u" is a typedef for "unsigned char", whereas "ipp8u" is an enumerator value.

Regards,
Sergey
amyron
Beginner
101 Views

Your piece of code looks OK. But, try to use low-letters type identifier. I.e. "ippC1" for channel number and "ipp8u" for pixel type. "Ipp8u" is a typedef for "unsigned char", whereas "ipp8u" is an enumerator value.

Thanks, with the lower case type identifier I can compile the code OK!
Now, during the executuion I'm getting new errors:

First I've got
This applicaion has failed to start because msvcr80d.dll was not found. Re-intalling the application may fix this problem.
(I've googled msvcr80d.dll, and copied in my folder, which solved the error)

Now, I'm getting
This applicaion has failed to start because dmip-1.0.dll was not found. Re-intalling the application may fix this problem.

I guess, it still wants to have the dynamic library? why? I'm trying to include dmip statically.

Here is my test code of Win32 console program (which gives the error above). Please help.


#include "stdafx.h"
#include "ipp.h"
#include

#pragma comment(lib, "dmip.lib")
#pragma comment(lib, "ippsemerged.lib")
#pragma comment(lib, "ippsmerged.lib")
#pragma comment(lib, "ippcorel.lib")

int _tmain(int argc, _TCHAR* argv[])
{
// IPP static initialization
ippStaticInit();

Ipp8u *inData;
IppiSize roi, size7x7={7,7};
int step;
Image A(inData,ipp8u,ippC1,roi,step);

return 0;
}


PS: The test build with build32.bat also fails,
perhaps due to some path missing.

The system cannot find the path specified.
The system cannot find the path specified.
'env.bat' is not recognized as an internal or external command,
operable program or batch file.
'nmake' is not recognized as an internal or external command,
operable program or batch file.
The system cannot find the path specified.

PS2: I've also tried to run dmip_example.exe
as
....DMIPimage-processingdmipbinwin32>dmip_example.exe -input=im.bmp -example=2
Usage: -input=input bmp file
-example=0 - brightness, 1 - store, 2 - harmonize, other - sobel
DMIP 1.0 Dec 8 2008
ippiv8l.lib 6.0 Update 1 build 167.32 Nov 25 2008
ippcvv8l.lib 6.0 Update 1 build 167.32 Nov 25 2008
ippccv8l.lib 6.0 Update 1 build 167.32 Nov 25 2008
DMIP Harmonize example time 762143184.000000 (clocks) 0.340544 msec
IPP Harmonize example time 664354152.000000 (clocks) 0.296850 msec

Seems to run Ok, but the example time for DMIP is bigger, why? for other -example=0,1,
DMIP time is even worse.


--
Andriy
Sergey_K_Intel
Employee
101 Views

Hi,

As much as I know the package, there is no static library. There are dmip.dll and static library of exported functions. So, all the functions in dmip.lib are just entry points to the dmip.dll. You'll be definitely requiring the dmip.dll during run. Copy it to the application directory.

Then, regarding MSCRT80.DLL. This is a MS VS2005 run-time DLL library. So, you need VS2005 or higher to go with DMIP. Look into readme file.

And the last, regarding execution time. Your log showed that IPP's CPU dispatcher had taken the V8 library, so, probably, you have a Core2 processor. Tell how many cores do you have (Dual Core, Quad Core?), and, more important, the dimension sizes of your image. The parallelization doesn't give any benefit on small images.

Regards,
Sergey

amyron
Beginner
101 Views

Hi,

As much as I know the package, there is no static library. There are dmip.dll and static library of exported functions. So, all the functions in dmip.lib are just entry points to the dmip.dll. You'll be definitely requiring the dmip.dll during run. Copy it to the application directory.

Then, regarding MSCRT80.DLL. This is a MS VS2005 run-time DLL library. So, you need VS2005 or higher to go with DMIP. Look into readme file.

And the last, regarding execution time. Your log showed that IPP's CPU dispatcher had taken the V8 library, so, probably, you have a Core2 processor. Tell how many cores do you have (Dual Core, Quad Core?), and, more important, the dimension sizes of your image. The parallelization doesn't give any benefit on small images.

Regards,
Sergey


Thanks Sergey, everything works now,
Copying dmip-1.0.dll into the application directory helped. You must be right, and there is no static version of dmip.

As for the execution time, I have Core2 Duo @1.5GHz.
The input image I was using is 187x223 .
I've also tried a larger image (1200x900) and the DMIP wins now, it is about 2 times faster.

--Andriy


Reply