summaryrefslogtreecommitdiff
path: root/rotord
diff options
context:
space:
mode:
Diffstat (limited to 'rotord')
-rw-r--r--rotord/cvimage.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/rotord/cvimage.cpp b/rotord/cvimage.cpp
index cb10fdd..5402a8e 100644
--- a/rotord/cvimage.cpp
+++ b/rotord/cvimage.cpp
@@ -17,7 +17,12 @@ namespace Rotor {
cerr<<"Rotor: cannot multiply images with different sizes! (wanted "<<w<<"x"<<h<<", got "<<other.w<<"x"<<other.h<<")"<<endl;
}
else {
- rgb/=other.rgb; //counter intuitive!
+ //rgb/=other.rgb; //does funny glitchy stuff
+ //could use cv::Mat.mul() here
+ for (int i=0;i<w*h*3;i++){
+ //calculate with tables
+ rgb.data[i]=pixels.multiply[rgb.data[i]][other.rgb.data[i]];
+ }
}
return *this;
}