Skip to content

Commit 27a1a2c

Browse files
committed
add highgui imshow waitKey stub
1 parent 9d8814b commit 27a1a2c

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

highgui/include/opencv2/highgui/highgui.hpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,10 @@ CV_EXPORTS_W Mat imdecode(InputArray buf, int flags);
5353

5454
CV_EXPORTS_W bool imencode(const String& ext, InputArray img, CV_OUT std::vector<uchar>& buf, const std::vector<int>& params = std::vector<int>());
5555

56+
CV_EXPORTS_W void imshow(const String& winname, InputArray mat);
57+
58+
CV_EXPORTS_W int waitKey(int delay = 0);
59+
5660
} // namespace cv
5761

5862
#endif // OPENCV_HIGHGUI_HPP

highgui/src/highgui.cpp

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -418,4 +418,17 @@ bool imencode(const String& ext, InputArray _img, std::vector<uchar>& buf, const
418418
return success;
419419
}
420420

421+
void imshow(const String& winname, InputArray mat)
422+
{
423+
fprintf(stderr, "imshow save image to %s.png", winname.c_str());
424+
imwrite(winname + ".png", mat);
425+
}
426+
427+
int waitKey(int delay)
428+
{
429+
(void)delay;
430+
fprintf(stderr, "waitKey stub");
431+
return -1;
432+
}
433+
421434
} // namespace cv

0 commit comments

Comments
 (0)