mirror of
https://github.com/ruby-opencv/ruby-opencv
synced 2023-03-27 23:22:12 -04:00
add some create window options
This commit is contained in:
parent
3a08bc621e
commit
efc919fe4c
3 changed files with 8 additions and 1 deletions
|
@ -320,6 +320,8 @@ init_ruby_module()
|
|||
|
||||
/* Flags of window */
|
||||
rb_define_const(rb_module, "CV_WINDOW_AUTOSIZE", INT2FIX(CV_WINDOW_AUTOSIZE));
|
||||
rb_define_const(rb_module, "CV_WINDOW_NORMAL", INT2FIX(CV_WINDOW_NORMAL));
|
||||
rb_define_const(rb_module, "CV_WINDOW_OPENGL", INT2FIX(CV_WINDOW_OPENGL));
|
||||
|
||||
/* Object detection mode */
|
||||
rb_define_const(rb_module, "CV_HAAR_DO_CANNY_PRUNING", INT2FIX(CV_HAAR_DO_CANNY_PRUNING));
|
||||
|
|
|
@ -61,8 +61,11 @@ window_free(void *ptr)
|
|||
* @overload new(name, flags = CV_WINDOW_AUTOSIZE)
|
||||
* @param name [String] Name of the window in the window caption that may be used as a window identifier.
|
||||
* @param flags [Integer] Flags of the window. The supported flags are:
|
||||
* * CVWINDOW_AUTOSIZE - If this is set, the window size is automatically adjusted
|
||||
* * CV_WINDOW_AUTOSIZE - If this is set, the window size is automatically adjusted
|
||||
* to fit the displayed image, and you cannot change the window size manually.
|
||||
* * CV_WINDOW_NORMAL - If this is set, the user can resize the window (no constraint).
|
||||
* * CV_WINDOW_OPENGL - If this is set, the window will be created with OpenGL support.
|
||||
* @opencv_func cvNamedWindow
|
||||
*/
|
||||
VALUE
|
||||
rb_initialize(int argc, VALUE *argv, VALUE self)
|
||||
|
|
|
@ -149,7 +149,9 @@ class TestOpenCV < OpenCVTestCase
|
|||
assert_equal(4, CV_FM_LMEDS)
|
||||
|
||||
# Flags of window
|
||||
assert_equal(0, CV_WINDOW_NORMAL)
|
||||
assert_equal(1, CV_WINDOW_AUTOSIZE)
|
||||
assert_equal(4096, CV_WINDOW_OPENGL)
|
||||
|
||||
# Object detection mode
|
||||
assert_equal(1, CV_HAAR_DO_CANNY_PRUNING)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue