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

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.