📄 camera.h
字号:
#ifndef ___CAMERA_H
#define ___CAMERA_H
#include <dsylib.h>
#include <extdev.h>
#include <lvpackon.h>
/** Represents any input equipment.
* Objects belonging to the LvCameraNode class represent the input
* equipment used to transfer in the video memory images from the outer
* world.
* @sa LvGrabberNode
*/
LVDSYCLASS LvCameraNode : public LvExtDeviceNode {
private:
BOOL PLive;
protected:
HANDLE Live_NoSync;
HANDLE Live_Field_0;
HANDLE Freeze_Field_0;
HANDLE Sync_Field_0;
HANDLE Sync_Field_1;
virtual void InitCfg(LvPortCfg *Cfg, U16BIT DevType=B_NOBOARD);
virtual LVSTATUS _DoLive(U32BIT Mode);
virtual LVSTATUS _DoFreeze(U32BIT Mode);
virtual LVSTATUS _DoWaitSync(U8BIT SyncType);
// Constructors & destructor
LvCameraNode(U16BIT Type, U16BIT aConnId, U8BIT aSyncNr, U16BIT anId=0, LPSTR ExtName=NULL);
virtual ~LvCameraNode(void);
LVSTATUS AddCamera(U16BIT Type, U16BIT aConnId, U8BIT aSyncNr);
friend LVDSYCLASS LvGrabberNode;
public:
virtual U32BIT GetType(void) { return ND_Camera; }
virtual char FAR *GetName(void) { return "Camera"; }
//>>>>PS
/** Activates the camera
* It behaves in the same way as the LvGrabberNode::ActivateCamera() method, in the * @ref LvGrabberNode class.
* In order to have more flexibility in next releases,
* the preferred method to activate the camera is the one in the
* @ref LvGrabberNode class; applications should always use that method to
* activate the camera or monitor.
* @param Targets @ref Targets "Target" for which the camera has to be activated. If there are a need to use more
* @ref Targets "targets" than there are possibility to OR-ed these @ref Targets "targets"
* @return @ref ErrorDefinitions
* @sa Live(), Freeze(), @ref LvGrabberNode, LvGrabberNode::ActivateCamera()
*/
virtual LVSTATUS Activate(U16BIT Targets=Tgt_Default);
/** Retrieves the actual area of interest.
* The user application uses this function to specify the desired camera region of interest. \n
* The StartX member of the @ref LvExtDeviceInfo "LvSourceInfo" structure is always related to
* the horizontal blank end (HBE in the Camera Editor) camera parameter.\n
* The StartY member of the @ref LvExtDeviceInfo "LvSourceInfo" structure is always related to
* the vertical blank end (VBE in the Camera Editor) camera parameter.
* @param SrcInfo pointer to a LvSourceInfo structure that
* specifies the desired source Roi settings.
* @return @ref ErrorDefinitions
* @sa GetSourceROI()
*/
LVSTATUS SetSourceROI(LvSourceInfo *SrcInfo);
/** Retrieves the actual area of interest.
* This function fills the @ref LvExtDeviceInfo "SrcInfo" structure with the actual settings of the
* camera region of interest.
* @param SrcInfo pointer to a @ref LvExtDeviceInfo "LvSourceInfo" structure that is
* filled with the actual source ROI settings.
* @return @ref ErrorDefinitions
* @sa SetSourceROI(), LvGrabberNode::ConnectCamera(), LvGrabberNode::ActivateCamera()
*/
LVSTATUS GetSourceROI(LvSourceInfo *SrcInfo);
/** Retrieves the Camera type.
* Retrieves the Camera type
* @return The camera identifier
*/
U16BIT GetCameraType(void);
//>>>>PE
};
//-[CLASS] LvCameraNode
#include <lvpackof.h>
#endif
//-[HEADER] Camera
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -