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.Change_HLSA / Change_HLSM

Previous Top Next


MiniRobotLanguage (MRL)

 

ANA.Change_HLSA

Change full Image-Register (IR) Content HLS Additive

ANA.Change_HLSM

Change full Image-Register (IR) Content HLS using Multiplication

 

 

Intention

 

This command will change the HLS-Values of a complete IR.

For this it will Add or Subtract Values for H,L and S.

These values can be directly the given values using ANA.Change_HLSA

or can be values where the given values will be multiplied with the current Pixel-Values using ANA.Change_HLSM.

 

What is HLS?

0-239 Hue is wavelength color.

0-240 Luminosity (brightness, brilliance) is black 0(0%) to white240(100%).

0-240 Saturation is relative bandwidth amount of grey in a color. 0(0%) to 240(100%)  

as you can see, the Range from HLS is not exactly the same like it was RGB.

For further use.

 

1. Using the Multiplikation HLS-Modifier

  Here is the Source-Code:

 

VAF.$$PIA=?exeloc\Sara2.jpg

NEF.$$PIA

  MBX.No such file.

  ENR.

EIF.

ANA.Load|0|$$PIA

ANA.Show|0!

$$HUE=0

$$LUM=150

$$SAT=-100

ANA.Change_HLSM|0|$$HUE|$$LUM|$$SAT

ANA.Show|0!

ENR.

 

 

 

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

 

clip0219 ->clip0220

 

 

 

clip0221

 

 

2. Using the Additive HLS-Modifier

  Here is the Source-Code:

 

 

VAF.$$PIA=?exeloc\Sara2.jpg

NEF.$$PIA

  MBX.No such file.

  ENR.

EIF.

ANA.Load|0|$$PIA

ANA.Show|0!

$$HUE=0

$$LUM=75

$$SAT=-50

ANA.Change_HLSA|0|$$HUE|$$LUM|$$SAT

ANA.Show|0!

ENR.

 

clip0219 clip0222

 

 

Syntax

 

ANA.Change_HLSM|P1[|P2][|P3][|P4][|P5]

ANA.Change_HLSA|P1[|P2][|P3][|P4][|P5]

 

Parameter Explanation

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

P2 - opt  Hue-Value This Value will be added or Subtracted from the Pixel-Color HLS-Value. If omitted 0 is used.

P3 - opt  Luminosity-Value This Value will be added or Subtracted from the Pixel-Color HLS-Value. If omitted 0 is used.

P4 - opt  Saturation-Value This Value will be added or Subtracted from the Pixel-Color HLS-Value. If omitted 0 is used.

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

 

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

 

 

Example

-

 

 

Remarks

-

 

 

Limitations:

-

 

See also:

 

    ANA.Luminance / Change_Luminance