RLL Computer Vision Code: code/image_preprocessor.h 源文件 From RLL Computer Vision previous page next page RLL Computer Vision Code 1.0 江苏科技大学HLL战队机器视觉代码 code image_preprocessor.h 浏览该文件的文档. 1 /***************************************************************************** 2 * HLL Computer Vision Code * 3 * Copyright (C) 2017 HLL sin1997@gmail.com. * 4 * * 5 * This file is part of HCVC. * 6 * * 7 * @file image_preprocessor.h * 8 * @brief Preprocess image to detect the armour zone and track it * 9 * Details. * 10 * * 11 * @author HLL * 12 * @email sin1997@gmail.com * 13 * @version 1.0.0.0 * 14 * @date 2017.11.10 * 15 * * 16 *----------------------------------------------------------------------------* 17 * Remark : Description * 18 *----------------------------------------------------------------------------* 19 * Change History : * 20 * <Date> | <Version> | <Author> | <Description> * 21 *----------------------------------------------------------------------------* 22 * 2017/11/10 | 1.0.0.0 | Zhu Min | Create file * 23 *----------------------------------------------------------------------------* 24 * * 25 *****************************************************************************/ 26 27 #ifndef IMAGE_PREPROCESSOR_H 28 #define IMAGE_PREPROCESSOR_H 29 30 /*C++标准库*/ 31 #include "algorithm" 32 #include "iostream" 33 #include "string" 34 35 /*opencv库*/ 36 #include "opencv2/opencv.hpp" 37 #include "opencv2/video/tracking.hpp" 38 #include "tracking.hpp" 39 40 /*自定义库*/ 41 #include "tool.h" 42 43 using namespace std; 44 using namespace cv; 45 46 namespace HCVC 47 { 50 55 class ImagePreprocessor 56 { 57 public: 62 ImagePreprocessor(); 63 70 Mat preprocess(const Mat& srcImage); 71 79 void setThreshod(int channel, int minOrMax, int value); 80 87 int getThreshod(int channel, int minOrMax) const; 88 89 private: 91 vector<int> thresholds[3]; 92 101 Mat rangeThreshold(const Mat& srcImage, const int& channel); 102 }; 104 } 105 106 #endif // IMAGE_PREPROCESSOR_Hstd cv HCVCHLL Computer Vision Code namepace. Definition: armour_detector.cpp:3 HCVC::ImagePreprocessor图像预处理模块 Definition: image_preprocessor.h:55 tool.h 制作者 1.8.13 previous page start next page