 |
ImageD
v2_7_5 (24.06.22)
ImageD is an image processing software designed for rapid prototyping and implementing algorithms and solutions for science, research and teaching.
|
Go to the documentation of this file.
9 #ifndef D_COMPONENT_LIST_H
10 #define D_COMPONENT_LIST_H
27 #include <QStringList>
32 #include <opencv2/core/core.hpp>
33 #include <opencv2/highgui/highgui.hpp>
34 #include <opencv2/imgproc/imgproc.hpp>
53 int set_Mat(
Mat *pMA_BinaryOrLabel,
int connectivity = 8);
57 size_t get_size() {
return m_Components.size();}
60 double get_Feature(
int comp,
int feat) {
return m_Components[comp].get_Feature(feat);}
61 vector<double> get_FeatureVector(
int feature);
62 vector<double> get_FeatureVector_BG(
int feature);
70 vector<Point2f> get_CentroidVector();
71 vector<Point2f> get_CentroidVector_BG();
74 vector<Point> get_OffsetVector();
75 vector<Point2f> get_OffsetVector_2f();
76 vector<Point> get_OffsetVector_BG();
78 vector<vector<Point>> get_ContourVector();
79 vector<vector<Point>> get_ContourVector_BG();
80 vector<vector<Point>> get_ContourVector_ConvexHull();
82 vector<Rect> get_BndBox_Rect_Vector();
84 vector<RotatedRect> get_BndBox_Rotate_Vector();
86 vector<RotatedRect> get_Ellipse_Fitted_Vector();
89 vector<Point>
get_Coordinates(
int comp) {
return m_Components[comp].get_Coordinates();}
93 void Components_Updated();
94 size_t size() {
return m_Components.size();}
95 void clear() {m_Components.clear();}
98 void save_all(QString path_dir);
105 bool initialized =
false;
106 int Split_Labels_2_Components();
109 vector<D_Component> m_Components;
110 bool b_Components() {
return static_cast<bool>(m_Components.size());}
118 #endif // D_COMPONENT_LIST_H
cv::Mat Mat
Definition: d_opencv_typedefs.h:28
@ ER_okay
Definition: d_enum.h:133
void clear()
Definition: d_component_list.h:95
void Components_Updated()
Definition: d_component_list.cpp:304
Mat * get_pMatBinary()
Definition: d_component_list.h:65
cv::Point2f Point2f
Definition: d_opencv_typedefs.h:37
size_t size()
Definition: d_component_list.h:94
Point get_Offset(int comp)
Definition: d_component_list.h:73
cv::Rect Rect
Definition: d_opencv_typedefs.h:65
vector< Point2f > get_CentroidVector()
Definition: d_component_list.cpp:148
RotatedRect get_BndBox_Rotate(int comp)
Definition: d_component_list.h:85
vector< Point > get_OffsetVector()
Definition: d_component_list.cpp:177
Mat * get_pMatLabels()
Definition: d_component_list.h:67
size_t get_size()
Definition: d_component_list.h:57
const QStringList QSL_FeatureList
Definition: d_enum.h:1457
vector< RotatedRect > get_Ellipse_Fitted_Vector()
Definition: d_component_list.cpp:291
The D_Component class A blob and its features in a 2D binary/label image.
Definition: d_component.h:41
vector< RotatedRect > get_BndBox_Rotate_Vector()
Definition: d_component_list.cpp:278
cv::Point Point
Definition: d_opencv_typedefs.h:35
@ ER_bitdepth_bad
Definition: d_enum.h:138
Mat get_MatLabels()
Definition: d_component_list.h:66
void save_all(QString path_dir)
Definition: d_component_list.cpp:309
vector< vector< Point > > get_ContourVector_ConvexHull()
Definition: d_component_list.cpp:252
vector< double > get_FeatureVector(int feature)
Definition: d_component_list.cpp:119
@ ER_channel_bad
Definition: d_enum.h:144
D_Component get_Component(size_t index)
Definition: d_component_list.h:56
vector< Point > get_OffsetVector_BG()
Definition: d_component_list.cpp:203
RotatedRect get_Ellipse_Fitted(int comp)
Definition: d_component_list.h:87
vector< double > get_FeatureVector_BG(int feature)
Definition: d_component_list.cpp:132
vector< D_Component > get_ComponentVector()
Definition: d_component_list.h:58
Rect get_BndBox_Rect(int comp)
Definition: d_component_list.h:83
Point2f get_Centroid(int comp)
Definition: d_component_list.h:69
int set_Mat(Mat *pMA_BinaryOrLabel, int connectivity=8)
Definition: d_component_list.cpp:22
D_Component_List()
Definition: d_component_list.cpp:11
The D_Component_List class is a list of D_Component representing the blobs in a binary image.
Definition: d_component_list.h:46
vector< Point2f > get_CentroidVector_BG()
Definition: d_component_list.cpp:161
vector< Point2f > get_OffsetVector_2f()
Definition: d_component_list.cpp:190
Mat get_MatBinary()
Definition: d_component_list.h:64
vector< vector< Point > > get_ContourVector()
Definition: d_component_list.cpp:221
double get_Feature(int comp, int feat)
Definition: d_component_list.h:60
cv::RotatedRect RotatedRect
Definition: d_opencv_typedefs.h:66
@ ER_parameter_bad
Definition: d_enum.h:142
vector< vector< Point > > get_ContourVector_BG()
Definition: d_component_list.cpp:234
@ c_FEAT_NUMBER_OF_FEATS
Definition: d_enum.h:1455
vector< Rect > get_BndBox_Rect_Vector()
Definition: d_component_list.cpp:265
vector< Point > get_Coordinates(int comp)
Definition: d_component_list.h:89
@ ER_empty
Definition: d_enum.h:135