Image/Pixel-Color Operations

<< Click to Display Table of Contents >>

Navigation:  3. Script Language > Image/Pixel-Color Operations > ANA. - Imageworks > Pattern-Recognition >

Image/Pixel-Color Operations

ANA.GetResultsPack - Get Result on TOS

Previous Top Next


MiniRobotLanguage (MRL)

 

ANA.GetResultsPack

Get detailled Result from Find-Operation on TOS

 

 

Intention

 

This command plays a crucial role in obtaining comprehensive results following FindPattern operations, such as 'ANA.FindPattern'.

It yields more in-depth results than the standard output on TOS, and notably, these results aren't automatically deleted.

 

The command serves two primary functions:

 

1. It places a single finding on the stack.

2. When called with P1=0, it simply puts the number of finds on TOS.

 

If the results from the previous Find-Operation are not required, 'ANA.ResetResultsPack' can be used to clear the Find-Memory.

The subsequent code demonstrates the usage of this command: ANA.GetResultsPack.

 

STW.ct|Chrome_WidgetWin_1|General Discussion - Brave

SWP.12,9|1216,717|T

VAR.$$PA1=?pattern\Cross_12.bmp

ANA.Load|1|$$PA1

' This will generate the 4 Downscaled Versions

ANA.DownScale|1|2

VAN.$$COT=110

VAN.$$PIH=-60

' Setting Maximum stored results to 40 - is 10 by default.

ANA.Set_Data|6|40

ANA.Snap|0

ANA.FindPattern4|0|$$COT|$$PIH|$$COT|$$PIH|$$COT|$$PIH|$$COT|$$PIH

PRT.----------------------------

' This command will clear the stack so we only get the Results-Pack-Item

STS.CLEAR

' Here we ask for the 5th Found Item.

ANA.GetResultsPack|5

DMP.6

ANA.ShowHits|0!

ENR.

 

 

Note that this command will just place the one specified "Find" on the Stack. You will get a lot of additional Information for the find:

 

$$000/TOS:          Number of Find that is on Stack.

$$001        Number of remaining Finds in Memory.

$$002        Coordinates of Middlepoint of this Find. These are in Top-Window-Coordinates.

$$003        Coordinates of the Find-Rectangle of this Find. These are in Top-Window-Coordinates.

$$004        Engine Number that has found the Pattern - this references the Pattern-Number in "FindPattern4"

$$005        Pattern-Size of the found Pattern.

 

 

clip0037       clip0038

Left picture: This is the Stack after the call to ANA.GetResultspack|5.

 

Right Picture: Using Multi-Pattern Find Operations with scaled Patterns and high Tolerance Settings can lead to the same Object

being found from several engines.

 

 

 

Syntax

 

ANA.GetResultsPack[|P1][|P2]

 

Parameter Explanation

 

P1 - opt. Number of the Find to get. This number should be in a range from 1 to "Number of Finds".
                   If P1 is zero, the command will just return the number of stored Finds.        

P2 - opt. 0/1 If P2 is 1 then the Result that was on TOS is been deleted from Results-Memory.

                  As the results are organized like an internal Stack, another result will take its number
                  and the number of remaining results will decrease.  

 

The Command will leave a 0 on the TOS in case of error.

Generally the results are sorted from Bottom to Top.

 

Example

 

'***********************************

' ANA.GetResult-Sample

'***********************************

STW.ct|Chrome_WidgetWin_1|General Discussion - Brave

SWP.12,9|1216,717|T

VAR.$$PA1=?pattern\Cross_12.bmp

ANA.Load|1|$$PA1

' This will generate the 4 Downscaled Versions

ANA.DownScale|1|2

VAN.$$COT=110

VAN.$$PIH=-60

' Setting Maximum stored results to 40 - is 10 by default.

ANA.Set_Data|6|40

ANA.Snap|0

ANA.FindPattern4|0|$$COT|$$PIH|$$COT|$$PIH|$$COT|$$PIH|$$COT|$$PIH

PRT.----------------------------

STS.CLEAR

ANA.GetResultsPack|0

DMP.6

PAU.5

ANA.GetResultsPack|1|1

DMP.6

MBX.Ready

ENR.

 

 

 

 

Remarks

-

 

 

 

Limitations:

-

 

 

See also:

 

    ANA_FindPattern