Repository: opencv
Issue: CPU CascadeClassifier with HOG not working anymore with opencv 3.0.0.rc1
Labels: bug,auto-transferred,priority: normal,category: objdetect,affected: 3.4,RFC

Transferred from http://code.opencv.org/issues/4336

```
|| Valentino Proietti on 2015-05-14 09:47
|| Priority: Normal
|| Affected: branch 'master' (3.0-dev)
|| Category: objdetect
|| Tracker: Bug
|| Difficulty: Hard
|| PR: 
|| Platform: x64 / Linux
```
## CPU CascadeClassifier with HOG not working anymore with opencv 3.0.0.rc1

```
Hi,
While moving from opencv 2.4.10 to opencv 3.0.0rc1 I found that the CPU CascadeClassifier is not working anymore with HOG.
Digging into the code I discovered that the HOGEvaluator is completely missing in 3.0.

This is the FeatureEvaluator::create() method from the *2.4* version:
<pre>
Ptr<FeatureEvaluator> FeatureEvaluator::create( int featureType )
{
    return featureType == HAAR ? Ptr<FeatureEvaluator>(new HaarEvaluator) :
        featureType == LBP ? Ptr<FeatureEvaluator>(new LBPEvaluator) :
        featureType == HOG ? Ptr<FeatureEvaluator>(new HOGEvaluator) :
        Ptr<FeatureEvaluator>();
}
</pre>

And this is the same method from the *3.0* version:
<pre>
Ptr<FeatureEvaluator> FeatureEvaluator::create( int featureType )
{
    return featureType == HAAR ? Ptr<FeatureEvaluator>(new HaarEvaluator) :
        featureType == LBP ? Ptr<FeatureEvaluator>(new LBPEvaluator) :
        Ptr<FeatureEvaluator>();
}
</pre>

They are both extracted from the "cascadedetect.cpp" source file of the relative version.

The "opencv_traincascade" utility included in the 3.0.0rc1 version still permits us to use HOG for training but we don't know how to use the training results anymore. 
Is it a bug or a decision ?
If the latter: how are supposed to be used files produced by "opencv_traincascade" with HOG ?

Thank you
Valentino
```
## History
##### Alex D on 2015-05-15 12:58

```
Valentino Proietti wrote:
> Hi,
> While moving from opencv 2.4.10 to opencv 3.0.0rc1 I found that the CPU CascadeClassifier is not working anymore with HOG.
> Digging into the code I discovered that the HOGEvaluator is completely missing in 3.0.
> 
> This is the FeatureEvaluator::create() method from the *2.4* version:
> [...]
> 
> And this is the same method from the *3.0* version:
> [...]
> 
> They are both extracted from the "cascadedetect.cpp" source file of the relative version.
> 
> The "opencv_traincascade" utility included in the 3.0.0rc1 version still permits us to use HOG for training but we don't know how to use the training results anymore. 
> Is it a bug or a decision ?
> If the latter: how are supposed to be used files produced by "opencv_traincascade" with HOG ?
> 
> Thank you
> Valentino

I have exactly the same problem.
```
##### Vadim Pisarevsky on 2015-05-18 14:30

```
-   Category set to objdetect
```
##### Vadim Pisarevsky on 2015-05-28 14:24

```
We decided to drop the current HOG cascades in OpenCV 3.x. The implemented HOG features are quite weird - different from Dalal's interpretation of HOG, different from P. Dollar integral channel features. In xobjdetect we slowly grow superior ICF/ACF+WaldBoost-based detector, which is there already and will be improved during 2015.
-   Difficulty set to Hard
-   Assignee set to Vadim Pisarevsky
-   Status changed from New to Cancelled
```
##### Valentino Proietti on 2015-05-29 09:56

```
I'm just wondering why this "design decision" has not been evidenced as needed on the release notes, but may be it's just my fault.

Thank you very much indeed Vadim !!!
```
##### Steven Puttemans on 2015-06-10 09:36

```
Valentino Proietti wrote:
> I'm just wondering why this "design decision" has not been evidenced as needed on the release notes, but may be it's just my fault.
> 
> Thank you very much indeed Vadim !!!

Actually that is a very good point. It should be mentioned if functionality is dropped. We should remove the ability to train HOG features than also from the training interface. Will take a look at it later on! I will reopen this bugreport simply so I can link the PR for the deletion of the functionality.
-   Assignee changed from Vadim Pisarevsky to Steven Puttemans
-   Status changed from Cancelled to Open
```