Impact Acquire SDK Python
ImageBuffer Class Reference

Fully describes a captured image. More...

Inheritance diagram for ImageBuffer:
[legend]

Public Member Functions

 __init__ (self)
 

Properties

 iBytesPerPixel = property(lib_mvIMPACT_acquire.ImageBuffer_iBytesPerPixel_get, lib_mvIMPACT_acquire.ImageBuffer_iBytesPerPixel_set, doc=)
 The number of bytes per pixel.
 
 iChannelCount = property(lib_mvIMPACT_acquire.ImageBuffer_iChannelCount_get, lib_mvIMPACT_acquire.ImageBuffer_iChannelCount_set, doc=)
 The number of channels this image consists of.
 
 iHeight = property(lib_mvIMPACT_acquire.ImageBuffer_iHeight_get, lib_mvIMPACT_acquire.ImageBuffer_iHeight_set, doc=)
 The height of the image in pixel or lines.
 
 iSize = property(lib_mvIMPACT_acquire.ImageBuffer_iSize_get, lib_mvIMPACT_acquire.ImageBuffer_iSize_set, doc=)
 The size (in bytes) of the whole image.
 
 iWidth = property(lib_mvIMPACT_acquire.ImageBuffer_iWidth_get, lib_mvIMPACT_acquire.ImageBuffer_iWidth_set, doc=)
 The width of the image in pixel.
 
 pChannels = property(lib_mvIMPACT_acquire.ImageBuffer_pChannels_get, lib_mvIMPACT_acquire.ImageBuffer_pChannels_set, doc=)
 A pointer to an array of channel specific image data.
 
 pixelFormat = property(lib_mvIMPACT_acquire.ImageBuffer_pixelFormat_get, lib_mvIMPACT_acquire.ImageBuffer_pixelFormat_set, doc=)
 The pixel format of this image.
 
 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
 
 vpData = property(lib_mvIMPACT_acquire.ImageBuffer_vpData_get, lib_mvIMPACT_acquire.ImageBuffer_vpData_set, doc=)
 The starting address of the image.
 

Detailed Description

Fully describes a captured image.

This class serves as a describing structure for captured images.

Constructor & Destructor Documentation

◆ __init__()

__init__ ( self)

Property Documentation

◆ iBytesPerPixel

iBytesPerPixel = property(lib_mvIMPACT_acquire.ImageBuffer_iBytesPerPixel_get, lib_mvIMPACT_acquire.ImageBuffer_iBytesPerPixel_set, doc=)
static

The number of bytes per pixel.

◆ iChannelCount

iChannelCount = property(lib_mvIMPACT_acquire.ImageBuffer_iChannelCount_get, lib_mvIMPACT_acquire.ImageBuffer_iChannelCount_set, doc=)
static

The number of channels this image consists of.

For an RGB image this value e.g. would be 3. This value defines how many mvIMPACT.acquire.ChannelData structures mvIMPACT.acquire.ImageBuffer.pChannels is pointing to once this structure has been allocated and filled with valid data.

◆ iHeight

iHeight = property(lib_mvIMPACT_acquire.ImageBuffer_iHeight_get, lib_mvIMPACT_acquire.ImageBuffer_iHeight_set, doc=)
static

The height of the image in pixel or lines.

◆ iSize

iSize = property(lib_mvIMPACT_acquire.ImageBuffer_iSize_get, lib_mvIMPACT_acquire.ImageBuffer_iSize_set, doc=)
static

The size (in bytes) of the whole image.

This value in connection with mvIMPACT.acquire.ImageBuffer.vpData is sufficient to copy the complete image without having any additional information about it.

◆ iWidth

iWidth = property(lib_mvIMPACT_acquire.ImageBuffer_iWidth_get, lib_mvIMPACT_acquire.ImageBuffer_iWidth_set, doc=)
static

The width of the image in pixel.

◆ pChannels

pChannels = property(lib_mvIMPACT_acquire.ImageBuffer_pChannels_get, lib_mvIMPACT_acquire.ImageBuffer_pChannels_set, doc=)
static

A pointer to an array of channel specific image data.

◆ pixelFormat

pixelFormat = property(lib_mvIMPACT_acquire.ImageBuffer_pixelFormat_get, lib_mvIMPACT_acquire.ImageBuffer_pixelFormat_set, doc=)
static

The pixel format of this image.

This might be important, when the image data needs to be processed or stored in a file or maybe even if the image shall be displayed.

◆ thisown

thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
static

◆ vpData

vpData = property(lib_mvIMPACT_acquire.ImageBuffer_vpData_get, lib_mvIMPACT_acquire.ImageBuffer_vpData_set, doc=)
static

The starting address of the image.

This address in connection with mvIMPACT.acquire.ImageBuffer.iSize is sufficient to copy the complete image without having any additional information about it.

Attention
There are various ways to access the data captured into a request object. One way would be by using the ctypes module:
ib = getImageBufferFromSomewhere()
cbuf = (ctypes.c_char * ib.iSize).from_address(int(ib.vpData))
Note
It's not always necessary to copy the image data! Each mvIMPACT.acquire.ImageBuffer is an integral part of the mvIMPACT.acquire.Request object returned to the user by a call to the corresponding 'waitFor' function offered by the interface. The data in this mvIMPACT.acquire.ImageBuffer remains valid until the user either unlocks the request buffer or closes the mvIMPACT.acquire.Device again.
By unlocking the mvIMPACT.acquire.Request the user informs the driver, that this mvIMPACT.acquire.Request and the mvIMPACT.acquire.ImageBuffer belonging to that mvIMPACT.acquire.Request is not longer needed by the user. The driver then queues this mvIMPACT.acquire.Request for capturing image data into it once again. However once a mvIMPACT.acquire.Request has been returned to the user, its mvIMPACT.acquire.ImageBuffer can't be overwritten by the driver! Therefore the user can work with, modify, store or copy the data safely until he unlocks the mvIMPACT.acquire.Request again.