AVT相机arm版本SDK

This commit is contained in:
zhangpeng
2025-04-30 09:26:04 +08:00
parent 837c870f18
commit 78a1c63a95
705 changed files with 148770 additions and 0 deletions

View File

@@ -0,0 +1,254 @@
/*=============================================================================
Copyright (C) 2012 Allied Vision Technologies. All Rights Reserved.
Redistribution of this header file, in original or modified form, without
prior written consent of Allied Vision Technologies is prohibited.
-------------------------------------------------------------------------------
File: VmbCommonTypes.h
Description: Main header file for the common types of the Vimba APIs.
-------------------------------------------------------------------------------
THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED
WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF TITLE,
NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
=============================================================================*/
#ifndef VMBCOMMONTYPES_H_INCLUDE_
#define VMBCOMMONTYPES_H_INCLUDE_
#ifdef __cplusplus
extern "C" {
#endif
// This file describes all necessary definitions for types used within
// Allied Vision's Vimba APIs. These type definitions are designed to be
// portable from other languages and other operating systems.
#if defined (_MSC_VER)
// 8 bit signed integer on Microsoft systems
typedef __int8 VmbInt8_t;
// 8 bit unsigned integer on Microsoft systems
typedef unsigned __int8 VmbUint8_t;
// 16 bit signed integer on Microsoft systems
typedef __int16 VmbInt16_t;
// 16 bit unsigned integer on Microsoft systems
typedef unsigned __int16 VmbUint16_t;
// 32 bit signed integer on Microsoft systems
typedef __int32 VmbInt32_t;
// 32 bit unsigned integer on Microsoft systems
typedef unsigned __int32 VmbUint32_t;
// 64 bit signed integer on Microsoft systems
typedef __int64 VmbInt64_t;
// 64 bit unsigned integer on Microsoft systems
typedef unsigned __int64 VmbUint64_t;
#else // for non MS or GNU compilers without any warranty for the size
//#pragma message("Compatibility warning: typedefs in " __FILE__ " may not have the correct number of bits")
// 8 bit signed integer on non-Microsoft systems
typedef signed char VmbInt8_t;
// 8 bit unsigned integer on non-Microsoft systems
typedef unsigned char VmbUint8_t;
// 16 bit signed integer on non-Microsoft systems
typedef short VmbInt16_t;
// 16 bit unsigned integer on non-Microsoft systems
typedef unsigned short VmbUint16_t;
// 32 bit signed integer on non-Microsoft systems
typedef int VmbInt32_t;
// 32 bit signed integer on non-Microsoft systems
typedef unsigned int VmbUint32_t;
// 64 bit signed integer on non-Microsoft systems
typedef long long VmbInt64_t;
// 64 bit unsigned integer on non-Microsoft systems
typedef unsigned long long VmbUint64_t;
#endif
// Handle; e.g. for a camera
typedef void* VmbHandle_t;
// Standard type for boolean values
#if defined(__cplusplus) || defined(__bool_true_false_are_defined)
typedef bool VmbBool_t;
#else
// Boolean type (equivalent to char)
typedef char VmbBool_t; // 1 means true and 0 means false
#endif
//
// enum for bool values
//
typedef enum VmbBoolVal
{
VmbBoolTrue = 1,
VmbBoolFalse = 0,
} VmbBoolVal;
// char type
typedef unsigned char VmbUchar_t;
//
// Error codes, returned by most functions: (not yet complete)
//
typedef enum VmbErrorType
{
VmbErrorSuccess = 0, // No error
VmbErrorInternalFault = -1, // Unexpected fault in VimbaC or driver
VmbErrorApiNotStarted = -2, // VmbStartup() was not called before the current command
VmbErrorNotFound = -3, // The designated instance (camera, feature etc.) cannot be found
VmbErrorBadHandle = -4, // The given handle is not valid
VmbErrorDeviceNotOpen = -5, // Device was not opened for usage
VmbErrorInvalidAccess = -6, // Operation is invalid with the current access mode
VmbErrorBadParameter = -7, // One of the parameters is invalid (usually an illegal pointer)
VmbErrorStructSize = -8, // The given struct size is not valid for this version of the API
VmbErrorMoreData = -9, // More data available in a string/list than space is provided
VmbErrorWrongType = -10, // Wrong feature type for this access function
VmbErrorInvalidValue = -11, // The value is not valid; either out of bounds or not an increment of the minimum
VmbErrorTimeout = -12, // Timeout during wait
VmbErrorOther = -13, // Other error
VmbErrorResources = -14, // Resources not available (e.g. memory)
VmbErrorInvalidCall = -15, // Call is invalid in the current context (e.g. callback)
VmbErrorNoTL = -16, // No transport layers are found
VmbErrorNotImplemented = -17, // API feature is not implemented
VmbErrorNotSupported = -18, // API feature is not supported
VmbErrorIncomplete = -19, // A multiple registers read or write is partially completed
} VmbErrorType;
typedef VmbInt32_t VmbError_t; // Type for an error returned by API methods; for values see VmbErrorType
//
// Version information
//
typedef struct
{
VmbUint32_t major; // Major version number
VmbUint32_t minor; // Minor version number
VmbUint32_t patch; // Patch version number
} VmbVersionInfo_t;
//
// Indicate if pixel is monochrome or RGB.
//
typedef enum VmbPixelType
{
VmbPixelMono = 0x01000000, // Monochrome pixel
VmbPixelColor = 0x02000000 // Pixel bearing color information
} VmbPixelType;
//
// Indicate number of bits for a pixel. Needed for building values of VmbPixelFormatType
//
typedef enum VmbPixelOccupyType
{
VmbPixelOccupy8Bit = 0x00080000, // Pixel effectively occupies 8 bits
VmbPixelOccupy10Bit = 0x000A0000, // Pixel effectively occupies 10 bits
VmbPixelOccupy12Bit = 0x000C0000, // Pixel effectively occupies 12 bits
VmbPixelOccupy14Bit = 0x000E0000, // Pixel effectively occupies 14 bits
VmbPixelOccupy16Bit = 0x00100000, // Pixel effectively occupies 16 bits
VmbPixelOccupy24Bit = 0x00180000, // Pixel effectively occupies 24 bits
VmbPixelOccupy32Bit = 0x00200000, // Pixel effectively occupies 32 bits
VmbPixelOccupy48Bit = 0x00300000, // Pixel effectively occupies 48 bits
VmbPixelOccupy64Bit = 0x00400000, // Pixel effectively occupies 48 bits
} VmbPixelOccupyType;
//
// Pixel format types.
// As far as possible, the Pixel Format Naming Convention (PFNC) has been followed, allowing a few deviations.
// If data spans more than one byte, it is always LSB aligned, except if stated differently.
//
typedef enum VmbPixelFormatType
{
// mono formats
VmbPixelFormatMono8 = VmbPixelMono | VmbPixelOccupy8Bit | 0x0001, // Monochrome, 8 bits (PFNC:Mono8)
VmbPixelFormatMono10 = VmbPixelMono | VmbPixelOccupy16Bit | 0x0003, // Monochrome, 10 bits in 16 bits (PFNC:Mono10)
VmbPixelFormatMono10p = VmbPixelMono | VmbPixelOccupy10Bit | 0x0046, // Monochrome, 10 bits in 16 bits (PFNC:Mono10p)
VmbPixelFormatMono12 = VmbPixelMono | VmbPixelOccupy16Bit | 0x0005, // Monochrome, 12 bits in 16 bits (PFNC:Mono12)
VmbPixelFormatMono12Packed = VmbPixelMono | VmbPixelOccupy12Bit | 0x0006, // Monochrome, 2x12 bits in 24 bits (GEV:Mono12Packed)
VmbPixelFormatMono12p = VmbPixelMono | VmbPixelOccupy12Bit | 0x0047, // Monochrome, 2x12 bits in 24 bits (PFNC:MonoPacked)
VmbPixelFormatMono14 = VmbPixelMono | VmbPixelOccupy16Bit | 0x0025, // Monochrome, 14 bits in 16 bits (PFNC:Mono14)
VmbPixelFormatMono16 = VmbPixelMono | VmbPixelOccupy16Bit | 0x0007, // Monochrome, 16 bits (PFNC:Mono16)
// bayer formats
VmbPixelFormatBayerGR8 = VmbPixelMono | VmbPixelOccupy8Bit | 0x0008, // Bayer-color, 8 bits, starting with GR line (PFNC:BayerGR8)
VmbPixelFormatBayerRG8 = VmbPixelMono | VmbPixelOccupy8Bit | 0x0009, // Bayer-color, 8 bits, starting with RG line (PFNC:BayerRG8)
VmbPixelFormatBayerGB8 = VmbPixelMono | VmbPixelOccupy8Bit | 0x000A, // Bayer-color, 8 bits, starting with GB line (PFNC:BayerGB8)
VmbPixelFormatBayerBG8 = VmbPixelMono | VmbPixelOccupy8Bit | 0x000B, // Bayer-color, 8 bits, starting with BG line (PFNC:BayerBG8)
VmbPixelFormatBayerGR10 = VmbPixelMono | VmbPixelOccupy16Bit | 0x000C, // Bayer-color, 10 bits in 16 bits, starting with GR line (PFNC:BayerGR10)
VmbPixelFormatBayerRG10 = VmbPixelMono | VmbPixelOccupy16Bit | 0x000D, // Bayer-color, 10 bits in 16 bits, starting with RG line (PFNC:BayerRG10)
VmbPixelFormatBayerGB10 = VmbPixelMono | VmbPixelOccupy16Bit | 0x000E, // Bayer-color, 10 bits in 16 bits, starting with GB line (PFNC:BayerGB10)
VmbPixelFormatBayerBG10 = VmbPixelMono | VmbPixelOccupy16Bit | 0x000F, // Bayer-color, 10 bits in 16 bits, starting with BG line (PFNC:BayerBG10)
VmbPixelFormatBayerGR12 = VmbPixelMono | VmbPixelOccupy16Bit | 0x0010, // Bayer-color, 12 bits in 16 bits, starting with GR line (PFNC:BayerGR12)
VmbPixelFormatBayerRG12 = VmbPixelMono | VmbPixelOccupy16Bit | 0x0011, // Bayer-color, 12 bits in 16 bits, starting with RG line (PFNC:BayerRG12)
VmbPixelFormatBayerGB12 = VmbPixelMono | VmbPixelOccupy16Bit | 0x0012, // Bayer-color, 12 bits in 16 bits, starting with GB line (PFNC:BayerGB12)
VmbPixelFormatBayerBG12 = VmbPixelMono | VmbPixelOccupy16Bit | 0x0013, // Bayer-color, 12 bits in 16 bits, starting with BG line (PFNC:BayerBG12)
VmbPixelFormatBayerGR12Packed = VmbPixelMono | VmbPixelOccupy12Bit | 0x002A, // Bayer-color, 2x12 bits in 24 bits, starting with GR line (GEV:BayerGR12Packed)
VmbPixelFormatBayerRG12Packed = VmbPixelMono | VmbPixelOccupy12Bit | 0x002B, // Bayer-color, 2x12 bits in 24 bits, starting with RG line (GEV:BayerRG12Packed)
VmbPixelFormatBayerGB12Packed = VmbPixelMono | VmbPixelOccupy12Bit | 0x002C, // Bayer-color, 2x12 bits in 24 bits, starting with GB line (GEV:BayerGB12Packed)
VmbPixelFormatBayerBG12Packed = VmbPixelMono | VmbPixelOccupy12Bit | 0x002D, // Bayer-color, 2x12 bits in 24 bits, starting with BG line (GEV:BayerBG12Packed)
VmbPixelFormatBayerGR10p = VmbPixelMono | VmbPixelOccupy10Bit | 0x0056, // Bayer-color, 12 bits continuous packed, starting with GR line (PFNC:BayerGR10p)
VmbPixelFormatBayerRG10p = VmbPixelMono | VmbPixelOccupy10Bit | 0x0058, // Bayer-color, 12 bits continuous packed, starting with RG line (PFNC:BayerRG10p)
VmbPixelFormatBayerGB10p = VmbPixelMono | VmbPixelOccupy10Bit | 0x0054, // Bayer-color, 12 bits continuous packed, starting with GB line (PFNC:BayerGB10p)
VmbPixelFormatBayerBG10p = VmbPixelMono | VmbPixelOccupy10Bit | 0x0052, // Bayer-color, 12 bits continuous packed, starting with BG line (PFNC:BayerBG10p)
VmbPixelFormatBayerGR12p = VmbPixelMono | VmbPixelOccupy12Bit | 0x0057, // Bayer-color, 12 bits continuous packed, starting with GR line (PFNC:BayerGR12p)
VmbPixelFormatBayerRG12p = VmbPixelMono | VmbPixelOccupy12Bit | 0x0059, // Bayer-color, 12 bits continuous packed, starting with RG line (PFNC:BayerRG12p)
VmbPixelFormatBayerGB12p = VmbPixelMono | VmbPixelOccupy12Bit | 0x0055, // Bayer-color, 12 bits continuous packed, starting with GB line (PFNC:BayerGB12p)
VmbPixelFormatBayerBG12p = VmbPixelMono | VmbPixelOccupy12Bit | 0x0053, // Bayer-color, 12 bits continuous packed, starting with BG line (PFNC:BayerBG12p)
VmbPixelFormatBayerGR16 = VmbPixelMono | VmbPixelOccupy16Bit | 0x002E, // Bayer-color, 16 bits, starting with GR line (PFNC:BayerGR16)
VmbPixelFormatBayerRG16 = VmbPixelMono | VmbPixelOccupy16Bit | 0x002F, // Bayer-color, 16 bits, starting with RG line (PFNC:BayerRG16)
VmbPixelFormatBayerGB16 = VmbPixelMono | VmbPixelOccupy16Bit | 0x0030, // Bayer-color, 16 bits, starting with GB line (PFNC:BayerGB16)
VmbPixelFormatBayerBG16 = VmbPixelMono | VmbPixelOccupy16Bit | 0x0031, // Bayer-color, 16 bits, starting with BG line (PFNC:BayerBG16)
// rgb formats
VmbPixelFormatRgb8 = VmbPixelColor | VmbPixelOccupy24Bit | 0x0014, // RGB, 8 bits x 3 (PFNC:RGB8)
VmbPixelFormatBgr8 = VmbPixelColor | VmbPixelOccupy24Bit | 0x0015, // BGR, 8 bits x 3 (PFNC:BGR8)
VmbPixelFormatRgb10 = VmbPixelColor | VmbPixelOccupy48Bit | 0x0018, // RGB, 12 bits in 16 bits x 3 (PFNC:RGB12)
VmbPixelFormatBgr10 = VmbPixelColor | VmbPixelOccupy48Bit | 0x0019, // RGB, 12 bits in 16 bits x 3 (PFNC:RGB12)
VmbPixelFormatRgb12 = VmbPixelColor | VmbPixelOccupy48Bit | 0x001A, // RGB, 12 bits in 16 bits x 3 (PFNC:RGB12)
VmbPixelFormatBgr12 = VmbPixelColor | VmbPixelOccupy48Bit | 0x001B, // RGB, 12 bits in 16 bits x 3 (PFNC:RGB12)
VmbPixelFormatRgb14 = VmbPixelColor | VmbPixelOccupy48Bit | 0x005E, // RGB, 14 bits in 16 bits x 3 (PFNC:RGB12)
VmbPixelFormatBgr14 = VmbPixelColor | VmbPixelOccupy48Bit | 0x004A, // RGB, 14 bits in 16 bits x 3 (PFNC:RGB12)
VmbPixelFormatRgb16 = VmbPixelColor | VmbPixelOccupy48Bit | 0x0033, // RGB, 16 bits x 3 (PFNC:RGB16)
VmbPixelFormatBgr16 = VmbPixelColor | VmbPixelOccupy48Bit | 0x004B, // RGB, 16 bits x 3 (PFNC:RGB16)
// rgba formats
VmbPixelFormatArgb8 = VmbPixelColor | VmbPixelOccupy32Bit | 0x0016, // ARGB, 8 bits x 4 (PFNC:RGBa8)
VmbPixelFormatRgba8 = VmbPixelFormatArgb8, // RGBA, 8 bits x 4, legacy name
VmbPixelFormatBgra8 = VmbPixelColor | VmbPixelOccupy32Bit | 0x0017, // BGRA, 8 bits x 4 (PFNC:BGRa8)
VmbPixelFormatRgba10 = VmbPixelColor | VmbPixelOccupy64Bit | 0x005F, // RGBA, 8 bits x 4, legacy name
VmbPixelFormatBgra10 = VmbPixelColor | VmbPixelOccupy64Bit | 0x004C, // RGBA, 8 bits x 4, legacy name
VmbPixelFormatRgba12 = VmbPixelColor | VmbPixelOccupy64Bit | 0x0061, // RGBA, 8 bits x 4, legacy name
VmbPixelFormatBgra12 = VmbPixelColor | VmbPixelOccupy64Bit | 0x004E, // RGBA, 8 bits x 4, legacy name
VmbPixelFormatRgba14 = VmbPixelColor | VmbPixelOccupy64Bit | 0x0063, // RGBA, 8 bits x 4, legacy name
VmbPixelFormatBgra14 = VmbPixelColor | VmbPixelOccupy64Bit | 0x0050, // RGBA, 8 bits x 4, legacy name
VmbPixelFormatRgba16 = VmbPixelColor | VmbPixelOccupy64Bit | 0x0064, // RGBA, 8 bits x 4, legacy name
VmbPixelFormatBgra16 = VmbPixelColor | VmbPixelOccupy64Bit | 0x0051, // RGBA, 8 bits x 4, legacy name
// yuv/ycbcr formats
VmbPixelFormatYuv411 = VmbPixelColor | VmbPixelOccupy12Bit | 0x001E, // YUV 411 with 8 bits (GEV:YUV411Packed)
VmbPixelFormatYuv422 = VmbPixelColor | VmbPixelOccupy16Bit | 0x001F, // YUV 422 with 8 bits (GEV:YUV422Packed)
VmbPixelFormatYuv444 = VmbPixelColor | VmbPixelOccupy24Bit | 0x0020, // YUV 444 with 8 bits (GEV:YUV444Packed)
VmbPixelFormatYCbCr411_8_CbYYCrYY = VmbPixelColor | VmbPixelOccupy12Bit | 0x003C, // Y<>CbCr 411 with 8 bits (PFNC:YCbCr411_8_CbYYCrYY) - identical to VmbPixelFormatYuv411
VmbPixelFormatYCbCr422_8_CbYCrY = VmbPixelColor | VmbPixelOccupy16Bit | 0x0043, // Y<>CbCr 422 with 8 bits (PFNC:YCbCr422_8_CbYCrY) - identical to VmbPixelFormatYuv422
VmbPixelFormatYCbCr8_CbYCr = VmbPixelColor | VmbPixelOccupy24Bit | 0x003A, // Y<>CbCr 444 with 8 bits (PFNC:YCbCr8_CbYCr) - identical to VmbPixelFormatYuv444
VmbPixelFormatLast,
} VmbPixelFormatType;
typedef VmbUint32_t VmbPixelFormat_t; // Type for the pixel format; for values see VmbPixelFormatType
#ifdef __cplusplus
}
#endif
#endif // VMBCOMMONTYPES_H_INCLUDE_

View File

@@ -0,0 +1,343 @@
/*=============================================================================
Copyright (C) 2012 Allied Vision Technologies. All Rights Reserved.
Redistribution of this header file, in original or modified form, without
prior written consent of Allied Vision Technologies is prohibited.
-------------------------------------------------------------------------------
File: VmbTransform.h
Description: Definition of image transform functions for the Vimba APIs.
-------------------------------------------------------------------------------
THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED
WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF TITLE,
NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
=============================================================================*/
#ifndef VMB_TRANSFORM_H_
#define VMB_TRANSFORM_H_
#ifndef VMB_TRANSFORM
#define VMB_TRANSFORM
#endif
#pragma once
#include "VmbTransformTypes.h"
#ifdef __cplusplus
extern "C" {
#endif
#ifndef VMB_WIN32DLL_API
#ifndef VMB_NO_EXPORT
# ifdef VMB_EXPORTS
# if defined(__ELF__) && (defined(__clang__) || defined(__GNUC__))
# define VMB_WIN32DLL_API __attribute__((visibility("default")))
# elif defined( __APPLE__ ) || defined(__MACH__)
# define VMB_WIN32DLL_API __attribute__((visibility("default")))
# else
# ifndef _WIN64
# define VMB_WIN32DLL_API __declspec(dllexport) __stdcall
# else
# define VMB_WIN32DLL_API __stdcall
# endif
# endif
# else
# if defined (__ELF__) && (defined(__clang__) || defined(__GNUC__))
# define VMB_WIN32DLL_API
# elif defined( __APPLE__ ) || defined(__MACH__)
# define VMB_WIN32DLL_API
# else
# define VMB_WIN32DLL_API __declspec(dllimport) __stdcall
# endif
# endif
#else
# define VMB_WIN32DLL_API
#endif
#endif
//
// Method: VmbGetVersion()
//
// Purpose: Inquire the library version.
//
// Parameters:
//
// [out] VmbUint32_t * pValue Contains the library version (Major,Minor,Sub,Build)
//
// Returns:
//
// - VmbErrorSuccess: If no error
// - VmbErrorBadParameter: if the given pointer is NULL
//
// Details: This function can be called at anytime, even before the library is
// initialized.
//
VmbError_t VMB_WIN32DLL_API VmbGetVersion ( VmbUint32_t* pValue );
//
// Method: VmbGetTechnoInfo()
//
// Purpose: Get information about processor supported features.
//
// Parameters:
//
// [out] VmbTechInfo_t* pTechnoInfo Returns the supported SIMD technologies
//
// Returns:
//
// - VmbErrorSuccess: if no error
// - VmbErrorBadParameter: if the given pointer is NULL
//
// Details: This should be called before using any SIMD (MMX,SSE) optimized functions
//
VmbError_t VMB_WIN32DLL_API VmbGetTechnoInfo( VmbTechInfo_t* pTechnoInfo );
//
// Method: VmbGetErrorInfo()
//
// Purpose: Translate Vimba error codes into a human-readable string.
//
// Parameters:
//
// [in ] VmbError_t errorCode The error code to get a readable string for
// [out] VmbANSIChar_t* pInfo Pointer to a zero terminated string that will
// contain the error information on return
// [in ] VmbUint32_t maxInfoLength The length of the pInfo buffer
//
// Returns:
//
// - VmbErrorSuccess: if no error
// - VmbErrorBadParameter: if the given pointer is NULL, or if maxInfoLength is 0
// - VmbErrorMoreData: if maxInfoLength is too small to hold the complete information
//
VmbError_t VMB_WIN32DLL_API VmbGetErrorInfo( VmbError_t errorCode,
VmbANSIChar_t* pInfo,
VmbUint32_t maxInfoLength );
//
// Method: VmbGetApiInfoString()
//
// Purpose: Get information about the currently loaded Vimba ImageTransform API.
//
// Parameters:
//
// [in ] VmbAPIInfo_t infoType Type of information to return
// [out] VmbANSIChar_t* pInfo Pointer to a zero terminated string that
// will contain the information on return
// [in ] VmbUint32_t maxInfoLength The length of the pInfo buffer
//
// Returns:
//
// - VmbErrorSuccess: if no error
// - VmbErrorBadParameter: if the given pointer is NULL
// - VmbErrorMoreData: if maxInfoLength is too small to hold the complete information
//
// Details: infoType may be one of the following values:
// - VmbAPIInfoAll: Returns all information about the API
// - VmbAPIInfoPlatform: Returns information about the platform the API was built for (x86 or x64)
// - VmbAPIInfoBuild: Returns info about the API built (debug or release)
// - VmbApiInfoTechnology: Returns info about the supported technologies the API was built for (OpenMP or OpenCL)
//
VmbError_t VMB_WIN32DLL_API VmbGetApiInfoString( VmbAPIInfo_t infoType,
VmbANSIChar_t* pInfo,
VmbUint32_t maxInfoLength );
//
// Method: VmbSetDebayerMode()
//
// Purpose: Set transformation options to a predefined debayering mode.
//
// Parameters:
//
// [in ] VmbDebayerMode_t debayerMode The mode used for debayering the source raw image, default mode is
// 2x2 debayering. Debayering modes only work for image widths and
// heights divisible by two
// [in,out] VmbTransformInfo* pTransformInfo Parameter that contains information about special
// transform functionality
//
// Returns:
//
// - VmbErrorSuccess: if no error
// - VmbErrorBadParameter: if the given pointer is NULL
//
// Details: Debayering is only applicable to image formats with both an even width and an even height.
//
VmbError_t VMB_WIN32DLL_API VmbSetDebayerMode( VmbDebayerMode_t debayerMode,
VmbTransformInfo* pTransformInfo );
//
// Method: VmbSetColorCorrectionMatrix3x3()
//
// Purpose: Set transformation options to a 3x3 color matrix transformation.
//
// Parameters:
//
// [in ] const VmbFloat_t* pMatrix Color correction matrix
// [in,out] VmbTransformInfo* pTransformInfo Parameter that is filled with information
// about special transform functionality
//
// Returns:
//
// - VmbErrorSuccess: If no error
// - VmbErrorBadParameter: if one of the given pointers is NULL
//
VmbError_t VMB_WIN32DLL_API VmbSetColorCorrectionMatrix3x3( const VmbFloat_t* pMatrix,
VmbTransformInfo* pTransformInfo );
//
// Method: VmbSetGammaCorrection()
//
// Purpose: Retrieve the version number of VimbaC.
//
// Parameters:
//
// [in ] VmbFloat_t gamma Float gamma correction to set
// [in,out] VmbTransformInfo* pTransformInfo Transform info to set gamma correction to
//
// Returns:
//
// - VmbErrorSuccess: If no error
// - VmbErrorBadParameter: if the given pointer is NULL
//
VmbError_t VMB_WIN32DLL_API VmbSetGammaCorrection( VmbFloat_t gamma,
VmbTransformInfo* pTransformInfo );
//
// Method: VmbSetImageInfoFromPixelFormat()
//
// Purpose: Set image info member values in VmbImage from pixel format.
//
// Parameters:
//
// [in ] VmbPixelFormat_t pixelFormat PixelFormat describes the pixel format used by
// the image data member
// [in ] VmbUint32_t width Width of the image in pixels
// [in ] VmbUint32_t height Height of the image in pixels
// [in,out] VmbImage* pImage Pointer to Vimba image to set the info to
//
// Returns:
//
// - VmbErrorSuccess: if no error
// - VmbErrorBadParameter: if the given pointer is NULL or one of the "image" members is invalid
// - VmbErrorStructSize: if the image struct size doesn't match its "Size" member
//
// Details: A VmbPixelFormat_t can be obtained from Vimba C/C++ APIs frame
// or from the PixelFormat feature. For displaying images, it is suggested to use
// VmbSetImageInfoFromString() or to look up a matching VmbPixelFormat_t
//
VmbError_t VMB_WIN32DLL_API VmbSetImageInfoFromPixelFormat( VmbPixelFormat_t pixelFormat,
VmbUint32_t width,
VmbUint32_t height,
VmbImage* pImage );
//
// Method: VmbSetImageInfoFromString()
//
// Purpose: Set image info member values in VmbImage from string.
//
// Parameters:
//
// [in ] const VmbANSIChar_t* pImageFormat Image format as a (const) case insensitive string
// [in ] VmbUint32_t stringLength The length of the pixel format string
// [in ] VmbUint32_t width Width of the image in pixels
// [in ] VmbUint32_t height Height of the image in pixels
// [in,out] VmbImage * pImage Pointer to Vimba image to set the info to
//
// Returns:
//
// - VmbErrorSuccess: if no error
// - VmbErrorBadParameter: if one of the given pointers or the "Data" member in "image" is NULL, or
// if width or hight don't match between source and destination, or
// if one of the parameters for the conversion does not fit
// - VmbErrorStructSize: if the "image" struct size does not match its "Size" member
// - VmbErrorResources: if the there was a memory fault during processing
//
// Details: function does not read or write to VmbImage::Data member.
//
VmbError_t VMB_WIN32DLL_API VmbSetImageInfoFromString( const VmbANSIChar_t* pImageFormat,
VmbUint32_t stringLength,
VmbUint32_t width,
VmbUint32_t height,
VmbImage* pImage );
/* Method: VmbSetImageInfoFromInputParameters.
*
* Purpose:: set output image dependent on the input image, user specifies pixel layout and bit depth of out format.
*
* Parameters:
* [in] VmbPixelFormat_t InputPixelFormat input vimba pixel format
* [in] VmbUint32_t width width of the output image
* [in] VmbUint32_t height height of the output image
* [in] VmbPixelLayout_t OutputPixelLayout pixel component layout for output image
* [in] VmbUint32_t BitsPerPixel bit depth of output 8 and 16 supported
* [out] VmbImage * pOutputImage pointer to output simple vimba image
*/
VmbError_t VMB_WIN32DLL_API VmbSetImageInfoFromInputParameters( VmbPixelFormat_t InputPixelFormat,
VmbUint32_t Width,
VmbUint32_t Height,
VmbPixelLayout_t OutputPixelLayout,
VmbUint32_t BitsPerPixel,
VmbImage* pOutputImage);
/* Method: VmbSetImageInfoFromInputImage.
*
* Purpose: set output image compatible to input image with given layout and bit depth
* the output image will have same dimensions as the input image
*
* [in] const VmbImage * pInputImage input image with fully initialized inmage info elemets
* [in] VmbPixelLayout_t OutputPixelLayout layout for the output image
* [in] VmbUint32_t BitsPerPixel bit depth for output image 8bit and 16bit supported
* [out] VmbImage * pOutputImage output image to set the compatible format to
*/
VmbError_t VMB_WIN32DLL_API VmbSetImageInfoFromInputImage( const VmbImage * pInputImage,
VmbPixelLayout_t OutputPixelLayout,
VmbUint32_t BitsPerPixel,
VmbImage* pOutputImage);
//
// Method: VmbImageTransform()
//
// Purpose: Transform images from one pixel format to another with possible transformation options.
// The transformation is defined by the provided images and the desired transformation.
//
// Parameters:
//
// [in ] const VmbImage* pSource Pointer to source image
// [in,out] VmbImage* pDestination Pointer to destination image
// [in ] const VmbTransformInfo* pParameter Optional transform parameters
// [in ] VmbUint32_t parameterCount Number of transform parameters
//
// Returns:
//
// - VmbErrorSuccess: if no error
// - VmbErrorBadParameter: if any image pointer or their "Data" members is NULL, or
// if "Width" or "Height" don't match between source and destination, or
// if one of the parameters for the conversion does not fit
// - VmbErrorStructSize: if the image structs size don't match their "Size" member
// - VmbErrorNotImplemented: if there is no transformation between source and destination format
//
// Details: Create the source and destination image info structure with VmbSetImageInfoFromPixelFormat
// or VmbSetimageInfoFromString and keep those structures as template.
// For calls to transform, simply attach the image to the Data member.
// The optional parameters, when set, are constraints on the transform.
//
VmbError_t VMB_WIN32DLL_API VmbImageTransform( const VmbImage* pSource,
VmbImage* pDestination,
const VmbTransformInfo* pParameter,
VmbUint32_t parameterCount );
#ifdef __cplusplus
}
#endif // #ifdef __cplusplus
#endif //#ifndef UNI_TRANSFORM_H_

View File

@@ -0,0 +1,617 @@
/*=============================================================================
Copyright (C) 2012 Allied Vision Technologies. All Rights Reserved.
Redistribution of this header file, in original or modified form, without
prior written consent of Allied Vision Technologies is prohibited.
-------------------------------------------------------------------------------
File: VmbTransformTypes.h
Description: Definition of types used in the Vimba Image Transform library.
-------------------------------------------------------------------------------
THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED
WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF TITLE,
NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
=============================================================================*/
#ifndef VMB_TRANSFORM_TYPES_H_
#define VMB_TRANSFORM_TYPES_H_
#include "VmbCommonTypes.h"
typedef VmbInt8_t* VmbInt8Ptr_t;
typedef VmbInt16_t* VmbInt16Ptr_t;
typedef VmbInt32_t* VmbInt32Ptr_t;
typedef VmbInt64_t* VmbInt64Ptr_t;
typedef VmbUint8_t* VmbUint8Ptr_t;
typedef VmbUint16_t* VmbUint16Ptr_t;
typedef VmbUint32_t* VmbUint32Ptr_t;
typedef VmbUint64_t* VmbUint64Ptr_t;
typedef const VmbInt8_t* VmbConstInt8Ptr_t;
typedef const VmbInt16_t* VmbConstInt16Ptr_t;
typedef const VmbInt32_t* VmbConstInt32Ptr_t;
typedef const VmbInt64_t* VmbConstInt64Ptr_t;
typedef const VmbUint8_t* VmbConstUint8Ptr_t;
typedef const VmbUint16_t* VmbConstUint16Ptr_t;
typedef const VmbUint32_t* VmbConstUint32Ptr_t;
typedef const VmbUint64_t* VmbConstUint64Ptr_t;
typedef char VmbANSIChar_t;
typedef float VmbFloat_t;
typedef VmbFloat_t* VmbFloatPtr_t;
typedef const VmbFloat_t* VmbConstFloatPtr_t;
typedef void* VmbVoidPtr_t;
typedef const void * VmbConstVoidPtr_t;
typedef VmbVoidPtr_t VmbColorCorrectionHandle_t;
//! Enumeration for the Bayer pattern
typedef enum VmbBayerPattern
{
VmbBayerPatternRGGB=0, //!< RGGB pattern, red pixel comes first
VmbBayerPatternGBRG, //!< RGGB pattern, green pixel of blue row comes first
VmbBayerPatternGRBG, //!< RGGB pattern, green pixel of red row comes first
VmbBayerPatternBGGR, //!< RGGB pattern, blue pixel comes first
VmbBayerPatternCYGM=128, //!< CYGM pattern, cyan pixel comes first in the first row, green in the second row (of the sensor)
VmbBayerPatternGMCY, //!< CYGM pattern, green pixel comes first in the first row, cyan in the second row (of the sensor)
VmbBayerPatternCYMG, //!< CYGM pattern, cyan pixel comes first in the first row, magenta in the second row (of the sensor)
VmbBayerPatternMGCY, //!< CYGM pattern, magenta pixel comes first in the first row, cyan in the second row (of the sensor)
VmbBayerPatternLAST=255
} VmbBayerPattern;
typedef VmbUint32_t VmbBayerPattern_t;
//! Enumeration for the endianness
typedef enum VmbEndianness
{
VmbEndiannessLittle=0, //!< Little endian data format
VmbEndiannessBig, //!< Big endian data format
VmbEndiannessLast=255
} VmbEndianness;
typedef VmbUint32_t VmbEndianness_t;
//! Enumeration for the image alignment
typedef enum VmbAlignment
{
VmbAlignmentMSB=0, //!< Data is MSB aligned (pppp pppp pppp ....)
VmbAlignmentLSB, //!< Data is LSB aligned (.... pppp pppp pppp)
VmbAlignmentLAST=255
} VmbAlignment;
typedef VmbUint32_t VmbAlignment_t;
//! Structure for accessing data in 12-bit transfer mode, two pixel are coded into 3 bytes
typedef struct Vmb12BitPackedPair_t
{
VmbUint8_t m_nVal8_1 ; //!< High byte of the first Pixel
VmbUint8_t m_nVal8_1Low : 4; //!< Low nibble of the first pixel
VmbUint8_t m_nVal8_2Low : 4; //!< Low nibble of the second pixel
VmbUint8_t m_nVal8_2 ; //!< High byte of the second pixel
}Vmb12BitPackedPair_t;
/** states of the multi media technology support for operating system and processor.
*/
typedef struct VmbSupportState_t
{
VmbBool_t Processor; //!< technology supported by the processor
VmbBool_t OperatingSystem; //!< technology supported by the OS
}VmbSupportState_t;
/** states of the support for different multimedia technologies*/
typedef struct VmbTechInfo_t
{
VmbSupportState_t IntelMMX; //!< INTEL first gen MultiMedia eXtension
VmbSupportState_t IntelSSE; //!< INTEL Streaming SIMD Extension
VmbSupportState_t IntelSSE2; //!< INTEL Streaming SIMD Extension 2
VmbSupportState_t IntelSSE3; //!< INTEL Streaming SIMD Extension 3
VmbSupportState_t IntelSSSE3; //!< INTEL Supplemental Streaming SIMD Extension 3
VmbSupportState_t AMD3DNow; //!< AMD 3DNow
} VmbTechInfo_t;
/**api info types*/
typedef enum VmbAPIInfo
{
VmbAPIInfoAll,
VmbAPIInfoPlatform, //!< Platform the api was build for
VmbAPIInfoBuild, //!< build type (debug or release)
VmbAPIInfoTechnology, //!< info about special technoklogies uses in building the api
VmbAPIInfoLast
} VmbAPIInfo;
typedef VmbUint32_t VmbAPIInfo_t;
typedef struct VmbMono8_t
{
#ifdef __cplusplus
typedef VmbUint8_t value_type;
#endif
VmbUint8_t Y; //!< gray part
} VmbMono8_t;
typedef struct VmbMono8s_t
{
#ifdef __cplusplus
typedef VmbInt8_t value_type;
#endif
VmbInt8_t Y; //!< gray part
} VmbMono8s_t;
typedef struct VmbMono10_t
{
#ifdef __cplusplus
typedef VmbUint16_t value_type;
#endif
VmbUint16_t Y; //!< gray part
} VmbMono10_t;
typedef struct VmbMono12_t
{
#ifdef __cplusplus
typedef VmbUint16_t value_type;
#endif
VmbUint16_t Y; //!< gray part
} VmbMono12_t;
typedef struct VmbMono14_t
{
#ifdef __cplusplus
typedef VmbUint16_t value_type;
#endif
VmbUint16_t Y; //!< gray part
} VmbMono14_t;
typedef struct VmbMono16_t
{
#ifdef __cplusplus
typedef VmbUint16_t value_type;
#endif
VmbUint16_t Y; //!< gray part
} VmbMono16_t;
typedef struct VmbMono16s_t
{
#ifdef __cplusplus
typedef VmbInt16_t value_type;
#endif
VmbInt16_t Y; //!< gray part
} VmbMono16s_t;
/** Structure for accessing Windows RGB data */
typedef struct VmbRGB8_t
{
#ifdef __cplusplus
typedef VmbUint8_t value_type;
#endif
VmbUint8_t R; //!< red part
VmbUint8_t G; //!< green part
VmbUint8_t B; //!< blue part
} VmbRGB8_t;
typedef struct VmbRGB10_t
{
#ifdef __cplusplus
typedef VmbUint16_t value_type;
#endif
VmbUint16_t R; //!< red part
VmbUint16_t G; //!< green part
VmbUint16_t B; //!< blue part
} VmbRGB10_t;
typedef struct VmbRGB12_t
{
#ifdef __cplusplus
typedef VmbUint16_t value_type;
#endif
VmbUint16_t R; //!< red part
VmbUint16_t G; //!< green part
VmbUint16_t B; //!< blue part
} VmbRGB12_t;
typedef struct VmbRGB14_t
{
#ifdef __cplusplus
typedef VmbUint16_t value_type;
#endif
VmbUint16_t R; //!< red part
VmbUint16_t G; //!< green part
VmbUint16_t B; //!< blue part
} VmbRGB14_t;
typedef struct VmbRGB16_t
{
#ifdef __cplusplus
typedef VmbUint16_t value_type;
#endif
VmbUint16_t R; //!< red part
VmbUint16_t G; //!< green part
VmbUint16_t B; //!< blue part
} VmbRGB16_t;
/** Structure for accessing Windows RGB data */
typedef struct VmbBGR8_t
{
#ifdef __cplusplus
typedef VmbUint8_t value_type;
#endif
VmbUint8_t B; //!< blue part
VmbUint8_t G; //!< green part
VmbUint8_t R; //!< red part
} VmbBGR8_t;
/** Structure for accessing Windows RGB data */
typedef struct VmbBGR10_t
{
#ifdef __cplusplus
typedef VmbUint16_t value_type;
#endif
VmbUint16_t B; //!< blue part
VmbUint16_t G; //!< green part
VmbUint16_t R; //!< red part
} VmbBGR10_t;
/** Structure for accessing Windows RGB data */
typedef struct VmbBGR12_t
{
#ifdef __cplusplus
typedef VmbUint16_t value_type;
#endif
VmbUint16_t B; //!< blue part
VmbUint16_t G; //!< green part
VmbUint16_t R; //!< red part
} VmbBGR12_t;
/** struct for 14 bit bgr*/
typedef struct VmbBGR14_t
{
#ifdef __cplusplus
typedef VmbUint16_t value_type;
#endif
VmbUint16_t B; //!< blue part
VmbUint16_t G; //!< green part
VmbUint16_t R; //!< red part
} VmbBGR14_t;
//! Structure for accessing 16-bit Windows-type RGB data
typedef struct VmbBGR16_t
{
#ifdef __cplusplus
typedef VmbUint16_t value_type;
#endif
VmbUint16_t B; //!< blue part
VmbUint16_t G; //!< green part
VmbUint16_t R; //!< red part
} VmbBGR16_t;
/** Structure for accessing non-Windows RGB data */
typedef struct VmbRGBA8_t
{
#ifdef __cplusplus
typedef VmbUint8_t value_type;
#endif
VmbUint8_t R; //!< red part
VmbUint8_t G; //!< green part
VmbUint8_t B; //!< blue part
VmbUint8_t A; //!< unused
} VmbRGBA8_t, VmbRGBA32_t;
/** Structure for accessing Windows RGBA data.*/
typedef struct VmbBGRA8_t
{
#ifdef __cplusplus
typedef VmbUint8_t value_type;
#endif
VmbUint8_t B; //!< blue part
VmbUint8_t G; //!< green part
VmbUint8_t R; //!< red part
VmbUint8_t A; //!< unused
} VmbBGRA8_t, VmbBGRA32_t;
typedef struct VmbARGB8_t
{
#ifdef __cplusplus
typedef VmbUint8_t value_type;
#endif
VmbUint8_t A; //!< unused
VmbUint8_t R; //!< red part
VmbUint8_t G; //!< green part
VmbUint8_t B; //!< blue part
} VmbARGB8_t, VmbARGB32_t;
/** Structure for accessing Windows RGBA data.*/
typedef struct VmbABGR8_t
{
#ifdef __cplusplus
typedef VmbUint8_t value_type;
#endif
VmbUint8_t A; //!< unused
VmbUint8_t B; //!< blue part
VmbUint8_t G; //!< green part
VmbUint8_t R; //!< red part
} VmbABGR8_t, VmbABGR32_t;
/** Structure for accessing non-Windows RGB data */
typedef struct VmbRGBA10_t
{
#ifdef __cplusplus
typedef VmbUint16_t value_type;
#endif
VmbUint16_t R; //!< red part
VmbUint16_t G; //!< green part
VmbUint16_t B; //!< blue part
VmbUint16_t A; //!< unused
} VmbRGBA10_t;
/** Structure for accessing Windows RGBA data.*/
typedef struct VmbBGRA10_t
{
#ifdef __cplusplus
typedef VmbUint16_t value_type;
#endif
VmbUint16_t B; //!< blue part
VmbUint16_t G; //!< green part
VmbUint16_t R; //!< red part
VmbUint16_t A; //!< unused
} VmbBGRA10_t;
/** Structure for accessing non-Windows RGB data */
typedef struct VmbRGBA12_t
{
#ifdef __cplusplus
typedef VmbUint16_t value_type;
#endif
VmbUint16_t R; //!< red part
VmbUint16_t G; //!< green part
VmbUint16_t B; //!< blue part
VmbUint16_t A; //!< unused
} VmbRGBA12_t;
/** Structure for accessing non-Windows RGB data */
typedef struct VmbRGBA14_t
{
#ifdef __cplusplus
typedef VmbUint16_t value_type;
#endif
VmbUint16_t R; //!< red part
VmbUint16_t G; //!< green part
VmbUint16_t B; //!< blue part
VmbUint16_t A; //!< unused
} VmbRGBA14_t;
/** Structure for accessing Windows RGBA data.*/
typedef struct VmbBGRA12_t
{
#ifdef __cplusplus
typedef VmbUint16_t value_type;
#endif
VmbUint16_t B; //!< blue part
VmbUint16_t G; //!< green part
VmbUint16_t R; //!< red part
VmbUint16_t A; //!< unused
} VmbBGRA12_t;
/** Structure for accessing Windows RGBA data.*/
typedef struct VmbBGRA14_t
{
#ifdef __cplusplus
typedef VmbUint16_t value_type;
#endif
VmbUint16_t B; //!< blue part
VmbUint16_t G; //!< green part
VmbUint16_t R; //!< red part
VmbUint16_t A; //!< unused
} VmbBGRA14_t;
/** Structure for accessing non-Windows RGB data */
typedef struct VmbRGBA16_t
{
#ifdef __cplusplus
typedef VmbUint16_t value_type;
#endif
VmbUint16_t R; //!< red part
VmbUint16_t G; //!< green part
VmbUint16_t B; //!< blue part
VmbUint16_t A; //!< unused
} VmbRGBA16_t, VmbRGBA64_t;
/** Structure for accessing Windows RGBA data.*/
typedef struct VmbBGRA16_t
{
#ifdef __cplusplus
typedef VmbUint16_t value_type;
#endif
VmbUint16_t B; //!< blue part
VmbUint16_t G; //!< green part
VmbUint16_t R; //!< red part
VmbUint16_t A; //!< unused
} VmbBGRA16_t, VmbBGRA64_t;
/**Structure for accessing data in the YUV 4:4:4 format (YUV)
prosilica component order
*/
typedef struct VmbYUV444_t
{
#ifdef __cplusplus
typedef VmbUint8_t value_type;
#endif
VmbUint8_t U; //!< U
VmbUint8_t Y; //!< Luma
VmbUint8_t V; //!< V
} VmbYUV444_t;
//! Structure for accessing data in the YUV 4:2:2 format (UYVY)
typedef struct VmbYUV422_t
{
#ifdef __cplusplus
typedef VmbUint8_t value_type;
#endif
VmbUint8_t U; //!< the U part for both pixels
VmbUint8_t Y0; //!< the intensity of the first pixel
VmbUint8_t V; //!< the V part for both pixels
VmbUint8_t Y1; //!< the intensity of the second pixel
} VmbYUV422_t;
//! Structure for accessing data in the YUV 4:1:1 format (UYYVYY)
typedef struct VmbYUV411_t
{
#ifdef __cplusplus
typedef VmbUint8_t value_type;
#endif
VmbUint8_t U; //!< the U part for all four pixels
VmbUint8_t Y0; //!< the intensity of the first pixel
VmbUint8_t Y1; //!< the intensity of the second pixel
VmbUint8_t V; //!< the V part for all four pixels
VmbUint8_t Y2; //!< the intensity of the third pixel
VmbUint8_t Y3; //!< the intensity of the fourth pixel
} VmbYUV411_t;
//! \endcond
/** image pixel layout information*/
typedef enum VmbPixelLayout
{
VmbPixelLayoutMono,
VmbPixelLayoutMonoPacked,
VmbPixelLayoutRaw,
VmbPixelLayoutRawPacked,
VmbPixelLayoutRGB,
VmbPixelLayoutBGR,
VmbPixelLayoutRGBA,
VmbPixelLayoutBGRA,
VmbPixelLayoutYUV411,
VmbPixelLayoutYUV422,
VmbPixelLayoutYUV444,
VmbPixelLayoutMonoP,
VmbPixelLayoutMonoPl,
VmbPixelLayoutRawP,
VmbPixelLayoutRawPl,
VmbPixelLayoutYYCbYYCr411,
VmbPixelLayoutCbYYCrYY411 = VmbPixelLayoutYUV411,
VmbPixelLayoutYCbYCr422,
VmbPixelLayoutCbYCrY422 = VmbPixelLayoutYUV422,
VmbPixelLayoutYCbCr444,
VmbPixelLayoutCbYCr444 = VmbPixelLayoutYUV444,
VmbPixelLayoutLAST,
}VmbPixelLayout;
typedef VmbUint32_t VmbPixelLayout_t;
/**image color space information*/
typedef enum VmbColorSpace
{
VmbColorSpaceUndefined,
VmbColorSpaceITU_BT709,
VmbColorSpaceITU_BT601,
}VmbColorSpace;
typedef VmbUint32_t VmbColorSpace_t;
/**image pixel information*/
typedef struct VmbPixelInfo
{
VmbUint32_t BitsPerPixel;
VmbUint32_t BitsUsed;
VmbAlignment_t Alignment;
VmbEndianness_t Endianness;
VmbPixelLayout_t PixelLayout;
VmbBayerPattern_t BayerPattern;
VmbColorSpace_t Reserved;
} VmbPixelInfo;
/**image information*/
typedef struct VmbImageInfo
{
VmbUint32_t Width;
VmbUint32_t Height;
VmbInt32_t Stride;
VmbPixelInfo PixelInfo;
}VmbImageInfo;
/** wimba image type*/
typedef struct VmbImage
{
VmbUint32_t Size; // struct size
void * Data;
VmbImageInfo ImageInfo;
}VmbImage;
/**transform info for special debayering modes*/
typedef enum VmbDebayerMode
{
VmbDebayerMode2x2,
VmbDebayerMode3x3,
VmbDebayerModeLCAA,
VmbDebayerModeLCAAV,
VmbDebayerModeYUV422,
}VmbDebayerMode;
typedef VmbUint32_t VmbDebayerMode_t;
/**transform info types*/
typedef enum VmbTransformType
{
VmbTransformTypeNone,
VmbTransformTypeDebayerMode,
VmbTransformTypeColorCorrectionMatrix,
VmbTransformTypeGammaCorrection,
VmbTransformTypeOffset,
VmbTransformTypeGain,
}VmbTransformType;
typedef VmbUint32_t VmbTransformType_t;
/**transform info for color correction using a 3x3 matrix multiplication*/
typedef struct VmbTransformParameterMatrix3x3
{
VmbFloat_t Matrix[9];
}VmbTransformParameterMatrix3x3;
/**transform info for gama correcting the immage, currently unsuported*/
typedef struct VmbTransformParameterGamma
{
VmbFloat_t Gamma;
}VmbTransformParameterGamma;
/**transform info for special debayering modes*/
typedef struct VmbTransformParameteDebayer
{
VmbDebayerMode_t Method;
}VmbTransformParameterDebayer;
typedef struct VmbTransformParameterOffset
{
VmbInt32_t Offset;
} VmbTransformParameterOffset;
typedef struct VmbTransformParameterGain
{
VmbUint32_t Gain;
} VmbTransformParameterGain;
/**transform info variant*/
typedef union VmbTransformParameter
{
VmbTransformParameterMatrix3x3 Matrix3x3;
VmbTransformParameterDebayer Debayer;
VmbTransformParameterGamma Gamma;
VmbTransformParameterOffset Offset;
VmbTransformParameterGain Gain;
}VmbTransformParameter;
/**transform info interface structure*/
typedef struct VmbTransformInfo
{
VmbTransformType_t TransformType;
VmbTransformParameter Parameter;
}VmbTransformInfo;
#endif