OPENCV Desktop Capture

前端 未结 3 465
鱼传尺愫
鱼传尺愫 2020-12-21 13:05

How to capture the desktop in OpenCV (ie. turn a bitmap into a Mat)?

Hello,

Can anyone explain to me how I would use this code in OpenCV to capture the deskt

3条回答
  •  礼貌的吻别
    2020-12-21 13:38

    It seems you forgot to capture the return of hwnd2mat():

    HWND hwndDesktop = GetDesktopWindow();
    Mat src = hwnd2mat(hwndDesktop);
    imshow("output", src);
    waitKey(0);
    

提交回复
热议问题