{"action":"opened","issue":{"url":"https://api.github.com/repos/mshabunin/test2/issues/507","labels_url":"https://api.github.com/repos/mshabunin/test2/issues/507/labels{/name}","comments_url":"https://api.github.com/repos/mshabunin/test2/issues/507/comments","events_url":"https://api.github.com/repos/mshabunin/test2/issues/507/events","html_url":"https://github.com/mshabunin/test2/issues/507","id":95195918,"number":507,"title":"gpu:HOGDescriptor cannot support two hog descriptor with different parameters","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/affected:%202.4","name":"affected: 2.4","color":"ededed"},{"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/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/mshabunin/test2/labels/category:%20gpu%20(cuda)","name":"category: gpu (cuda)","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:%20incomplete","name":"status: incomplete","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-15T13:34:55Z","updated_at":"2015-07-15T13:34:55Z","closed_at":null,"body":"Converted from http://code.opencv.org/issues/3748\r\n```\n|| by Zhifei Fang on 2014-06-11 07:45\n|| Status: Incomplete\n|| Priority: Normal\n|| Affected: 2.4.9 (latest release)\n|| Target: -\n|| Category: gpu (cuda)\n|| Tracker: bug\n```\n\ngpu:HOGDescriptor cannot support two hog descriptor with different parameters\n-----------\n```\nIn namespace hog, there are some constants. Defined in hog.cu.\n\nhog.cu line 60~68 :  \n constant int cnbins;  \n constant int cblock_stride_x;  \n constant int cblock_stride_y;  \n constant int cnblocks_win_x;  \n constant int cnblocks_win_y;  \n constant int cblock_hist_size;  \n constant int cblock_hist_size_2up;  \n constant int cdescr_size;  \n constant int cdescr_width;\n\nThese constant assigned by a function called set_up_constants\n\nhog.cu line 90:  \nvoid set_up_constants(int nbins, int block_stride_x, int\nblock_stride_y,  \n int nblocks_win_x, int nblocks_win_y)\n\nIn the hog.cpp (gpu module)  \nThe constructor of gpu:HOGDescriptor (line 132) will call\nset_up_constants\n\nso if user want to set two HOGDescriptor with different parameters, that\nmay cause a problem.  \nThe second will rewrite these global, that make the first HOGDescriptor\ncannot work in the proper way.\n\nI will attach a test file later.\n```\n\nHistory\n-------\n##### by Daniil Osokin on 2014-07-07 03:06\n```\nHi Zhifei, will you provide any tests?\n-   Priority changed from High to Normal\n-   Assignee set to Zhifei Fang\n-   Status changed from New to Incomplete\n-   Category set to gpu (cuda)\n```\n##### by Tran Duong on 2014-10-25 09:38\n```\nI have same problem. I create two model files for detect motobike and\ncar with different parameters. If I use only motobike model to detect,\nthat's no problem (FPS higher than 30). But when I use two model to\ndetect, the program detect very slowly (FPS less 1).  \nNote: this bug don't occur on CPU mode\n```\n##### by Huy Le on 2014-10-27 05:34\n```\nI got the same problem. Please fix it in version 3.0.\n```"}}