RGBa

class RGBa(*args, **kwargs)

Bases: pybind11_object

Class that defines a RGBa 32 bits structure that is used to build color images. RGBa stands for red green blue alpha color space.

The alpha channel is normally used as an opacity channel. If a pixel has a value of 0 in its alpha channel, it is fully transparent, whereas a value of 255 in the alpha channel gives a fully opaque pixel.

By default the alpha channel is set to vpRGBa::alpha_default .

Note

See vpImage

Overloaded function.

  1. __init__(self: visp._visp.core.RGBa) -> None

Basic constructor.

Build a black value.

  1. __init__(self: visp._visp.core.RGBa, r: int, g: int, b: int, a: int) -> None

Constructor.

Initialize the color with R, G, B, A values.

Parameters:
r

Red value.

g

Green value.

b

Blue value.

a

Additional value.

  1. __init__(self: visp._visp.core.RGBa, v: int) -> None

  2. __init__(self: visp._visp.core.RGBa, v: int) -> None

  3. __init__(self: visp._visp.core.RGBa, v: int) -> None

  4. __init__(self: visp._visp.core.RGBa, v: visp._visp.core.RGBa) -> None

Copy constructor.

  1. __init__(self: visp._visp.core.RGBa, v: visp._visp.core.ColVector) -> None

Methods

__init__

Overloaded function.

Inherited Methods

Operators

__add__

Overloaded function.

__annotations__

__doc__

__eq__

Compare two RGBa values.

__gt__

__hash__

__init__

Overloaded function.

__lt__

__module__

__mul__

Overloaded function.

__ne__

Compare two color pixels.

__repr__

__sub__

Overloaded function.

Attributes

A

B

G

R

__annotations__

__hash__

alpha_default

class AlphaDefault(self, value: int)

Bases: pybind11_object

Values:

  • alpha_default

__and__(self, other: object) object
__eq__(self, other: object) bool
__ge__(self, other: object) bool
__getstate__(self) int
__gt__(self, other: object) bool
__hash__(self) int
__index__(self) int
__init__(self, value: int)
__int__(self) int
__invert__(self) object
__le__(self, other: object) bool
__lt__(self, other: object) bool
__ne__(self, other: object) bool
__or__(self, other: object) object
__rand__(self, other: object) object
__ror__(self, other: object) object
__rxor__(self, other: object) object
__setstate__(self, state: int) None
__xor__(self, other: object) object
property name : str
__add__(*args, **kwargs)

Overloaded function.

  1. __add__(self: visp._visp.core.RGBa, v: visp._visp.core.RGBa) -> visp._visp.core.RGBa

Warning

in case of overflow : e.g. 128+128 returns 0 for all 4 channels

Parameters:
v

Color to add to the current object “this”.

Returns:

“this” + v

  1. __add__(self: visp._visp.core.RGBa, v: visp._visp.core.ColVector) -> visp._visp.core.ColVector

Parameters:
v

Color to add to the current object “this”.

Returns:

“this” + v

__eq__(self, v: visp._visp.core.RGBa) bool

Compare two RGBa values.

Returns:

true if the values are the same, false otherwise.

__gt__(self, v: visp._visp.core.RGBa) bool
__init__(*args, **kwargs)

Overloaded function.

  1. __init__(self: visp._visp.core.RGBa) -> None

Basic constructor.

Build a black value.

  1. __init__(self: visp._visp.core.RGBa, r: int, g: int, b: int, a: int) -> None

Constructor.

Initialize the color with R, G, B, A values.

Parameters:
r

Red value.

g

Green value.

b

Blue value.

a

Additional value.

  1. __init__(self: visp._visp.core.RGBa, v: int) -> None

  2. __init__(self: visp._visp.core.RGBa, v: int) -> None

  3. __init__(self: visp._visp.core.RGBa, v: int) -> None

  4. __init__(self: visp._visp.core.RGBa, v: visp._visp.core.RGBa) -> None

Copy constructor.

  1. __init__(self: visp._visp.core.RGBa, v: visp._visp.core.ColVector) -> None

__lt__(self, v: visp._visp.core.RGBa) bool
__mul__(*args, **kwargs)

Overloaded function.

  1. __mul__(self: visp._visp.core.RGBa, v: float) -> visp._visp.core.ColVector

Parameters:
v

Value to multiply.

Returns:

v * “this”

  1. __mul__(self: visp._visp.core.RGBa, v: float) -> visp._visp.core.ColVector

Parameters:
v

Value to multiply.

Returns:

v * “this”

__ne__(self, v: visp._visp.core.RGBa) bool

Compare two color pixels.

Returns:

true if the images are different, false if they are the same.

__sub__(*args, **kwargs)

Overloaded function.

  1. __sub__(self: visp._visp.core.RGBa, v: visp._visp.core.RGBa) -> visp._visp.core.ColVector

Parameters:
v

Color to subtract to the current object “this”.

Returns:

“this” - v

  1. __sub__(self: visp._visp.core.RGBa, v: visp._visp.core.ColVector) -> visp._visp.core.ColVector

Parameters:
v

Color to subtract to the current object “this”.

Returns:

“this” - v

__hash__ = None