<< Click to Display Table of Contents >> Navigation: 3. Script Language > Image/Pixel-Color Operations > ANA. - Imageworks > Logic-Operations > Image/Pixel-Color Operations |
MiniRobotLanguage (MRL)
ANA.ColorDiffMapX
Generate a Outline based on the Color-Difference in X-Direction
ANA.ColorDiffMapY
Generate a Outline based on the Color-Difference in Y-Direction
ANA.ColorDiffMapXY
Generate a Outline based on the Color-Difference in X and Y-Direction
Intention
This Command will generate an Outline of the objects in the IR, it will search and find the borders of Objects.
Use it together with the ANA.Contrast Operation to get the results you may want.
This Example will show ANA.ReplaceColorT to make a Cleanup of a picture from a social network.
You got that Picture and it has a lot of JPG-Artefacts and the colors are not pure.
The SPR can quickly clean it up.
'***********************************
' ANA.ReplaceColorT-Sample
' Used to clean up JPG-Artefacts
' IMPORTANT: Used Sample picture are used for technical reasons and "may or may not represent" the opinion of the Script / SPR-Authors. :-)
'***********************************
VAF.$$PIA=?exeloc\Pics\Sam1.jpg
NEF.$$PIA
MBX.File not found.
EIF.
ANA.Load|1|$$PIA
ANA.Load|0|$$PIA
ANA.Show|0!
'Restore red
$$SRC=&HFF0000
$$COL=&HFF0000
$$TOL=95
ANA.ReplaceColorT|0|$$SRC|$$TOL|$$COL
' Restore Blue
$$SRC=&H0000FF
$$COL=$$SRC
$$TOL=90
ANA.ReplaceColorT|0|$$SRC|$$TOL|$$COL
'Restore Black
$$SRC=&H0
$$COL=$$SRC
$$TOL=90
ANA.ReplaceColorT|0|$$SRC|$$TOL|$$COL
'Restore White
$$SRC=&HFFFFFF
$$COL=$$SRC
$$TOL=90
ANA.ReplaceColorT|0|$$SRC|$$TOL|$$COL
ANA.Show|0!
' Generate Outline
ANA.cdfxy|0|1|1
ANA.Contrast|1|15000
ANA.Invert|1
ANA.Show|1!
' IR 2 must not be empty for the MixTar Command
ANA.Copy|0|2
' Combine both
ANA.MixTar|1|0|2
DMP.1
ANA.Show|2!
ENR.
' Below you can see the result of the Operation.
Original Picture with Artefacts First Cleanup - pure Colors Generate Outline to clean up Borders
Final Result
Here is the Speed-Dump:
Syntax
ANA.ColorDiffMapX|P1|P2[|P3]
ANA.ColorDiffMapY|P1|P2[|P3]
ANA.ColorDiffMapXY|P1|P2[|P3]
Parameter Explanation
P1 - Source Image-Register Number, if omitted 0 is used.
P2 - Destination Image-Register Number, if omitted 0 is used.
P3 - (opt.) Value that is used for the internal "ToGrey" Conversion. This value will effect the result. Default is 1.
The Command will not leave a 0/1 on the TOS.
Example
-
Remarks
This Command is really fast and will do its Job in a 1-2 Seconds.
Limitations:
-
See also: