---
name: "opencv_traincascade"
section: "1"
platform: "linux"
package: "libopencv-dev"
version: "4.5.1+dfsg-5"
release: "Debian 11 (Bullseye)"
platforms: ["linux"]
url: "https://new.carta.tech/opencv_traincascade"
---

# opencv\_traincascade(1)

transcascade application

## NAME

opencv\_traincascade - transcascade application

## SYNOPSIS

**opencv\_traincascade \[options\]**

## DESCRIPTION

**traincascade application.**

## OPTIONS

**opencv\_traincascade** supports the following options:

## BASIC OPTIONS

- **-data** *cascade\_dir\_name*

  - **-vec** *vec\_file\_name*

  - **-bg** *background\_file\_name*

  - **-numPos** *number\_of\_positive\_samples*

  The default is *2000*.

- **-numNeg** *number\_of\_negative\_samples*

  The default is *1000*.

- **-num** *Stages***number\_of\_stages**

  The default is *20*.

- **-precalcValBufSize** *precalculated\_vals\_buffer\_size\_in\_Mb*

  The default is *256*.

- **-precalcIdxBufSize** *precalculated\_idxs\_buffer\_size\_in\_Mb*

  The default is *256*.

- **-baseFormatSave**

  ## CASCADE OPTIONS

- **-stageType**

  The default is *BOOST*.

- **-featureType**

  Set feature type . You can select HAAR or LBP. The default is *HAAR*.

- **-w** *sampleWidth*

  The default is *24*.

- **-h** *sampleHeight*

  The default is *24*.

## BOOST OPTIONS

- **-bt {***DAB***\|***RAB***\|***LB***\|***GAB***}**

  The type of the applied boosting algorithm. You can choose between Discrete AdaBoost (*DAB*), Real AdaBoost (*RAB*), LogitBoost (*LB*) and Gentle AdaBoost (*GAB*). The default is *GAB*.

- **-minHitRate** *min\_hit\_rate*

  The default is *0.995*.

- **-maxFalseAlarmRate** *max\_false\_alarm\_rate*

  The default is *0.5*.

- **-weightTrimRate** *weight\_trim\_rate*

  The default is *0.95*.

- **-maxDepth** *max\_depth\_of\_weak\_tree*

  The default is *1*.

- **-maxWeakCount** *max\_weak\_tree\_count*

  The default is *100*.

## HAARFEATURE OPTIONS

- **-mode** *\<BASIC***\|***CORE***\|***ALL\>*

  The type of the applied haarFeature mode. You can choose between *BASIC*,  `ORE` and *ALL*. The default is *BASIC*.

## EXAMPLES

TODO

## SEE ALSO

**opencv\_haartraing**(1), [**opencv\_performance**(1)](/opencv_performance/1.md)

More information and examples can be found in the OpenCV documentation.

## AUTHORS

This manual page was written by **Nobuhiro Iwamatsu** \<iwamatsu@debian.org\> for the Debian project (but may be used by others).
