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

ippiCopySubpixIntersect _8u_C1R issue.

elevenmice
Beginner
259 Views
Hi guys,

I'm using ippiCopySubpixIntersect(..) with image A onto image B. The idea is to animate the ippPoint_32f point parameter thus giving the impression that image A is sliding onto image B.

I used I'm using ippiCopySubpixIntersect(..) on the R, G and B channels seperately and latter recombining them.

It works fine. But there's a small annoying issue. While image A is sliding onto image B, A becomes blurred from time to time while the animation is taking place. It's very visible.

Does anyone know how to solve this? Here is my code below:

IppiSize sizeIn = { outWidth, outHeight };
IppiSize sizeOut = { m_width , m_height };
IppiPoint min,max;

IppiPoint_32f MovingPoint;
MovingPoint.x = m_MovingPoint.x - m_fSlideStepX;
MovingPoint.y = m_MovingPoint.y - m_fSlideStepY; // m_fSlideStepX and Y decrease moving point by 0.5 per frame ( at a framerate of 12fps).

Ipp8u* RComponent = new Ipp8u[ outWidth * outHeight ];
Ipp8u* GComponent = new Ipp8u[ outWidth * outHeight ];
Ipp8u* BComponent = new Ipp8u[ outWidth * outHeight ];

....
Here I feed the above 3 arrays with image A.
....
....


Ipp8u* ROutput = new Ipp8u[ m_width * m_height ];
Ipp8u* ROutput = new Ipp8u[ m_width * m_height ];
Ipp8u* ROutput = new Ipp8u[ m_width * m_height ];

...
The above 3 arrays are meant to be black but can be extended to have a background image
...
..


status = ippiCopySubpixIntersect_8u_C1R( RComponent, outWidth, sizeIn, ROutput, m_width , sizeOut, MovingPoint, &min , &max );

status = ippiCopySubpixIntersect_8u_C1R( GComponent, outWidth, sizeIn, GOutput, m_width , sizeOut, MovingPoint, &min , &max );

status = ippiCopySubpixIntersect_8u_C1R( BComponent, outWidth, sizeIn, BOutput, m_width , sizeOut, MovingPoint, &min , &max );

.....
.... Here I recombine ROutput, GOutput, Boutput and display it on the screen.
.....


ippiman.pdf also talks about :

Case 2: Copying with conversion to integer data


found on page 103. I'm not sure what that one does. It has an extra parameter called scalefactor. Can anyone tell me what that does?

Also, I'm using the 8u_C1R version of the IppiCopySubPixIntersect command. Does that cause a compromise in quality?

Please let me know.

tnx
0 Kudos
2 Replies
Vladimir_Dudnik
Employee
259 Views

Hello,

according our experts comment, ippiCopySubpixel itself should not cause blur effect. Could you please share simple test case to see where the problem is?

see IPP manual regarding scale factor parameter details (it is used when result of operation can't be represented in output data type range to save most significant bits of the result.

Regards,
Vladimir

0 Kudos
elevenmice
Beginner
259 Views
Hi Vladimir,

Sorry for the late reply. I did not use ippiCopySubpixIntersect in the end. Actually i'm not really sure what it does.

It turns out that ippiCopySubpix does what I want. In ur reply you do mention that ippiCopySubpix does not cause blurring. That is correct and it is the function I'm currently using.

The function I was previously using is ippiCopySubpixIntersect and it's that function that causes the blurring.

It's got Intersect appended to it. :p

Anyways my problem is solved with ippiCopySubpix.

cheers
chetan

btw, the email alert for this forum does not seem to work. I keep switching on the email alert but i never get any emails when someone replies to my posts. It used to work fine before. Now it's not really working.
0 Kudos
Reply