- // detects objects of different sizes in the input image.
- // the detected objects are returned as a list of rectangles.
- // scaleFactor specifies how much the image size
- // is reduced at each image scale.
- // minNeighbors speficifes how many neighbors should
- // each candiate rectangle have to retain it.
- // flags - ignored
- // minSize - the minimum possible object size.
- // Objects smaller than that are ignored.
- void detectMultiScale( const Mat& image,
+
+ void detectMultiScale( const Mat& image, vector<Rect>& objects,
+ double scaleFactor=1.1, int minNeighbors=3,
+ int flags=0, Size minSize=Size());
+
+ bool setImage( Ptr<FeatureEvaluator>&, const Mat& );
+ int runAt( Ptr<FeatureEvaluator>&, Point );
+
+ bool is_stump_based; // true, if the trees are stumps
+
+ int stageType; // stage type (BOOST only for now)
+ int featureType; // feature type (HAAR or LBP for now)
+ int ncategories; // number of categories (for categorical features only)
+ Size origWinSize; // size of training images
+
+ vector<Stage> stages; // vector of stages (BOOST for now)
+ vector<DTree> classifiers; // vector of decision trees
+ vector<DTreeNode> nodes; // vector of tree nodes
+ vector<float> leaves; // vector of leaf values
+ vector<int> subsets; // subsets of split by categorical feature
+
+ Ptr<FeatureEvaluator> feval; // pointer to feature evaluator
+ Ptr<CvHaarClassifierCascade> oldCascade; // pointer to old cascade
+};
+\end{lstlisting}
+
+\cvCppFunc{CascadeClassifier::CascadeClassifier}
+Loads the classifier from file.
+
+\begin{lstlisting}
+CascadeClassifier::CascadeClassifier(const string& filename);
+\end{lstlisting}
+
+\begin{description}
+\cvarg{filename}{Name of file from which classifier will be load.}
+\end{description}
+
+\cvCppFunc{CascadeClassifier::empty}
+Checks if the classifier has been loaded or not.
+
+\begin{lstlisting}
+bool CascadeClassifier::empty() const;
+\end{lstlisting}
+
+\cvCppFunc{CascadeClassifier::load}
+Loads the classifier from file. The previous content is destroyed.
+
+\begin{lstlisting}
+bool CascadeClassifier::load(const string& filename);
+\end{lstlisting}
+
+\begin{description}
+\cvarg{filename}{Name of file from which classifier will be load. File may contain as old haar classifier (trained by haartraining application) or new cascade classifier (trained traincascade application).}
+\end{description}
+
+\cvCppFunc{CascadeClassifier::read}
+Reads the classifier from a FileStorage node. File may contain a new cascade classifier (trained traincascade application) only.
+
+\begin{lstlisting}
+bool CascadeClassifier::read(const FileNode& node);
+\end{lstlisting}
+
+\cvCppFunc{CascadeClassifier::detectMultiScale}
+Detects objects of different sizes in the input image. The detected objects are returned as a list of rectangles.
+
+\begin{lstlisting}
+void CascadeClassifier::detectMultiScale( const Mat& image,