rmcv  v0.1.0
A library for RoboMaster computer vision based on OpenCV.
objdetect.h
1 //
2 // Created by yaione on 3/1/2022.
3 //
4 
5 #ifndef RMCV_OBJDETECT_H
6 #define RMCV_OBJDETECT_H
7 
8 #include "core/core.h"
9 
10 namespace rm {
21  bool MatchLightBlob(const rm::Contour &contour, float minRatio, float maxRatio, float tiltAngle, float minArea,
22  float maxArea, cv::RotatedRect &lightBlobBox, bool fitEllipse = true);
23 
34  void FindLightBlobs(std::vector<rm::Contour> &contours, std::vector<rm::LightBlob> &lightBlobs, float minRatio,
35  float maxRatio, float tiltAngle, float minArea, float maxArea, const cv::Mat &source,
36  bool fitEllipse = true);
37 
48  void FindLightBlobs(std::vector<rm::Contour> &contours, std::vector<rm::LightBlob> &lightBlobs, float minRatio,
49  float maxRatio, float tiltAngle, float minArea, float maxArea, rm::CampType camp,
50  bool fitEllipse = true);
51 
56  int FindGuidLight(const std::vector<rm::LightBlob> &lightBlobs, const cv::Mat &source);
57 
63  bool LightBlobOverlap(std::vector<rm::LightBlob> &lightBlobs, int leftIndex, int rightIndex);
64 
78  void FindArmour(std::vector<rm::LightBlob> &lightBlobs, std::vector<rm::Armour> &armours, float maxAngleDif,
79  float errAngle, float minBoxRatio, float maxBoxRatio, float lenRatio, rm::CampType enemy,
80  bool filter = true);
81 }
82 
83 #endif //RMCV_OBJDETECT_H
rm::FindLightBlobs
void FindLightBlobs(std::vector< rm::Contour > &contours, std::vector< rm::LightBlob > &lightBlobs, float minRatio, float maxRatio, float tiltAngle, float minArea, float maxArea, const cv::Mat &source, bool fitEllipse=true)
Definition: objdetect.cpp:28
rm::FindGuidLight
int FindGuidLight(const std::vector< rm::LightBlob > &lightBlobs, const cv::Mat &source)
rm
Main modules.
Definition: daheng.h:17
rm::MatchLightBlob
bool MatchLightBlob(const rm::Contour &contour, float minRatio, float maxRatio, float tiltAngle, float minArea, float maxArea, cv::RotatedRect &lightBlobBox, bool fitEllipse=true)
Definition: objdetect.cpp:8
rm::LightBlobOverlap
bool LightBlobOverlap(std::vector< rm::LightBlob > &lightBlobs, int leftIndex, int rightIndex)
Definition: objdetect.cpp:62
rm::FindArmour
void FindArmour(std::vector< rm::LightBlob > &lightBlobs, std::vector< rm::Armour > &armours, float maxAngleDif, float errAngle, float minBoxRatio, float maxBoxRatio, float lenRatio, rm::CampType enemy, bool filter=true)
Definition: objdetect.cpp:82