{"action":"opened","issue":{"url":"https://api.github.com/repos/mshabunin/test2/issues/43","labels_url":"https://api.github.com/repos/mshabunin/test2/issues/43/labels{/name}","comments_url":"https://api.github.com/repos/mshabunin/test2/issues/43/comments","events_url":"https://api.github.com/repos/mshabunin/test2/issues/43/events","html_url":"https://github.com/mshabunin/test2/issues/43","id":95678194,"number":43,"title":"remap for 64-bit images is performed with 32-bit precision","user":{"login":"mshabunin","id":3304494,"avatar_url":"https://avatars.githubusercontent.com/u/3304494?v=3","gravatar_id":"","url":"https://api.github.com/users/mshabunin","html_url":"https://github.com/mshabunin","followers_url":"https://api.github.com/users/mshabunin/followers","following_url":"https://api.github.com/users/mshabunin/following{/other_user}","gists_url":"https://api.github.com/users/mshabunin/gists{/gist_id}","starred_url":"https://api.github.com/users/mshabunin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mshabunin/subscriptions","organizations_url":"https://api.github.com/users/mshabunin/orgs","repos_url":"https://api.github.com/users/mshabunin/repos","events_url":"https://api.github.com/users/mshabunin/events{/privacy}","received_events_url":"https://api.github.com/users/mshabunin/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/mshabunin/test2/labels/auto-transferred","name":"auto-transferred","color":"ededed"},{"url":"https://api.github.com/repos/mshabunin/test2/labels/category:%20imgproc","name":"category: imgproc","color":"ededed"},{"url":"https://api.github.com/repos/mshabunin/test2/labels/category:%20video","name":"category: video","color":"ededed"},{"url":"https://api.github.com/repos/mshabunin/test2/labels/feature","name":"feature","color":"ededed"},{"url":"https://api.github.com/repos/mshabunin/test2/labels/priority:%20low","name":"priority: low","color":"ededed"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-07-17T15:21:26Z","updated_at":"2015-07-17T15:21:26Z","closed_at":null,"body":"Transferred from http://code.opencv.org/issues/1167\r\n```\n|| Mark Desnoyer on 2011-06-24 18:22\n|| Priority: Low\n|| Affected: None\n|| Category: imgproc, video\n|| Tracker: Feature\n|| Difficulty: \n|| PR: \n|| Platform: None / None\n```\n\nremap for 64-bit images is performed with 32-bit precision\n-----------\n```\nHi,\r\n\r\nI could be wrong here, but I believe that the remap function (used by all the warping functions) can only be run with 32-bit precision. Let me know if I'm misinterpreting the code.\r\n\r\nChange r5351 allows the user to use 64-bit images now, however, remap does an optimization to switch the image to fixed-point format and then does a lookup. Unfortunately, the lookup table is only 16-bit, which works fine if you're in a 32-bit image, but you lose precision in the 64-bit case.\r\n\r\nI know this will be a pain in the butt to fix, so for now, I think it's most important to include a warning about the precision loss in the documentation. Maybe even a compiler/runtime warning if the user is trying to remap 64-bit images. \r\n\r\nFor some context, I'm running into this because I'm trying to do some very precise affine warps to images. It works fine in Matlab, but I get a slightly different answer with the OpenCV warpAffine consistent with losing precision somewhere.\n```\n\nHistory\n-------\n##### Alexander Shishkov on 2012-02-12 20:59\n```\n-   Description changed from Hi, I could be wrong here, but I believe\n    that the remap function (used by al... to Hi, I could be wrong here,\n    but I believe that the remap function (used by al... More\n```\n##### Alexander Shishkov on 2012-03-21 20:37\n```\n-   Target version deleted ()\n```\n##### Alexander Shishkov on 2012-03-25 20:32\n```\n-   Priority changed from Normal to Low\n```\n##### Alexander Shishkov on 2012-03-25 20:46\n```\n-   Assignee deleted (Vadim Pisarevsky)\n```\n##### Alexander Shishkov on 2012-04-05 12:44\n```\n-   Target version deleted ()\n```\n##### Andrey Kamaev on 2012-04-10 11:18\n```\n-   Description changed from Hi, I could be wrong here, but I believe\n    that the remap function (used by al... to Hi, I could be wrong here,\n    but I believe that the remap function (used by al... More\n```\n##### Vadim Pisarevsky on 2015-05-25 21:35\n```\nok, converting it to a feature request\n-   Tracker changed from Bug to Feature\n```"}}