eBUS Python Function List

This page documents module-level utility functions available in the eBUS Python SDK. For class methods and properties, see the eBUS Python Class List documentation.

PvPixelUtil Functions

Pixel type utility functions for querying pixel format properties. These functions are available in the eBUSBase module.

eBUSBase.PvPixelTypeGetBitsPerComponent(aPixelType)

Get the number of bits per component for a pixel type.

Returns the number of bits used to represent a single color component in the specified pixel format. For example, RGB8 uses 8 bits per component (R, G, and B each use 8 bits), while RGB10 uses 10 bits per component.

Parameters:

aPixelType (PvPixelType, in) – The pixel type to query

Return type:

int

Returns:

Number of bits per component. Common values:

  • 1: PvPixelMono1p, PvPixelConfidence1, PvPixelConfidence1p

  • 2: PvPixelMono2p

  • 4: PvPixelMono4p, PvPixelBayerGR4p, PvPixelBayerRG4p, etc.

  • 8: PvPixelMono8, PvPixelRGB8, PvPixelBGR8, all 8-bit formats (default)

  • 10: PvPixelMono10, PvPixelRGB10, Bayer 10-bit formats, 3D coordinate 10-bit packed

  • 12: PvPixelMono12, PvPixelRGB12, Bayer 12-bit formats, 3D coordinate 12-bit packed

  • 14: PvPixelMono14, PvPixelRGB14, Bayer 14-bit formats

  • 16: PvPixelMono16, PvPixelRGB16, Bayer 16-bit formats, 3D coordinate 16-bit

  • 32: PvPixelMono32, 3D coordinate 32-bit float, PvPixelRGB10p32

See also: PvPixelTypeGetBitsPerPixel, PvPixelTypeGetPixelSize

eBUSBase.PvPixelTypeGetPixelBitCount(aType)

Get the size of one pixel in bits for a specific pixel type.

This function returns the total number of bits required to represent a complete pixel in the specified format. This is an alias for PvPixelTypeGetPixelSize.

Parameters:

aPixelType (PvPixelType, in) – The pixel type to query

Return type:

int

Returns:

Number of bits per pixel. Common values:

  • 8: PvPixelMono8 (1 channel × 8 bits)

  • 16: PvPixelMono16 (1 channel × 16 bits)

  • 24: PvPixelRGB8, PvPixelBGR8 (3 channels × 8 bits)

  • 32: PvPixelRGBa8, PvPixelBGRa8 (4 channels × 8 bits), PvPixelMono32

  • 48: PvPixelRGB16 (3 channels × 16 bits)

  • 64: PvPixelRGBa16 (4 channels × 16 bits)

See also: PvPixelTypeGetPixelSize, PvPixelTypeGetBitsPerComponent

eBUSBase.PvPixelTypeGetBitsPerPixel(aPixelType)

Get the number of bits required to hold a pixel using the specified pixel type.

Returns the bits per pixel value encoded in the pixel type enumeration. This value is extracted from bits 16-23 of the pixel type value.

Parameters:

aPixelType (PvPixelType, in) – The pixel type to query

Return type:

int

Returns:

Number of bits per pixel (same as PvPixelTypeGetPixelBitCount)

See also: PvPixelTypeGetPixelSize, PvPixelTypeGetPixelBitCount

eBUSBase.PvPixelTypeGetPixelSize(aPixelType)

Get the pixel size in bits for a specific pixel type.

This is the canonical function to get the total number of bits per pixel. Both PvPixelTypeGetPixelBitCount and PvPixelTypeGetBitsPerPixel call this function.

Parameters:

aPixelType (PvPixelType, in) – The pixel type to query

Return type:

int

Returns:

Number of bits per pixel

See also: PvPixelTypeGetPixelBitCount, PvPixelTypeGetBitsPerPixel

eBUSBase.PvPixelTypeIsPixelColor(aPixelType)

Determine if a pixel type represents color data (not monochrome).

Returns True for all color formats including RGB, BGR, Bayer, YUV, YCbCr, and color 3D coordinate formats. Returns False only for monochrome formats.

Parameters:

aPixelType (PvPixelType, in) – The pixel type to test

Return type:

bool

Returns:

  • True: Color pixel format (RGB, BGR, Bayer, YUV, YCbCr, etc.)

  • False: Monochrome format (Mono8, Mono16, Mono1p, Mono2p, Mono4p, Mono10, Mono12, Mono14, Mono32, and all mono packed/signed variants)

See also: PvPixelTypeIsPixelHighRes

eBUSBase.PvPixelTypeIsPixelHighRes(aPixelType)

Determine if a pixel type uses more than 8 bits per channel.

Returns True for pixel formats that use more than 8 bits per color component. This is useful for determining if special processing or display handling is needed for high dynamic range images.

Parameters:

aPixelType (PvPixelType, in) – The pixel type to test

Return type:

bool

Returns:

  • True: High resolution format (>8 bits per component): Mono10, Mono12, Mono14, Mono16, Mono32, RGB10, RGB12, RGB14, RGB16, Bayer10/12/14/16, YCbCr 10/12 bit, 3D coordinates, etc.

  • False: Standard 8-bit or lower format: Mono8, Mono1p, Mono2p, Mono4p, RGB8, BGR8, Bayer8, all YUV/YCbCr 8-bit formats, RGB565p, etc.

See also: PvPixelTypeIsPixelColor, PvPixelTypeGetBitsPerComponent

eBUSBase.PvPixelTypeToString(aPixelType)

Get a string representation of a pixel type.

Converts a pixel type enumeration value to its human-readable string name. For custom pixel types not defined in the standard, returns a hexadecimal representation in the format ‘CustomPixel_0xXXXXXXXX’.

Parameters:

aPixelType (PvPixelType, in) – The pixel type to convert

Return type:

str

Returns:

String name of the pixel type (without ‘PvPixel’ prefix)

Supported Pixel Type Strings:

Monochrome formats: Mono1p, Mono2p, Mono4p, Mono8, Mono8s, Mono10, Mono10Packed, Mono10p, Mono12, Mono12Packed, Mono12p, Mono14, Mono14p, Mono16, Mono32

RGB/BGR formats: RGB8, BGR8, RGBa8, BGRa8, RGB10, BGR10, RGB12, BGR12, RGB14, BGR14, RGB16, BGR16, RGBa16, BGRa16, RGB10p, BGR10p, RGB12p, BGR12p, RGB565p, BGR565p, RGB8_Planar, RGB10_Planar, RGB12_Planar, RGB16_Planar, RGB10V1Packed, RGB12V1Packed, RGB10p32, etc.

Bayer formats: BayerGR8, BayerRG8, BayerGB8, BayerBG8, BayerGR10, BayerRG10, etc. (All Bayer patterns in 4p, 8, 10, 12, 14, 16 bit variants, packed and unpacked)

YUV/YCbCr formats: YUV411_8_UYYVYY, YUV422_8_UYVY, YUV422_8, YUV8_UYV, YCbCr8_CbYCr, YCbCr422_8, YCbCr601_*, YCbCr709_*, etc.

3D Coordinate formats: Coord3D_A8, Coord3D_B8, Coord3D_C8, Coord3D_ABC8, Coord3D_ABC8_Planar, Coord3D_A16, Coord3D_ABC16, Coord3D_A32f, Coord3D_ABC32f, etc.

BiColor formats: BiColorRGBG8, BiColorBGRG8, BiColorRGBG10, BiColorRGBG10p, etc.

Confidence formats: Confidence1, Confidence1p, Confidence8, Confidence16, Confidence32f

Color component formats: R8, R10, R12, R16, G8, G10, G12, G16, B8, B10, B12, B16

See also: PvPixelType enumeration

Utility Classes

Additional utility functionality is provided through the following classes:

eBUSBase Module:

eBUSReceive Module:

See the eBUS Python Class List documentation for detailed information on these utility classes.