<< Click to Display Table of Contents >> Navigation: 3. Script Language > Image/Pixel-Color Operations > ANA. - Imageworks > Pattern-Recognition > Image/Pixel-Color Operations |
MiniRobotLanguage (MRL)
ANA.GetResult
Get Result from Find-Operation on TOS
Intention
This command is called internally automatically after FindPattern Operations like "ANA.FIndPattern".
It is possibly not needed anymore as from now find-Operations call it internally.
It will place the result of these Operation on the TOS.
It will also clear the internal Find-Operation Memory, therefore you can call it only one time after each Find-Operation.
If you do not need the results from the last Find-Operation, you can use "ANA.ResetList"
to clear the Find-Memory without dropping the results on the Stack.
Left picture: This is the Stack before and after the call to ANA.GetResult.
Right Picture: This is the Stack after the first Result - that is the number of Found Elements - has been "Pop'ed".
Here is the Code that shows the usage of ANA.GetResult.
STW.ct|FORM_DESKTOPS_MANAGER_FRMMAIN_CLASS:0|Desktops-Manager
'SWP.4090,2|640,400|T
ANA.Snap|0
' Please adapt the filename of the saved Pattern
ANA.Load|1|?path\De16.bmp
' P1 - Target, P2 - Pattern, P3 - Color-Tolerance, P4 - min. Hits (Pixel) maximum Number:128 . We use -10%, P5 - Debugmode 0/1
ANA.fpa|0|1|0|115|0
DMP.6
ANA.gres
DMP.6
' We take away the number of Hits from TOS
POP.$$NOH
DMP.6
' If no Hits, jump away to Lab_NoHits.
MBX.$$NOH
ENR.
Syntax
ANA.GetResult[|P1]
Parameter Explanation
P1 - opt. this Parameter is currently not used,
The Command will leave a 0 on the TOS in case of error.
Otherwise it will put the results of the last Find-Operation on the Stack in sorted Order.
The first number on the TOS is the "Number of results", After that the results come one after the other.
Generally the results are sorted from Bottom to Top.
Example
'***********************************
' ANA.GetResult-Sample
'***********************************
' You can not run this example
' its a Subprogram-code that will search for alternative patterns
' if the first pattern is not found.
:GetPat16OR
GSB.GetHWN
ANA.Snap|0
ANA.Load|1|§§_01
ANA.fpa|0|1|0|§§_02|0
ANA.gres
POP.$$POA
IVV.$$POA=0
ANA.Load|1|§§_03
ANA.fpa|0|1|0|§§_04|0
ANA.gres
POP.$$POA
IVV.$$POA=0
MBX.Pattern not found: §§_03
EIF.
EIF.
RET.
Remarks
-
Limitations:
-
See also: