{"action":"opened","issue":{"url":"https://api.github.com/repos/mshabunin/test2/issues/106","labels_url":"https://api.github.com/repos/mshabunin/test2/issues/106/labels{/name}","comments_url":"https://api.github.com/repos/mshabunin/test2/issues/106/comments","events_url":"https://api.github.com/repos/mshabunin/test2/issues/106/events","html_url":"https://github.com/mshabunin/test2/issues/106","id":95175218,"number":106,"title":"warpPerspective can be split in two functions","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:%20normal","name":"priority: normal","color":"ededed"},{"url":"https://api.github.com/repos/mshabunin/test2/labels/status:%20open","name":"status: open","color":"ededed"},{"url":"https://api.github.com/repos/mshabunin/test2/labels/target:%20-","name":"target: -","color":"ededed"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-07-15T12:03:22Z","updated_at":"2015-07-15T12:03:22Z","closed_at":null,"body":"Converted from http://code.opencv.org/issues/1564\r\n```\n|| by vasile v on 2012-01-25 01:22\n|| Status: Open\n|| Priority: Normal\n|| Affected: None\n|| Target: -\n|| Category: imgproc, video\n|| Tracker: feature\n```\n\nwarpPerspective can be split in two functions\n-----------\n```\nI have been using with great success a split warpPerspective() function\nto perform all kind of transforms that can be applied to many files at\nonce.\n\nIf you precalculate the maps for remap(), you can apply them to many\nimages (by example to a video when processing), gaining a significant\nperformance improvement. Some examples include: fast resize, fast\nperspective correction, etc.\n\nThe technique can be used also on tracking algorithms, or multi-scale\ndetectors on video, where the image must be resized.\n\nThe improvement can be achieved by splitting warpPerspective in two\nfunctions, that can be called separately from API:  \nbuildMaps() and remap(). (The latter is already separate)\n\nExample:\n\n     1VideoCapture cap;\n     2cap.open(file);\n     3Mat H = (Mat_<float>( 0.5, 0, 0, 0, 0,5, 0, 0, 0,0, 0));\n     4builsMaps(srcsize, dstsize, H, mapx, mapy);\n     5\n     6Mat frame, smallframe;\n     7\n     8for(;;)\n     9{\n    10   cap >> frame;\n    11\n    12   // much, much faster than resize or warpAffine\n    13   remap(frame, smallframe, mapx, mapy, flags); \n    14}\n\nA good idea would be to have a separate optimization for remap on\nandroid (now it has only SSE acceleration)\n```\n\nHistory\n-------\n##### by Alexander Shishkov on 2012-02-12 08:01\n```\n-   Description changed from I have been using with great succes a split\n    warpPerspective() function to per... to I have been using with great\n    succes a split warpPerspective() function to per... More\n```\n##### by Andrey Kamaev on 2012-02-25 02:13\n```\n-   Description changed from I have been using with great succes a split\n    warpPerspective() function to per... to I have been using with great\n    success a split @warpPerspective()@ function to ... More\n```\n##### by Vadim Pisarevsky on 2012-04-06 07:46\n```\n-   Priority changed from High to Normal\n```"}}