Commit 0c647d07f87f7191c09ffa143825c468d753a4e2

Authored by Keyurpatel93
Committed by GitHub
1 parent 597d765b

option to create a continuous mat (#567)

* option to create a continuous mat

* Better implementation

* clean up

* always create continuous  mats
openbr/plugins/imgproc/crop.cpp
@@ -40,7 +40,7 @@ class CropTransform : public UntrainableTransform @@ -40,7 +40,7 @@ class CropTransform : public UntrainableTransform
40 40
41 void project(const Template &src, Template &dst) const 41 void project(const Template &src, Template &dst) const
42 { 42 {
43 - dst = Mat(src, Rect(x, y, width < 1 ? src.m().cols-x-abs(width) : width, height < 1 ? src.m().rows-y-abs(height) : height)); 43 + dst = Mat(src, Rect(x, y, width < 1 ? src.m().cols-x-abs(width) : width, height < 1 ? src.m().rows-y-abs(height) : height)).clone();
44 } 44 }
45 }; 45 };
46 46