{"action":"created","comment":{"url":"https://api.github.com/repos/Itseez/opencv/pulls/comments/30398394","id":30398394,"diff_hunk":"@@ -0,0 +1,397 @@\n+#define WIN32_LEAN_AND_MEAN\n+#include <windows.h>\n+#include <d3d10.h>\n+\n+#include <string>\n+#include <iostream>\n+#include <queue>\n+\n+#include \"opencv2/core.hpp\"\n+#include \"opencv2/core/directx.hpp\"\n+#include \"opencv2/core/ocl.hpp\"\n+#include \"opencv2/imgproc.hpp\"\n+#include \"opencv2/videoio.hpp\"\n+#include \"winapp.hpp\"\n+\n+#pragma comment (lib, \"d3d10.lib\")\n+\n+\n+class D3D10WinApp : public WinApp\n+{\n+public:\n+    D3D10WinApp(int width, int height, std::string& window_name, cv::VideoCapture& cap) :\n+        WinApp(width, height, window_name)\n+    {\n+        m_shutdown = false;\n+        m_mode = 0;\n+        m_modeStr[0] = cv::String(\"No processing\");\n+        m_modeStr[1] = cv::String(\"Processing on CPU\");\n+        m_modeStr[2] = cv::String(\"Processing on GPU\");\n+        m_disableProcessing = false;\n+        m_cap = cap;\n+    }\n+\n+    ~D3D10WinApp() {}\n+\n+    int onClose(void)\n+    {\n+        m_shutdown = true;\n+        cleanup();\n+        ::DestroyWindow(m_hWnd);\n+        return 0;\n+    }\n+\n+    virtual LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)\n+    {\n+        switch (message)\n+        {\n+        case WM_CHAR:\n+            if (wParam >= '0' && wParam <= '2')\n+            {\n+                m_mode = (char)wParam - '0';\n+                return 0;\n+            }\n+            else if (wParam == VK_SPACE)\n+            {\n+                m_disableProcessing = !m_disableProcessing;\n+                return 0;\n+            }\n+            else if (wParam == VK_ESCAPE)\n+            {\n+                return onClose();\n+            }\n+            break;\n+\n+        case WM_CLOSE:\n+            return onClose();\n+\n+        case WM_DESTROY:\n+            ::PostQuitMessage(0);\n+            return 0;\n+        }\n+\n+        return ::DefWindowProc(hWnd, message, wParam, lParam);\n+    }\n+\n+    static float getFps()\n+    {\n+        static std::queue<int64> time_queue;\n+\n+        int64 now = cv::getTickCount();\n+        int64 then = 0;\n+        time_queue.push(now);\n+\n+        if (time_queue.size() >= 2)\n+            then = time_queue.front();\n+\n+        if (time_queue.size() >= 25)\n+            time_queue.pop();\n+\n+        return time_queue.size() * (float)cv::getTickFrequency() / (now - then);\n+    }\n+\n+    int init(void)\n+    {\n+        HRESULT r;\n+\n+        DXGI_SWAP_CHAIN_DESC scd;\n+\n+        ZeroMemory(&scd, sizeof(DXGI_SWAP_CHAIN_DESC));\n+\n+        scd.BufferCount       = 1;                               // one back buffer\n+        scd.BufferDesc.Format = DXGI_FORMAT_R8G8B8A8_UNORM;      // use 32-bit color\n+        scd.BufferDesc.Width  = m_width;                         // set the back buffer width\n+        scd.BufferDesc.Height = m_height;                        // set the back buffer height\n+        scd.BufferUsage       = DXGI_USAGE_RENDER_TARGET_OUTPUT; // how swap chain is to be used\n+        scd.OutputWindow      = m_hWnd;                          // the window to be used\n+        scd.SampleDesc.Count  = 1;                               // how many multisamples\n+        scd.Windowed          = TRUE;                            // windowed/full-screen mode\n+        scd.SwapEffect        = DXGI_SWAP_EFFECT_DISCARD;\n+        scd.Flags             = DXGI_SWAP_CHAIN_FLAG_ALLOW_MODE_SWITCH; // allow full-screen switching\n+\n+        r = ::D3D10CreateDeviceAndSwapChain(\n+                NULL,\n+                D3D10_DRIVER_TYPE_HARDWARE,\n+                NULL,\n+                0,\n+                D3D10_SDK_VERSION,\n+                &scd,\n+                &m_pD3D10SwapChain,\n+                &m_pD3D10Dev);\n+        if (FAILED(r))\n+        {\n+            return -1;\n+        }\n+\n+        r = m_pD3D10SwapChain->GetBuffer(0, __uuidof(ID3D10Texture2D), (LPVOID*)&m_pBackBuffer);\n+        if (FAILED(r))\n+        {\n+            return -1;\n+        }\n+\n+        r = m_pD3D10Dev->CreateRenderTargetView(m_pBackBuffer, NULL, &m_pRenderTarget);\n+        if (FAILED(r))\n+        {\n+            return -1;\n+        }\n+\n+        m_pD3D10Dev->OMSetRenderTargets(1, &m_pRenderTarget, NULL);\n+\n+        D3D10_VIEWPORT viewport;\n+        ZeroMemory(&viewport, sizeof(D3D10_VIEWPORT));\n+\n+        viewport.Width    = m_width;\n+        viewport.Height   = m_height;\n+        viewport.MinDepth = 0.0f;\n+        viewport.MaxDepth = 0.0f;\n+\n+        m_pD3D10Dev->RSSetViewports(1, &viewport);\n+\n+        D3D10_TEXTURE2D_DESC desc = { 0 };\n+\n+        desc.Width            = m_width;\n+        desc.Height           = m_height;\n+        desc.MipLevels        = 1;\n+        desc.ArraySize        = 1;\n+        desc.Format           = DXGI_FORMAT_R8G8B8A8_UNORM;\n+        desc.SampleDesc.Count = 1;\n+        desc.BindFlags        = D3D10_BIND_SHADER_RESOURCE;\n+        desc.Usage            = D3D10_USAGE_DYNAMIC;\n+        desc.CPUAccessFlags   = D3D10_CPU_ACCESS_WRITE;\n+\n+        r = m_pD3D10Dev->CreateTexture2D(&desc, NULL, &m_pSurface);\n+        if (FAILED(r))\n+        {\n+            std::cerr << \"Can't create texture with input image\" << std::endl;\n+            return -1;\n+        }\n+\n+        if (cv::ocl::haveOpenCL())\n+        {\n+            m_oclCtx = cv::directx::ocl::initializeContextFromD3D10Device(m_pD3D10Dev);\n+        }\n+\n+        m_oclDevName = cv::ocl::useOpenCL() ?\n+            cv::ocl::Context::getDefault().device(0).name() :\n+            \"No OpenCL device\";\n+\n+        return 0;\n+    } // init()\n+\n+\n+    int get_surface(ID3D10Texture2D** ppSurface)\n+    {\n+        HRESULT r;\n+\n+        if (!m_cap.read(m_frame_bgr))\n+            return -1;\n+\n+        cv::cvtColor(m_frame_bgr, m_frame_rgba, CV_RGB2BGRA);\n+\n+        UINT subResource = ::D3D10CalcSubresource(0, 0, 1);\n+\n+        D3D10_MAPPED_TEXTURE2D mappedTex;\n+        r = m_pSurface->Map(subResource, D3D10_MAP_WRITE_DISCARD, 0, &mappedTex);\n+        if (FAILED(r))\n+        {\n+            return r;\n+        }\n+\n+        cv::Mat m(m_height, m_width, CV_8UC4, mappedTex.pData, (int)mappedTex.RowPitch);\n+        // copy video frame data to surface\n+        m_frame_rgba.copyTo(m);\n+\n+        m_pSurface->Unmap(subResource);\n+\n+        *ppSurface = m_pSurface;\n+\n+        return 0;\n+    }\n+\n+\n+    void print_info(ID3D10Texture2D* pSurface, int mode, float fps, cv::String oclDevName)\n+    {\n+        HRESULT r;\n+\n+        UINT subResource = ::D3D10CalcSubresource(0, 0, 1);\n+\n+        D3D10_MAPPED_TEXTURE2D mappedTex;\n+        r = pSurface->Map(subResource, D3D10_MAP_WRITE_DISCARD, 0, &mappedTex);\n+        if (FAILED(r))\n+        {\n+            return;\n+        }\n+\n+        cv::Mat m(m_height, m_width, CV_8UC4, mappedTex.pData, (int)mappedTex.RowPitch);\n+\n+        cv::String strMode = cv::format(\"%s\", m_modeStr[mode].c_str());\n+        cv::String strFPS = cv::format(\"%2.1f\", fps);\n+        cv::String strDevName = cv::format(\"%s\", oclDevName.c_str());\n+\n+        cv::putText(m, strMode, cv::Point(0, 16), 1, 0.8, cv::Scalar(0, 0, 0));\n+        cv::putText(m, strFPS, cv::Point(0, 32), 1, 0.8, cv::Scalar(0, 0, 0));\n+        cv::putText(m, strDevName, cv::Point(0, 48), 1, 0.8, cv::Scalar(0, 0, 0));\n+\n+        m_pSurface->Unmap(subResource);\n+\n+        return;\n+    }\n+\n+\n+    int render()\n+    {\n+        try\n+        {\n+            if (m_shutdown)\n+                return 0;\n+\n+            HRESULT r;\n+            ID3D10Texture2D* pSurface;\n+\n+            r = get_surface(&pSurface);\n+            if (FAILED(r))\n+            {\n+                return -1;\n+            }\n+\n+            switch (m_mode)\n+            {\n+                case 0:\n+                    // no processing\n+                    break;\n+\n+                case 1:\n+                {\n+                    // process video frame on CPU\n+                    UINT subResource = ::D3D10CalcSubresource(0, 0, 1);\n+\n+                    D3D10_MAPPED_TEXTURE2D mappedTex;\n+                    r = m_pSurface->Map(subResource, D3D10_MAP_WRITE_DISCARD, 0, &mappedTex);\n+                    if (FAILED(r))\n+                    {\n+                        return r;\n+                    }\n+\n+                    cv::Mat m(m_height, m_width, CV_8UC4, mappedTex.pData, (int)mappedTex.RowPitch);\n+\n+                    if (!m_disableProcessing)\n+                    {\n+                        // blur D3D10 surface with OpenCV on CPU\n+                        cv::blur(m, m, cv::Size(15, 15), cv::Point(-7, -7));\n+                    }\n+\n+                    m_pSurface->Unmap(subResource);\n+\n+                    break;\n+                }\n+\n+                case 2:\n+                {\n+                    // process video frame on GPU\n+                    cv::UMat u;\n+\n+                    cv::directx::convertFromD3D10Texture2D(pSurface, u);\n+\n+                    if (!m_disableProcessing)\n+                    {\n+                        // blur D3D9 surface with OpenCV on GPU with OpenCL\n+                        cv::blur(u, u, cv::Size(15, 15), cv::Point(-7, -7));\n+                    }\n+\n+                    cv::directx::convertToD3D10Texture2D(u, pSurface);\n+\n+                    break;\n+                }\n+\n+            } // switch\n+\n+            print_info(pSurface, m_mode, getFps(), m_oclDevName);\n+\n+            // traditional DX render pipeline:\n+            //   BitBlt surface to backBuffer and flip backBuffer to frontBuffer\n+            m_pD3D10Dev->CopyResource(m_pBackBuffer, pSurface);\n+\n+            // present the back buffer contents to the display\n+            // switch the back buffer and the front buffer\n+            r = m_pD3D10SwapChain->Present(0, 0);\n+            if (FAILED(r))\n+            {\n+                return -1;\n+            }\n+        }\n+\n+        catch (cv::Exception& e)\n+        {\n+            std::cerr << \"Exception: \" << e.what() << std::endl;\n+            return 10;\n+        }\n+\n+        return 0;\n+    }\n+\n+    int cleanup(void)\n+    {\n+        SAFE_RELEASE(m_pSurface);\n+        SAFE_RELEASE(m_pBackBuffer);\n+        SAFE_RELEASE(m_pD3D10SwapChain);\n+        SAFE_RELEASE(m_pRenderTarget);\n+        SAFE_RELEASE(m_pD3D10Dev);\n+        return 0;\n+    }\n+\n+private:\n+    bool                    m_shutdown;\n+    int                     m_mode;\n+    cv::String              m_modeStr[3];\n+    int                     m_disableProcessing;\n+    ID3D10Device*           m_pD3D10Dev;\n+    IDXGISwapChain*         m_pD3D10SwapChain;\n+    ID3D10Texture2D*        m_pBackBuffer;\n+    ID3D10Texture2D*        m_pSurface;\n+    ID3D10RenderTargetView* m_pRenderTarget;\n+    cv::VideoCapture        m_cap;\n+    cv::Mat                 m_frame_bgr;\n+    cv::Mat                 m_frame_rgba;\n+    cv::ocl::Context        m_oclCtx;\n+    cv::String              m_oclPlatformName;\n+    cv::String              m_oclDevName;\n+};\n+\n+\n+using namespace cv;\n+\n+int main(int argc, char** argv)\n+{\n+    cv::VideoCapture cap;\n+\n+    if (argc > 1)\n+    {\n+        cap.open(argv[1]);\n+    }\n+    else\n+        cap.open(0);\n+\n+    int width = (int)cap.get(CAP_PROP_FRAME_WIDTH);\n+    int height = (int)cap.get(CAP_PROP_FRAME_HEIGHT);\n+    std::string wndname = \"D3D10 Window\";\n+\n+    D3D10WinApp app(width, height, wndname, cap);\n+\n+    try\n+    {\n+        app.Create();\n+        return app.run();\n+    }\n+\n+    catch (cv::Exception& e)\n+    {\n+        std::cerr << \"Exception: \" << e.what() << std::endl;\n+        return 10;\n+    }\n+\n+    catch (...)\n+    {\n+        std::cerr << \"FATAL ERROR: Unknown exception\" << std::endl;\n+        return 11;\n+    }\n+}","path":"samples/directx/d3d10_opencl.cpp","position":397,"original_position":397,"commit_id":"3cb4954d70324fa3e1405fd90d279eec21dc99ba","original_commit_id":"3cb4954d70324fa3e1405fd90d279eec21dc99ba","user":{"login":"alalek","id":4981219,"avatar_url":"https://avatars.githubusercontent.com/u/4981219?v=3","gravatar_id":"","url":"https://api.github.com/users/alalek","html_url":"https://github.com/alalek","followers_url":"https://api.github.com/users/alalek/followers","following_url":"https://api.github.com/users/alalek/following{/other_user}","gists_url":"https://api.github.com/users/alalek/gists{/gist_id}","starred_url":"https://api.github.com/users/alalek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alalek/subscriptions","organizations_url":"https://api.github.com/users/alalek/orgs","repos_url":"https://api.github.com/users/alalek/repos","events_url":"https://api.github.com/users/alalek/events{/privacy}","received_events_url":"https://api.github.com/users/alalek/received_events","type":"User","site_admin":false},"body":"Code duplication in `main` body (except name and App class)","created_at":"2015-05-15T10:19:50Z","updated_at":"2015-05-15T10:19:50Z","html_url":"https://github.com/Itseez/opencv/pull/4016#discussion_r30398394","pull_request_url":"https://api.github.com/repos/Itseez/opencv/pulls/4016","_links":{"self":{"href":"https://api.github.com/repos/Itseez/opencv/pulls/comments/30398394"},"html":{"href":"https://github.com/Itseez/opencv/pull/4016#discussion_r30398394"},"pull_request":{"href":"https://api.github.com/repos/Itseez/opencv/pulls/4016"}}},"pull_request":{"url":"https://api.github.com/repos/Itseez/opencv/pulls/4016","id":35372466,"html_url":"https://github.com/Itseez/opencv/pull/4016","diff_url":"https://github.com/Itseez/opencv/pull/4016.diff","patch_url":"https://github.com/Itseez/opencv/pull/4016.patch","issue_url":"https://api.github.com/repos/Itseez/opencv/issues/4016","number":4016,"state":"open","locked":false,"title":"directx opencl interop samples (with copy from opencl image2d to buffer)","user":{"login":"vladimir-dudnik","id":9465398,"avatar_url":"https://avatars.githubusercontent.com/u/9465398?v=3","gravatar_id":"","url":"https://api.github.com/users/vladimir-dudnik","html_url":"https://github.com/vladimir-dudnik","followers_url":"https://api.github.com/users/vladimir-dudnik/followers","following_url":"https://api.github.com/users/vladimir-dudnik/following{/other_user}","gists_url":"https://api.github.com/users/vladimir-dudnik/gists{/gist_id}","starred_url":"https://api.github.com/users/vladimir-dudnik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vladimir-dudnik/subscriptions","organizations_url":"https://api.github.com/users/vladimir-dudnik/orgs","repos_url":"https://api.github.com/users/vladimir-dudnik/repos","events_url":"https://api.github.com/users/vladimir-dudnik/events{/privacy}","received_events_url":"https://api.github.com/users/vladimir-dudnik/received_events","type":"User","site_admin":false},"body":"a simplified version of directx-opencl interoperability samples (should replace existing samples if everithing is ok)","created_at":"2015-05-13T21:26:14Z","updated_at":"2015-05-15T10:19:50Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e86f7f6cd7a2c40ca74cb02d672d694665fee828","assignee":{"login":"alalek","id":4981219,"avatar_url":"https://avatars.githubusercontent.com/u/4981219?v=3","gravatar_id":"","url":"https://api.github.com/users/alalek","html_url":"https://github.com/alalek","followers_url":"https://api.github.com/users/alalek/followers","following_url":"https://api.github.com/users/alalek/following{/other_user}","gists_url":"https://api.github.com/users/alalek/gists{/gist_id}","starred_url":"https://api.github.com/users/alalek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alalek/subscriptions","organizations_url":"https://api.github.com/users/alalek/orgs","repos_url":"https://api.github.com/users/alalek/repos","events_url":"https://api.github.com/users/alalek/events{/privacy}","received_events_url":"https://api.github.com/users/alalek/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/Itseez/opencv/pulls/4016/commits","review_comments_url":"https://api.github.com/repos/Itseez/opencv/pulls/4016/comments","review_comment_url":"https://api.github.com/repos/Itseez/opencv/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Itseez/opencv/issues/4016/comments","statuses_url":"https://api.github.com/repos/Itseez/opencv/statuses/3cb4954d70324fa3e1405fd90d279eec21dc99ba","head":{"label":"vladimir-dudnik:directx-opencl-sample","ref":"directx-opencl-sample","sha":"3cb4954d70324fa3e1405fd90d279eec21dc99ba","user":{"login":"vladimir-dudnik","id":9465398,"avatar_url":"https://avatars.githubusercontent.com/u/9465398?v=3","gravatar_id":"","url":"https://api.github.com/users/vladimir-dudnik","html_url":"https://github.com/vladimir-dudnik","followers_url":"https://api.github.com/users/vladimir-dudnik/followers","following_url":"https://api.github.com/users/vladimir-dudnik/following{/other_user}","gists_url":"https://api.github.com/users/vladimir-dudnik/gists{/gist_id}","starred_url":"https://api.github.com/users/vladimir-dudnik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vladimir-dudnik/subscriptions","organizations_url":"https://api.github.com/users/vladimir-dudnik/orgs","repos_url":"https://api.github.com/users/vladimir-dudnik/repos","events_url":"https://api.github.com/users/vladimir-dudnik/events{/privacy}","received_events_url":"https://api.github.com/users/vladimir-dudnik/received_events","type":"User","site_admin":false},"repo":{"id":25978796,"name":"opencv","full_name":"vladimir-dudnik/opencv","owner":{"login":"vladimir-dudnik","id":9465398,"avatar_url":"https://avatars.githubusercontent.com/u/9465398?v=3","gravatar_id":"","url":"https://api.github.com/users/vladimir-dudnik","html_url":"https://github.com/vladimir-dudnik","followers_url":"https://api.github.com/users/vladimir-dudnik/followers","following_url":"https://api.github.com/users/vladimir-dudnik/following{/other_user}","gists_url":"https://api.github.com/users/vladimir-dudnik/gists{/gist_id}","starred_url":"https://api.github.com/users/vladimir-dudnik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vladimir-dudnik/subscriptions","organizations_url":"https://api.github.com/users/vladimir-dudnik/orgs","repos_url":"https://api.github.com/users/vladimir-dudnik/repos","events_url":"https://api.github.com/users/vladimir-dudnik/events{/privacy}","received_events_url":"https://api.github.com/users/vladimir-dudnik/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/vladimir-dudnik/opencv","description":"Open Source Computer Vision Library","fork":true,"url":"https://api.github.com/repos/vladimir-dudnik/opencv","forks_url":"https://api.github.com/repos/vladimir-dudnik/opencv/forks","keys_url":"https://api.github.com/repos/vladimir-dudnik/opencv/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vladimir-dudnik/opencv/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vladimir-dudnik/opencv/teams","hooks_url":"https://api.github.com/repos/vladimir-dudnik/opencv/hooks","issue_events_url":"https://api.github.com/repos/vladimir-dudnik/opencv/issues/events{/number}","events_url":"https://api.github.com/repos/vladimir-dudnik/opencv/events","assignees_url":"https://api.github.com/repos/vladimir-dudnik/opencv/assignees{/user}","branches_url":"https://api.github.com/repos/vladimir-dudnik/opencv/branches{/branch}","tags_url":"https://api.github.com/repos/vladimir-dudnik/opencv/tags","blobs_url":"https://api.github.com/repos/vladimir-dudnik/opencv/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vladimir-dudnik/opencv/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vladimir-dudnik/opencv/git/refs{/sha}","trees_url":"https://api.github.com/repos/vladimir-dudnik/opencv/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vladimir-dudnik/opencv/statuses/{sha}","languages_url":"https://api.github.com/repos/vladimir-dudnik/opencv/languages","stargazers_url":"https://api.github.com/repos/vladimir-dudnik/opencv/stargazers","contributors_url":"https://api.github.com/repos/vladimir-dudnik/opencv/contributors","subscribers_url":"https://api.github.com/repos/vladimir-dudnik/opencv/subscribers","subscription_url":"https://api.github.com/repos/vladimir-dudnik/opencv/subscription","commits_url":"https://api.github.com/repos/vladimir-dudnik/opencv/commits{/sha}","git_commits_url":"https://api.github.com/repos/vladimir-dudnik/opencv/git/commits{/sha}","comments_url":"https://api.github.com/repos/vladimir-dudnik/opencv/comments{/number}","issue_comment_url":"https://api.github.com/repos/vladimir-dudnik/opencv/issues/comments{/number}","contents_url":"https://api.github.com/repos/vladimir-dudnik/opencv/contents/{+path}","compare_url":"https://api.github.com/repos/vladimir-dudnik/opencv/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vladimir-dudnik/opencv/merges","archive_url":"https://api.github.com/repos/vladimir-dudnik/opencv/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vladimir-dudnik/opencv/downloads","issues_url":"https://api.github.com/repos/vladimir-dudnik/opencv/issues{/number}","pulls_url":"https://api.github.com/repos/vladimir-dudnik/opencv/pulls{/number}","milestones_url":"https://api.github.com/repos/vladimir-dudnik/opencv/milestones{/number}","notifications_url":"https://api.github.com/repos/vladimir-dudnik/opencv/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vladimir-dudnik/opencv/labels{/name}","releases_url":"https://api.github.com/repos/vladimir-dudnik/opencv/releases{/id}","created_at":"2014-10-30T16:07:21Z","updated_at":"2015-05-08T09:19:21Z","pushed_at":"2015-05-14T09:08:45Z","git_url":"git://github.com/vladimir-dudnik/opencv.git","ssh_url":"git@github.com:vladimir-dudnik/opencv.git","clone_url":"https://github.com/vladimir-dudnik/opencv.git","svn_url":"https://github.com/vladimir-dudnik/opencv","homepage":"opencv.org","size":439925,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"Itseez:master","ref":"master","sha":"4743184078659d4bcf43c363efd2aa430e4786ff","user":{"login":"Itseez","id":1786446,"avatar_url":"https://avatars.githubusercontent.com/u/1786446?v=3","gravatar_id":"","url":"https://api.github.com/users/Itseez","html_url":"https://github.com/Itseez","followers_url":"https://api.github.com/users/Itseez/followers","following_url":"https://api.github.com/users/Itseez/following{/other_user}","gists_url":"https://api.github.com/users/Itseez/gists{/gist_id}","starred_url":"https://api.github.com/users/Itseez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Itseez/subscriptions","organizations_url":"https://api.github.com/users/Itseez/orgs","repos_url":"https://api.github.com/users/Itseez/repos","events_url":"https://api.github.com/users/Itseez/events{/privacy}","received_events_url":"https://api.github.com/users/Itseez/received_events","type":"Organization","site_admin":false},"repo":{"id":5108051,"name":"opencv","full_name":"Itseez/opencv","owner":{"login":"Itseez","id":1786446,"avatar_url":"https://avatars.githubusercontent.com/u/1786446?v=3","gravatar_id":"","url":"https://api.github.com/users/Itseez","html_url":"https://github.com/Itseez","followers_url":"https://api.github.com/users/Itseez/followers","following_url":"https://api.github.com/users/Itseez/following{/other_user}","gists_url":"https://api.github.com/users/Itseez/gists{/gist_id}","starred_url":"https://api.github.com/users/Itseez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Itseez/subscriptions","organizations_url":"https://api.github.com/users/Itseez/orgs","repos_url":"https://api.github.com/users/Itseez/repos","events_url":"https://api.github.com/users/Itseez/events{/privacy}","received_events_url":"https://api.github.com/users/Itseez/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Itseez/opencv","description":"Open Source Computer Vision Library","fork":false,"url":"https://api.github.com/repos/Itseez/opencv","forks_url":"https://api.github.com/repos/Itseez/opencv/forks","keys_url":"https://api.github.com/repos/Itseez/opencv/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Itseez/opencv/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Itseez/opencv/teams","hooks_url":"https://api.github.com/repos/Itseez/opencv/hooks","issue_events_url":"https://api.github.com/repos/Itseez/opencv/issues/events{/number}","events_url":"https://api.github.com/repos/Itseez/opencv/events","assignees_url":"https://api.github.com/repos/Itseez/opencv/assignees{/user}","branches_url":"https://api.github.com/repos/Itseez/opencv/branches{/branch}","tags_url":"https://api.github.com/repos/Itseez/opencv/tags","blobs_url":"https://api.github.com/repos/Itseez/opencv/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Itseez/opencv/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Itseez/opencv/git/refs{/sha}","trees_url":"https://api.github.com/repos/Itseez/opencv/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Itseez/opencv/statuses/{sha}","languages_url":"https://api.github.com/repos/Itseez/opencv/languages","stargazers_url":"https://api.github.com/repos/Itseez/opencv/stargazers","contributors_url":"https://api.github.com/repos/Itseez/opencv/contributors","subscribers_url":"https://api.github.com/repos/Itseez/opencv/subscribers","subscription_url":"https://api.github.com/repos/Itseez/opencv/subscription","commits_url":"https://api.github.com/repos/Itseez/opencv/commits{/sha}","git_commits_url":"https://api.github.com/repos/Itseez/opencv/git/commits{/sha}","comments_url":"https://api.github.com/repos/Itseez/opencv/comments{/number}","issue_comment_url":"https://api.github.com/repos/Itseez/opencv/issues/comments{/number}","contents_url":"https://api.github.com/repos/Itseez/opencv/contents/{+path}","compare_url":"https://api.github.com/repos/Itseez/opencv/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Itseez/opencv/merges","archive_url":"https://api.github.com/repos/Itseez/opencv/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Itseez/opencv/downloads","issues_url":"https://api.github.com/repos/Itseez/opencv/issues{/number}","pulls_url":"https://api.github.com/repos/Itseez/opencv/pulls{/number}","milestones_url":"https://api.github.com/repos/Itseez/opencv/milestones{/number}","notifications_url":"https://api.github.com/repos/Itseez/opencv/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Itseez/opencv/labels{/name}","releases_url":"https://api.github.com/repos/Itseez/opencv/releases{/id}","created_at":"2012-07-19T09:40:17Z","updated_at":"2015-05-15T05:09:58Z","pushed_at":"2015-05-14T21:16:31Z","git_url":"git://github.com/Itseez/opencv.git","ssh_url":"git@github.com:Itseez/opencv.git","clone_url":"https://github.com/Itseez/opencv.git","svn_url":"https://github.com/Itseez/opencv","homepage":"opencv.org","size":1105999,"stargazers_count":5343,"watchers_count":5343,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":4904,"mirror_url":null,"open_issues_count":34,"forks":4904,"open_issues":34,"watchers":5343,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Itseez/opencv/pulls/4016"},"html":{"href":"https://github.com/Itseez/opencv/pull/4016"},"issue":{"href":"https://api.github.com/repos/Itseez/opencv/issues/4016"},"comments":{"href":"https://api.github.com/repos/Itseez/opencv/issues/4016/comments"},"review_comments":{"href":"https://api.github.com/repos/Itseez/opencv/pulls/4016/comments"},"review_comment":{"href":"https://api.github.com/repos/Itseez/opencv/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Itseez/opencv/pulls/4016/commits"},"statuses":{"href":"https://api.github.com/repos/Itseez/opencv/statuses/3cb4954d70324fa3e1405fd90d279eec21dc99ba"}}}}