debug模式下编译报错channels is not a member of cv::DataType<_Tp>
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 6.4k
- Forks
- 2.5k
- PR merge metrics
- No merged PRs in 30d
Description
**I'm submitting a ...** (check one with "x")
```
[ ] bug report
[x] help wanted
[ ] feature request
```
**Current behavior**
VS2017+OpenCV3.4.2版本在debug模式下编译解决方案报错:
Severity Code Description Project File Line Suppression State
Error C2039 'channels': is not a member of 'cv::DataType<_Tp>' libeasypr c:\opencv\build\include\opencv2\core\mat.inl.hpp 1099
Error C3867 'cv::Mat::channels': non-standard syntax; use '&' to create a pointer to member libeasypr c:\opencv\build\include\opencv2\core\mat.inl.hpp 1099
Error C2297 '*': illegal, right operand has type 'int (__cdecl cv::Mat::* )(void) const' libeasypr c:\opencv\build\include\opencv2\core\mat.inl.hpp 1099
Error C2039 'depth': is not a member of 'cv::DataType<_Tp>' libeasypr c:\opencv\build\include\opencv2\core\traits.hpp 362
Error C2065 'depth': undeclared identifier libeasypr c:\opencv\build\include\opencv2\core\traits.hpp 362
搜到之前类似的issue让把traits.hpp中的#define OPENCV_TRAITS_ENABLE_DEPRECATED uncomment掉,但没有用。
请问大神这个问题该如何解决?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the Debug build with VS2017 and OpenCV 3.4.2, then inspect the reported errors in OpenCV's mat.inl.hpp and traits.hpp. Determine which project type or OpenCV compatibility issue causes the failures; done means the EasyPR solution compiles successfully in Debug mode.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, opencv
- Domain
- build-system, computer-vision
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100