cv::remap() with CV_INTER_NEAREST produces bad results

asked 2018-06-26 14:06:56 -0600

swebb_denver gravatar image

I'm getting these results when computing maps (initUndistortRectifyMap) with map type CV_16SC2. Both maps are getting created and sized correctly (by the initUndistort..() call), but when I use NEAREST interpolation, it looks like hell. CV_INTER_LINEAR also has artifacts, and cubic isn't much better. If I use CV_32FC1 it looks as I would expect.

I realize the 16SC2 won't be as accurate, and based on reading documentation I understand that NEAREST isn't supported unless the second map is valid, but that doesn't seem to be the problem (?)...

Any help is appreciated.

Thanks

Steve

image description

edit retag flag offensive close merge delete