⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 dsydef.h

📁 相机传输图像程序源代码 拜耳模式(RAW格式文件)与RGB图像数据互相转换函数库
💻 H
📖 第 1 页 / 共 4 页
字号:
//=====================================================================
//[HEADER] DsyDef
// Daisy basic definitions
//+
//[AUTHOR]
// Bruno Rivara
//.


#ifndef ___DSYDEF_H
#define ___DSYDEF_H

#include <lvdef.h>
#include <dsylib.sh>
#include <camtype.h>

#include <lvpackon.h>

typedef U16BIT HCONNECTION;

/** @defgroup DaisyDefines Daisy definitions */
//@{
//@}

/** @defgroup DaisyEnums Daisy enumerations */
//@{
//@}

/** @defgroup MainDefines Main defines
 * @ingroup DaisyDefines
 */
//@{
/** Handle of the desired camera.
 * This handle should have been retrieved by a previous call to the LvGrabberNode::GetConnectedCamera() method.
 */
typedef HCONNECTION HCAMERA;
typedef HCONNECTION LVHMONITOR;

/** Handle of the connector where the camera is / will be connected. */
typedef HCONNECTION HCONNECTOR;

/** Handle of the grabber. */
typedef U16BIT HGRABBER;

/** Handle of the watchdog. */
typedef U16BIT HWATCHDOG;
//@}

/** @defgroup InvalidHandle InvalidHandle
 * @ingroup DaisyDefines
 */
//@{
/** Invalid handle. */
#define HANDLE_INVALID 0xffff

/** Invalid connection handle. */
#define HCONN_INVALID  HANDLE_INVALID
//@}


/** @defgroup disconnect_camera_group Disconnect camera group. 
 * @ingroup DaisyDefines
 */
//@{
/** When you would like to operate with all the cameras connected to the 
 * first subgrabber, you could use this definition 
 */
#define HCAMERA_ALLSUBGRB_0  0xff00
/** When you would like to operate with all the cameras connected to the 
 * second subgrabber, you could use this definition 
 */
#define HCAMERA_ALLSUBGRB_1  0xff01
/** When you would like to operate with all the cameras connected to the
 * third subgrabber, you could use this definition 
 */
#define HCAMERA_ALLSUBGRB_2  0xff02
/** When you would like to operate with all the cameras connected to the
 * forth subgrabber, you could use this definition 
 */
#define HCAMERA_ALLSUBGRB_3  0xff03
/** When you would like to operate with all the cameras connected to the
 * fifts subgrabber, you could use this definition 
 */
#define HCAMERA_ALLSUBGRB_4  0xff04
/** When you would like to operate with all the cameras connected to the
 * sixth subgrabber, you could use this definition 
 */
#define HCAMERA_ALLSUBGRB_5  0xff05
/** When you would like to operate with all the cameras connected to the
 * seventh subgrabber, you could use this definition 
 */
#define HCAMERA_ALLSUBGRB_6  0xff06
/** When you would like to operate with all the cameras connected to the
 * eighth subgrabber, you could use this definition 
 */
#define HCAMERA_ALLSUBGRB_7  0xff07
/** When you would like to operate with all the cameras connected to the
 * grabber, you could use this definition 
 */
#define HCAMERA_ALLGRB       0xff80
//@}
/* Subgrabber mask. */
#define HCAMERA_SUBGRBMSK    0x007f


/** @defgroup ConnectorState Connector state.
 * @ingroup DaisyDefines
 * These defines is used wherever is used LvConnectionInfo structure and its member Status
 * @sa LvConnectionInfo 
 */
//@{
/** Connector is free.
 * This value is saved in Status member of LvConnectionInfo structure after calling 
 * LvGrabberNode::GetConnectionInfo() function when this connector isn't used.
 */
#define LvConnState_Free     0
/** Connector is in use.
 * This value is saved in Status member of LvConnectionInfo structure after calling
 * LvGrabberNode::GetConnectionInfo() function when this connector is in use.
 */
#define LvConnState_InUse    1
//@}


#define SADDR_DONTCARE 0xffffffffL

#define Max_DescStrLength 31

// Image format definitons
#define Max_ColorComponent 4


/*? @defgroup ColorComponent Color component selection
 * @ingroup DaisyDefines
 * These defines could be used when calling LvExtDeviceNode::SelectColorComponent() as parameter.
 * @sa LvExtDeviceNode::SelectColorComponent() 
 */
#define ColCmp_None           0x00 /*?< Selects no component. */
#define ColCmp_Red            0x01 /*?< Selects the red component. */
#define ColCmp_Green          0x02 /*?< Selects the green component. */
#define ColCmp_Blue           0x03 /*?< Selects the blue component. */
#define ColCmp_AllColor       0x04 /*?< Selects all color components (not the alpha channel, if any). */
#define ColCmp_Alpha          0x05 /*?< Selects the alpha component (if any). */
#define ColCmp_Luminance      0x06 /*?< Selects the luminance component. */
#define ColCmp_Chrominance    0x07 /*?< Selects the chrominance component. */
#define ColCmp_MultiColor     0x08 /*?< Selects the multicolor component. */
#define ColCmp_Grey           0x09 /*?< Selects the grey component. */

#define ColCmp_Last           0x0a
#define ColCmp_All            0xff




/*? @defgroup PixelDepth PixelDepth - Pixel depth definitions. 
 * @ingroup DaisyDefines
 * Used as member of LvMemInfo structure 
 */
#define PDepth_1         0x00    /*?< 1 bit pixel depth (bit masks). */
#define PDepth_8         0x01    /*?< 8 bit pixel depth (monochrome image). */
#define PDepth_16        0x02    /*?< 16 bit pixel depth (32k or 64k colors image). */
#define PDepth_24        0x04    /*?< 24 bit pixel depth (16.7M colors image). */
#define PDepth_32        0x03    /*?< 32 bit pixel depth (16.7M colors image). */
#define PDepth_Last      0x05    /*?< Last pixel depth definition. */



#define ColMode_RGBA     0x00
#define ColMode_RGB      0x01
#define ColMode_YUV      0x02
#define ColMode_Mono     0x03
#define ColMode_Last     0x04


#define AddrMode_All           0x00
#define AddrMode_Window        0x01
#define AddrMode_MultiPixel    0x02
#define AddrMode_Planar        0x03
#define AddrMode_Last          0x04


#ifndef _Windows
// From Windows.h
/** The RGBQUAD structure describes a color consisting of relative intensities of red, green and blue. */
typedef struct tagRGBQUAD {     /* rgbq */
    /** Specifies the intensity of blue in the color. */
    BYTE    rgbBlue;
    /** Specifies the intensity of green in the color. */
    BYTE    rgbGreen;
    /** Specifies the intensity of red in the color. */
    BYTE    rgbRed;
    /** Reserved; must be zero */
    BYTE    rgbReserved;
} RGBQUAD;
#endif

/*? @defgroup AccessMode AccessMode - video memory address mode definitions.
 * @ingroup DaisyDefines
 */
/* 8 bits access. */
#define AccMode_8Bit            0x01
/* 16 bits access. */
#define AccMode_16Bit           0x02
/* 32 bits access. */
#define AccMode_32Bit           0x04


#define DSY_I_NoError I_NoError

#define ND_ADC          0x00000001L
#define ND_LUT          0x00000002L
#define ND_ColorConv    0x00000004L
#define ND_Scaler       0x00000008L
#define ND_Memory       0x00000010L
#define ND_DAC          0x00000020L
#define ND_MUX          0x00000030L
#define ND_MIX          0x00000080L
#define ND_CfgConv      0x00000100L
#define ND_1In1Out      0x00000200L
#define ND_LUTDAC       0x00000400L
#define ND_Crtc         0x00000800L
#define ND_Address      0x00001000L
#define ND_PixelPacker  0x00002000L
#define ND_Slicer       0x00008000L
#define ND_FrameBuffer  0x00004000L
#define ND_DMACtl       0x00010000L
#define ND_Info         0x00020000L
#define ND_Monitor      0x00040000L
#define ND_Camera       0x00080000L

#define ND_Grabber      0x00100000L
#define ND_AOM          0x00200000L
#define ND_AIM          0x00400000L
#define ND_Adapter      0x00800000L

#define ND_All          0x0fffffffL


// Supported IO types.
#define IOT_OptoIn          0x00
#define IOT_GpioIn          0x01
#define IOT_OptoOut         0x02
#define IOT_GpioOut         0x03

/*
//[DEFINE!] SyncroMode
// Supported synchronization modes. OBSOLETE! No more defined.
//& Description left for reference
#define SM_Common            0x00
        // Common sinchronization
#define SM_VCR               0x01
        // VCR sinchronization
#define SM_Pixel             0x02
        // Pixel sinchronization
#define SM_Last              0x03
        // Last sinchronization definition
//.
*/




/** @defgroup MirrorType MirrorType - supported input image mirroring types.
 * One (or OR-ed combination) of this definitions could be used/returned by LvCameraNode::GetMirrorType() or LvCameraNode::SetMirrorType()
 * @ingroup DaisyDefines
 * @sa LvCameraNode::GetMirrorType(), LvCameraNode::SetMirrorType() 
 */
//@{
/** The image is transferred as it comes from the camera. */
#define Mirror_None          0x00
/** The image is swapped along its Y axis. */
#define Mirror_Vertical      0x01
/** The image is swapped along its X axis. */
#define Mirror_Horizontal    0x02
/** The image is swapped along its X and Y axis. */
#define Mirror_HV            0x03
//@}
#define Mirror_Last          0x04





enum __ConnType {
    // Definition of the provided connector types
    CT_Undefined, // 0x00 Undefined (user provided) connector
    CT_BNC,       // 0x01 BNC connector
    CT_SVideo,    // 0x02 SVideo connector
    CT_HiRose,    // 0x03 Hirose connector
    CT_Chinch,    // 0x04 Chinch connector

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -