Giter VIP home page Giter VIP logo

tutorial-haartraining's Introduction

-data/         The downloaded image datasets
-HaarTraining/ HaarTraining from OpenCV
-result/       Results

Below is a note of how I installed HaarTraining. 
I had to modify several files since I did not like to work on the OpenCV installed directory. 
These resulting files are availbe in the HaarTraining directory. 

On Windows
+ Install OpenCV 1.0. Download .exe installer and Install it (C:\Program Files\OpenCV) 
+ Copy C:\Program Files\OpenCV\apps\HaarTraining
+ Copy C:\Program Files\OpenCV\data\haarcascades into data\
+ Copy C:\Program Files\OpenCV\samples\c\{facedetect,convert_cascade}.c into HaarTrainig\src\
+ Modify path in the make\*.vcproj
  $ sh replace_vcproj.sh createsamples
  $ sh replace_vcproj.sh haartraining
  $ sh replace_vcproj.sh performance
  $ sh replace_vcproj.sh cvhaartraining
+ Modify make\haartraining.sln. 
  Replace ..\..\..\ with C:\Program Files\OpenCV\
+ Create mergevec.cpp, and vec2img.cpp into src\
+ Add new VC++ Console application projects, mergevec and vec2img in Visual Studio. 
  Copy {mergevec,vec2img}.vcproj into make\
  Modify *.vcproj
  $ sh new_vcproj.sh mergevec
  $ sh new_vcproj.sh vec2img
  Remove remained files and projects in Visual Stuio. 
  Add existing projects mergevec.vcproj, and vec2img.vcproj. 
+ Copy C:\Program Files\OpenCV\samples\c\{convert_cascade,facedetect}.c into src\
+ Add new VC++ Console ....
  Copy {convert_cascade,facedetect}.vcproj into make\
  Modify *.vcproj
   Copy contents of C:\Program Files\OpenCV\samples\c\cvsample.vcproj, but remaining ProjectGUID. 
   Replace the string 'cvsample' with 'convert_cascade or facedetect
   Replace .\..\..\ with .\../
   Replace ../../ with C:\Program Files\OpenCV\
   Replace OutputFile directory into .\../bin/
   Replace .\squares.c with .\..\src\convert_cascade.c or .\..\src\facedetect.c. 
  Remove remained files and projects in Visual Stuio. 
  Add existing projects ...
+ Build Solution. 
+ Copy C:\Program Files\OpenCV\bin\*.dll into HaarTraining\bin
+ Run. 
+ I got Runtime error R6034 (Visual Studio 8). On Visual Studio, 
  right Click Solution > Properties > Configuration Properties > Change all Configurations to 'Release' from 'Debug'
  Rebuild Solution. It worked.

On Linux
+ Download Open OpenCV-1.0.0.tar.gz, and tar xvzf OpenCV-1.0.0.tar.gz; cd opencv-1.0.0
+ ./configure --prefix=~/opencv-1.0.0; make; make install;
+ export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:~/opencv-1.0.0/{bin,lib}
+ cp -r ~/opencv-1.0.0/apps/HaarTraining .
+ cp -r ~/opencv-1.0.0/data/haarcascades data/
+ cp -r ~/opencv-1.0.0/samples/c/{facedetect,convert_cascade}.c HaarTrainig/src
+ cd HaarTraining; Created a Makefile in HaarTraining/
+ make
+ run

tutorial-haartraining's People

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

tutorial-haartraining's Issues

Checkout does not build revision 96

What steps will reproduce the problem?
1. cd src; make
2.
3.

What is the expected output? What do you see instead?
Expect it to compile. Fails with following error:
g++ `pkg-config --cflags opencv` -I../include -I. -o cvhaartraining.o -c 
cvhaartraining.cpp
cvhaartraining.cpp: In function ‘int 
icvGetHaarTrainingDataFromVec(CvHaarTrainingData*, int, int, 
CvIntHaarClassifier*, const char*, int*)’:
cvhaartraining.cpp:1818:50: error: ‘int 
icvGetHaarTrainingDataFromVec(CvHaarTrainingData*, int, int, 
CvIntHaarClassifier*, const char*, int*)’ was declared ‘extern’ and later 
‘static’ [-fpermissive]
In file included from cvhaartraining.cpp:49:0:
./_cvhaartraining.h:354:5: error: previous declaration of ‘int 
icvGetHaarTrainingDataFromVec(CvHaarTrainingData*, int, int, 
CvIntHaarClassifier*, const char*, int*)’ [-fpermissive]
make: *** [cvhaartraining.o] Error 1


What version of the product are you using? On what operating system?
Built against OpenCV 2.4.2, Ubuntu 13.04, Kernel 3.8.0-27-generic

Please provide any additional information below.
FIX: Remove line 1814 from cvhaartraining.cpp

Original issue reported on code.google.com by [email protected] on 23 Aug 2013 at 8:44

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.