Intel® Integrated Performance Primitives
Deliberate problems developing high-performance vision, signal, security, and storage applications.
6704 Discussions

Same image Different performance of ippi funtion

hande_b_
Beginner
541 Views

Hi everyone . I am trying to implement edge drawing algoritm of Cihan Topal, Cüneyt Akinlar . This is the code of  magnitude calculation:

void CalculateMagnitude(CprImage *sobelVertical,CprImage *sobelHorizantal,CprImage *magImage)
{
ippiAdd_32f_C1R( (Ipp32f *)sobelVertical->DataPtr() + offset , sobelVertical->Step() , (Ipp32f *)sobelHorizantal->DataPtr() + offset , sobelHorizantal->Step() , (Ipp32f *)magImage->DataPtr() + offset , magImage->Step() , roi);


ippiThreshold_LTVal_32f_C1R( (Ipp32f *)magImage->DataPtr() + offset , magImage->Step() , (Ipp32f *)magImage->DataPtr() + offset , magImage->Step() , roi , (Ipp32f)m_gradientThreshold , 0);
}

//offset , roi , m_gradientThreshold defined before

When i measure the performance of functions, this function processes same image sometimes at 2ms , sometimes at 30 ms , 120 ms ...

What do you think the problem is?  

0 Kudos
7 Replies
SergeyKostrov
Valued Contributor II
541 Views
>>...When i measure the performance of functions, this function processes same image sometimes at 2ms, >>sometimes at 30 ms , 120 ms ... >> >>What do you think the problem is? Additional technical details about your development environment, IPP library version and how big is the source image are needed.
0 Kudos
hande_b_
Beginner
541 Views

i am using ipp verison 7.0.205, image is 512x512 gray scale image, development envoriment visual studio 2008 c++

0 Kudos
SergeyKostrov
Valued Contributor II
541 Views
Do you use 32-bit or 64-bit IPP DLLs? >>...i am using ipp verison 7.0.205... I have that version and use ippiAdd_32f_xxx and never had any performance issues. I can't say anything about ippiThreshold_LTVal_32f_C1R. Consider the following: - Disable antivirus ( if any ) - Use single-threaded environment for IPP and boost priority for the test process to High or to Realtime - Repeat tests - It makes sense to verify two cases, like: Test #1 ... { ippiAdd_32f_C1R( ... ) // ippiThreshold_LTVal_32f_C1R( ... ) <- commented! } and Test #2 ... { // ippiAdd_32f_C1R( ... ) <- commented! ippiThreshold_LTVal_32f_C1R( ... ) } in order to identify what IPP function possibly has some issues ( still Not proven ). - A complete test case will help as well
0 Kudos
hande_b_
Beginner
541 Views

32-bit . Ok i am trying what you say

0 Kudos
SergeyKostrov
Valued Contributor II
541 Views
>>...32-bit . Ok i am trying what you say... Use Release Configuration for your test project and if you upload a simple test case I could quickly verify if some performance issues exist. My environment in that case is: Windows XP 32-bit / IPP v7.0.205 / VS 2005 with MS and ICC ( v12 ) compilers.
0 Kudos
hande_b_
Beginner
541 Views

 I did what you said It differed a little bit but still have problems 

I added performans outputs of test1, test2 ,respectly

0 Kudos
SergeyKostrov
Valued Contributor II
541 Views
>>Test #1 >>... >>{ >>ippiAdd_32f_C1R( ... ) >>// ippiThreshold_LTVal_32f_C1R( ... ) <- commented! >>} I see that there is a performance issue in the 1st test case: ... 34.1359 29.9709 0.576922 ... but it doesn't give any idea what else is going on in your application and around in OS (!) at the same time, that is during calculation of the magnitude.
0 Kudos
Reply