Quantcast
Channel: OpenCV Q&A Forum - Latest question feed
Viewing all articles
Browse latest Browse all 19555

remap of remap is not equal to remap

$
0
0
I have two successive remap calls and I'm trying to merge them: for (int j = 0; j < h; j++) for (int i = 0; i < w; i++) { float x, y; x = mapx2.at(j, i); y = mapy2.at(j, i); x = RANGE(x, 0, w - 1); y = RANGE(y, 0, h - 1); mapx1_2.at(j, i) = mapx1.at(y, x); mapy1_2.at(j, i) = mapy1.at(y, x); } The **overall** result looks the same but **details** are different. Here is an example. The first extract with the two successive remaps shows a smooth line. The second extract with the single merged remap is not smooth. [![enter image description here][1]][1] [![enter image description here][2]][2] I tried to cast x and y to int but with the same result. I understand that "interpolation of interpolation" is not the same as a single merged interpolation. How could I fix the problem? PS: I asked the question on Stackoverflow but here should be a better place to get an answer I think. [1]: http://i.stack.imgur.com/BhU2c.png [2]: http://i.stack.imgur.com/9DjLF.png

Viewing all articles
Browse latest Browse all 19555

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>