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

📄 orchid.h

📁 相机传输图像程序源代码 拜耳模式(RAW格式文件)与RGB图像数据互相转换函数库
💻 H
📖 第 1 页 / 共 5 页
字号:
*       with external trigger is limited by the fact that the external trigger cannot be received
*       by the grabber during the acquisition of the frame, so the AsynchronousGrab mode
*       cannot be utilized anyway.
* @note The AsynchronousGrab mode is useful only in cases the processing of acquired images takes
*       shorter time than the acquisition itself. Otherwise the acquisition will result in the
*       repeating scheme: 2 frames acquired, then some frames lost. Furthermore, a
*       notification about one frame completion can be also lost, if two notifications happen
*       during processing of a frame.\n
* @note Do not confuse the AsynchronousGrab with the Asynchronous Reset mode, which has
*       totally different meaning (resets the camera for each frame). AsynchronousGrab is
*       not possible in the LvxRtAr module (i.e. the camera in the Asynchronous Reset mode).
* @ingroup OrchidFunctionsInitializing
* @param hLvxTask   Handle to Orchid module, created by lvx_OpenTask().
* @param bSet       Value, enabling (TRUE) or disabling (FALSE) the asynchronous grab.
* @par See also .NET version:
*      LeutronVision::Orchid::LvxRtAr::AsynchronousGrab
*/
DLLENTRY void WINAPI lvx_SetAsynchronousGrab(HLVXTASK hLvxTask, BOOL bSet);

/* -------------------------------------------------------------------------- */

/** Returns the AsynchronousGrab mode.
*
* The acquisition is controlled by setting an internal continue flag on each checkpoint. When the
* frame  is acquired, the continue flag on
* the checkpoint is evaluated to decide, whether to continue immediately with the acquisition of
* the next frame. This happens in the short time between 2 images. If the flag is not set, then
* the next frame is lost, because setting the continue flag by the lvx_GrabContinue() \b after
* this evaluation means the continue flag is set already for the next checkpoint.\n
* Imagine you want to acquire one frame while another one is inspected; the inspection is
* fast enough to be done during the subsequence acquisition and you do not want to loose any frame.
* For such type of acquisition the internal continue flag on the checkpoint must be set \b before the
* checkpoint is evaluated, i.e. before the acquisition of the current frame is finished.\n
* To start such acquisition, you would have to:
* -# start acquisition of the first frame, wait until the acquisition actually starts and
*    then set the continue flag for the second frame.
* -# Wait for the notification about the first frame completion, after you receive it, you
*    can start processing it, and concurrently with it the second frame is acquired, as the
*    continue flag for it was already set.
* -# If you finish the processing of the first frame before the second frame is
*    completed, you can set the continue flag for the third frame and go to step 2). However,
*    if you finish the processing too late, i.e. after also the second frame is completed,
*    the acquisition is already stopped and some frames lost. To initiate double buffering, you
*    would have to go again to step 1).
*
* The AsynchronousGrab mode simplifies this kind of acquisition; when the lvx_SetAsynchronousGrab()
* property is set to \b TRUE, then each lvx_GrabContinue() command inspects the current status of
* acquisition; if the acquisition is stopped, it initiates grabbing of 2 frames (as in the
* step 1 above); if it is not stopped, it behaves normally, i.e. initiates grabbing of the next
* frame (like in the step 3 above). So with the AsynchronousGrab you can implement acquisition with
* double buffering simply by calling lvx_GrabContinue() to start the acquisition, and then calling
* lvx_GrabContinue() after each frame is processed.\n
* @note When this property is set to TRUE, the following properties must fulfill these conditions:
*       - lvx_SetSubsequences() must be set to a value greater than 1 (at least 2, better 3).
*       - lvx_SetFlowMode() must be set to lvx_Flow_ContinueOnRequest.
*       - lvx_SetCheckpoints() must be set to lvx_Checkpoint_EndOfFrame.
*       - lvx_SetExternalTrigger() must be set to lvx_ExtEv_Ignore. If the
*       ExternalTrigger is set to another value in the run-time, the AsynchronousGrab mode is
*       disabled until the ExternalTrigger is set to lvx_ExtEv_Ignore again. The double buffering
*       with external trigger is limited by the fact that the external trigger cannot be received
*       by the grabber during the acquisition of the frame, so the AsynchronousGrab mode
*       cannot be utilized anyway.
* @note The AsynchronousGrab mode is useful only in cases the processing of acquired images takes
*       shorter time than the acquisition itself. Otherwise the acquisition will result in the
*       repeating scheme: 2 frames acquired, then some frames lost. Furthermore, a
*       notification about one frame completion can be also lost, if two notifications happen
*       during processing of a frame.\n
* @note Do not confuse the AsynchronousGrab with the Asynchronous Reset mode, which has
*       totally different meaning (resets the camera for each frame). AsynchronousGrab is
*       not possible in the LvxRtAr module (i.e. the camera in the Asynchronous Reset mode).
* @ingroup OrchidFunctionsInitializing
* @param hLvxTask   Handle to Orchid module, created by lvx_OpenTask().
* @return The AsynchronousGrab mode.
* @par See also .NET version:
*      LeutronVision::Orchid::LvxRtAr::AsynchronousGrab
*/
DLLENTRY BOOL WINAPI lvx_GetAsynchronousGrab(HLVXTASK hLvxTask);

/* -------------------------------------------------------------------------- */

/* ---obsolete--- */
DLLENTRY void WINAPI lvx_SetRandomCameraSwitch(HLVXTASK hLvxTask, BOOL bSet);
/* ---obsolete--- */
DLLENTRY BOOL WINAPI lvx_GetRandomCameraSwitch(HLVXTASK hLvxTask);
/* ---obsolete--- */
DLLENTRY void WINAPI lvx_SetParallelGrab(HLVXTASK hLvxTask, BOOL bSet);
/* ---obsolete--- */
DLLENTRY BOOL WINAPI lvx_GetParallelGrab(HLVXTASK hLvxTask);

/* -------------------------------------------------------------------------- */

/** Sets the color format of the acquired images.
*
* @par LvxLive module:
*      Sets the color format of the snap image, that is made by the lvx_MakeSnap() method.\n
*      \n
*      In case an AVI file is to be open, the ImageBitsPerPixel can be used to select between
*      8-bit, 24-bit and 32-bit color format of images put to the AVI file. The 8-bit color format
*      is used when ImageBitsPerPixel is set to 8, and the 32-bit color format is used when
*      ImageBitsPerPixel is set to 32; for any other non-zero value of ImageBitsPerPixel the 24-bit
*      color format is used. If the ImageBitsPerPixel is set to 0, the 24-bit or 8-bit color format
*      is used, depending on whether the camera is color or not. Note that some codecs need not
*      support all these formats. The property must be set before opening the AVI file.\n
*      \n
*      In case the lvx_SetDisplayWindow() is not set, the ImageBitsPerPixel sets also the color
*      format, in which are images acquired to the DMA buffer. This is useful in case you want to
*      access the acquired images directly in this buffer, using the "Get DMA image data"
*      command. However, if the lvx_SetDisplayWindow() is set, or the DirectX Processor is
*      attached the image color format is the same as the color format of the screen, if the
*      grabber or camera supports it.
*
* @par Real-time modules:
*      Sets the color format of the images in the DMA buffer.\n
*      The value 0 means determine the color format from the camera characteristics: it is 24-bit
*      for color cameras and 8-bit for monochrome cameras.\n
*      The supported formats are RGB color 15, 16, 24, 32 bits per pixel and 8-bit to 16-bit
*      greyscale formats. To distinguish between 16-bit RGB and 16-bit greyscale format,
*      the greyscale formats are expressed with 1000 added, begining with the 9-bit mono format,
*      so the value 1009 represents 9-bit greyscale format, 1010
*      represents 10-bit greyscale format, ..., 1016 represents 16-bit greyscale format.\n
*      \n
*      The 9-bit to 16-bit mono formats
*      are not compatible with the Windows DIB format, so the lvx_GetImageBitmapInfo()
*      returns NULL and the lvx_ImageBitmapData() returns a pointer to a 2-dimensional array of the
*      word pixel values.\n
*      Some grabbers enable to use the RGB color planes. The corresponding BitsPerPixel constants
*      are 3008 for 3x8-bit plane, 3010 for 3x10-bit plane and 3012 for 3x12-bit plane.\n
*      \n
*      This property value is used for the module initialization (using the lvx_Initialize()
*      method). Changing the property value after the module is initialized returns the module to
*      the uninitialized status.\n
*
* @par LvxPrep module:
*      Sets the color format of the output image. The supported color formats are 8, 24 and 32 bits
*      per pixel.
* @ingroup OrchidFunctionsInitializing
* @param hLvxTask        Handle to Orchid module, created by lvx_OpenTask().
* @param iBitsPerPixel   one of the following constants (note that some of them may
*                        not be supported by the hardware):
*                        - 0: auto (8-bit for monochrome, 24-bit for color camera with RGB output)
*                        - 8: 8-bit monochrome
*                        - 15: 15-bit RGB color (5-5-5 bits)
*                        - 16: 16-bit RGB color (5-6-5 bits)
*                        - 24: 24-bit RGB color (8-8-8 bits)
*                        - 32: 32-bit RGB color (alpha-8-8-8 bits)
*                        - 1009: 9-bit monochrome
*                        - 1010: 10-bit monochrome
*                        - 1011: 11-bit monochrome
*                        - 1012: 12-bit monochrome
*                        - 1013: 13-bit monochrome
*                        - 1014: 14-bit monochrome
*                        - 1015: 15-bit monochrome
*                        - 1016: 16-bit monochrome
*                        - 3008: 3x8-bit RGB color planes
*                        - 3010: 3x10-bit RGB color planes
*                        - 3012: 3x12-bit RGB color planes
*
* @par See also .NET version:
*      LeutronVision::Orchid::LvxBaseAcquisition::ImageBitsPerPixel
*/
DLLENTRY void WINAPI lvx_SetImageBitsPerPixel(HLVXTASK hLvxTask, int iBitsPerPixel);

/* -------------------------------------------------------------------------- */

/** Returns the color format of the acquired images.
*
* @par LvxLive module:
*      Sets the color format of the snap image, that is made by the lvx_MakeSnap() method.\n
*      \n
*      In case an AVI file is to be open, the ImageBitsPerPixel can be used to select between
*      8-bit, 24-bit and 32-bit color format of images put to the AVI file. The 8-bit color format
*      is used when ImageBitsPerPixel is set to 8, and the 32-bit color format is used when
*      ImageBitsPerPixel is set to 32; for any other non-zero value of ImageBitsPerPixel the 24-bit
*      color format is used. If the ImageBitsPerPixel is set to 0, the 24-bit or 8-bit color format
*      is used, depending on whether the camera is color or not. Note that some codecs need not
*      support all these formats. The property must be set before opening the AVI file.\n
*      \n
*      In case the lvx_SetDisplayWindow() is not set, the ImageBitsPerPixel sets also the color
*      format, in which are images acquired to the DMA buffer. This is useful in case you want to
*      access the acquired images directly in this buffer, using the "Get DMA image data"
*      command. However, if the lvx_SetDisplayWindow() is set, or the DirectX Processor is
*      attached the image color format is the same as the color format of the screen, if the
*      grabber or camera supports it.
*
* @par Real-time modules:
*      Sets the color format of the images in the DMA buffer.\n
*      The value 0 means determine the color format from the camera characteristics: it is 24-bit
*      for color cameras and 8-bit for monochrome cameras.\n
*      The supported formats are RGB color 15, 16, 24, 32 bits per pixel and 8-bit to 16-bit
*      greyscale formats. To distinguish between 16-bit RGB and 16-bit greyscale format,
*      the greyscale formats are expressed with 1000 added, begining with the 9-bit mono format,
*      so the value 1009 represents 9-bit greyscale format, 1010
*      represents 10-bit greyscale format, ..., 1016 represents 16-bit greyscale format.\n
*      \n
*      The 9-bit to 16-bit mono formats
*      are not compatible with the Windows DIB format, so the lvx_GetImageBitmapInfo()
*      returns NULL and the lvx_ImageBitmapData() returns a pointer to a 2-dimensional array of the
*      word pixel values.\n
*      Some grabbers enable to use the RGB color planes. The corresponding BitsPerPixel constants
*      are 3008 for 3x8-bit plane, 3010 for 3x10-bit plane and 3012 for 3x12-bit plane.\n
*      \n
*      This property value is used for the module initialization (using the lvx_Initialize()
*      method). Changing the property value after the module is initialized returns the module to
*      the uninitialized status.\n
*
* @par LvxPrep module:
*      Sets the color format of the output image. The supported color formats are 8, 24 and 32 bits
*      per pixel.
* @ingroup OrchidFunctionsInitializing
* @param hLvxTask        Handle to Orchid module, created by lvx_OpenTask().
* @return The color format of the images, see iBitsPerPixel parameter by the
*     lvx_SetImageBitsPerPixel() function for the list of values.
*
* @par See also .NET version:
*      LeutronVision::Orchid::LvxBaseAcquisition::ImageBitsPerPixel
*/
DLLENTRY int  WINAPI lvx_GetImageBitsPerPixel(HLVXTASK hLvxTask);

/* -------------------------------------------------------------------------- */

/** Sets the image width.
*
* @par LvxLive module:
*      The width of the snap, that will be acquired by the lvx_MakeSnap() method. When set to 0,
*      the current live image size is used (if live is not displayed, then maximum image size is
*      used). If you want to set the maximum possible size, you can use some large value, like
*      10000. The lvx_MakeSnap() method always checks this value against the maximum image size, and if it is
*      larger, it rounds it down to the maximum possible value.\n
*      When the AVI file is opened (see lvx_OpenAviFile() ) and no display window is specified, the
*      width and height, specified in the lvx_SetImageWidth() and lvx_SetImageHeight() functions are used for
*      setting the size of the image saved to AVI. If the display window is specified, the AVI
*      image size is set to be equal to the live image size, but rounded down to be dividable by 8.
*
* @par Real-time modules:
*      The width of the images in the sequence. When set to 0, the maximum image size is used
*      (default). This property value is used for the module initialization (using the
*      lvx_Initialize() method). Changing this property value after the module is initialized
*      returns the module to the uninitialized status.
* @ingroup OrchidFunctionsInitializing
* @param hLvxTask   Handle to Orchid module, created by lvx_OpenTask().
* @param iWidth     Width of the image in pixels. See the description above for details.
* @par See also .NET version:
*      LeutronVision::Orchid::LvxBaseAcquisition::ImageWidth
*/
DLLENTRY void WINAPI lvx_SetImageWidth(HLVXTASK hLvxTask, int iWidth);

/* -------------------------------------------------------------------------- */

/** Returns the image width.
*
* @par LvxLive module:
*      The width of the snap, that will be acquired by the lvx_MakeSnap() method. When set to 0,
*      the current live image size is used (if live is not displayed, then maximum image size is
*      used). If you want to set the maximum possible size, you can use some large value, like
*      10000. The lvx_MakeSnap() method always checks this value against the maximum image size, and if it is
*      larger, it rounds it down to the m

⌨️ 快捷键说明

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