Adding and Editing Color Models
A Color Model is a collection of Colors that are used to define an object and background in an image. Each Color Model represents a 3D color space in which you add or subtract the RGB values of Colors of the object and background you are acquiring.
![Closed](../../Skins/Default/Stylesheets/Images/transparent.gif)
- From the Settings tab, select the Color Library to reference from the Color Library drop-down menu. By default, the first Color Library (ExtractColorLibrary_1) is selected.
- Press the Train Color button to launch the ExtractColor Training dialog.
- In the Color Models group box of the ExtractColor Training dialog, press the New Model button to add a new Color Model to the Color Library. The default name is "Model_1" (if it is the first Color Model added to the Color Library, otherwise it will be incremented, e.g. "Model_2", "Model_3", etc.).
- If desired, rename the Color Model to a name more specific to your application, especially if you will have multiple Color Models. A Color Model can be renamed at any time by highlighting the Color Model and pressing the Rename button above the Color Library directory.
- Color Models can be removed from the list by selecting the Color Model and pressing the Delete Model button.
![Closed](../../Skins/Default/Stylesheets/Images/transparent.gif)
Adding or Subtracting a Single Color to a Color Model
- Select the Color Model to modify.
- In the Train group box, select Most Dominant Color (the default setting).
- In the Train group box, select the type of region that will be used to define the Color: Region, Circle, Annulus, Polygon or Freehand.
- Press the Add New Color or the Subtract New Color button, and configure the region within the image so that it only includes the RGB values that you want to add or subtract.
- Either double-click the region or press the OK button in the Job Edit toolbar once you have configured the region.
- For an Add Operation, the Color added to the Color Model contains the peak RGB values from within the region, and those values will be added to the cumulative Color Model.
- For a Subtract Operation, the Color added to the Color Model contains the peak RGB values from within the region, and those values will be subtracted from the cumulative Color Model.
- Colors in the Color Model list may be moved within the list to modify which Color begins or ends the operation. The fist Color applied to the inspection is listed first.
Adding or Subtracting Multiple Colors to a Color Model
- Select the Color Model to modify.
- In the Train group box, select Multiple Colors.
- In the Train group box, select the type of region that will be used to define the Color: Region, Circle, Annulus, Polygon or Freehand.
- Press the Add New Color or Subtract New Color button, and configure the region within the image so that it only includes the RGB values that you want to add or subtract.
- Either double-click the region or press the OK button in the Job Edit toolbar once you have configured the region.
- For an Add Operation, the Color added to the Color Model contains the peak RGB values from within the region, and those values will be added to the cumulative Color Model.
- For a Subtract Operation, the Color added to the Color Model contains the peak RGB values from within the region, and those values will be subtracted from the cumulative Color Model.
- Colors in the Color Model list may be moved within the list to modify which Color begins or ends the operation. The fist Color applied to the inspection is listed first.
![Closed](../../Skins/Default/Stylesheets/Images/transparent.gif)
Utilizing the Image Marking controls in conjunction with the Color Tolerance controls, you can determine how much of your object is being detected and adjust the Color Tolerance controls to increase or decrease the sensitivity of the tool by using the Darker, Lighter, Highlights and Hues settings in the Color Tolerance group box of the ExtractColor Training dialog.
Color Tolerance Controls
Darker
Increasing this setting adds space to the Color toward Black (0, 0, 0).
Lighter
Increasing this setting adds space to the Color toward White (255, 255, 255).
Highlights
Increasing this setting adds space to the Color from the initial Color position toward White (255, 255, 255).
Hues
Increasing this setting increases the 3D "box" of the initial Color in three dimensions in the color space.
Image Marking Controls
The Image Marking buttons allow you to determine what is highlighted in the image when you are adding/subtracting Color(s) and Color Model(s).
Mark Results for Entire Group
All of the Colors in your Color Model are marked in the image.
Mark Results up to Selected Color
If you select the second Color in a list of three, the first and second Colors are marked in the image.
Mark Selected Colors Only
Only the selected Color is marked in the image.
![Closed](../../Skins/Default/Stylesheets/Images/transparent.gif)
- From the Settings tab, select the Color Library to reference from the Color Library drop-down menu.
- Press the Train Color button to launch the ExtractColor Training dialog.
- Select the Color Model to modify and utilize the controls in the dialog to edit the Color Model.