{"action":"opened","issue":{"url":"https://api.github.com/repos/mshabunin/test2/issues/115","labels_url":"https://api.github.com/repos/mshabunin/test2/issues/115/labels{/name}","comments_url":"https://api.github.com/repos/mshabunin/test2/issues/115/comments","events_url":"https://api.github.com/repos/mshabunin/test2/issues/115/events","html_url":"https://github.com/mshabunin/test2/issues/115","id":95433995,"number":115,"title":"YUV to Gray conversion","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:%20documentation","name":"category: documentation","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"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-07-16T13:33:22Z","updated_at":"2015-07-16T13:33:23Z","closed_at":null,"body":"Transferred from http://code.opencv.org/issues/1910\r\n```\n|| Alexander Serebryakov on 2012-05-09 07:57\n|| Priority: Normal\n|| Affected: None\n|| Category: documentation\n|| Tracker: Feature\n|| Difficulty: None\n|| PR: None\n|| Platform: None / None\n```\n\nYUV to Gray conversion\n-----------\n```\nSome kinds of cameras, used in Android based devices give an image in YUV format.\r\nFeature detection algorithms usually work with Gray images. Thus it is necessary to convert image\r\nto RGB and after it to Gray. Cost of this conversion is quite high, so it could be much easier to convert YUV image directly to Gray.\n```\n\nHistory\n-------\n##### Andrey Kamaev on 2012-05-10 09:23\n```\nOpenCV 2.4.0 already has all the functionality:\r\n\r\n# For @YUV888@ you can just call @cv::extractChannel@\r\n# For packed YUV formats you can use @cv::cvtColor@ with one of:\r\n#* @COLOR_YUV2GRAY_420@\r\n#* @COLOR_YUV2GRAY_UYVY@\r\n#* @COLOR_YUV2GRAY_YUY2@\r\n\r\nThe only issue is that a lot of existing conversion types are undocumented.\n-   Category set to documentation\n```\n##### Andrey Kamaev on 2012-05-31 12:03\n```\n-   Target version set to 2.4.2\n-   Assignee set to Andrey Kamaev\n```\n##### Adi Shavit on 2012-06-06 10:52\n```\nAlexander Serebryakov wrote:\r\n> Some kinds of cameras, used in Android based devices give an image in YUV format.\r\n> Feature detection algorithms usually work with Gray images. Thus it is necessary to convert image\r\n> to RGB and after it to Gray. Cost of this conversion is quite high, so it could be much easier to convert YUV image directly to Gray.\r\n\r\nActually, YUV420 can be provide direct access to its grey-channel without any copying.\n```\n##### Andrey Kamaev on 2012-06-06 10:56\n```\n> Actually, YUV420 can be provide direct access to its grey-channel without any copying.\r\n\r\nSurprisingly, it is already implemented without copying ;)\n```\n##### Alexander Serebryakov on 2012-06-10 07:25\n```\nYes, I understand it, but sometimes end users of the library do not know how actually YUV420 image is stored in the cv::Mat.\r\nThat's why I asked to provide a simple interface for YUV420 to GRAY conversion.\n```\n##### David Ing on 2012-06-18 02:20\n```\nSome people may be unaware that the Y-channel +is+ gray.\r\n\r\n    http://en.wikipedia.org/wiki/YUV\r\n\r\n:)\n```\n##### Andrey Kamaev on 2012-06-25 09:21\n```\n-   Target version deleted (2.4.2)\n```\n##### Andrey Kamaev on 2012-10-22 08:48\n```\n-   Assignee deleted (Andrey Kamaev)\n```"}}