参考上海交通大学代码进行修改

This commit is contained in:
2025-12-05 11:13:37 +08:00
parent 593cb37cf7
commit f6e7d37da9
41 changed files with 2297 additions and 0 deletions

View File

@@ -0,0 +1,19 @@
#ifndef IMAGEPREPROCESSOR_H
#define IMAGEPREPROCESSOR_H
#include <opencv2/opencv.hpp>
#include <string>
class ImagePreprocessor {
public:
ImagePreprocessor();
~ImagePreprocessor();
// Apply morphological operations to a mask
void apply_morphology(const cv::Mat& input_mask, cv::Mat& output_mask);
// Apply Gaussian blur to reduce noise
void apply_gaussian_blur(const cv::Mat& input, cv::Mat& output, int kernel_size = 6);
};
#endif // IMAGEPREPROCESSOR_H