<commit_before>/*=========================================================================

  Program:   Insight Segmentation & Registration Toolkit
  Module:    itkFaceDetectionFilter.h
  Language:  C++
  Date:      $Date$
  Version:   $Revision$

  Copyright (c) Insight Software Consortium. All rights reserved.
  See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.

     This software is distributed WITHOUT ANY WARRANTY; without even
     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
     PURPOSE.  See the above copyright notices for more information.

=========================================================================*/
#ifndef __itkFaceDetectionFilter_h
#define __itkFaceDetectionFilter_h

#include "cv.h"
#include "highgui.h"
#include "itkImageToImageFilter.h"
#include "list"

namespace itk
{
/** \class FaceDetectionFilter
 * \brief Detect the face in an image using OpenCV libs
 *
 * Face detection filter is used to detect faces with an openCV module
 * This filter only works with 2D  grayscale images. The output image has the 
 * same type as the input image.
 * 
 * In order to detect the faces, the filter has to be trained. 
 * Consequently, you always need to specify the trainer file.
 * (it shoud be a .xml file).
 * By default, the filter generate white rectangles around the faces it detects
 * You can also change the option with the SetGenerateROI and SetDrawRectangles
 * method.
 * If you only want the ROI, then the filter output image is the same as the input
 * If you want both option, then you would find lines from the drawn recatngles
 * in your ROI if some ROIs are overlaping.
 * If both options are disabled, then nothing happens.
 *
 * For the ROI, you may want also to use the filter RegionOfInterestImageFilter to 
 * get the faces from your image. 
 *
 * \sa PasteImageFilter
 * \sa RegionOfInterestImageFilter
 *
 * \ingroup OpenCVFilters
 */



template< class TInputImage >
class ITK_EXPORT FaceDetectionFilter : public ImageToImageFilter< TInputImage,TInputImage >
{
public:
  /** Standard class typedefs. */
  typedef FaceDetectionFilter                                   Self;
  typedef ImageToImageFilter< TInputImage, TInputImage >       Superclass;
  typedef SmartPointer< Self >                                  Pointer;
  typedef SmartPointer< const Self >                            ConstPointer;

  /** Method for creation through the object factory. */
  itkNewMacro(Self);

  /** Run-time type information (and related methods). */
  itkTypeMacro(FaceDetectionFilter, ImageToImageFilter);

  /** Some typedefs for the input and output types. */
  typedef TInputImage  InputImageType;
<commit_msg>DOC: Update doxygen for Video-Filters-OpenCV<commit_after>/*=========================================================================

  Program:   Insight Segmentation & Registration Toolkit
  Module:    itkFaceDetectionFilter.h
  Language:  C++
  Date:      $Date$
  Version:   $Revision$

  Copyright (c) Insight Software Consortium. All rights reserved.
  See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.

     This software is distributed WITHOUT ANY WARRANTY; without even
     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
     PURPOSE.  See the above copyright notices for more information.

=========================================================================*/
#ifndef __itkFaceDetectionFilter_h
#define __itkFaceDetectionFilter_h

#include "cv.h"
#include "highgui.h"
#include "itkImageToImageFilter.h"
#include "list"

namespace itk
{
/** \class FaceDetectionFilter
 * \brief Detect the face in an image using OpenCV libs
 *
 * Face detection filter is used to detect faces with an openCV module
 * This filter only works with 2D  grayscale images. The output image has the 
 * same type as the input image.
 * 
 * In order to detect the faces, the filter has to be trained. 
 * Consequently, you always need to specify the trainer file.
 * (it shoud be a .xml file).
 * By default, the filter generate white rectangles around the faces it detects
 * You can also change the option with the SetGenerateROI and SetDrawRectangles
 * method.
 * If you only want the ROI, then the filter output image is the same as the input
 * If you want both option, then you would find lines from the drawn recatngles
 * in your ROI if some ROIs are overlaping.
 * If both options are disabled, then nothing happens.
 *
 * For the ROI, you may want also to use the filter RegionOfInterestImageFilter to 
 * get the faces from your image. 
 *
 * \sa PasteImageFilter
 * \sa RegionOfInterestImageFilter
 *
 * \ingroup Video-Filters-OpenCV
 */



template< class TInputImage >
class ITK_EXPORT FaceDetectionFilter : public ImageToImageFilter< TInputImage,TInputImage >
{
public:
  /** Standard class typedefs. */
  typedef FaceDetectionFilter                                   Self;
  typedef ImageToImageFilter< TInputImage, TInputImage >       Superclass;
  typedef SmartPointer< Self >                                  Pointer;
  typedef SmartPointer< const Self >                            ConstPointer;

  /** Method for creation through the object factory. */
  itkNewMacro(Self);

  /** Run-time type information (and related methods). */
  itkTypeMacro(FaceDetectionFilter, ImageToImageFilter);

  /** Some typedefs for the input and output types. */
  typedef TInputImage  InputImageType;

{'fraction_non_alphanumeric': 0.11390315480557593, 'fraction_numerical': 0.00036683785766691124, 'mean_word_length': 3.5479566305254377, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6034493', 'n_tokens_mistral': 1444, 'n_tokens_neox': 1371, 'n_words': 590}