ippiRotate edge effects

ippiRotate edge effects

Hi all,

I am experiencing edge effects when trying to use ippiRotate with small images. They (effects) are possibly present on bigger images as well but it is easier to see them on very small ones.

When rotating very small image (w = 8, h = 2) I get wrong result picture - and if I pad it with 4 extra lines at the top and 4 extra lines at the bottom so that input image size if 8 by 10 everything works perfectly well. I do not receive error message in both cases. Am I supposed to add that edge lines (I did not find such requirement in the manual) or is it erroneous behavior?

Thanks a lot,

Sergey

9 帖子 / 0 全新
最新文章
如需更全面地了解编译器优化,请参阅优化注意事项

Sergey,

Were you able to reproduce this by using the IPP ippiDemo.exe? Did the same thing happen? Also, which version of the libary are you using?

- Chuck

Chuck,
Thank you for your reply - I have version 7.1 and yes, my result are similar to what I get using Demo - though there is some difference apparently due to different "default" color.
Here is what I get when using ippiDemo.exe ippiRotate 5 degrees counterclockwise with shifts
x = -0.17431148549531633, y= 0.0076106038165089096 - calculated for rotation center (0, 2). Cubic interpolation.
I can interpret this as some edge effect.
Sergey

附件: 

附件尺寸
下载 inp-p2.bmp1.1 KB
下载 pro-p2demo2.bmp1.1 KB

Hi Sergey,

>>When rotating very small image (w = 8, h = 2) I get wrong result picture - and if I pad it with 4 extra lines at the top and 4 extra lines
>>at the bottom so that input image size if 8 by 10 everything works perfectly well. I do not receive error message in both cases.

Could you attach a small test-case?

Hi Sergey :)
The test data for ippDemo.exe are described above in the reply to Chuck. Input image is inp-p2.bmp (8bit unsigned), function being tested is ippiRotate with the described above parameters. The result I got is in pro-p2demo2.bmp.
Will that work as case test? I can attach my own code - but the results more or less coincide with ippiDemo...

Sergey

>>...The test data for ippDemo.exe are described above in the reply to Chuck...

I looked at these bmp-files and I saw how the incorrect image looks like. Thanks for the real example. I will also verify how the ippDemo application rotates the source image ( for 5 degrees ).

If you can please post the codes. Thanks in advance.

Hi Sergey,

I easily reproduced your problem and I was able to see some strange edge effects when using ippiDemo application. Please take a look at my notes and questions.

>>I am experiencing edge effects when trying to use ippiRotate with small images. They (effects) are possibly present on bigger images as well but
>>it is easier to see them on very small ones.

In case of very small images distortions are inevitable and you're right that they could also be seen in bigger images. My question is did you use ippiRotate_8u_C1R or ippiRotateCenter_8u_C1R function(s)?

Did you use a 'Smooth Edge' option?

>>When rotating very small image (w = 8, h = 2) I get wrong result picture - and if I pad it with 4 extra lines at the top and 4 extra lines
>>at the bottom so that input image size if 8 by 10 everything works perfectly well. I do not receive error message in both cases.
>>Am I supposed to add that edge lines (I did not find such requirement in the manual) or is it erroneous behavior?

I'm not sure. I did a verification with another image processing program and it rotated your source image pretty well. Take a look at attached image and it demonstrates several counterclockwise rotations in 5-degree steps:


Another thing is your "discovery" looks like a very old problem with IPP rotate functions and a verification / investigation by IPP software developers is really needed.

附件: 

附件尺寸
下载 imagejrotatetesta.jpg30.67 KB

Hi Sergey - thanks a lot, it all makes sense. I am using ippiRotate_8u_C1R as I like flexibility of adding some extra shifts when rotating. I will try rotateCenter - and if "artifacts" persist I will pad image with extra lines to get clean results...

Sergey

>>...I am using ippiRotate_8u_C1R as I like flexibility of adding some extra shifts when rotating...

It looks like a workaround and I think you need to live with it for some time. I would do the same and try to use a 'Smooth Edge' option as well.

Best regards,
Sergey

发表评论

登录添加评论。还不是成员?立即加入