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

modified CvMat#and

This commit is contained in:
ser1zw 2011-01-03 13:47:34 +09:00
parent ff2562bbd3
commit 9a3067caaf

View file

@ -1734,7 +1734,7 @@ rb_and(int argc, VALUE *argv, VALUE self)
{
VALUE val, mask, dest;
rb_scan_args(argc, argv, "11", &val, &mask);
dest = new_object(cvGetSize(CVARR(self)), cvGetElemType(CVARR(self)));
dest = copy(self);
if (rb_obj_is_kind_of(val, rb_klass))
cvAnd(CVARR(self), CVARR(val), CVARR(dest), MASK(mask));
else