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

📄 grabber.h

📁 相机传输图像程序源代码 拜耳模式(RAW格式文件)与RGB图像数据互相转换函数库
💻 H
📖 第 1 页 / 共 5 页
字号:
         * @param hCamera Handle of the camera to be activated. The camera must already be
         *          connected to the grabber by calling the ConnectCamera() method.
         *          The handle of the camera is returned when the ConnectCamera is
         *          called or can be retrieved by calling the LvCameraNode::GetHandle function
         *          for the camera being activated.
         * @param Targets @ref Targets for which the camera has to be activated. This value has to
         *          be activated. This value has to be a combination of values from the @ref Targets definitions;
         *          these values can be OR-ed to specify more targets; if the hardware does
         *          not support multiple targets an error is returned.
         * @return @ref ErrorDefinitions
         * @sa DeactivateCamera()
         */
        virtual LVSTATUS  ActivateCamera(HCAMERA hCamera, U8BIT Targets=Tgt_Default);

        /** Deactivates a previously connected and activated camera.
         * Allow to deactivate the camera associated with the specified handle.
         * @param hCamera    Handle of the camera to be deactivated; this handle must be retrieved by calling the ConnectCamera()
         *                   method.
         * @param Targets    Actually unused.
         * @return @ref ErrorDefinitions
         * @sa ActivateCamera()
         */
        virtual LVSTATUS  DeactivateCamera(HCAMERA hCamera, U8BIT Targets=Tgt_Default);

        /** Disconnects a previously connected camera.
         * Allows to disconnect the camera associated with the specified handle. When calling this method
         * the camera should be already deactivated.
         * It is possible to disconnect a group of cameras previously connected with a single call to DisconnectCamera()
         * by using the following values as hCamera parameter:
         * @code
         *  HCAMERA_ALLGRB               Disconnects all the cameras connected to the grabber.
         *  HCAMERA_ALLSUBGRB_0          Disconnects all the cameras connected to the first subgrabber
         *  HCAMERA_ALLSUBGRB_1          Disconnects all the cameras connected to the second subgrabber
         *  HCAMERA_ALLSUBGRB_2          Disconnects all the cameras connected to the third subgrabber
         *  HCAMERA_ALLSUBGRB_3          Disconnects all the cameras connected to the forth subgrabber
         * @endcode
         * @param hCamera Handle of the camera to be disconnected; this handle should have been retrieved by calling the
         *                ConnectCamera() method
         * @return @ref ErrorDefinitions
         * @sa DeactivateCamera()
         */
        virtual LVSTATUS  DisconnectCamera(HCAMERA hCamera);

        // U16BIT GetNrFreeConnector(U16BIT VideoType, BOOL ForDigital=FALSE);
        // LVSTATUS GetFreeConnectorInfo(U8BIT VideoType, LvConnectionInfo FAR *ConnInfo, BOOL ForDigital=FALSE);

        /** Retrieves the number of free input connectors.
         * Query method to retrieve the number of the connectors currently available
         * for connecting input equipment; this method reports the number of free
         * connectors for the specified camera type.\n
         * This method checks also the availability of the synchronization lines
         * needed for the specified camera type.
         * @param CameraId           Type of camera to be connected
         * @param SubGrb             Which subgrabber has to be used
         * @return The number of free connectors for the specified camera type
         * @sa ConnectCamera(), GetFreeConnectorInfoEx()
         */
        U16BIT GetNrFreeConnectorEx(U16BIT CameraId, U32BIT SubGrb=0);

        /** Retrieves information about free input connectors.
         * Query method to retrieve the handles of the connectors currently available
         * for connecting input equipment. This call fills the _tagLvConnectionInfo array, which
         * has to be previously allocated by the calling application using the
         * information from the GetNrFreeConnectorEx() method, with data about
         * the free connectors for the specified type. The user application can then
         * refer to a specific connector with its handle while asking Daisy to connect
         * a new camera.
         * @param CameraId          Type of camera
         * @param ConnInfo          Pointer to a block of memory allocated by the
         *                          application where the data will be stored; it
         *                          has to be large enough to contain all the
         *                          connectors for the requested video type.
         *                          Before calling this method, the application
         *                          should allocate this buffer using the value
         *                          returned by the GetNrFreeConnectorEx()
         *                          method.
         * @param SubGrb            Which subgrabber has to be used
         * @return @ref ErrorDefinitions
         */
        LVSTATUS GetFreeConnectorInfoEx(U16BIT CameraId, LvConnectionInfo FAR *ConnInfo, U32BIT SubGrb=0);

        /** Retrieves the number in the full IO connector list.
         * Query method to retrieve the number of the connectors available
         * for general purpose Input/Output; this method reports the number of
         * connectors for the specified IO type.\n
         * @param IOId              Type of IO to query
         * @param SubGrb            Which subgrabber has to be used
         * @return The number of connectors for the specified GPIO type
         * @sa GetFullConnectorInfoIO()
         */

        U32BIT   GetNrFullConnectorInfoIO(U16BIT IOId, U32BIT SubGrb=0);
        /** Retrieves the full IO connector list.
         * Query method to retrieve information about available IO connectors
         * This call fills the _tagLvConnectionInfo array, which
         * has to be previously allocated by the calling application using the
         * information from the GetNrFullConnectorInfoIO() method, with data about
         * the connectors for the specified type.
         * @param IOId              Type of IO
         * @param ConnInfo          Pointer to a block of memory allocated by the
         *                          application where the data will be stored; it
         *                          has to be large enough to contain all the
         *                          connectors for the requested IO type.
         *                          Before calling this method, the application
         *                          should allocate this buffer using the value
         *                          returned by the GetNrFullConnectorInfoIO()
         *                          method.
         * @param SubGrb            Which subgrabber has to be queried
         * @return @ref ErrorDefinitions
         */
        LVSTATUS GetFullConnectorInfoIO(U16BIT IOId, LvConnectionInfo FAR *ConnInfo, U32BIT SubGrb=0);

        /** Moves the region of interest.
         * Allows the user to move the ROI used by the specified connection (monitor or camera)
         * in another location of the target memory; The application can specify the new position
         * in the coordinate system currently used by  the ROI associated with that connection
         * (the first form) or in the coordinate system used by the specified ROI.
         *
         * @note Due to the way the hardware has to be set, in case of moving a ROI
         *         associated with a camera, not all the coordinates can be chosen. The
         *         ActivateROI() method will update the StartX and StartY ROI fields in
         *         order to reflect the adjusted window position.
         *         The application should then check the content of these fields after the
         *         call to the ActivateROI() method and act accordingly (e.g. by moving the window
         *         containing the image coming from the camera).
         *         The application should always use the GetConnectionInfo() method
         *         in order to retrieve the parameter for the position correction.
         *
         * @remarks When using the second form, Daisy will adjust the hardware to match
         *            all the parameters set in the LvRoi object, especially for those regarding
         *            the color format and resolution.
         *
         * @param hConn Handle of the connection whose ROI has to be changed; it can be either a
         *                HCAMERA or a HMONITOR.
         * @param x     New x position in ROI coordinates where the ROI will be moved. In this case
         *                no other setting will change.
         * @param y     New y position in ROI coordinates where the ROI will be moved. In this case
         *                no other setting will change.
         * @param Target Specifies the target for which the ROI has to be set. The target has to be
         *                 previously activated by a call to the ActivateCamera() method. This parameter
         *                 must be one of the @ref Targets definitions.
         * @return @ref ErrorDefinitions
         */
        LVSTATUS ActivateROI(HCONNECTION hConn, U32BIT x, U32BIT y, U8BIT Target=Tgt_Default);

        /** Moves the region of interest.
         * Allows the user to move the ROI used by the specified connection (monitor or camera)
         * in another location of the target memory; The application can specify the new position
         * in the coordinate system currently used by  the ROI associated with that connection
         * (the first form) or in the coordinate system used by the specified ROI.
         *
         * @note Due to the way the hardware has to be set, in case of moving a ROI
         *         associated with a camera, not all the coordinates can be chosen. The
         *         ActivateROI() method will update the StartX and StartY ROI fields in
         *         order to reflect the adjusted window position.
         *         The application should then check the content of these fields after the
         *         call to the ActivateROI() method and act accordingly (e.g. by moving the window
         *         containing the image coming from the camera).
         *         The application should always use the GetConnectionInfo() method
         *         in order to retrieve the parameter for the position correction.
         *
         * @remarks When using the second form, Daisy will adjust the hardware to match
         *            all the parameters set in the LvRoi object, especially for those regarding
         *            the color format and resolution.
         *
         * @param hConn Handle of the connection whose ROI has to be changed; it can be either a
         *                HCAMERA or a HMONITOR.
         * @param Info  LvROI object defining the new parameters for the ROI associated with the
         *                hConn handle.
         * @param Target Specifies the target for which the ROI has to be set. The target has to be
         *                 previously activated by a call to the ActivateCamera() method. This parameter
         *                 must be one of the @ref Targets definitions.
         * @return @ref ErrorDefinitions
         */
        LVSTATUS ActivateROI(HCONNECTION hConn, LvROI FAR *Info, U8BIT Target=Tgt_Default);

        /** Updates the lock mask for the specified camera and target.
         * Updates the lock mask for the specified camera and target. The Lock
         * mask has to be previously set by using the LvROI methods.
         * @param hConn          Handle of the connection whose Lock mask
         *                       has to be updated; it should be a @b HCAMERA
         *                       handle.
         * @param Enable         Enables or disables the lock mask.
         * @param Target         Specifies the target for which the ROI has to
         *                       be set. The target has to be previously
         *                       activated by a call to the ActivateCamera()
         *                       method. This parameter must be one of the
         *                       @ref Targets "Targets" definitions.
         * @return @ref ErrorDefinitions
         * @sa LvROI
         */
        LVSTATUS UpdateLockMask(HCONNECTION hConn, BOOL Enable=TRUE, U8BIT Target=Tgt_Default);

        virtual LVSTATUS EnableVMemAccess(LvROI FAR *Info);
        virtual LVSTATUS DisableVMemAccess(LvROI FAR *Info);

        /** Retrieves the content of the defined region of interest.
         * This method is used to store an image buffer to the acquisition memory
         * using the memory view specified in the provided LvROI object; this object
         * has to be initialized by using the GetConnectionInfo() method.\n
         * Using this method, the user has not to @a Enable and @a Disable the Video
         * Memory access, @a Daisy will do it.
         * @param Buffer             User allocated buffer from where @a Daisy will
         *                           take the content of the part of video memory
         *                           specified in the LvROI object. @a Daisy assumes
         *                           that this buffer will be large enough to contain
         *                           the whole image.
         * @param Info               Object defining the Region of interest that has
         *                           to be stored from the video memory.
         * @param InMode             @a Daisy can convert SOME color format to the
         *                           destination color format. This parameter
         *                           allows the user application to specify which
         *                           color format is stored in the provided Buffer;
         *                           the value of this parameter is one of the
         *                           @ref ROIColorFormat identifiers.
         * @return
         *   @code
         *      DSY_I_NoError        everything is all right.
         *      DSY_E_NotSupported   when the InMode parameter specifies a format that Daisy is not able to convert.
         *      DSY_E_InvalidPointer when the Buffer length is not enough to contain the image with the eventually
         *                             specified color format and image size.
         *   @endcode
         * @sa RetrieveROI(), LvROI::GetArea()
         */

⌨️ 快捷键说明

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