如何在此视频中解决此无限镜像效果 [英] How do I solve this infinite-mirror-effect in this video
问题描述
我有一个任务是使用OPENCV作为视频源捕获桌面或主动窗口,但结果在输出视频中提供无限镜像效果,有人说它与GetDesktopWindow有关,我也有一个功能从屏幕图像中创建一个名为hwnd2mat的位图
这是在main中:
Hi, i have a task to capture desktop or activewindow using OPENCV as video source, but the result gives infinite-mirror-efect in the output video, someone says it have something to do with the GetDesktopWindow , also i have a function that create a bitmap from the screen image called hwnd2mat
this is inside main :
HWND hwndDesktop = GetDesktopWindow();
int key = 0;
while (key != 30 )
{
Mat src = hwnd2mat(hwndDesktop);
// you can do some image processing here
imshow("output", src);
key = waitKey(30); // you can change wait time
}
ReleaseCapture();
destroyAllWindows();
return 0;
我尝试过:
i使用FindWindow()或FindWindowEx()更改GetDesktopWindow()并使用间谍++找到我不知道什么类,但我不知道如何做到这一点的例子,你能给我一个例子或解决方案吗?非常感激,我已经在这2天苦苦挣扎了。
What I have tried:
i change GetDesktopWindow() with FindWindow() or FindWindowEx() and using Spy++ to find the Class of i don't know what, but i don't know example how i do that, could you please give me an example or a solution for this? appreciate it very much, i've been struggling with this for 2 days.
推荐答案
使用OPENCV捕获桌面或主动窗口 - Google搜索 [ ^ ]。
这篇关于如何在此视频中解决此无限镜像效果的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!