{"action":"created","issue":{"url":"https://api.github.com/repos/Itseez/opencv/issues/5670","labels_url":"https://api.github.com/repos/Itseez/opencv/issues/5670/labels{/name}","comments_url":"https://api.github.com/repos/Itseez/opencv/issues/5670/comments","events_url":"https://api.github.com/repos/Itseez/opencv/issues/5670/events","html_url":"https://github.com/Itseez/opencv/pull/5670","id":117047145,"number":5670,"title":"Opencv agast tree search proposal for significant codesize reduction with comparative performance","user":{"login":"askourik","id":15856399,"avatar_url":"https://avatars.githubusercontent.com/u/15856399?v=3","gravatar_id":"","url":"https://api.github.com/users/askourik","html_url":"https://github.com/askourik","followers_url":"https://api.github.com/users/askourik/followers","following_url":"https://api.github.com/users/askourik/following{/other_user}","gists_url":"https://api.github.com/users/askourik/gists{/gist_id}","starred_url":"https://api.github.com/users/askourik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/askourik/subscriptions","organizations_url":"https://api.github.com/users/askourik/orgs","repos_url":"https://api.github.com/users/askourik/repos","events_url":"https://api.github.com/users/askourik/events{/privacy}","received_events_url":"https://api.github.com/users/askourik/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"vpisarev","id":2110786,"avatar_url":"https://avatars.githubusercontent.com/u/2110786?v=3","gravatar_id":"","url":"https://api.github.com/users/vpisarev","html_url":"https://github.com/vpisarev","followers_url":"https://api.github.com/users/vpisarev/followers","following_url":"https://api.github.com/users/vpisarev/following{/other_user}","gists_url":"https://api.github.com/users/vpisarev/gists{/gist_id}","starred_url":"https://api.github.com/users/vpisarev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vpisarev/subscriptions","organizations_url":"https://api.github.com/users/vpisarev/orgs","repos_url":"https://api.github.com/users/vpisarev/repos","events_url":"https://api.github.com/users/vpisarev/events{/privacy}","received_events_url":"https://api.github.com/users/vpisarev/received_events","type":"User","site_admin":false},"milestone":null,"comments":15,"created_at":"2015-11-16T03:53:48Z","updated_at":"2015-11-24T12:19:46Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/Itseez/opencv/pulls/5670","html_url":"https://github.com/Itseez/opencv/pull/5670","diff_url":"https://github.com/Itseez/opencv/pull/5670.diff","patch_url":"https://github.com/Itseez/opencv/pull/5670.patch"},"body":"Hi All,\r\nI propose to fix the https://github.com/Itseez/opencv/issues/5669 problem and reduce codesize for AGAST algorithm up to 5-10 times depending on platform. It can be very useful for embedded systems with small memory resources because current AGAST codesize is one of largest in OpenCV. The performance remains comparative (50-200% variation depended on testcase and method). The core of improvements is binary tree condition search from 32-bit table instead of thousands of if-else-goto in previous code. The 32-bit tree leaf format contains two 12-bit absolute table offsets for positive/negative results, 4-bit id of compared node/pixel (can be expanded up to 7 bit if necessary) and 1 bit of comparing result (below or above threshold). The leaf table was generated automatically from current code using Perl script, all performance/ quality tests passed OK. The current proposed branch contains code replacement, but it's easy to derive new class if necessary. Also I have experimental version with even more table codesize reduction (24-bit instead of 32-bit plus relative offsets), but it seems to be slower on RISC processors because of alignments. The further performance optimization is also possible after tree reordering for better cache alignmants (I precerved the current order). Feel free to ask me any questions and proposals about this improvement.\r\nRegards,\r\nAndrey"},"comment":{"url":"https://api.github.com/repos/Itseez/opencv/issues/comments/159250916","html_url":"https://github.com/Itseez/opencv/pull/5670#issuecomment-159250916","issue_url":"https://api.github.com/repos/Itseez/opencv/issues/5670","id":159250916,"user":{"login":"vpisarev","id":2110786,"avatar_url":"https://avatars.githubusercontent.com/u/2110786?v=3","gravatar_id":"","url":"https://api.github.com/users/vpisarev","html_url":"https://github.com/vpisarev","followers_url":"https://api.github.com/users/vpisarev/followers","following_url":"https://api.github.com/users/vpisarev/following{/other_user}","gists_url":"https://api.github.com/users/vpisarev/gists{/gist_id}","starred_url":"https://api.github.com/users/vpisarev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vpisarev/subscriptions","organizations_url":"https://api.github.com/users/vpisarev/orgs","repos_url":"https://api.github.com/users/vpisarev/repos","events_url":"https://api.github.com/users/vpisarev/events{/privacy}","received_events_url":"https://api.github.com/users/vpisarev/received_events","type":"User","site_admin":false},"created_at":"2015-11-24T12:19:46Z","updated_at":"2015-11-24T12:19:46Z","body":"@askourik, @alalek, thanks for solving the datatype issue!\r\n@askourik, regarding the tests. As I see, there is already some test for AGAST: opencv/modules/features2d/test_agast.cpp. If it passes, then may be it's enough, no extra work needed\r\n"}}