some refactor
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
#include <opencv2/highgui.hpp>
|
||||
#include <armor_finder/armor_finder.h>
|
||||
|
||||
ArmorFinder::ArmorFinder(EnemyColor &color, Serial &u, string paras_folder, const bool &use) :
|
||||
ArmorFinder::ArmorFinder(uint8_t &color, Serial &u, string paras_folder, const uint8_t &use) :
|
||||
serial(u),
|
||||
enemy_color(color),
|
||||
state(STANDBY_STATE),
|
||||
|
||||
@@ -21,7 +21,7 @@ static void splitBayerBG(cv::Mat &src, cv::Mat &blue, cv::Mat &red) {
|
||||
}
|
||||
}
|
||||
|
||||
void imageColorSplit(cv::Mat &src_input, cv::Mat &split, EnemyColor color) {
|
||||
void imageColorSplit(cv::Mat &src_input, cv::Mat &split, uint8_t color) {
|
||||
cv::Mat blue(240, 320, CV_8UC1), red(240, 320, CV_8UC1);
|
||||
if(src_input.type() == CV_8UC1){
|
||||
splitBayerBG(src_input, blue, red);
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
#include <opencv2/core.hpp>
|
||||
#include <armor_finder/armor_finder.h>
|
||||
|
||||
void imageColorSplit(cv::Mat &src_input, cv::Mat &split, EnemyColor color);
|
||||
void imageColorSplit(cv::Mat &src_input, cv::Mat &split, uint8_t color);
|
||||
void imagePreProcess(cv::Mat &src);
|
||||
|
||||
#endif /* _IMAGE_PROCESS_H_ */
|
||||
|
||||
Reference in New Issue
Block a user