{"action":"opened","issue":{"url":"https://api.github.com/repos/mshabunin/test/issues/374","labels_url":"https://api.github.com/repos/mshabunin/test/issues/374/labels{/name}","comments_url":"https://api.github.com/repos/mshabunin/test/issues/374/comments","events_url":"https://api.github.com/repos/mshabunin/test/issues/374/events","html_url":"https://github.com/mshabunin/test/issues/374","id":91231919,"number":374,"title":"Android VideoCapture output format is not clarified and is missing native YUV NV21","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/test/labels/Affected-None","name":"Affected-None","color":"ededed"},{"url":"https://api.github.com/repos/mshabunin/test/labels/auto-transferred","name":"auto-transferred","color":"ededed"},{"url":"https://api.github.com/repos/mshabunin/test/labels/Category-highgui-camera","name":"Category-highgui-camera","color":"ededed"},{"url":"https://api.github.com/repos/mshabunin/test/labels/Priority-Normal","name":"Priority-Normal","color":"bfe5bf"},{"url":"https://api.github.com/repos/mshabunin/test/labels/Status-Open","name":"Status-Open","color":"ededed"},{"url":"https://api.github.com/repos/mshabunin/test/labels/Target--","name":"Target--","color":"ededed"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-06-26T11:49:53Z","updated_at":"2015-06-26T11:49:53Z","closed_at":null,"body":"Converted from http://code.opencv.org/issues/3925\r\n```\n|| by Ayberk Özgür on 2014-09-26 18:48:00\n|| Status: Open\n|| Priority: Normal\n|| Affected: None\n|| Target: -\n|| Category: highgui-camera\n\nAndroid VideoCapture output format is not clarified and is missing native YUV NV21\n===========\nIn cap_android.cpp, the\nCvCapture_Android::retrieveFrame( int outputType ) function takes the\nraw YUV NV21 (yuv420sp) frame and converts it to one of greyscale, RGB\nor RGBA to be output to the outside world (see\nhttps://github.com/Itseez/opencv/blob/master/modules/videoio/src/cap_android.cpp#L428).\nThis is tied to the channel parameter of\nVideoCapture::retrieve(cv::Mat,int) which can take one of\nCV_CAP_ANDROID_GREY_FRAME, CV_CAP_ANDROID_COLOR_FRAME_BGR,\nCV_CAP_ANDROID_COLOR_FRAME_RGB, CV_CAP_ANDROID_COLOR_FRAME_BGRA or\nCV_CAP_ANDROID_COLOR_FRAME_RGBA. This has two problems:\n\n1) Passing the output type to VideoCapture as channel is very\nunintuitive. It should at least be passed as a CV_CAP_ parameter to the\nCvCapture_Android object itself through VideoCapture, something like\nCV_CAP_PROP_ANDROID_OUTPUT_TYPE. If there's a good reason for passing it\nas a channel, then it should be properly documented.\n\n2) YUV NV21 type output is missing. There are good reasons for having it\nas a possible output type, e.g avoiding color space conversions in CPU\naltogether when only drawing it on screen via a GL shader. YUV NV21\noutput support could easily be added in ~15 lines of code since it is\nthe default color space of the raw camera image and it is the only space\nthat is guaranteed to be supported by all Android hardware.\n\n\nHistory\n=======\n|| by Ilya Lavrenov on 2014-09-27 12:24:00\n-   Assignee set to Alexander Smorkalov\n\n\n|| by Ayberk Özgür on 2014-09-29 17:12:00\nPR opened for this: https://github.com/Itseez/opencv/pull/3280\n-   % Done changed from 0 to 100\n\n\n|| by Alexander Smorkalov on 2014-09-30 13:47:00\n-   Pull request set to https://github.com/Itseez/opencv/pull/3280\n\n\n|| by Philip L on 2015-05-24 16:27:00\n-   Status changed from New to Open\n-   % Done changed from 100 to 0\n```"}}