org.sikuli.api
Class ColorImageTarget
java.lang.Object
org.sikuli.api.DefaultTarget
org.sikuli.api.ImageTarget
org.sikuli.api.ColorImageTarget
- All Implemented Interfaces:
- Target
public class ColorImageTarget
- extends ImageTarget
The ColorImageTarget class defines targets based on color patterns. It also takes into account the textures patterns.
This class can be used to distinguish between two targets having the same shapes or texture patterns but only differ
in the color patterns.
For example, it can be used to distinguish between a blue circle and a red circle.
It's very important to use this class when having targets that differ only in color since other Target classes such as
ImageTarget may fail to identify targets that differ only in colors.
ColorImageTarget
public ColorImageTarget(URL url)
- Creates a ColorImageTarget from an image at a given URL.
- Parameters:
url - the URL to load the image.
ColorImageTarget
public ColorImageTarget(BufferedImage targetImage)
- Creates a ColorImageTarget from a BufferedImage.
- Parameters:
targetImage - the image representing this target.
ColorImageTarget
public ColorImageTarget(File file)
- Creates a ColorImageTarget from a given File object.
- Parameters:
file - the File to read image data from.
Copyright © 2014. All rights reserved.