User Tools

Site Tools


en:code:core:image

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
en:code:core:image [2013/06/29 10:35] – [takeScreenshotUsingScreenIndex] jmgren:code:core:image [2023/10/09 10:17] (current) jmgr
Line 16: Line 16:
 <code javascript> <code javascript>
 var myObject = new Image(filename); var myObject = new Image(filename);
-</code> 
-<code javascript> 
-var myObject = new Image(x, y); 
 </code> </code>
  
Line 371: Line 368:
     * confidenceMinimum - (integer) the minimum confidence percentage, 100 means perfect match (default: 70)     * confidenceMinimum - (integer) the minimum confidence percentage, 100 means perfect match (default: 70)
     * downPyramidCount - (integer) the number of pyramids to use. A pyramid is a subdivision of the image used to accelerate the search. Choose 1 here if the searched image is not very different from this image. (default: 2)     * downPyramidCount - (integer) the number of pyramids to use. A pyramid is a subdivision of the image used to accelerate the search. Choose 1 here if the searched image is not very different from this image. (default: 2)
-    * searchExpansion - (integer) the number of pixels to shift when searching for another matching image (default: 15)+    * method - ([[#method|Method]]) the search method to use (default: CorrelationCoefficient[//Added in Actionaz 3.7.0.//]
  
 === Returns === === Returns ===
Line 415: Line 412:
     * searchExpansion - (integer) the number of pixels to shift when searching for another matching image (default: 15)     * searchExpansion - (integer) the number of pixels to shift when searching for another matching image (default: 15)
     * maximumMatches - (integer) the maximal number of matches (default: 10)     * maximumMatches - (integer) the maximal number of matches (default: 10)
 +    * method - ([[#method|Method]]) the search method to use (default: CorrelationCoefficient) [//Added in Actionaz 3.7.0.//]
  
 === Returns === === Returns ===
Line 431: Line 429:
 var imageToFind = new Image("object.png"); var imageToFind = new Image("object.png");
  
-var searchResult = screenShot.findSubImage(imageToFind);+var searchResult = screenShot.findSubImages(imageToFind);
 if(searchResult) if(searchResult)
 { {
Line 466: Line 464:
     * downPyramidCount - (integer) the number of pyramids to use. A pyramid is a subdivision of the image used to accelerate the search. Choose 1 here if the searched image is not very different from this image. (default: 2)     * downPyramidCount - (integer) the number of pyramids to use. A pyramid is a subdivision of the image used to accelerate the search. Choose 1 here if the searched image is not very different from this image. (default: 2)
     * searchExpansion - (integer) the number of pixels to shift when searching for another matching image (default: 15)     * searchExpansion - (integer) the number of pixels to shift when searching for another matching image (default: 15)
 +    * method - ([[#method|Method]]) the search method to use (default: CorrelationCoefficient) [//Added in Actionaz 3.7.0.//]
  
 === Returns === === Returns ===
Line 511: Line 510:
     * searchExpansion - (integer) the number of pixels to shift when searching for another matching image (default: 15)     * searchExpansion - (integer) the number of pixels to shift when searching for another matching image (default: 15)
     * maximumMatches - (integer) the maximal number of matches (default: 10)     * maximumMatches - (integer) the maximal number of matches (default: 10)
 +    * method - ([[#method|Method]]) the search method to use (default: CorrelationCoefficient) [//Added in Actionaz 3.7.0.//]
  
 === Returns === === Returns ===
Line 567: Line 567:
   - Vertical: a vertical mirror   - Vertical: a vertical mirror
   - Horizontal: an horizontal mirror   - Horizontal: an horizontal mirror
 +
 +==== Method ====
 +Search method. [//Added in Actionaz 3.7.0.//]
 +
 +=== Values ===
 +  - CorrelationCoefficient: correlation coefficient, best for most use cases
 +  - CrossCorrelation: cross correlation
 +  - SquaredDifference: squared difference
en/code/core/image.1372502101.txt.gz · Last modified: 2021/02/13 11:23 (external edit)