1
0
Fork 0
mirror of https://github.com/ruby-opencv/ruby-opencv synced 2023-03-27 23:22:12 -04:00

use CV_INTER_* constants instead of INTERPOLATION_METHOD table

This commit is contained in:
ser1zw 2013-01-18 03:01:10 +09:00
parent 08348ff8d3
commit cbeeb1caee
3 changed files with 30 additions and 35 deletions

View file

@ -294,7 +294,7 @@ define_ruby_module()
rb_define_const(rb_module, "CV_INTER_LINEAR", INT2FIX(CV_INTER_LINEAR));
rb_define_const(rb_module, "CV_INTER_AREA", INT2FIX(CV_INTER_AREA));
rb_define_const(rb_module, "CV_INTER_CUBIC", INT2FIX(CV_INTER_CUBIC));
/* Warp affine optional flags */
rb_define_const(rb_module, "CV_WARP_FILL_OUTLIERS", INT2FIX(CV_WARP_FILL_OUTLIERS));
rb_define_const(rb_module, "CV_WARP_INVERSE_MAP", INT2FIX(CV_WARP_INVERSE_MAP));
@ -345,14 +345,6 @@ define_ruby_module()
REGISTER_CVMETHOD(inversion_method, "svd_sym", CV_SVD_SYM);
REGISTER_CVMETHOD(inversion_method, "svd_symmetric", CV_SVD_SYM);
VALUE interpolation_method = rb_hash_new();
/* {:nn, :linear, :area, :cubic}: Interpolation method */
rb_define_const(rb_module, "INTERPOLATION_METHOD", interpolation_method);
REGISTER_CVMETHOD(interpolation_method, "nn", CV_INTER_NN);
REGISTER_CVMETHOD(interpolation_method, "linear", CV_INTER_LINEAR);
REGISTER_CVMETHOD(interpolation_method, "area", CV_INTER_AREA);
REGISTER_CVMETHOD(interpolation_method, "cubic", CV_INTER_CUBIC);
VALUE warp_flag = rb_hash_new();
/* {:fill_outliers, :inverse_map}: Warp affine optional flags */
rb_define_const(rb_module, "WARP_FLAG", warp_flag);