23 lines
697 B
C++
23 lines
697 B
C++
#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
|