Image/Pixel-Color Operations

<< Click to Display Table of Contents >>

Navigation:  3. Script Language > Image/Pixel-Color Operations > ANA. - Imageworks > RGB- and HLS-Operations >

Image/Pixel-Color Operations

ANA.MixRGB - Mix R,G and B Part into IR

Previous Top Next


MiniRobotLanguage (MRL)

 

ANA.MixRGB

Mix Contents from 3 Image-Register (IR) that contain R,G and B-Part into a Single IR

 

ANA.MixBGR

Mix Contents from 3 Image-Register (IR) that contain R,G and B-Part into a Single IR, flipping IR's into BGR

 

ANA.MixBRG

Mix Contents from 3 Image-Register (IR) that contain R,G and B-Part into a Single IR, flipping IR's into BRG

 

ANA.MixGRB

Mix Contents from 3 Image-Register (IR) that contain R,G and B-Part into a Single IR, flipping IR's into GRB

 

 

Intention

 

This command will mix the Content of R,G and B-Part each in separate Image-Registers, into a Single IR-Picture.

 

1. Split Picture in R,G and B-Parts and Mix it together into original Picture

  SplitRGB is technically the Opposite then the ANA.MixRGB - Command.

 

$$FIA=?pattern\SarahC_640.jpg

ANA.Load|0|$$FIA

ANA.SplitRGB|0|1

ANA.Show|1!

ANA.Show|2!

ANA.Show|3!

ANA.MixRGB|6|1

ANA.Show|6!

ENR.

 

 

Picture 1: Original in IR 0   Picture 2 in IR 1                        Picture 3 in IR 2                            Picture 4 in IR 3

 

clip0043 ->clip0040+clip0041+ clip0042

Colors->clip0047+clip0048+clip0049

Below we will show just the result of the Mixing-Commands:

 

ANA.MixRGB

  the Result will just be the Original, unless you have changed the Parts.

clip0043   Colors

 

 

ANA.MixBGR

  the Result will just be the Original, unless you have changed the Parts.

clip0045   clip0051

 

 

ANA.MixBRG

  the Result will just be the Original, unless you have changed the Parts.

clip0046   clip0050

 

 

 

ANA.MixGRB

  the Result will just be the Original, unless you have changed the Parts.

clip0044   clip0052

 

 

Syntax

 

ANA.MixRGB[|P1][|P2]

ANA.MixBGR[|P1][|P2]

ANA.MixBRG[|P1][|P2]

ANA.MixGRB[|P1][|P2]

 

Parameter Explanation

P1 - opt. Destination Image-Register number, if omitted, IR 0 will be used.

P2 - opt.Source R Image-Register number, if omitted, IR P1+1 will be used.

Important:

The Image Registers for G+B are P2+1 and P2+2

 

The Command will leave a 0/1 on the TOS. As always, a 0 means Error, while a 1 means "all fine".

 

 

Example

 

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

' ANA.SplitRGB and MixRGB-Sample

'

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

$$FIA=?pattern\SarahC_640.jpg

ANA.Load|0|$$FIA

ANA.SplitRGB|0|1

ANA.Show|1!

ANA.Show|2!

ANA.Show|3!

' Now mix the 3 Parts together in IR 6

ANA.MixRGB|6|1

ANA.Show|6!

ENR.

 

 

Remarks

 

-

 

 

 

Limitations:

 

-

 

 

See also: