init: 64 bits version of the webcam

This commit is contained in:
2026-07-13 16:31:52 +02:00
parent c0f3eeb00d
commit 07e526544d
381 changed files with 43996 additions and 9097 deletions

View File

@ -40,14 +40,15 @@
//
//M*/
#ifndef __OPENCV_CORE_OPENGL_HPP__
#define __OPENCV_CORE_OPENGL_HPP__
#ifndef OPENCV_CORE_OPENGL_HPP
#define OPENCV_CORE_OPENGL_HPP
#ifndef __cplusplus
# error opengl.hpp header must be compiled as C++
#endif
#include "opencv2/core.hpp"
#include "ocl.hpp"
namespace cv { namespace ogl {
@ -244,7 +245,7 @@ public:
/** @brief Maps OpenGL buffer to CUDA device memory.
This operatation doesn't copy data. Several buffer objects can be mapped to CUDA memory at a time.
This operation doesn't copy data. Several buffer objects can be mapped to CUDA memory at a time.
A mapped data store must be unmapped with ogl::Buffer::unmapDevice before its buffer object is used.
*/
@ -511,15 +512,57 @@ CV_EXPORTS void render(const Arrays& arr, int mode = POINTS, Scalar color = Scal
*/
CV_EXPORTS void render(const Arrays& arr, InputArray indices, int mode = POINTS, Scalar color = Scalar::all(255));
//! @} core_opengl
/////////////////// CL-GL Interoperability Functions ///////////////////
namespace ocl {
using namespace cv::ocl;
// TODO static functions in the Context class
/** @brief Creates OpenCL context from GL.
@return Returns reference to OpenCL Context
*/
CV_EXPORTS Context& initializeContextFromGL();
} // namespace cv::ogl::ocl
/** @brief Converts InputArray to Texture2D object.
@param src - source InputArray.
@param texture - destination Texture2D object.
*/
CV_EXPORTS void convertToGLTexture2D(InputArray src, Texture2D& texture);
/** @brief Converts Texture2D object to OutputArray.
@param texture - source Texture2D object.
@param dst - destination OutputArray.
*/
CV_EXPORTS void convertFromGLTexture2D(const Texture2D& texture, OutputArray dst);
/** @brief Maps Buffer object to process on CL side (convert to UMat).
Function creates CL buffer from GL one, and then constructs UMat that can be used
to process buffer data with OpenCV functions. Note that in current implementation
UMat constructed this way doesn't own corresponding GL buffer object, so it is
the user responsibility to close down CL/GL buffers relationships by explicitly
calling unmapGLBuffer() function.
@param buffer - source Buffer object.
@param accessFlags - data access flags (ACCESS_READ|ACCESS_WRITE).
@return Returns UMat object
*/
CV_EXPORTS UMat mapGLBuffer(const Buffer& buffer, int accessFlags = ACCESS_READ|ACCESS_WRITE);
/** @brief Unmaps Buffer object (releases UMat, previously mapped from Buffer).
Function must be called explicitly by the user for each UMat previously constructed
by the call to mapGLBuffer() function.
@param u - source UMat, created by mapGLBuffer().
*/
CV_EXPORTS void unmapGLBuffer(UMat& u);
//! @}
}} // namespace cv::ogl
namespace cv { namespace cuda {
//! @addtogroup cuda
//! @{
/** @brief Sets a CUDA device and initializes it for the current thread with OpenGL interoperability.
This function should be explicitly called after OpenGL context creation and before any CUDA calls.
@ -528,8 +571,6 @@ This function should be explicitly called after OpenGL context creation and befo
*/
CV_EXPORTS void setGlDevice(int device = 0);
//! @}
}}
//! @cond IGNORED
@ -681,4 +722,4 @@ bool cv::ogl::Arrays::empty() const
//! @endcond
#endif /* __OPENCV_CORE_OPENGL_HPP__ */
#endif /* OPENCV_CORE_OPENGL_HPP */