i'm just starting to learn to use openCV and windows.h in c++ and i wanted to learn to play with images. I found online
HWND hwndDesktop = GetDesktopWindow();
Mat src = hwnd2mat(hwndDesktop);
imshow("output", src);
waitKey(0);
this bit of code to get a screenshot, but when i tried it, it said that identifier "hwnd2mat" is undefined and i found nothing online. Is it because i didn't install opencv correctly? this is my try
#include <iostream>
#include <opencv2/opencv.hpp>
#include <Windows.h>
using namespace std;
using namespace cv;
int main()
{
HWND num = GetDesktopWindow();
Mat src = hwnd2mat(num);
return 0;
}