截取特定区域的屏幕截图
Taking a screenshot of a particular area
寻找一种在C++中截取屏幕上特定区域屏幕截图的方法。(所以不是整个屏幕)然后它应该将其保存为.png .jpg之后与另一个函数一起使用的任何内容。
另外,我将以某种方式将其与openCV一起使用。以为我会提到这一点,也许这是一个有用的细节。
OpenCV无法直接从您的计算机截取屏幕截图。您将需要一个不同的框架/方法来执行此操作。@Ben是正确的,这个链接值得研究。
一旦你读懂了这个图像,你需要把它存储到cv:Mat中,以便你能够对它执行OpenCV操作。
为了在OpenCV中裁剪图像,以下代码片段会有所帮助。
CVMat * imagesource;
// Transform it into the C++ cv::Mat format
cv::Mat image(imagesource);
// Setup a rectangle to define your region of interest
cv::Rect myROI(10, 10, 100, 100);
// Crop the full image to that image contained by the rectangle myROI
// Note that this doesn't copy the data
cv::Mat croppedImage = image(myROI);
相关文章:
- Winapi:屏幕截图未显示在窗口中
- 截取屏幕截图后程序卡住
- C++鼠标单击时的屏幕截图不起作用
- GTKMM:拍摄绘图区域的屏幕截图?
- 有没有办法使用 ofstream 保存屏幕截图?
- 如何使用 DX11 截取屏幕截图?
- avcodec_receive_packet错误(gdi 屏幕截图 + ffmpeg)
- C++屏幕截图 - 如何读取位图?
- 使用QT C 屏幕截图
- 如何将屏幕截图位图转换为 cv::Mat
- QT自动保存使用命名模板的屏幕截图
- C 屏幕截图
- BMP的完整屏幕截图.与块状和保存有关的问题
- 使用OpenCV和C++在按键上截取网络摄像头源的屏幕截图
- DirectX 部分屏幕截图
- 截取屏幕截图,分析它,然后删除它
- WXWIDGETS应用于WXStaticBitMap时,屏幕截图将大部分图像留为空白
- 屏幕截图桌面DirectX C /QT
- 截取特定区域的屏幕截图
- 在Qt上截取选定区域(QRubberBand)的屏幕截图