colourIsolation

From DavinciWiki
Jump to: navigation, search

Description

Increases the difference between primary and/or secondary colours in an RGB image

Arguments and Return Values

Arguments: The input image, and the amounts to increase the difference between colour channels

Return Value: A bip byte RGB image

Usage

Syntax: colourIsolation(inputimage [, mode = VAL] [, master = FLOAT] [, rg = FLOAT] [, gb = FLOAT] [, rb = FLOAT])

This function subtracts some percentage of the other two colour channels from each channel in an RGB image. This can be seen in two different ways:

  • Increasing the difference between colours in the image.
  • Subtracting potentially-redundant data in images where the colour channels contain overlapping spectral bands (for example, in a consumer digital camera, in which the red and green channels in particular have a large spectral overlap in order to simulate the human eye's sensitivity).

The mode parameter controls the method by which the isolation is performed:

  • u (unrestricted) does not constrain the subtraction - this is the default behaviour
  • p (primary) causes the colours to approach red, green, and blue as the amount of isolation is increased
  • s (secondary) causes the colours to approach cyan, magenta, and yellow as the amount of isolation is increased
  • ps (primary/secondary) causes the colours to approach red, yellow, green, cyan, blue, and magenta as the amount of isolation is increased

The master parameter controls the overall scaling of the effect. If it is not specified, it defaults to 0.3.

The rg parameter controls the amount by which the red and green channels are subtracted from each other. If it is not specified, it defaults to 1.0.

The gb parameter controls the amount by which the green and blue channels are subtracted from each other. If it is not specified, it defaults to 0.7.

The rb parameter controls the amount by which the red and blue channels are subtracted from each other. If it is not specified, it defaults to 0.1.

See this article for a detailed discussion of this topic.


Examples

dv> c
640x426x3 array of float, bip format [3,271,680 bytes]

dv> i = colourIsolation(c, mode = "u", master = 0.2, rg = 1.0, gb = 0.7, rb = 0.1)
Operating Mode: Unrestricted
Red/Green Isolation: 0.200000
Green/Blue Isolation: 0.140000
Red/Blue Isolation: 0.020000
640x426x3 array of float, bip format [3,271,680 bytes]

Images

A photograph before and after processing (colourIsolation(mode = "u", master = 0.75, rg = 1.0, gb = 0.7, rb = 0.1)):

ColourIsolation.PNG

Synthetic hue-wheel images processed at a variety of settings

DavinciWiki Mini-Nav Bar

Contents


Contact Developers

  • davinci-dev [AT] mars.asu.edu

All other topics

  • See navigation on the left


Recent Library Changes

Created On: 07-16-2012
Modified On: 05-02-2013

Personal tools