OpenCV
Simple copy and save in cv::imshow() 간단하게 이미지 복사, 저장 하기
J-sean
2019. 11. 17. 11:07
반응형
This is a Windows backend only function but you can simply copy or save the image displayed with cv::imshow().
cv::imshow()로 이미지를 출력할 때 출력된 이미지를 간단히 클립 보드에 복사하거나 파일로 저장 할 수 있다.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | #include <opencv2/opencv.hpp> using namespace std; using namespace cv; int main(int argc, char** argv) { Mat src = imread("matera.jpg"); if (src.empty()) { cerr << "Image load failed." << endl; return 0; } imshow("src", src); waitKey(0); return 0; } |
[Windows backend only]
- Pressing Ctrl+C will copy the image to the clipboard.
- Pressing Ctrl+S will show a dialog to save the image
반응형