#pragma once #include #include #include #include #include #include class ScreenShot { private: Display* display = nullptr; Window root; XWindowAttributes window_attributes; XImage* ximg = nullptr; XShmSegmentInfo shminfo; int x, y, width, height; bool init; public: ScreenShot(); ~ScreenShot(); void operator() (cv::Mat& cvimg); };