Find Clothing

Clothing analysis provides the location of the clothing (covering the upper body) of a person who has been identified by face detection or face recognition.

To determine the location of clothing

  1. Create a new configuration or open an existing configuration to send to Media Server with the process action. Alternatively, you can modify the Media Server configuration file (mediaserver.cfg).

  2. In the [Analysis] section, add a new analysis task by setting the AnalysisEngineN parameter. You can give the task any name, for example:

    [Analysis]
    AnalysisEngine0=FaceDetect
    AnalysisEngine1=Clothing
  3. Create a new configuration section to contain the task settings, and set the following parameters:

    Type The analysis engine to use. Set this parameter to Clothing.
    Input The track that contains detected faces. The clothing analysis engine provides the position of a person's clothing for each detected face. Set this parameter to the ResultWithSource output track from your face detection task. For example, if your face detection task is named FaceDetect, set this parameter to FaceDetect.ResultWithSource.

    For example:

    [Clothing]
    Type=Clothing
    FaceInput=FaceDetect.ResultWithSource
  4. Save and close the configuration file. If you modified the Media Server configuration file, you must restart Media Server for your changes to take effect.

You can run clothing analysis followed by a color analysis task to find the dominant color of a person's clothing. For more information about the color analysis task, see Analyze Colors. The following procedure describes how to add a task for color analysis.

To determine the color of clothing

  1. Open the configuration file in which you configured the clothing analysis task.
  2. In the [Analysis] section, add a new analysis task (for color analysis) by setting the AnalysisEngineN parameter. You can give the task any name, for example:

    [Analysis]
    AnalysisEngine0=FaceDetect
    AnalysisEngine1=Clothing
    AnalysisEngine2=ClothingColors
  3. Create a new configuration section to contain the task settings, and set the following parameters:

    Type The analysis engine to use. Set this parameter to ColorCluster.
    Input The track that contains information about the location of the clothing (and the image to analyze). Set this parameter to the ResultWithSource output track from your clothing analysis task. For example, if your clothing analysis task is named Clothing, set this parameter to Clothing.ResultWithSource.
    RestrictToInputRegion A Boolean value that specifies whether to analyze a region of the input image or video frame that is specified in the input record, instead of the entire image. Set this parameter to TRUE, because you want the color analysis task to analyze only the region that represents the clothing, and not the entire image.

    For example:

    [ClothingColors]
    Type=ColorCluster
    Input=Clothing.ResultWithSource
    RestrictToInputRegion=True
  4. Save and close the configuration file. If you modified the Media Server configuration file, you must restart Media Server for your changes to take effect.


_HP_HTML5_bannerTitle.htm