{"action":"opened","issue":{"url":"https://api.github.com/repos/mshabunin/test3/issues/2","labels_url":"https://api.github.com/repos/mshabunin/test3/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/mshabunin/test3/issues/2/comments","events_url":"https://api.github.com/repos/mshabunin/test3/issues/2/events","html_url":"https://github.com/mshabunin/test3/issues/2","id":96611255,"number":2,"title":"icf train code bug","user":{"login":"opencv-pushbot","id":2051563,"avatar_url":"https://avatars.githubusercontent.com/u/2051563?v=3","gravatar_id":"","url":"https://api.github.com/users/opencv-pushbot","html_url":"https://github.com/opencv-pushbot","followers_url":"https://api.github.com/users/opencv-pushbot/followers","following_url":"https://api.github.com/users/opencv-pushbot/following{/other_user}","gists_url":"https://api.github.com/users/opencv-pushbot/gists{/gist_id}","starred_url":"https://api.github.com/users/opencv-pushbot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/opencv-pushbot/subscriptions","organizations_url":"https://api.github.com/users/opencv-pushbot/orgs","repos_url":"https://api.github.com/users/opencv-pushbot/repos","events_url":"https://api.github.com/users/opencv-pushbot/events{/privacy}","received_events_url":"https://api.github.com/users/opencv-pushbot/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/mshabunin/test3/labels/affected:%20master","name":"affected: master","color":"ededed"},{"url":"https://api.github.com/repos/mshabunin/test3/labels/auto-transferred","name":"auto-transferred","color":"ededed"},{"url":"https://api.github.com/repos/mshabunin/test3/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/mshabunin/test3/labels/category:%20xobjdetect","name":"category: xobjdetect","color":"ededed"},{"url":"https://api.github.com/repos/mshabunin/test3/labels/priority:%20normal","name":"priority: normal","color":"ededed"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-07-22T16:36:04Z","updated_at":"2015-07-22T16:36:04Z","closed_at":null,"body":"Transferred from http://code.opencv.org/issues/4007\r\n```\n|| Bruno Nascimento on 2014-11-13 18:01\n|| Priority: Normal\n|| Affected: branch 'master' (3.0-dev)\n|| Category: contrib/xobjdetect\n|| Tracker: Bug\n|| Difficulty: Easy\n|| PR: \n|| Platform: x64 / Windows\n```\n\nicf train code bug\n-----------\n```\naround line 300 of acffeature.cpp\r\nthe code is assuming that the cartToPolar function returns angle degrees from 0 to 180 when in reality returns from 0 to 360 degrees. \r\nThis leads to index out of bounds just a few lines below.\n```\n\nHistory\n-------\n##### Bruno Nascimento on 2014-11-13 18:08\n```\nI changed from:\n\n\n            if (angle < 0)\n                angle += 180;\n\nto...\n\n\n            if (angle > 180)\n                angle -= 180;\n```\n##### be rak on 2014-11-14 07:48\n```\n<pre>\nwhat about angle == 180 or even angle == 360 ?\n</pre>\n\ncurrently it has this (weird) fix:\n<pre>\n\n     // If angle == 180, prevent index overflow\n     if (ind == 6)\n         ind = 5;\n\n</pre>\n\nimho, bin 5 is the wrong response for the 180° or 360° case anyway, so replacing the whole \n\n<pre>\n\n     if (angle ...) angle ...\n     if (ind) ...\n\n</pre>\n\nconstruct by \n\n<pre>\n\n     float angle = angles(row, col);\n     int ind = ((int)(angle / 30)) % 6;\n</pre>\n\nwould make it work for the 360° case, too. (yes, that happens!)\n```\n##### Steven Puttemans on 2014-11-14 08:49\n```\n-   Status changed from New to Done\n```\n##### be rak on 2014-11-14 09:20\n```\n@Steven Puttemans , why is it marked done now ? isn't this a bit early ? it shows up as 'closed' on the issues page, while neither a pr,  nor a cancellation happened (yet).\n```\n##### Steven Puttemans on 2014-11-17 08:54\n```\nExcuse me, that needed to be put on open, not not on done :D\n-   Status changed from Done to Open\n```\n##### Maksim Shabunin on 2015-04-27 09:12\n```\n-   Target version changed from 3.0-beta to 3.0\n```\n##### Vadim Pisarevsky on 2015-04-28 12:05\n```\n-   Category changed from objdetect to contrib/xobjdetect\n```"}}