TrafficSign_LightDetection icon indicating copy to clipboard operation
TrafficSign_LightDetection copied to clipboard

traffic light recgnition install question

Open libeiUCAS opened this issue 9 years ago • 4 comments
trafficstars

Hello @JayYangSS , I try a lot to build your project, but I failed. I am interested in the traffic light recognition. Further,I read the issue you and @sainisanjay ,I follow your comments to remove function openMP_MultiThreadCamera and TSRecognitionPerFrame.Howerver I meet the problem: ////////////////////////////////////////////////////////////////////////////////////////////////// 1> sizeFiltering.cpp 1>c:\program files (x86)\windows kits\8.1\include\shared\qosobjs.h(52): error C2146: 语法错误: 缺少“;”(在标识符“ObjectHdr”的前面) 1>c:\program files (x86)\windows kits\8.1\include\shared\qosobjs.h(52): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int 1>c:\program files (x86)\windows kits\8.1\include\shared\qosobjs.h(53): error C2146: 语法错误: 缺少“;”(在标识符“FriendlyName”的前面) 1>c:\program files (x86)\windows kits\8.1\include\shared\qosobjs.h(53): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int 1>c:\program files (x86)\windows kits\8.1\include\shared\qosobjs.h(69): error C2146: 语法错误: 缺少“;”(在标识符“ObjectHdr”的前面) 1>c:\program files (x86)\windows kits\8.1\include\shared\qosobjs.h(69): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int 1>c:\program files (x86)\windows kits\8.1\include\shared\qosobjs.h(70): error C2146: 语法错误: 缺少“;”(在标识符“TrafficClass”的前面) 1>c:\program files (x86)\windows kits\8.1\include\shared\qosobjs.h(70): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int 1>c:\program files (x86)\windows kits\8.1\include\shared\qosobjs.h(84): error C2146: 语法错误: 缺少“;”(在标识符“ObjectHdr”的前面) 1>c:\program files (x86)\windows kits\8.1\include\shared\qosobjs.h(84): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int 1>c:\program files (x86)\windows kits\8.1\include\shared\qosobjs.h(85): error C2146: 语法错误: 缺少“;”(在标识符“DSField”的前面) /////////////////////////////////////////////////////////////// I think the problem is caused by visual studio version. I use visual studio 2013 . OS: win7. I want know Which IDE you ues? If you meet the same problem? Please suggest me the solution for above mentioned problem. your support is highly appreciated on this matter. Thanks

libeiUCAS avatar Oct 20 '16 07:10 libeiUCAS

Hello @libeiUCAS, First of all i haven't meet the above problems. I am using windows 7 with Visual studio 2010 with Opencv 2.4.9. Secondly, i am not sure what are the above problems because error showing in Chinese language which i can't understand. I hope @JayYangSS will suggest you some solution. Just i would like to suggest you check your opencv libraries whether they are in right path.

ghost avatar Oct 20 '16 17:10 ghost

@libeiUCAS I use VS2013 and openCV2.4.8, I think it's not because of these problem, but maybe you miss some header files, try this: http://stackoverflow.com/questions/16501647/error-c2146-syntax-error-missing-before-identifier-contextrecord

JayYangSS avatar Oct 21 '16 02:10 JayYangSS

Hello @JayYangSS , @sainisanjay,as your comment ,I tried a lot , but failed. I reinstall OS win7,vs2013 ,vs2010.Now the environment is win7+opencv2.4.9+vs2013. I meet the error as fllow: /////////////////////////////////////////////////////////// 1> sizeFiltering.cpp 1>c:\program files (x86)\microsoft sdks\windows\v7.0a\include\qosobjs.h(49): error C2146: syntax error : missing ';' before identifier 'ObjectHdr' 1>c:\program files (x86)\microsoft sdks\windows\v7.0a\include\qosobjs.h(49): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int 1>c:\program files (x86)\microsoft sdks\windows\v7.0a\include\qosobjs.h(49): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int 1>c:\program files (x86)\microsoft sdks\windows\v7.0a\include\qosobjs.h(50): error C2146: syntax error : missing ';' before identifier 'FriendlyName' 1>c:\program files (x86)\microsoft sdks\windows\v7.0a\include\qosobjs.h(50): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int 1>c:\program files (x86)\microsoft sdks\windows\v7.0a\include\qosobjs.h(50): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int 1>c:\program files (x86)\microsoft sdks\windows\v7.0a\include\qosobjs.h(66): error C2146: syntax error : missing ';' before identifier 'ObjectHdr'

1>c:\program files (x86)\microsoft sdks\windows\v7.0a\include\traffic.h(88): error C2059: syntax error : '__stdcall' 1>c:\program files (x86)\microsoft sdks\windows\v7.0a\include\traffic.h(98): error C2059: syntax error : '__stdcall' 1>c:\program files (x86)\microsoft sdks\windows\v7.0a\include\traffic.h(104): error C2059: syntax error : '__stdcall' 1>c:\program files (x86)\microsoft sdks\windows\v7.0a\include\traffic.h(110): error C2059: syntax error : '__stdcall' 1>c:\program files (x86)\microsoft sdks\windows\v7.0a\include\traffic.h(118): error C2146: syntax error : missing ';' before identifier 'ClNotifyHandler' 1>c:\program files (x86)\microsoft sdks\windows\v7.0a\include\traffic.h(118): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int 1>c:\program files (x86)\microsoft sdks\windows\v7.0a\include\traffic.h(118): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int 1>c:\program files (x86)\microsoft sdks\windows\v7.0a\include\traffic.h(119): error C2146: syntax error : missing ';' before identifier 'ClAddFlowCompleteHandler' 1>c:\program files (x86)\microsoft sdks\windows\v7.0a\include\traffic.h(119): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int /////////////////////////////////////////////////////////////////////

I am not sure whether my build process is correct :

1. new an enmpty project in vs2013 
2. add existing item (@JayYangSS  's github source file) to  resource files
3. change #define OPENMP 1   in traffic.h .   
4. remove the directory:HungarianAlg,KalmanFilter,Tracker. Drogonfly_ImgRead.h and Drogonfly_ImgRead.cpp 
5.  remove   void openMP_MultiThreadCamera()     void TSRecognitionPerFrame(IplImage *frame,float *TSRSend)  in   Main_TrafficSignRecognition.cpp

the project artitecture is like this: image

Please suggest me the solution for the problem. Thanks in advanced. @JayYangSS @sainisanjay

libeiUCAS avatar Oct 26 '16 06:10 libeiUCAS

try this: navigate to property->C/C++->Preprocessor->Preprocessor Definitions, add the following content:

WIN32
NDEBUG
_CONSOLE

@libeiUCAS

JayYangSS avatar Oct 27 '16 01:10 JayYangSS