Person detection using fastHOG

Trying to get the fastHOG code running

  • downloaded fastHOG C++ code by Prisacariu and Reid
  • the code seems to need 3 additional 3rd party libs which do not come with the fastHOG code!
    • boost
    • FreeImage
    • fltk
  • downloaded + unzipped FreeImage

building fltk

  • downloaded fltk version 1.3.0, but when trying to compile fastHOG it misses two files:
    • fltk/run.h
    • fltk/Window.h
1>------ Build started: Project: fastHOG, Configuration: Debug Win32 ------
1>Build started 25.06.2012 14:15:43.
1>InitializeBuildStatus:
1>  Touching "Debug\fastHOG.unsuccessfulbuild".
1>ClCompile:
1>  fastHOG.cpp
1>w:\20_src\13_others_code\fasthog\source\fasthog\fasthog.cpp(11): fatal error C1083: Cannot open include file: 'fltk/run.h': No such file or directory
1>  ImageWindow.cpp
1>w:\20_src\13_others_code\fasthog\source\fasthog\utils\imagewindow.h(4): fatal error C1083: Cannot open include file: 'fltk/Window.h': No such file or directory
  • since both files (run.h + Window.h) were not found in the fltk 1.3.0 package, I tried out the next version fltk 2.0.x
  • but: here I have problems to compile the fltk library, some include files are not found…
  • next try. downloading fltk 3.0.x
  • in fltk-3.0\ide\VisualC2010 there is a fltk.sln and both files run.h and Window.h are included in the package. Unfortunately, compiler errors again:
1>------ Build started: Project: fltk3, Configuration: Debug Win32 ------
1>Build started 25.06.2012 15:05:44.
1>InitializeBuildStatus:
1>  Touching ".\fltk3_debug\fltk3.unsuccessfulbuild".
1>ClCompile:
1>  run.cxx
1>w:\20_src\90_thirdparty_libs\fltk-3.0\src\fltk3\win32.cxx(1146): error C2653: 'Fl' : is not a class or namespace name
  • solution found by a colleague!
  • I tried to compile the fltk.sln … (strange idea, isn' it? ;-) ) That yields compiler errors.
  • use fltk 2.0.x version and try to compile the fltk_dynamic.sln, then fltk (“fulltick”) can be compiled without errors

CUDA linker .lib not found problems

  • next problem: the code expects a .lib at exactly C:\CUDA\lib\cuda.lib:
1>------ Build started: Project: fastHOG, Configuration: Debug x64 ------
1>Build started 26.06.2012 14:07:34.
1>InitializeBuildStatus:
1>  Touching "Debug\fastHOG.unsuccessfulbuild".
1>ClCompile:
1>  All outputs are up-to-date.
1>LINK : fatal error LNK1104: cannot open file 'C:\CUDA\lib\cuda.lib'
1>
1>Build FAILED.
1>
1>Time Elapsed 00:00:00.09
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
  • but this path/lib is not set in the project settings as additional libraries
  • so where does it come from?
  • searching for string C:\CUDA\lib\cuda.lib in the fastHOG directory in all files …
  • found the hardcoded string here in HOGDefines.h:
#ifdef _WIN32
	#pragma comment( lib, "C:\\CUDA\\lib\\cuda.lib" )
	#pragma comment( lib, "C:\\CUDA\\lib\\cudart.lib" )
	#pragma comment( lib, "C:\\CUDA\\SDK\\common\\lib\\cutil32.lib" )
#endif
  • solved this issue with a quick-and-dirty-solution by replacing the .lib locations with mine:
#ifdef _WIN32
	#pragma comment( lib, "C:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v5.0\\lib\\x64\\cuda.lib" )
	#pragma comment( lib, "C:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v5.0\\lib\\x64\\cudart.lib" )
	//#pragma comment( lib, "C:\\CUDA\\SDK\\common\\lib\\cutil32.lib" )
#endif

Further compiler errors

1>------ Build started: Project: fastHOG, Configuration: Debug x64 ------
1>Build started 26.06.2012 14:19:54.
1>InitializeBuildStatus:
1>  Touching "Debug\fastHOG.unsuccessfulbuild".
1>ClCompile:
1>  All outputs are up-to-date.
1>ImageWindow.obj : error LNK2001: unresolved external symbol "private: static class fltk::Group * fltk::Group::current_" (?current_@Group@fltk@@0PEAV12@EA)
1>ImageWindow.obj : error LNK2001: unresolved external symbol "class fltk::Symbol * fltk::FLAT_BOX" (?FLAT_BOX@fltk@@3QEAVSymbol@1@EA)
1>ImageWindow.obj : error LNK2001: unresolved external symbol "class fltk::Symbol * fltk::BORDER_BOX" (?BORDER_BOX@fltk@@3QEAVSymbol@1@EA)
1>HOGEngine.obj : error LNK2019: unresolved external symbol InitHOG referenced in function "public: void __cdecl HOG::HOGEngine::InitializeHOG(int,int,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >)" (?InitializeHOG@HOGEngine@HOG@@QEAAXHHV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)
1>HOGEngine.obj : error LNK2019: unresolved external symbol CloseHOG referenced in function "public: void __cdecl HOG::HOGEngine::FinalizeHOG(void)" (?FinalizeHOG@HOGEngine@HOG@@QEAAXXZ)
1>HOGEngine.obj : error LNK2019: unresolved external symbol BeginHOGProcessing referenced in function "public: void __cdecl HOG::HOGEngine::BeginProcess(class HOG::HOGImage *,int,int,int,int,float,float)" (?BeginProcess@HOGEngine@HOG@@QEAAXPEAVHOGImage@2@HHHHMM@Z)
1>HOGEngine.obj : error LNK2019: unresolved external symbol GetHOGParameters referenced in function "public: void __cdecl HOG::HOGEngine::EndProcess(void)" (?EndProcess@HOGEngine@HOG@@QEAAXXZ)
1>HOGEngine.obj : error LNK2019: unresolved external symbol EndHOGProcessing referenced in function "public: void __cdecl HOG::HOGEngine::EndProcess(void)" (?EndProcess@HOGEngine@HOG@@QEAAXXZ)
1>HOGEngine.obj : error LNK2019: unresolved external symbol GetProcessedImage referenced in function "public: void __cdecl HOG::HOGEngine::GetImage(class HOG::HOGImage *,enum HOG::HOGEngine::ImageType)" (?GetImage@HOGEngine@HOG@@QEAAXPEAVHOGImage@2@W4ImageType@12@@Z)
1>HOGImage.obj : error LNK2019: unresolved external symbol __imp_FreeImage_ConvertToRawBits referenced in function "public: __cdecl HOG::HOGImage::HOGImage(char *)" (??0HOGImage@HOG@@QEAA@PEAD@Z)
1>HOGImage.obj : error LNK2019: unresolved external symbol __imp_FreeImage_Unload referenced in function "public: __cdecl HOG::HOGImage::HOGImage(char *)" (??0HOGImage@HOG@@QEAA@PEAD@Z)
1>HOGImage.obj : error LNK2019: unresolved external symbol __imp_FreeImage_ConvertTo32Bits referenced in function "public: __cdecl HOG::HOGImage::HOGImage(char *)" (??0HOGImage@HOG@@QEAA@PEAD@Z)
1>HOGImage.obj : error LNK2019: unresolved external symbol __imp_FreeImage_GetBPP referenced in function "public: __cdecl HOG::HOGImage::HOGImage(char *)" (??0HOGImage@HOG@@QEAA@PEAD@Z)
1>HOGImage.obj : error LNK2019: unresolved external symbol __imp_FreeImage_GetHeight referenced in function "public: __cdecl HOG::HOGImage::HOGImage(char *)" (??0HOGImage@HOG@@QEAA@PEAD@Z)
1>HOGImage.obj : error LNK2019: unresolved external symbol __imp_FreeImage_GetWidth referenced in function "public: __cdecl HOG::HOGImage::HOGImage(char *)" (??0HOGImage@HOG@@QEAA@PEAD@Z)
1>HOGImage.obj : error LNK2019: unresolved external symbol __imp_FreeImage_Load referenced in function "public: __cdecl HOG::HOGImage::HOGImage(char *)" (??0HOGImage@HOG@@QEAA@PEAD@Z)
1>HOGImage.obj : error LNK2019: unresolved external symbol __imp_FreeImage_FIFSupportsReading referenced in function "public: __cdecl HOG::HOGImage::HOGImage(char *)" (??0HOGImage@HOG@@QEAA@PEAD@Z)
1>HOGImage.obj : error LNK2019: unresolved external symbol __imp_FreeImage_GetFIFFromFilename referenced in function "public: __cdecl HOG::HOGImage::HOGImage(char *)" (??0HOGImage@HOG@@QEAA@PEAD@Z)
1>HOGImage.obj : error LNK2019: unresolved external symbol __imp_FreeImage_GetFileType referenced in function "public: __cdecl HOG::HOGImage::HOGImage(char *)" (??0HOGImage@HOG@@QEAA@PEAD@Z)
1>W:\20_src\13_others_code\fasthog\source\Debug\fastHOG.exe : fatal error LNK1120: 19 unresolved externals
  • added all fltk .lib files I could find in the lib folder to additional libraries to link against:
fltk2dlld.lib
fltk2dll_imagesd.lib
fltk2dll_glutd.lib
fltk2dll_gld.lib
  • result: still unresolved fltk symbols! :(
  • new try: building fltk_static.sln to build static libs
  • resulting list of libs is different from dynamic case!
fltk2d.lib
fltk2_gld.lib
fltk2_glutd.lib
fltk2_imagesd.lib
fltk2_jpegd.lib
fltk2_pngd.lib
fltk2_zd.lib
  • adding these libs to the fastHOG project settings to link against
  • linker result: still missing symbols

Conclusion: could not get it running...

  • I do not know how to get rid of this linker errors (fltk + FreeImage linker errors)
  • provided all fltk .libs and the FreeImage.lib to link against. But still linker errors …
 
public/person_detection_-_fasthog.txt · Last modified: 2012/06/26 14:39 (external edit) · []
Recent changes RSS feed Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki