Repository: opencv
Issue: Affine3 class templated method operator* is using a type that does not exist!
Labels: bug,category: core

##### System information (version)
- OpenCV => 3.1.0
- Operating System / Platform => Ubuntu 14.04 on VirtualBoxVM
- Compiler => g++

##### Detailed description
The templated method 
```
template<typename T, typename V> inline
V cv::operator*(const cv::Affine3<T>& affine, const V& v)
```
is using a type that does not exist! Because it tried to use V's member variable x, y, z, but as far as I know, no vectors in OpenCV or even Eigen is implemented this way but only access by indices. 

##### Steps to reproduce
```
struct CamSpec
{
    CamSpec(cv::Mat intrinsic, cv::Mat extrinsic):
        _intrinsic(intrinsic), _extrinsic(extrinsic){}
    const cv::Mat _intrinsic;
    const cv::Affine3<decimal_t> _extrinsic;

    cv::Mat inverse()
    {
        return _extrinsic.inv()*_intrinsic.inv();
    }

    point_t operator * (const cv::Vec<decimal_t, 3>& vec)
    {
        cv::Vec<decimal_t, 3> coord_pixel_vec = _extrinsic*vec; // THIS IS THE LINE THAT FAILS TO COMPILE
        cv::Mat_<decimal_t> coord_pixel = _intrinsic*cv::Mat(coord_pixel_vec);
        assert(coord_pixel.at<decimal_t>(2) == 1);
        return point_t(coord_pixel.at<decimal_t>(0), coord_pixel.at<decimal_t>(1));
    }
};
```

##### Error Message
```
/usr/local/include/opencv2/core/affine.hpp:456:55: error: ‘const class cv::MatExpr’ has no member named ‘z’
     r.x = m.val[0] * v.x + m.val[1] * v.y + m.val[ 2] * v.z + m.val[ 3];
                                                       ^
/usr/local/include/opencv2/core/affine.hpp:456:37: error: ‘const class cv::MatExpr’ has no member named ‘y’
     r.x = m.val[0] * v.x + m.val[1] * v.y + m.val[ 2] * v.z + m.val[ 3];
                                     ^
/usr/local/include/opencv2/core/affine.hpp:456:20: error: ‘const class cv::MatExpr’ has no member named ‘x’
     r.x = m.val[0] * v.x + m.val[1] * v.y + m.val[ 2] * v.z + m.val[ 3];
                    ^
/usr/local/include/opencv2/core/affine.hpp:456:9: error: ‘class cv::MatExpr’ has no member named ‘x’
     r.x = m.val[0] * v.x + m.val[1] * v.y + m.val[ 2] * v.z + m.val[ 3];
         ^
/usr/local/include/opencv2/core/affine.hpp:457:55: error: ‘const class cv::MatExpr’ has no member named ‘z’
     r.y = m.val[4] * v.x + m.val[5] * v.y + m.val[ 6] * v.z + m.val[ 7];
                                                       ^
/usr/local/include/opencv2/core/affine.hpp:457:37: error: ‘const class cv::MatExpr’ has no member named ‘y’
     r.y = m.val[4] * v.x + m.val[5] * v.y + m.val[ 6] * v.z + m.val[ 7];
                                     ^
/usr/local/include/opencv2/core/affine.hpp:457:20: error: ‘const class cv::MatExpr’ has no member named ‘x’
     r.y = m.val[4] * v.x + m.val[5] * v.y + m.val[ 6] * v.z + m.val[ 7];
                    ^
/usr/local/include/opencv2/core/affine.hpp:457:9: error: ‘class cv::MatExpr’ has no member named ‘y’
     r.y = m.val[4] * v.x + m.val[5] * v.y + m.val[ 6] * v.z + m.val[ 7];
         ^
/usr/local/include/opencv2/core/affine.hpp:458:55: error: ‘const class cv::MatExpr’ has no member named ‘z’
     r.z = m.val[8] * v.x + m.val[9] * v.y + m.val[10] * v.z + m.val[11];
                                                       ^
/usr/local/include/opencv2/core/affine.hpp:458:37: error: ‘const class cv::MatExpr’ has no member named ‘y’
     r.z = m.val[8] * v.x + m.val[9] * v.y + m.val[10] * v.z + m.val[11];
                                     ^
/usr/local/include/opencv2/core/affine.hpp:458:20: error: ‘const class cv::MatExpr’ has no member named ‘x’
     r.z = m.val[8] * v.x + m.val[9] * v.y + m.val[10] * v.z + m.val[11];
                    ^
/usr/local/include/opencv2/core/affine.hpp:458:9: error: ‘class cv::MatExpr’ has no member named ‘z’
     r.z = m.val[8] * v.x + m.val[9] * v.y + m.val[10] * v.z + m.val[11];
         ^
```