zhengthomastang / 2018AICity_TeamUW

The winning method in Track 1 and Track 3 at the 2nd AI City Challenge Workshop in CVPR 2018 - Official Implementation
http://openaccess.thecvf.com/content_cvpr_2018_workshops/w3/html/Tang_Single-Camera_and_Inter-Camera_CVPR_2018_paper.html
550 stars 198 forks source link

SPD_EST_IPL and APP_MDL_IPL compile error #9

Closed kev1nming closed 5 years ago

kev1nming commented 5 years ago

My evironment: Hardware: NVIDIA Jetson TX! OS: Ubuntu 16.04 for Tegra OpenCV: 2.4.13 (OpenCV4Tegra) CUDA:8.0

When I compile SPD_EST_IPL and APP_MDL_IPL, I have the following errors (The error reports is too long, I just paste a part of them)

ubuntu@tegra-ubuntu:~/2018AICity_TeamUW-master_1/Track1/SPD_EST_IPL/SPD_EST_IPL/src$ g++ main.cpp 
main.cpp: In member function ‘void CTrkNd::setDetCls(char*)’:
main.cpp:37:75: warning: format not a string literal and no format arguments [-Wformat-security]
  inline void setDetCls(char* acDetCls) { std::sprintf(m_acDetCls, acDetCls); }
                                                                           ^
main.cpp: In function ‘cv::Point3f bkproj2d23d(cv::Point2f, float*, int)’:
main.cpp:123:76: error: no match for ‘operator/’ (operand types are ‘cv::Point3f {aka cv::Point3_<float>}’ and ‘int’)
  o3dPt = cv::Point3f(oMatM.at<double>(0, 0), oMatM.at<double>(1, 0), 0.0f) / nLenUnit;
                                                                            ^
ubuntu@tegra-ubuntu:~/2018AICity_TeamUW-master_1/Track1/APP_MDL_IPL/src$ g++ main.cpp 
...
main.cpp:487:2: error: ‘Rect2f’ is not a member of ‘cv’
  cv::Rect2f oBBoxf;
  ^
main.cpp:533:174: error: no matching function for call to ‘cv::RotatedRect::RotatedRect(cv::Point, cv::Point, cv::Point)’
 cv::Point((APP_MDL_NORM_SZ.width - 1), (APP_MDL_NORM_SZ.height - 1))), cv::Scal
                                                                     ^
...

Maybe I should update my OpenCV to 3.1 ? I know little about C++, So if it's a stupid question, please forgive me.

Complete error report tmp_error.txt

zhengthomastang commented 5 years ago

Hi @kev1nming! Not sure if you have received my comments.

It looks like your compiler cannot link to OpenCV properly, or the OpenCV version is too old. Please use OpenCV 3.1+ as you suggested.

Besides, note that the C++ compiler in Visual Studio in Windows has some inconsistency in Linux. For example, the initialization of std::vector is not supported. You may follow the error messages to make corresponding changes. Let me know if you still have any problems.

kev1nming commented 5 years ago

Thank you for your comment. I'm sorry that I forgot to reply you yesterday. I will try your suggestions a few days later. If I have any new situation or problem, I will let you know.

kev1nming commented 5 years ago

It seems that I cannot compile code on my environment, so I think I should let my friend do this, Thank you again.