All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Classes | Enumerations | Functions
Image Handling Support

Classes

interface  Pylon::IImage
 Usable to access image properties and image buffer. More...
 
class  Pylon::CImageFormatConverter
 Creates new images by converting a source image to another format. More...
 
class  Pylon::CImagePersistenceOptions
 Used to pass options to CImagePersistence methods. More...
 
class  Pylon::CImagePersistence
 Contains static functions supporting loading and saving of images. More...
 
struct  Pylon::SBGRA8Pixel
 Describes the memory layout of a BGRA8 pixel. This pixel is used in Windows bitmaps. More...
 
struct  Pylon::SBGR8Pixel
 Describes the memory layout of a BGR8 pixel. This pixel is used in Windows bitmaps. More...
 
struct  Pylon::SRGB8Pixel
 Describes the memory layout of a RGB8 pixel. More...
 
struct  Pylon::SRGB16Pixel
 Describes the memory layout of a RGB16 pixel. More...
 
struct  Pylon::SYUV422_UYVY
 Describes the memory layout of a YUV422_UYVY pixel with information about brightness and chroma for two pixels. More...
 
struct  Pylon::SYUV422_YUYV
 Describes the memory layout of a YUV422_YUYV pixel with information about brightness and chroma for two pixels. More...
 
class  Pylon::SPixelData
 Describes the data of one pixel. More...
 
class  Pylon::CPylonImage
 Describes an image. More...
 
class  Pylon::CPylonImageBase
 Provides basic functionality for pylon image classes. More...
 
interface  Pylon::IReusableImage
 Extends the IImage interface to be able to reuse the image's resources to represent a different image. More...
 

Enumerations

enum  Pylon::EImageOrientation { Pylon::ImageOrientation_TopDown, Pylon::ImageOrientation_BottomUp }
 Defines the vertical orientation of an image in memory. More...
 
enum  Pylon::EImageFileFormat { Pylon::ImageFileFormat_Tiff = 1, Pylon::ImageFileFormat_Png = 3 }
 Lists the available file formats. More...
 
enum  Pylon::EPixelType {
  Pylon::PixelType_Undefined = -1, Pylon::PixelType_Mono1packed = 0x80000000 | 0x01000000 | (( 1 ) << 16) | 0x000c, Pylon::PixelType_Mono2packed = 0x80000000 | 0x01000000 | (( 2 ) << 16) | 0x000d, Pylon::PixelType_Mono4packed = 0x80000000 | 0x01000000 | (( 4 ) << 16) | 0x000e,
  Pylon::PixelType_Mono8 = 0x01000000 | (( 8 ) << 16) | 0x0001, Pylon::PixelType_Mono8signed = 0x01000000 | (( 8 ) << 16) | 0x0002, Pylon::PixelType_Mono10 = 0x01000000 | (( 16 ) << 16) | 0x0003, Pylon::PixelType_Mono10packed = 0x01000000 | (( 12 ) << 16) | 0x0004,
  Pylon::PixelType_Mono10p = 0x01000000 | (( 10 ) << 16) | 0x0046, Pylon::PixelType_Mono12 = 0x01000000 | (( 16 ) << 16) | 0x0005, Pylon::PixelType_Mono12packed = 0x01000000 | (( 12 ) << 16) | 0x0006, Pylon::PixelType_Mono12p = 0x01000000 | (( 12 ) << 16) | 0x0047,
  Pylon::PixelType_Mono16 = 0x01000000 | (( 16 ) << 16) | 0x0007, Pylon::PixelType_BayerGR8 = 0x01000000 | (( 8 ) << 16) | 0x0008, Pylon::PixelType_BayerRG8 = 0x01000000 | (( 8 ) << 16) | 0x0009, Pylon::PixelType_BayerGB8 = 0x01000000 | (( 8 ) << 16) | 0x000a,
  Pylon::PixelType_BayerBG8 = 0x01000000 | (( 8 ) << 16) | 0x000b, Pylon::PixelType_BayerGR10 = 0x01000000 | (( 16 ) << 16) | 0x000c, Pylon::PixelType_BayerRG10 = 0x01000000 | (( 16 ) << 16) | 0x000d, Pylon::PixelType_BayerGB10 = 0x01000000 | (( 16 ) << 16) | 0x000e,
  Pylon::PixelType_BayerBG10 = 0x01000000 | (( 16 ) << 16) | 0x000f, Pylon::PixelType_BayerGR12 = 0x01000000 | (( 16 ) << 16) | 0x0010, Pylon::PixelType_BayerRG12 = 0x01000000 | (( 16 ) << 16) | 0x0011, Pylon::PixelType_BayerGB12 = 0x01000000 | (( 16 ) << 16) | 0x0012,
  Pylon::PixelType_BayerBG12 = 0x01000000 | (( 16 ) << 16) | 0x0013, Pylon::PixelType_RGB8packed = 0x02000000 | (( 24 ) << 16) | 0x0014, Pylon::PixelType_BGR8packed = 0x02000000 | (( 24 ) << 16) | 0x0015, Pylon::PixelType_RGBA8packed = 0x02000000 | (( 32 ) << 16) | 0x0016,
  Pylon::PixelType_BGRA8packed = 0x02000000 | (( 32 ) << 16) | 0x0017, Pylon::PixelType_RGB10packed = 0x02000000 | (( 48 ) << 16) | 0x0018, Pylon::PixelType_BGR10packed = 0x02000000 | (( 48 ) << 16) | 0x0019, Pylon::PixelType_RGB12packed = 0x02000000 | (( 48 ) << 16) | 0x001a,
  Pylon::PixelType_BGR12packed = 0x02000000 | (( 48 ) << 16) | 0x001b, Pylon::PixelType_RGB16packed = 0x02000000 | (( 48 ) << 16) | 0x0033, Pylon::PixelType_BGR10V1packed = 0x02000000 | (( 32 ) << 16) | 0x001c, Pylon::PixelType_BGR10V2packed = 0x02000000 | (( 32 ) << 16) | 0x001d,
  Pylon::PixelType_YUV411packed = 0x02000000 | (( 12 ) << 16) | 0x001e, Pylon::PixelType_YUV422packed = 0x02000000 | (( 16 ) << 16) | 0x001f, Pylon::PixelType_YUV444packed = 0x02000000 | (( 24 ) << 16) | 0x0020, Pylon::PixelType_RGB8planar = 0x02000000 | (( 24 ) << 16) | 0x0021,
  Pylon::PixelType_RGB10planar = 0x02000000 | (( 48 ) << 16) | 0x0022, Pylon::PixelType_RGB12planar = 0x02000000 | (( 48 ) << 16) | 0x0023, Pylon::PixelType_RGB16planar = 0x02000000 | (( 48 ) << 16) | 0x0024, Pylon::PixelType_YUV422_YUYV_Packed = 0x02000000 | (( 16 ) << 16) | 0x0032,
  Pylon::PixelType_BayerGR12Packed = 0x01000000 | (( 12 ) << 16) | 0x002A, Pylon::PixelType_BayerRG12Packed = 0x01000000 | (( 12 ) << 16) | 0x002B, Pylon::PixelType_BayerGB12Packed = 0x01000000 | (( 12 ) << 16) | 0x002C, Pylon::PixelType_BayerBG12Packed = 0x01000000 | (( 12 ) << 16) | 0x002D,
  Pylon::PixelType_BayerGR10p = 0x01000000 | (( 10 ) << 16) | 0x0056, Pylon::PixelType_BayerRG10p = 0x01000000 | (( 10 ) << 16) | 0x0058, Pylon::PixelType_BayerGB10p = 0x01000000 | (( 10 ) << 16) | 0x0054, Pylon::PixelType_BayerBG10p = 0x01000000 | (( 10 ) << 16) | 0x0052,
  Pylon::PixelType_BayerGR12p = 0x01000000 | (( 12 ) << 16) | 0x0057, Pylon::PixelType_BayerRG12p = 0x01000000 | (( 12 ) << 16) | 0x0059, Pylon::PixelType_BayerGB12p = 0x01000000 | (( 12 ) << 16) | 0x0055, Pylon::PixelType_BayerBG12p = 0x01000000 | (( 12 ) << 16) | 0x0053,
  Pylon::PixelType_BayerGR16 = 0x01000000 | (( 16 ) << 16) | 0x002E, Pylon::PixelType_BayerRG16 = 0x01000000 | (( 16 ) << 16) | 0x002F, Pylon::PixelType_BayerGB16 = 0x01000000 | (( 16 ) << 16) | 0x0030, Pylon::PixelType_BayerBG16 = 0x01000000 | (( 16 ) << 16) | 0x0031,
  Pylon::PixelType_RGB12V1packed = 0x02000000 | (( 36 ) << 16) | 0X0034, Pylon::PixelType_Double = 0x80000000 | 0x01000000 | (( 48 ) << 16) | 0x100
}
 Lists the available pixel types. More...
 
enum  Pylon::EPixelColorFilter {
  Pylon::PCF_BayerRG, Pylon::PCF_BayerGB, Pylon::PCF_BayerGR, Pylon::PCF_BayerBG,
  Pylon::PCF_Undefined
}
 Lists the Bayer color filter types. More...
 

Functions

bool Pylon::IsMonoPacked (EPixelType pixelType)
 Returns true if the pixel type is Mono and the pixel values are not byte aligned.
 
bool Pylon::IsBayerPacked (EPixelType pixelType)
 Returns true if the pixel type is Bayer and the pixel values are not byte aligned.
 
bool Pylon::IsRGBPacked (EPixelType pixelType)
 Returns true if the pixel type is RGB and the pixel values are not byte aligned.
 
bool Pylon::IsBGRPacked (EPixelType pixelType)
 Returns true if the pixel type is BGR and the pixel values are not byte aligned.
 
bool Pylon::IsPacked (EPixelType pixelType)
 Returns true if the pixels of the given pixel type are not byte aligned.
 
bool Pylon::IsPackedInLsbFormat (EPixelType pixelType)
 
uint32_t Pylon::PlaneCount (EPixelType pixelType)
 Returns number of planes in the image composed of the pixel type.
 
EPixelType Pylon::GetPlanePixelType (EPixelType pixelType)
 Returns the pixel type of a plane.
 
bool Pylon::IsPlanar (EPixelType pixelType)
 Returns true if images of the pixel type are divided into multiple planes.
 
EPixelColorFilter Pylon::GetPixelColorFilter (EPixelType pixelType)
 Returns the Bayer color filter type.
 
uint32_t Pylon::BitPerPixel (EPixelType pixelType)
 Returns the bits needed to store a pixel. More...
 
uint32_t Pylon::SamplesPerPixel (EPixelType pixelType)
 Returns the number of measured values per pixel. More...
 
bool Pylon::IsYUV (EPixelType pixelType)
 Returns true when the pixel type represents a YUV format.
 
bool Pylon::IsRGBA (EPixelType pixelType)
 Returns true when the pixel type represents an RGBA format.
 
bool Pylon::IsRGB (EPixelType pixelType)
 Returns true when the pixel type represents an RGB or RGBA format.
 
bool Pylon::IsBGRA (EPixelType pixelType)
 Returns true when the pixel type represents a BGRA format.
 
bool Pylon::IsBGR (EPixelType pixelType)
 Returns true when the pixel type represents a BGR or BGRA format.
 
bool Pylon::IsBayer (EPixelType pixelType)
 Returns true when the pixel type represents a Bayer format.
 
bool Pylon::IsMono (EPixelType pixelType)
 Returns true when a given pixel is monochrome, e.g. PixelType_Mono8 or PixelType_BayerGR8.
 
bool Pylon::IsMonoImage (EPixelType pixelType)
 Returns true when an image using the given pixel type is monochrome, e.g. PixelType_Mono8.
 
uint32_t Pylon::GetPixelIncrementX (EPixelType pixelType)
 Returns the minimum step size expressed in pixels for extracting an AOI.
 
uint32_t Pylon::GetPixelIncrementY (EPixelType pixelType)
 Returns the minimum step size expressed in pixels for extracting an AOI.
 
uint32_t Pylon::BitDepth (EPixelType pixelType)
 Returns the bit depth of a value of the pixel in bits. More...
 
bool Pylon::ComputeStride (size_t &strideBytes, EPixelType pixelType, uint32_t width, size_t paddingX=0)
 Computes the stride in byte. More...
 
size_t Pylon::ComputePaddingX (size_t strideBytes, EPixelType pixelType, uint32_t width)
 Computes the padding value from row stride in byte. More...
 
size_t Pylon::ComputeBufferSize (EPixelType pixelType, uint32_t width, uint32_t height, size_t paddingX=0)
 Computes the buffer size in byte. More...
 

Detailed Description

Besides the Instant Camera classes used for grabbing images pylon offers additional classes that support handling the grabbed images. More information can be found here:

Enumeration Type Documentation

Lists the available file formats.

Enumerator
ImageFileFormat_Tiff 

Tagged Image File Format, no compression, supports mono images with more than 8 bit bit depth.

ImageFileFormat_Png 

Portable Network Graphics, lossless data compression.

Defines the vertical orientation of an image in memory.

Enumerator
ImageOrientation_TopDown 

The first row of the image is located at the start of the image buffer. This is the default for images taken by a camera.

ImageOrientation_BottomUp 

The last row of the image is located at the start of the image buffer.

Lists the Bayer color filter types.

Enumerator
PCF_BayerRG 

red green

PCF_BayerGB 

green blue

PCF_BayerGR 

green red

PCF_BayerBG 

blue green

PCF_Undefined 

undefined color filter or not applicable

Lists the available pixel types.

These pixel types are returned by a grab result and are used by the Image Handling Support classes.

The camera parameter interface classes define additional pixel format enumerations. These pixel format enumerations are different from the enumeration EPixelType pylon uses, e.g. the pylon pixel type PixelType_Mono1packed corresponds to PixelFormat_Mono1packed or PixelFormat_Mono1p. See the documentation of the parameter interface classes for more information.

The camera User's Manual provides more information on pixel formats and the memory layout of the image data.

Enumerator
PixelType_Undefined 

Undefined pixel type.

PixelType_Mono1packed 

alias PixelFormat_Mono1Packed or PixelFormat_Mono1p

PixelType_Mono2packed 

alias PixelFormat_Mono2Packed or PixelFormat_Mono2p

PixelType_Mono4packed 

alias PixelFormat_Mono4Packed or PixelFormat_Mono4p

PixelType_Mono8 

alias PixelFormat_Mono8

PixelType_Mono8signed 

alias PixelFormat_Mono8signed or PixelFormat_Mono8s

PixelType_Mono10 

alias PixelFormat_Mono10

PixelType_Mono10packed 

alias PixelFormat_Mono10Packed. The memory layouts of PixelType_Mono10packed and PixelType_Mono10p are different.

PixelType_Mono10p 

alias PixelFormat_Mono10p. The memory layouts of PixelType_Mono10packed and PixelType_Mono10p are different.

PixelType_Mono12 

alias PixelFormat_Mono12

PixelType_Mono12packed 

alias PixelFormat_Mono12Packed. The memory layouts of PixelType_Mono12packed and PixelType_Mono12p are different.

PixelType_Mono12p 

alias PixelFormat_Mono12p. The memory layouts of PixelType_Mono12packed and PixelType_Mono12p are different.

PixelType_Mono16 

alias PixelFormat_Mono16

PixelType_BayerGR8 

alias PixelFormat_BayerGR8

PixelType_BayerRG8 

alias PixelFormat_BayerRG8

PixelType_BayerGB8 

alias PixelFormat_BayerGB8

PixelType_BayerBG8 

alias PixelFormat_BayerBG8

PixelType_BayerGR10 

alias PixelFormat_BayerGR10

PixelType_BayerRG10 

alias PixelFormat_BayerRG10

PixelType_BayerGB10 

alias PixelFormat_BayerGB10

PixelType_BayerBG10 

alias PixelFormat_BayerBG10

PixelType_BayerGR12 

alias PixelFormat_BayerGR12

PixelType_BayerRG12 

alias PixelFormat_BayerRG12

PixelType_BayerGB12 

alias PixelFormat_BayerGB12

PixelType_BayerBG12 

alias PixelFormat_BayerBG12

PixelType_RGB8packed 

alias PixelFormat_RGB8Packed or PixelFormat_RGB8

PixelType_BGR8packed 

alias PixelFormat_BGR8Packed or PixelFormat_BGR8

PixelType_RGBA8packed 

alias PixelFormat_RGBA8Packed or PixelFormat_RGBa8

PixelType_BGRA8packed 

alias PixelFormat_BGRA8Packed or PixelFormat_BGRa8

PixelType_RGB10packed 

alias PixelFormat_RGB10Packed or PixelFormat_RGB10

PixelType_BGR10packed 

alias PixelFormat_BGR10Packed or PixelFormat_BGR10

PixelType_RGB12packed 

alias PixelFormat_RGB12Packed or PixelFormat_RGB12

PixelType_BGR12packed 

alias PixelFormat_BGR12Packed or PixelFormat_BGR12

PixelType_RGB16packed 

alias PixelFormat_RGB16Packed or PixelFormat_RGB16

PixelType_BGR10V1packed 

alias PixelFormat_BGR10V1Packed

PixelType_BGR10V2packed 

alias PixelFormat_BGR10V2Packed

PixelType_YUV411packed 

alias PixelFormat_YUV411Packed or PixelFormat_YCbCr411_8

PixelType_YUV422packed 

alias PixelFormat_YUV422Packed

PixelType_YUV444packed 

alias PixelFormat_YUV444Packed or PixelFormat_YCbCr8

PixelType_RGB8planar 

alias PixelFormat_RGB8Planar or PixelFormat_RGB8_Planar

PixelType_RGB10planar 

alias PixelFormat_RGB10Planar or PixelFormat_RGB10_Planar

PixelType_RGB12planar 

alias PixelFormat_RGB12Planar or PixelFormat_RGB12_Planar

PixelType_RGB16planar 

alias PixelFormat_RGB16Planar or PixelFormat_RGB16_Planar

PixelType_YUV422_YUYV_Packed 

alias PixelFormat_YUV422_YUYV_Packed or PixelFormat_YCbCr422_8

PixelType_BayerGR12Packed 

alias PixelFormat_BayerGR12Packed. The memory layouts of PixelType_BayerGR12Packed and PixelType_BayerGR12p are different.

PixelType_BayerRG12Packed 

alias PixelFormat_BayerRG12Packed. The memory layouts of PixelType_BayerRG12Packed and PixelType_BayerRG12p are different.

PixelType_BayerGB12Packed 

alias PixelFormat_BayerGB12Packed. The memory layouts of PixelType_BayerGB12Packed and PixelType_BayerGB12p are different.

PixelType_BayerBG12Packed 

alias PixelFormat_BayerBG12Packed. The memory layouts of PixelType_BayerBG12Packed and PixelType_BayerBG12p are different.

PixelType_BayerGR10p 

alias PixelFormat_BayerGR10p.

PixelType_BayerRG10p 

alias PixelFormat_BayerRG10p.

PixelType_BayerGB10p 

alias PixelFormat_BayerGB10p.

PixelType_BayerBG10p 

alias PixelFormat_BayerBG10p.

PixelType_BayerGR12p 

alias PixelFormat_BayerGR12p. The memory layouts of PixelType_BayerGR12Packed and PixelType_BayerGR12p are different.

PixelType_BayerRG12p 

alias PixelFormat_BayerRG12p. The memory layouts of PixelType_BayerRG12Packed and PixelType_BayerRG12p are different.

PixelType_BayerGB12p 

alias PixelFormat_BayerGB12p. The memory layouts of PixelType_BayerGB12Packed and PixelType_BayerGB12p are different.

PixelType_BayerBG12p 

alias PixelFormat_BayerBG12p. The memory layouts of PixelType_BayerBG12Packed and PixelType_BayerBG12p are different.

PixelType_BayerGR16 

alias PixelFormat_BayerGR16

PixelType_BayerRG16 

alias PixelFormat_BayerRG16

PixelType_BayerGB16 

alias PixelFormat_BayerGB16

PixelType_BayerBG16 

alias PixelFormat_BayerBG16

PixelType_RGB12V1packed 

alias PixelFormat_RGB12V1Packed

PixelType_Double 

alias PixelFormat_Double

Function Documentation

uint32_t Pylon::BitDepth ( EPixelType  pixelType)

Returns the bit depth of a value of the pixel in bits.

This may be less than the size needed to store the pixel. BitDepth(PixelType_Mono12) returns 12, BitDepth(PixelType_Mono12packed) returns 12, and BitDepth(PixelType_RGB8packed) returns 8 for example.

Parameters
[in]pixelTypeThe pixel type.
Precondition
The pixel type must be valid.
Error Safety:
Throws an exception when the pixel type is undefined.
uint32_t Pylon::BitPerPixel ( EPixelType  pixelType)

Returns the bits needed to store a pixel.

BitPerPixel(PixelType_Mono12) returns 16 and BitPerPixel(PixelType_Mono12packed) returns 12 for example.

Parameters
[in]pixelTypeThe pixel type.
Precondition
The pixel type must be defined.
Error Safety:
Throws an exception when the pixel type is undefined.
size_t Pylon::ComputeBufferSize ( EPixelType  pixelType,
uint32_t  width,
uint32_t  height,
size_t  paddingX = 0 
)

Computes the buffer size in byte.

Parameters
[in]pixelTypeThe pixel type.
[in]widthThe number of pixels in a row.
[in]heightThe number of rows in an image.
[in]paddingXThe number of extra data bytes at the end of each row (byte aligned).
Returns
The buffer size in byte.
Precondition
  • The pixel type must be valid.
  • The width value must be >= 0 and <= _I32_MAX.
  • The height value must be >= 0 and <= _I32_MAX.
Error Safety:
Throws an exception when the preconditions are not met.
size_t Pylon::ComputePaddingX ( size_t  strideBytes,
EPixelType  pixelType,
uint32_t  width 
)

Computes the padding value from row stride in byte.

Parameters
[out]strideBytesThe stride in byte.
[in]pixelTypeThe pixel type.
[in]widthThe number of pixels in a row.
Returns
Returns the paddingX value for the given stride value (byte aligned).
Precondition
  • The value of strideBytes must be large enough to contain a line described by pixelType and width.
  • The pixel type must be valid.
  • The width value must be >= 0 and <= _I32_MAX.
Error Safety:
Throws an exception when the preconditions are not met.
bool Pylon::ComputeStride ( size_t &  strideBytes,
EPixelType  pixelType,
uint32_t  width,
size_t  paddingX = 0 
)

Computes the stride in byte.

The stride indicates the number of bytes between the beginning of one row in an image and the beginning of the next row. For planar pixel types the returned value represents the stride of a plane.

The stride in bytes cannot be computed for packed image format when the stride is not byte aligned and paddingX == 0. If paddingX is larger than zero and the stride without padding is not byte aligned then the rest of the partially filled byte is considered as padding, e.g. pixelType = PixelType_Mono12packed, width = 5, paddingX = 10 results in a stride of 18 Bytes (stride without padding is 5 * BitPerPixel( PixelType_Mono12packed) = 5 * 12 = 60 Bits = 7.5 Bytes).

See also Pylon::IsPacked().

Parameters
[out]strideBytesThe stride in byte if it can be computed.
[in]pixelTypeThe pixel type.
[in]widthThe number of pixels in a row.
[in]paddingXThe number of additional bytes at the end of a row (byte aligned).
Returns
Returns true if the stride can be computed.
Precondition
The width value must be >= 0 and <= _I32_MAX.
Error Safety:
Throws an exception when the preconditions are not met.
bool Pylon::IsPackedInLsbFormat ( EPixelType  pixelType)
inline

Returns true if the pixel type is packed in lsb packed format. For lsb packed format, the data is filled lsb first in the lowest address byte (byte 0) starting with the first pixel and continued in the lsb of byte 1 (and so on). See the camera User's Manual or the Pixel Format Naming Convention (PFNC) of the GenICam standard group for more information.

uint32_t Pylon::SamplesPerPixel ( EPixelType  pixelType)

Returns the number of measured values per pixel.

SamplesPerPixel(PixelType_Mono8) returns 1 and SamplesPerPixel(PixelType_RGB8packed) returns 3 for example.

Parameters
[in]pixelTypeThe pixel type.
Precondition
The pixel type must be defined. The pixel type is not PixelType_YUV411packed.
Error Safety:
Throws an exception when the pixel type is undefined.

pylon 5.0.9
Copyright © 2006-2017 Basler AG (Tue May 30 2017 17:24:57)