You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
649 B
26 lines
649 B
#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; |
|
}; |
|
|
|
|