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

📄 grabber.h

📁 相机传输图像程序源代码 拜耳模式(RAW格式文件)与RGB图像数据互相转换函数库
💻 H
📖 第 1 页 / 共 5 页
字号:
        virtual char FAR *GetName(void) { return "VGA board"; }
                BOOL HandleIsCamera(HCONNECTION hConn);
                LVSTATUS GetConnectorSignalNr(HCAMERA hCamera, U8BIT *SigNr);

        /** Returns the subgrabber the camera is connected to.
         * @param hCamera handle to camera, which subgrabber we want to retrieve
         * @return The subgrabber index on the current grabber of the connected camera
         */
        virtual U32BIT GetSubGrabberForCamera(HCAMERA hCamera) { return 0; }

        /** Retrieves information about the associated grabber.
         * Copies grabber information to the buffer provided by the caller.
         * @param DevDescr structure allocated by the user application where to store the collected info.
         * @return Always @ref DSY_I_NoError
         */
         LVSTATUS GetDeviceInfo(LvDevDescr *DevDescr);

        /** Retrieves the specified board identifiers.
         * Query function to retrieve information about the boards a device is composed of.\n
         * A device can be composed by more than one board; in the simplest case,
         * a device is composed by only the main board (BD_MAIN); Leutron Vision
         * main boards (PrimaView, PicPort monochrome, PicPort color) are
         * designed to be enhanced with add-on modules for specific applications.
         * This function retrieves informations about the specified board.
         * @param BoardDescr  Pointer to a LvBoardDescr structure where the board info is copied.
         * @param Module Module to be queried; one of these definitions:
         *        @code
         *          BD_MAIN                       Main board
         *          BD_ADDON_1                    First add-on module
         *          BD_ADDON_2                    Second add-on module
         *          BD_ADDON_3                    Third add-on module
         *        @endcode
         * @return @ref ErrorDefinitions
         */
        virtual LVSTATUS GetBoardId(LvBoardDescr *BoardDescr, U8BIT Module=BD_MAIN);

        /** Retrieves information about a Target Buffer.
         * Query function to retrieve information about Target Buffers.
         * @param WhichTarget                  Target to be queried. One of the
         *                                     @ref TargetBuffer "TargetBuffer definitions."
         * @param Info                         Pointer to a LvTgtBufferInfo structure
         *                                     where the target buffer info are copied.
         * @param SubGrb                       Which subgrabber has to be used
         * @return @ref ErrorDefinitions
         */
        virtual LVSTATUS GetTgtBufferInfo(U16BIT WhichTarget, LvTgtBufferInfo *Info, int SubGrb=0);
        virtual BOOL   IsPrimaView(void) { return FALSE; }

        /** Determine if the grabber is a @a PicPort.
         * Determines if the grabber is a @a PicPort board. Returns @b TRUE for all the
         * members of the @a PicPort family.
         * @return  @b TRUE if the inquired grabber is a @a PicPort board.
         */
        virtual BOOL   IsPicPort(void) { return FALSE; }

        /** Determine if the grabber is a @a PicPort @a Color.
         * Determines if the grabber is a @a PicPort board. Returns @b TRUE for @a PicPort
         * @a Color, including the PCI bus specific versions.
         * @return @b TRUE if the inquired grabber is a @a PicPort @a Color board.
         */
        virtual BOOL   IsPicPortColor(void) { return FALSE; }

        /** Determine if the grabber is a @a PicPort @a Monochrome.
         * Determines if the grabber is a @a PicPort board. Returns @b TRUE for all models
         * of @a PicPort @a Monochrome, including the PCI bus specific versions.
         * @return @b TRUE if the inquired grabber is a @a PicPort @a Monochrome board.
         */
        virtual BOOL   IsPicPortMonochrome(void) { return FALSE; }
        virtual U16BIT GetGrbSigMapId(void) { return 0; }

        /*? Sets the specified VGA mode.
         * This method allows an application to set the desired VGA mode on the
         * actual grabber. Working in the Windows environment, Daisy will prevent to
         * change the VGA mode on the active device, the one used by Windows;
         * the method is available to set the desired mode on cards that are not the
         * active VGA in the system.
         * @param Mode The desired VGA mode; its meaning depends
         *             on the hardware. In the moment, only few
         *             modes are supported; a description of each
         *             mode will be presented in future releases.
         * @return @ref ErrorDefinitions
         */
        virtual LVSTATUS SetVGAMode(U16BIT Mode);

        /** Perform the connector recognition procedure.
         * This function allows an application to re-run the connector recognition
         * procedure. This is important when an end user is allowed by the
         * application to change the connection to the DSUB connector. An example
         * of application using this feature is the Camera Editor; to allow the user to
         * work with more than one connector without exiting the program, it
         * searches for the actual connector before trying to connect the camera.\n
         * \n
         * The LvCameraNode pointers eventually collected by the application
         * becomes invalid after calling this function, so, it is highly recommended
         * that the user application disconnects ALL the actually connected cameras
         * before directly calling this function.\n
         * \n
         * For proper camera connection handling, instead of directly using this
         * function, user applications should always use the
         * DsyRecheckConnector function that takes care of properly deactivating
         * and disconnecting cameras.
         * @return A pointer to the newly created LvConnector object; normally the user
         *         application should not use this kind of object.
         * @sa DisconnectCamera(), DsyRecheckConnector()
         */
        virtual LvConnector *RecheckConnector(void);

        /** Retrieves information about a connection (camera or monitor).
         * Allows the user to get information about the ROI currently used by an
         * equipment, in input or output, connected to the grabber; the data returned
         * in the provided LvROI object allows the application to access that ROI
         * with the right parameters.
         * Using this function has to be considered the preferred way to initialize a
         * LvROI object.
         * @param hConn          Handle to a previously connected camera or monitor.
         * @param Info           LvROI object allocated by the application to
         *                       store the information about the connection.
         * @param Target         Specifies the target for which the information
         *                       has to be retrieved. The target has to be
         *                       previously activated by a call to the
         *                       ActivateCamera() method. This parameter
         *                       must be one of the @ref Targets
         * @return @ref ErrorDefinitions
         * @sa LvROI
         */
        LVSTATUS GetConnectionInfo(HCONNECTION hConn, LvROI FAR *Info, U8BIT Target=Tgt_Default);

        /** Retrieves the name of the connector where a camera is connected.
         * Retrieves the description of the connector where the specified camera is connected.
         * It can be used as information in the user interface.
         * @param hCamera       The camera connected to the desired connector.
         * @param Buffer        Pointer to a user defined buffer where the connector description will be copied.
         * @param MaxSize       Size of the user defined buffer.
         * @return @ref ErrorDefinitions
         */
        LVSTATUS GetConnectorName(HCAMERA hCamera, LPSTR Buffer, int MaxSize);

        /*? Retrieves the connector type detected on the grabber.
         * Returns the connector identifier; one of the ConnectorId ids.
         * The Buffer parameter is optional; when present it is filled with the
         * connector description; it can be used as information for user interface.
         * @param Buffer             Pointer to a user defined buffer where the
         *                           connector description will be copied; this
         *                           parameter can be NULL.
         * @param MaxSize            Size of the user defined buffer. When not
         *                           specified, this parameter defaults to zero, and
         *                           no description will be copied in the eventually
         *                           provided buffer.
         * @return The connector identifier; one of the @ref ConnectorId ids.
         */
        U8BIT  GetConnectorType(char *Buffer=NULL, int MaxSize=0);
        U8BIT  GetConnectionType(HCONNECTION hConn);

        /** Retrieves the number of input equipment currently connected.
         * Query method to retrieve the number of the cameras currently connected
         * to the grabber.
         * @return The number of input equipment currently connected to the grabber.
         */
        U16BIT GetNrConnectedCamera(void);

        /** Retrieves the handles of the input equipments currently connected.
         * Query method to retrieve handles of the cameras currently connected to
         * the grabber; the GetConnectedCamera() method has to be called,
         * incrementing the Index parameter, until it returns @ref HANDLE_INVALID ; the
         * user application can then refer to a specific camera by using its handle.
         * @param Index Positive integer specifying the sequential number of the requested input device.
         * @return The handle of the requested input equipment if all right, otherwise @ref HANDLE_INVALID.
         */
        HCAMERA GetConnectedCamera(U16BIT Index);

        /** Gets a pointer to the specified camera object.
         * Returns a pointer to the LvCameraNode object associated with the specified handle.
         * The user application can use this object but it should not delete it (see Release notes).
         * @param hCamera Handle of the desired camera; this handle should have been retrieved by a previous call
         *                to the GetConnectedCamera() method.
         * @return The pointer to the LvCameraNode object specified by the hCamera parameter, if valid, otherwise NULL.
         */
        LvCameraNode FAR *GetCameraPtr(HCAMERA hCamera);

        /*? Monitor function */
        U16BIT GetNrConnectedMonitor(void);
        /*? Monitor function */
        LVHMONITOR GetConnectedMonitor(U16BIT Index);
        /*? Monitor function */
        LvMonitorNode FAR *GetMonitorPtr(LVHMONITOR hMonitor);

        /*? Monitor function */
        virtual LVHMONITOR ConnectMonitor(U16BIT Type, HCONNECTOR hConn);
        /*? Monitor function */
        virtual LVSTATUS ActivateMonitor(LVHMONITOR hMonitor);
        /*? Monitor function */
        virtual LVSTATUS  DisconnectMonitor(LVHMONITOR hMonitor);

        /** Connects an input equipment to the grabber.
         * Allows to connect an input equipment to the grabber; the @a hConn and @a NrSync parameters have to be chosen
         * by using the information retrieved from the GetNrFreeConnectorEx() and GetFreeConnectorInfoEx() methods.
         * @param Type      Type of camera to connect
         * @param hConn     Handle of the connector where the camera will be connected.
         * @param SyncNr    Synchronization line to be used.
         * @return  The handle of the connected camera if all right\n
         *          @ref HANDLE_INVALID if errors occur.
         */
        virtual HCAMERA ConnectCamera(U16BIT Type, HCONNECTOR hConn, U8BIT SyncNr=0xff);

        /** Connects an input equipment to the grabber.
         * Allows to connect an input equipment to the grabber; the @a hConn and @a NrSync parameters have to be chosen
         * by using the information retrieved from the GetNrFreeConnectorEx() and GetFreeConnectorInfoEx() methods.
         * @param TheCamera Which camera has to be connected.
         * @param Type      Type of camera to connect
         * @param hConn     Handle of the connector where the camera will be connected.
         * @param SyncNr    Synchronization line to be used.
         * @return  @ref ErrorDefinitions
         */
        virtual LVSTATUS  ConnectCamera(LvCameraNode *TheCamera, U16BIT Type, HCONNECTOR hConn, U8BIT SyncNr=0xff);


        /** Activates a previously connected camera.
         * Allow to activate the camera associated with the specified handle.
         * Activating a camera means to prepare the grabber hardware to receive
         * the input image from the activating camera\n
         * \n
         * @remarks Depending on the grabber installed in the system, the
         *          activation of a camera can cause the automatic deactivation of
         *          another eventually connected (and eventually active) camera.

⌨️ 快捷键说明

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