summaryrefslogtreecommitdiff
path: root/rotord/src/cvimage.h
diff options
context:
space:
mode:
Diffstat (limited to 'rotord/src/cvimage.h')
-rw-r--r--rotord/src/cvimage.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/rotord/src/cvimage.h b/rotord/src/cvimage.h
index 0a91715..2374e5b 100644
--- a/rotord/src/cvimage.h
+++ b/rotord/src/cvimage.h
@@ -90,6 +90,15 @@ namespace Rotor {
zero();
setup(_w,_h);
};
+ Image(const Image &mom) {
+ // copy constructor
+ zero();
+ rgb=mom.rgb.clone();
+ w=mom.w;
+ h=mom.h;
+ RGBdata=rgb.data; //can move to use the bare pointer eventually
+ ownsRGBdata=false; //always just deallocate cv::Mat from stack
+ }
~Image() {
free();
};
@@ -193,6 +202,7 @@ namespace Rotor {
h=rgb.cols;
return true;
}
+ //leaks
Image* clone(){
Image *t=new Image();
t->rgb=rgb.clone();