CUDA函数
This commit is contained in:
1 parent
a395698345
commit
4927b0ca02
2 files changed
+311
No files matched your search
@@ -0,0 +1,26 @@
|
||||
#pragma once
|
||||
|
||||
#include <cuda_runtime.h>
|
||||
#include <opencv2/core.hpp>
|
||||
|
||||
class MeshTextureCUDA {
|
||||
public:
|
||||
// 初始化CUDA环境
|
||||
static bool Initialize();
|
||||
|
||||
// 泊松混合的CUDA版本
|
||||
static bool PoissonBlendCUDA(cv::Mat& dst, const cv::Mat& src, const cv::Mat& mask, float bias);
|
||||
|
||||
// 掩码处理的CUDA版本
|
||||
static bool ProcessMaskCUDA(cv::Mat& mask, int stripWidth);
|
||||
|
||||
// 将 uint8 图像转换为 float 图像
|
||||
static bool ConvertToCUDA(const cv::Mat& src, cv::Mat& dst, float scale = 1.0f/255.0f);
|
||||
|
||||
// 清理CUDA资源
|
||||
static void Cleanup();
|
||||
|
||||
private:
|
||||
static bool cudaInitialized;
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user