Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error: ‘deque’ in namespace ‘std’ does not name a template type #210

Closed
stiv-yakovenko opened this issue Apr 28, 2020 · 5 comments
Closed

Comments

@stiv-yakovenko
Copy link

In file included from /home/stiv/Multitarget-tracker/src/Tracker/Kalman.cpp:1:0:
/home/stiv/Multitarget-tracker/src/Tracker/Kalman.h:37:10: error: ‘deque’ in namespace ‘std’ does not name a template type
     std::deque<Point_t> m_initialPoints;
          ^~~~~
/home/stiv/Multitarget-tracker/src/Tracker/Kalman.h:38:10: error: ‘deque’ in namespace ‘std’ does not name a template type
     std::deque<cv::Rect> m_initialRects;
          ^~~~~
In file included from /home/stiv/Multitarget-tracker/src/Detector/BaseDetector.cpp:3:0:
/home/stiv/Multitarget-tracker/src/Detector/FaceDetector.h:24:9: error: ‘CascadeClassifier’ in namespace ‘cv’ does not name a type
     cv::CascadeClassifier m_cascade;
         ^~~~~~~~~~~~~~~~~
/home/stiv/Multitarget-tracker/src/Tracker/Kalman.cpp: In member function ‘Point_t TKalmanFilter::Update(Point_t, bool)’:
/home/stiv/Multitarget-tracker/src/Tracker/Kalman.cpp:571:13: error: ‘m_initialPoints’ was not declared in this scope
         if (m_initialPoints.size() < MIN_INIT_VALS)
             ^~~~~~~~~~~~~~~
/home/stiv/Multitarget-tracker/src/Tracker/Kalman.cpp:571:13: note: suggested alternative: ‘m_initialized’
         if (m_initialPoints.size() < MIN_INIT_VALS)
             ^~~~~~~~~~~~~~~
             m_initialized
/home/stiv/Multitarget-tracker/src/Tracker/Kalman.cpp:579:13: error: ‘m_initialPoints’ was not declared in this scope
         if (m_initialPoints.size() == MIN_INIT_VALS)
             ^~~~~~~~~~~~~~~
/home/stiv/Multitarget-tracker/src/Tracker/Kalman.cpp:579:13: note: suggested alternative: ‘m_initialized’
         if (m_initialPoints.size() == MIN_INIT_VALS)
             ^~~~~~~~~~~~~~~
             m_initialized
/home/stiv/Multitarget-tracker/src/Tracker/Kalman.cpp: In member function ‘cv::Rect TKalmanFilter::Update(cv::Rect, bool)’:
/home/stiv/Multitarget-tracker/src/Tracker/Kalman.cpp:729:13: error: ‘m_initialRects’ was not declared in this scope
         if (m_initialRects.size() < MIN_INIT_VALS)
             ^~~~~~~~~~~~~~
In file included from /home/stiv/Multitarget-tracker/src/Detector/BaseDetector.cpp:4:0:
/home/stiv/Multitarget-tracker/src/Detector/PedestrianDetector.h:37:9: error: ‘HOGDescriptor’ in namespace ‘cv’ does not name a type
     cv::HOGDescriptor m_hog;
         ^~~~~~~~~~~~~
/home/stiv/Multitarget-tracker/src/Tracker/Kalman.cpp:729:13: note: suggested alternative: ‘m_initialized’
         if (m_initialRects.size() < MIN_INIT_VALS)
             ^~~~~~~~~~~~~~
             m_initialized
/home/stiv/Multitarget-tracker/src/Tracker/Kalman.cpp:740:13: error: ‘m_initialRects’ was not declared in this scope
         if (m_initialRects.size() == MIN_INIT_VALS)
             ^~~~~~~~~~~~~~
/home/stiv/Multitarget-tracker/src/Tracker/track.cpp: In member function ‘track_t CTrack::CalcDistHist(const CRegion&, cv::UMat) const’:
/home/stiv/Multitarget-tracker/src/Tracker/track.cpp:125:79: error: ‘CV_COMP_BHATTACHARYYA’ was not declared in this scope
   res = static_cast<track_t>(cv::compareHist(reg.m_hist, m_lastRegion.m_hist, CV_COMP_BHATTACHARYYA));
                                                                               ^~~~~~~~~~~~~~~~~~~~~
/home/stiv/Multitarget-tracker/src/Tracker/Kalman.cpp:740:13: note: suggested alternative: ‘m_initialized’
         if (m_initialRects.size() == MIN_INIT_VALS)
             ^~~~~~~~~~~~~~
             m_initialized
/home/stiv/Multitarget-tracker/src/Tracker/Kalman.cpp:744:34: error: unable to deduce ‘auto&&’ from ‘m_initialRects’
             for (const auto& r : m_initialRects)
                                  ^~~~~~~~~~~~~~
/home/stiv/Multitarget-tracker/src/Tracker/track.cpp: In member function ‘void CTrack::CreateExternalTracker(int)’:
/home/stiv/Multitarget-tracker/src/Tracker/track.cpp:668:40: warning: unused parameter ‘channels’ [-Wunused-parameter]
 void CTrack::CreateExternalTracker(int channels)
                                        ^~~~~~~~
[ 10%] Building CXX object src/Tracker/CMakeFiles/mtracking.dir/graph/mytree.cpp.o
src/Tracker/CMakeFiles/mtracking.dir/build.make:134: recipe for target 'src/Tracker/CMakeFiles/mtracking.dir/Kalman.cpp.o' failed
make[2]: *** [src/Tracker/CMakeFiles/mtracking.dir/Kalman.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
[ 12%] Building CXX object src/Detector/CMakeFiles/mdetection.dir/Subsense/BackgroundSubtractorLBSP.cpp.o
src/Detector/CMakeFiles/mdetection.dir/build.make:62: recipe for target 'src/Detector/CMakeFiles/mdetection.dir/BaseDetector.cpp.o' failed
make[2]: *** [src/Detector/CMakeFiles/mdetection.dir/BaseDetector.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
src/Tracker/CMakeFiles/mtracking.dir/build.make:110: recipe for target 'src/Tracker/CMakeFiles/mtracking.dir/track.cpp.o' failed
make[2]: *** [src/Tracker/CMakeFiles/mtracking.dir/track.cpp.o] Error 1
CMakeFiles/Makefile2:217: recipe for target 'src/Tracker/CMakeFiles/mtracking.dir/all' failed
make[1]: *** [src/Tracker/CMakeFiles/mtracking.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
CMakeFiles/Makefile2:162: recipe for target 'src/Detector/CMakeFiles/mdetection.dir/all' failed
make[1]: *** [src/Detector/CMakeFiles/mdetection.dir/all] Error 2
Makefile:83: recipe for target 'all' failed

@Nuzhny007
Copy link
Collaborator

Hm. #include in Kalman.h I'll insert. But cv::CascadeClassifier? Do you have opencv_objdetect module? And what version of OpenCV do you use?

@stiv-yakovenko
Copy link
Author

Fixed, it was missing opencv_objectdetect, but now it fails here

#if (((CV_VERSION_MAJOR == 4) && (CV_VERSION_MINOR < 2)) || (CV_VERSION_MAJOR == 3))
                res = static_cast<track_t>(cv::compareHist(reg.m_hist, m_lastRegion.m_hist, CV_COMP_BHATTACHARYYA));
                //res = 1.f - static_cast<track_t>(cv::compareHist(reg.m_hist, m_lastRegion.m_hist, CV_COMP_CORREL));
#else
                res = static_cast<track_t>(cv::compareHist(reg.m_hist, m_lastRegion.m_hist, cv::HISTCMP_BHATTACHARYYA));
#endif

I am on opencv 4.1.2 and this is the reason for

/home/stiv/Multitarget-tracker/src/Tracker/track.cpp: In member function ‘track_t CTrack::CalcDistHist(const CRegion&, cv::UMat) const’:
/home/stiv/Multitarget-tracker/src/Tracker/track.cpp:125:79: error: ‘CV_COMP_BHATTACHARYYA’ was not declared in this scope
   res = static_cast<track_t>(cv::compareHist(reg.m_hist, m_lastRegion.m_hist, CV_COMP_BHATTACHARYYA));
                                                                               ^~~~~~~~~~~~~~~~~~~~~
/home/stiv/Multitarget-tracker/src/Tracker/track.cpp: In member function ‘void CTrack::CreateExternalTracker(int)’:
/home/stiv/Multitarget-tracker/src/Tracker/track.cpp:668:40: warning: unused parameter ‘channels’ [-Wunused-parameter]
 void CTrack::CreateExternalTracker(int channels)
                                        ^~~~~~~~

why do you need this ifdef?

@stiv-yakovenko
Copy link
Author

Worked after replacing this constant with cv::HISTCMP_BHATTACHARYYA

@Nuzhny007
Copy link
Collaborator

I'm trying support all versions of OpenCV. May be:
#if (((CV_VERSION_MAJOR == 4) && (CV_VERSION_MINOR < 1)) || (CV_VERSION_MAJOR == 3))

@stiv-yakovenko
Copy link
Author

Yes, what you propose this seems to build on my opencv ver.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants