[eigen] Strange issue with Array of Array3f |
[ Thread Index | Date Index | More lists.tuxfamily.org/eigen Archives ]
Hi everyone, I wanted to point your attention to a strange issue my colleague Wojciech Jarosz has encountered when working with Arrays of RGB color data (encoded using as Array3f). Please see the StackOverflow report for details: http://stackoverflow.com/questions/32277887/using-eigen-array-of-arrays-for-rgb-images This is a minimal snippet of code illustrating the issue. #include <Eigen/Core> using namespace Eigen; int main(void) { typedef Array<Array3f, Dynamic, Dynamic> MyArray; MyArray m(2,2); // all of the following should have the same mathematical effect Array3f v = -Array3f(5.0f); // this compiles MyArray a = m + v; // this compiles MyArray b = m + Array3f(-5.0f); // this compiles MyArray c = m + (-Array3f(5.0f)); // this doesn't compile MyArray d = m - Array3f(5.0f); // this doesn't compile } Any thoughts or suggestions would be greatly appreciated. Thank you, Wenzel |
Mail converted by MHonArc 2.6.19+ | http://listengine.tuxfamily.org/ |