Ask Your Question

remap() gives pixelated result

asked 2013-02-24 05:46:22 -0600

I'm applying a warp using OpenCV's remap() function, but the result looks quite blocky. I'm using bicubic sampling using a float matrix to shift the x & y like this:

remap(src, dst, mapx, mapy, INTER_CUBIC, BORDER_CONSTANT);

As an example:

enter image description here (original, dst & zoomed in result)

The scaling factor is quite high on this example, and if you look at the bottom of the shirt it fails to do the bicubic sampling effectively. Is this because the scaling factor is high, and so the pixels sampled for bicubic interpolation are too few, hence resulting in this jagged result?

How can I make this nice & smooth?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2013-02-24 06:01:45 -0600

SR gravatar image

It is hard to guess, but this doesn't look sane. I have never used such large scaling factors but in my cases I never experienced such block artifacts with cubic interpolation.

edit flag offensive delete link more

Question Tools


Asked: 2013-02-24 05:46:22 -0600

Seen: 818 times

Last updated: Feb 24 '13