diff --git a/stim/image/image.h b/stim/image/image.h index b359405..b001232 100644 --- a/stim/image/image.h +++ b/stim/image/image.h @@ -624,6 +624,15 @@ public: return result; } + //operator functions + image operator+(image rhs) { + size_t N = size(); //calculate the total number of values in the image + image r(X(), Y(), C()); //allocate space for the resulting image + for (size_t n = 0; n < N; n++) + r.img[n] = img[n] + rhs.img[n]; //perform the inversion + return r; //return the inverted image + } + image srgb2lab(){ std::cout<<"ERROR stim::image::srgb2lab - function has been broken, re-implement."<