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.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/rotord/src/cvimage.h b/rotord/src/cvimage.h
index 336c41b..feb7298 100644
--- a/rotord/src/cvimage.h
+++ b/rotord/src/cvimage.h
@@ -32,7 +32,7 @@ namespace Rotor {
multiply[i]=new uint8_t[256];
for (int j=0;j<256;j++){
add[i][j]=(uint8_t)std::min(i+j,0xFF);
- multiply[i][j]=(uint8_t)((((float)i)/255.0f)*(((float)j)/255.0f)*255.0f);
+ multiply[i][j]=(uint8_t)(((float)i)*(((float)j)/255.0f));
}
}
mono_weights=new uint8_t*[3];
@@ -166,6 +166,7 @@ namespace Rotor {
*/
return t;
}
+ Image & operator=(const Image &other);
//believe these still work, don't know if these optimisations are better than opencvs..
Image & operator+=(const Image &other);
Image & operator*=(const Image &other);
@@ -176,6 +177,9 @@ namespace Rotor {
Image & add_wrap(const Image &other);
Image & divide_wrap(const Image &other);
Image & operator*=(const float &amount);
+ Image & operator+=(const float &amount);
+ Image & operator-=(const float &amount);
+ Image & operator/=(const float &amount);
Image * operator*(const float &amount);
Image * operator+(const float &amount);
Image * operator-(const float &amount);