Ask Your Question

rantanplan's profile - activity

2015-10-11 10:04:07 -0600 received badge  Nice Question (source)
2015-02-13 00:10:14 -0600 received badge  Taxonomist
2014-09-07 08:21:10 -0600 received badge  Student (source)
2013-11-27 23:23:34 -0600 received badge  Good Answer (source)
2013-05-22 03:12:16 -0600 received badge  Good Answer (source)
2013-03-26 23:26:44 -0600 received badge  Nice Answer (source)
2012-07-31 14:08:57 -0600 answered a question Mergevec.cpp : Error (compilation)

To compile the mergevec tool I did the following:

 1814c1814
 < static
 ---
 > //static
  • in src folder: run make mergevec
2012-07-31 13:44:45 -0600 received badge  Supporter (source)
2012-07-06 03:12:16 -0600 received badge  Nice Answer (source)
2012-07-04 14:47:42 -0600 commented question Enable Multithreading with TBB during cascade training

@Maria: Thanks for the clarification.

2012-07-04 10:53:08 -0600 received badge  Scholar (source)
2012-07-04 08:46:34 -0600 received badge  Teacher (source)
2012-07-04 08:41:00 -0600 answered a question How to train cascade classifier

Hi KDS,
you have to create a .vec file from your positives file using the opencv_createsamples tool, e.g.

opencv_createsamples -info positives.dat -num 1000 -vec positives.vec -w 24 -h 24

This would create a positives.vec file from 1000 positve samples listed in positives.dat. The sample width and height are 24. This .vec file is than passed to opencv_traincascade for training. For the negatives you just pass a file containing the file names of your negative samples. For further informations i found this, that, and that good resources. But you've probably found them already...

To create the opencv_createsamples tool you should configure OpenCV with BUILD_EXAMPLES=ON (i think).

2012-07-04 08:26:13 -0600 answered a question build problems for android_binary_package - Eclipse Indigo, Ubuntu 12.04

Hi darKoram, maybe you should try to break down your long problem into several smaller ones.

To help you with the java installation part of your long problem:

As you already found out Ubuntu no longer ships with sun-java6-jdk, so you have to install it manually. Below you find the instructions to install jdk6

  1. Download jdk6 from sun/oracle (I am using jdk1.6.0_33)
  2. uncompress the downloaded archive => jdk1.6.0_33
  3. mkdir /opt/java/64/
  4. sudo mv jdk1.6.0_33/ /opt/java/64/
  5. run:
    sudo update-alternatives --install "/usr/bin/java" "java" "/opt/java/64/jdk1.6.0_33/bin/java" 1
    sudo update-alternatives --install "/usr/bin/javac" "javac" "/opt/java/64/jdk1.6.0_33/bin/javac" 1
    sudo update-alternatives --install "/usr/bin/javaws" "javaws" "/opt/java/64/jdk1.6.0_33/bin/javaws" 1
    sudo update-alternatives --install "/usr/bin/javah" "javah" "/opt/java/64/jdk1.6.0_33/bin/javah" 1

  6. run:
    sudo update-alternatives --config java
    sudo update-alternatives --config javac
    sudo update-alternatives --config javaws
    sudo update-alternatives --config javah

Conerning your OpenCV installation. I would recommend you to use the latest OpenCV version 2.4.1, download the android(!) package, within you find an OpenCV-2.4.1 and an OpenCV-2.4.1-samples folder. Import the OpenCV-2.4.1 folder to Eclipse via File -> Import -> General -> Existing Projects into Workspace. For the samples, OpenCV-2.4.1-samples, you can do the same and choose which samples to install.

2012-07-04 05:38:10 -0600 received badge  Famous Question (source)
2012-07-02 10:56:29 -0600 received badge  Notable Question (source)
2012-07-02 06:04:21 -0600 received badge  Popular Question (source)
2012-06-30 11:56:23 -0600 received badge  Editor (source)
2012-06-30 11:44:43 -0600 asked a question Enable Multithreading with TBB during cascade training

I have compiled OpenCV-2.4.1 with TBB support (-DWITH_TBB=ON) on Ubuntu, which currently ships with TBB 4.0. However when I run opencv_traincascade to train a classifier only one core is used. I've also explicitly checked whether libtbb2 (really is 4.0) is used (/proc/[opencv_traincascade process number]/maps), and it is used. I am using an AMD Athlon 64 X2 Dual Core 4200+ processor.

Is there a way to enforce the usage of 2 or more cores? Or is there a problem with TBB on AMD CPUs?

Update: As I can't comment directly on your answers, so i update my question.

  1. Thanks for your answers!
  2. @Daniil: I tried checking for HAVE_TBB in traincascade.cpp without success. However, checking my build i found cvconfig.h which actually defines HAVE_TBB. So i believe that the libraries are really build with TBB support. I also checked their symbol table with nm and tbb symbols are there.
  3. @Maria: Thats what i was afraid of. However this discussion states that there should be an improvement using TBB.?!