org.sikuli.api
Class ColorImageTarget

java.lang.Object
  extended by org.sikuli.api.DefaultTarget
      extended by org.sikuli.api.ImageTarget
          extended by 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.


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.sikuli.api.Target
Target.Ordering
 
Constructor Summary
ColorImageTarget(BufferedImage targetImage)
          Creates a ColorImageTarget from a BufferedImage.
ColorImageTarget(File file)
          Creates a ColorImageTarget from a given File object.
ColorImageTarget(URL url)
          Creates a ColorImageTarget from an image at a given URL.
 
Method Summary
 
Methods inherited from class org.sikuli.api.ImageTarget
getImage, getURL, toImage, toString
 
Methods inherited from class org.sikuli.api.DefaultTarget
doFindAll, getLimit, getMinScore, getOrdering, setLimit, setMinScore, setOrdering
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.sikuli.api.Target
doFindAll, getLimit, getMinScore, getOrdering, setLimit, setMinScore, setOrdering
 

Constructor Detail

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.