Perform Color Analysis

To configure color analysis

  1. Create a new configuration to send to Media Server with the process action, or open an existing configuration that you want to modify.

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

    [Session]
    ...
    Engine2=ColorClusterTask
  3. Create a new configuration section to contain the task settings and set the following parameters:

    Type The analysis engine to use. Set this to ColorCluster.
    Input

    (Optional) The name of the track that contains the images to process. If you do not specify an input track, Media Server processes the first track of the correct type.

    ColorSpace (Optional) The color space in which the results of analysis are provided.
    ColorDictionary

    (Optional) A dictionary file that associates names with RGB color values. If you set this parameter, the task clusters colors around colors that are defined in the dictionary, and the results will include a name (such as "light blue" or "red") for each cluster.

    If the dictionary file is located in the colorcluster folder, in the static data directory, you can specify just the file name. Otherwise specify a path - either absolute or relative to the Media Server executable file.

    For example:

    [ColorClusterTask]
    Type=ColorCluster
    Input=MyTask.ResultWithSource
    ColorSpace=RGB
    
  4. (Optional) You can restrict color analysis to a specific region of the image or video frame. To do this, set the Region parameter.

    • To restrict analysis to a region that you define manually:

      Region=25,0,50,100 percent

      For information about how to set the Region parameter, refer to the Media Server Reference.

    • To restrict analysis to a region that is supplied by another analysis task:

      Region=Input

      NOTE: If you set Region=Input, the input track that you specify must contain region data. Many analysis engines, for example clothing detection or object recognition, produce records that contain regions.

  5. Save and close the configuration file.