diff options
| author | Comment <tim@gray.(none)> | 2013-08-16 00:56:32 +0100 |
|---|---|---|
| committer | Comment <tim@gray.(none)> | 2013-08-16 00:56:32 +0100 |
| commit | 1af93fbfe4c8cfa214331d2d96327637ffe749bf (patch) | |
| tree | f452a61b83e16993c5b4702f3a46c85d7d0829b6 /rotord/src/cvimage.h | |
| parent | f91c866884819bee50b39b7b370209ef6b94ec53 (diff) | |
adding render log
Diffstat (limited to 'rotord/src/cvimage.h')
| -rw-r--r-- | rotord/src/cvimage.h | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/rotord/src/cvimage.h b/rotord/src/cvimage.h index feb7298..4921f78 100644 --- a/rotord/src/cvimage.h +++ b/rotord/src/cvimage.h @@ -93,12 +93,17 @@ namespace Rotor { int getStride(){ return w*3; } + bool clear(){ + rgb.setTo(0); + }; bool setup(int _w,int _h){ //set up with internal data - rgb.create(_h,_w,CV_8UC3); - RGBdata=rgb.data; //can move to use the bare pointer eventually - ownsRGBdata=false; //will not be necessary - w=_w; - h=_h; + if (w!=_w|h!=h){ + rgb.create(_h,_w,CV_8UC3); + RGBdata=rgb.data; //can move to use the bare pointer eventually + ownsRGBdata=false; //will not be necessary + w=_w; + h=_h; + } return true; /* if (w!=_w||h!=_h||!ownsRGBdata||!ownsAdata||!ownsZdata){ |
