diff --git a/openbr/plugins/classification/dlib.cpp b/openbr/plugins/classification/dlib.cpp index 9b5d4c4..eb4ac82 100644 --- a/openbr/plugins/classification/dlib.cpp +++ b/openbr/plugins/classification/dlib.cpp @@ -48,18 +48,20 @@ private: void project(const Template &src, Template &dst) const { - dst = src; + dst = src; if (!src.file.rects().isEmpty()) { shape_predictor *sp = shapeResource.acquire(); - cv_image cimg(src.m().clone()); + cv_image cimg(src.m()); + array2d image; + assign_image(image,cimg); for (int j=0; j cimg(t.m().clone()); + cv_image cimg(t.m()); array2d image; assign_image(image,cimg); @@ -134,7 +136,7 @@ private: void project(const Template &src, Template &dst) const { dst = src; - cv_image cimg(src.m().clone()); + cv_image cimg(src.m()); array2d image; assign_image(image,cimg);