项目结构大变

This commit is contained in:
2025-11-20 19:29:00 +08:00
parent 6a7ab65597
commit a8791ab3df
17 changed files with 549 additions and 287 deletions

View File

@@ -8,16 +8,12 @@ class ImagePreprocessor {
public:
ImagePreprocessor();
~ImagePreprocessor();
// Get mask based on target color
cv::Mat get_mask(const cv::Mat& frame, const std::string& target_color);
// Get frame with only the target color
cv::Mat get_color_only_frame(const cv::Mat& frame, const std::string& target_color);
// Combined function to return both mask and color-only frame
void process_frame(const cv::Mat& frame, const std::string& target_color,
cv::Mat& mask, cv::Mat& color_only_frame);
// 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