内容填充
This commit is contained in:
23
ImagePreprocessor.h
Normal file
23
ImagePreprocessor.h
Normal file
@@ -0,0 +1,23 @@
|
||||
#ifndef IMAGEPREPROCESSOR_H
|
||||
#define IMAGEPREPROCESSOR_H
|
||||
|
||||
#include <opencv2/opencv.hpp>
|
||||
#include <string>
|
||||
|
||||
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);
|
||||
};
|
||||
|
||||
#endif // IMAGEPREPROCESSOR_H
|
||||
Reference in New Issue
Block a user