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.MixROR/ROL - Mix R,G and B Part into IR

Previous Top Next


MiniRobotLanguage (MRL)

 

ANA.MixROR

Mix Contents from 3 Image-Register (IR) that contain R,G and B-Part into a Single IR using a Bit Right-Shift (by P3 Bits)

 

ANA.MixROL

Mix Contents from 3 Image-Register (IR) that contain R,G and B-Part into a Single IR, using a Bit Left-Shift (by P3 Bits)

 

ANA.MixDROR

Mix Contents from 3 Image-Register (IR) that contain R,G and B-Part into a Single IR, using a Bit Right-Shift (by P3 Bits) and doing a Bit-Reversal LSB<>MSB

 

ANA.MixDROL

Mix Contents from 3 Image-Register (IR) that contain R,G and B-Part into a Single IR, using a Bit Left-Shift (by P3 Bits) and doing a Bit-Reversal LSB<>MSB

 

ANA.MixRev

Mix Contents from 3 Image-Register (IR) that contain R,G and B-Part into a Single IR, using a Bit Left-Shift (by P3 Bits) and doing a Bit-Reversal LSB<>MSB

 

ANA.MixRevN

Mix Contents from 3 Image-Register (IR) that contain R,G and B-Part into a Single IR, using a Bit Left-Shift (by P3 Bits) and doing a Bit-Reversal LSB<>MSB and a Negation

 

 

 

 

Intention

 

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

Its intended to analyze the pictures or apply Special effects.

 

Split Picture in R,G and B-Parts and Mix it together using the ROL/ROR_Commands

  Technically these commands eleminate some of the color-parts.

 

$$FIA=?pattern\SarahC_640.jpg

ANA.Load|0|$$FIA

ANA.SplitRGB|0|1

ANA.Show|1!

ANA.Show|2!

ANA.Show|3!

ANA.MixROL|6|1|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.MixROL|1                                        ANA.MixROR|1                                                ANA.MixDROR|1                                        ANA.MixDROL|1                                ANA.MixRev|2                                        ANA.MixRevN|2

               The result will be the blue part removed.                        The result will be the red part removed                                The Result will just be the Blue-Part.                                The result will be the red part.                        The Result will just be the Blue-Part.                                The result will be the red part.

 

 clip0055                Pic_ROR_1                        Pic_DROR_1                    Pic_DROL_1                Pic_300                Pic_3848

 

 

 

 ANA.MixROL|1                                        ANA.MixROR|1                                                ANA.MixDROR|1                                        ANA.MixDROL|1                                                ANA.MixRev|2                                ANA.MixRevN|2

               The result will be the blue part removed.                        The result will be the red part removed                        The Result will just be the Blue-Part.                                The result will be the red part.                                        The Result will just be the Blue-Part.                                The result will be the red part.

 

 Pic_Sa_ROL_1                Pic_Sa_ROR_1                        Pic_Sa_DROR_1                    Pic_Sa_DROL_1                Pic_5749                Pic_678

 

 

 

 

 ANA.MixROL|6                                        ANA.MixROR|6                                                ANA.MixDROR|6                                        ANA.MixDROL|6

               The result will be the blue part removed.                        The result will be the red part removed                        The Result will just be the Blue-Part.                                The result will be the red part.

 

 Pic_ROL_6                Pic_ROR_6                        Pic_DROR_6                    Pic_DROL_6

 

 

 

 ANA.MixROL|6                                        ANA.MixROR|6                                                ANA.MixDROR|6                                        ANA.MixDROL|6

               The result will be the blue part removed.                        The result will be the red part removed                        The Result will just be the Blue-Part.                                The result will be the red part.

 

 Pic_Sa_ROL_6                Pic_Sa_ROR_6                        Pic_Sa_DROR_6                    Pic_Sa_DROL_6

 

 

 

 

 

 

 

 

 

 

Syntax

 

ANA.MixROR[|P1][|P2][|P3]

ANA.MixROL[|P1][|P2][|P3]

ANA.MixDROR[|P1][|P2][|P3]

ANA.MixDROL[|P1][|P2][|P3]

ANA.MixRev[|P1][|P2][|P3]

ANA.MixRevN[|P1][|P2][|P3]

 

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.

P3 - opt Number of Bit-Shifts This numberwill specify how often the Bits will be shifted to LEFT (ROL/DROL) or RIGHT (ROR/DROR).
         You can use any number from 0 (no change) to 31.

 

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 MixROR-Sample

' Will save all resulting Pictures as ".jpg"

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

FOR.$$LOP|0|32

  $$FIA=?pattern\SarahC_640.jpg

  $$FIB=?pattern\Pic_Sa_ROR_$$LOP.jpg

  ANA.Load|0|$$FIA

  ANA.SplitRGB|0|1

  ANA.MixROR|6|1|$$LOP

  ANA.Show|6

  ANA.Save|6|$$FIB

NEX.

ENR.

 

 

Remarks

 

-

 

 

 

Limitations:

 

-

 

 

See also: