Opencv: bug opencv3.3.1: cv::DataType<cv::Vec<uchar, 3>> has no member type

Created on 20 Nov 2017  路  1Comment  路  Source: opencv/opencv

when I write code as follows in vs2015

cv::Mat img(10, 10, cv::DataType>::type);

it has an error : cv::Mat img(10, 10, cv::DataType>::type); has no member type

RFC builinstall

Most helpful comment

OpenCV traits system is reworked to avoid several bugs: #9457 (related issue #7599)

cv::DataType>::type

Consider to use:

  • CV_8UC3 directly if it is not part of code with templates
  • cv::traits::Type< cv::Vec<uchar, 3> >::value (since OpenCV 3.3.1 only)
  • or #define OPENCV_TRAITS_ENABLE_DEPRECATED before any OpenCV headers to allow old type traits (for example, in stdafx.h or via compiler defines in project properties).

>All comments

OpenCV traits system is reworked to avoid several bugs: #9457 (related issue #7599)

cv::DataType>::type

Consider to use:

  • CV_8UC3 directly if it is not part of code with templates
  • cv::traits::Type< cv::Vec<uchar, 3> >::value (since OpenCV 3.3.1 only)
  • or #define OPENCV_TRAITS_ENABLE_DEPRECATED before any OpenCV headers to allow old type traits (for example, in stdafx.h or via compiler defines in project properties).
Was this page helpful?
0 / 5 - 0 ratings

Related issues

orange-jacky picture orange-jacky  路  3Comments

dpo picture dpo  路  3Comments

sturkmen72 picture sturkmen72  路  3Comments

westonpace picture westonpace  路  3Comments

opencv-pushbot picture opencv-pushbot  路  3Comments