Module: OpenCV::GUI
- Defined in:
- ext/opencv/gui.cpp,
ext/opencv/window.cpp,
ext/opencv/trackbar.cpp,
ext/opencv/mouseevent.cpp
Defined Under Namespace
Classes: MouseEvent, Trackbar, Window
Class Method Summary collapse
-
.wait_key(delay = 0) ⇒ Number
Waits for a pressed key.
Class Method Details
.wait_key(delay = 0) ⇒ Number
Waits for a pressed key.
34 35 36 37 38 39 40 41 42 43 44 45 46 47 |
# File 'ext/opencv/gui.cpp', line 34
VALUE
rb_wait_key(int argc, VALUE *argv, VALUE self)
{
VALUE delay;
rb_scan_args(argc, argv, "01", &delay);
int keycode = 0;
try {
keycode = cvWaitKey(IF_INT(delay, 0));
}
catch (cv::Exception& e) {
raise_cverror(e);
}
return (keycode < 0) ? Qnil : INT2NUM(keycode);
}
|