 |
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_MAKRO_HUANGVISUALIZATION_H
10 #define D_MAKRO_HUANGVISUALIZATION_H
24 #include <QMainWindow>
25 #include <QFileDialog>
27 #include <QFileInfoList>
31 #include <QCloseEvent>
32 #include <QResizeEvent>
33 #include <QInputDialog>
34 #include <QDesktopServices>
49 #include <opencv2/core/core.hpp>
50 #include <opencv2/highgui/highgui.hpp>
51 #include <opencv2/imgproc/imgproc.hpp>
74 void closeEvent(QCloseEvent *event);
75 void resizeEvent(QResizeEvent *event);
81 void Update_Image_Out();
82 void Update_Image_In();
83 void Update_Image_Mask();
85 void Update_Plot_Hist();
86 void Update_Plot_Mass();
97 void Proc_StepDetail();
98 void Proc_StepValue();
99 void Proc_StepPixel();
100 void Proc_StepLine();
103 void Init_Position();
105 void Init_Quantile();
107 void Init_PointLists();
108 void Init_HistLegend();
110 void Step_SaveLineBegin();
111 void Step_LoadLineBegin();
113 void Step_Pixel_ChangePos();
114 void Step_Pixel_ChangePointLists();
116 void Step_Point_ChangeAddRem();
117 void Step_Point_Change_Hist();
118 void Step_Point_Change_Masses_Add();
119 void Step_Point_Change_Masses_Rem();
120 void Step_Point_Check_Masses();
122 void Step_Point_Quantil_Decrease_Change_Mass_Greater();
123 void Step_Point_Quantil_Decrease_Change_Quantil();
124 void Step_Point_Quantil_Decrease_Change_Mass_Quantil();
125 void Step_Point_Quantil_Decrease_Change_Mass_Smaller();
127 void Step_Point_Quantil_Increase_Change_Mass_Smaller();
128 void Step_Point_Quantil_Increase_Change_Quantil();
129 void Step_Point_Quantil_Increase_Change_Mass_Quantil();
130 void Step_Point_Quantil_Increase_Change_Mass_Greater();
132 void Step_Point_End();
134 void Step_Pixel_WriteOut();
135 void Step_Pixel_Change_Direction();
137 void on_pushButton_VideoGuide_clicked();
140 Ui::D_MAKRO_HuangVisualization *ui;
141 bool ClosingPossible =
false;
145 bool state_img_loaded =
false;
146 bool state_mask_loaded =
false;
147 bool state_quantil_rel_set =
false;
148 bool state_img_padded =
false;
149 bool state_img_out_init =
false;
167 QLabel *pLabelStatus;
175 Mat MA_ImgIn_GrayPadded;
176 Mat MA_ImgIn_GrayPadded3Ch;
190 Mat MA_MaskBinary_3C;
191 Mat MA_MaskShow_Binary;
192 Mat MA_MaskShow_In_Color;
193 Mat MA_MaskShow_In_Gray;
216 vector<Point> vBorderL;
217 vector<Point> vBorderR;
218 vector<Point> vBorderT;
219 vector<Point> vBorderB;
220 size_t mask_relevant_px_count;
224 vector<size_t> hist_line_begin;
234 size_t mass_smaller_line_begin;
235 size_t mass_smaller_or_median;
236 size_t mass_smaller_or_median_line_begin;
238 size_t mass_quantil_line_begin;
240 size_t mass_greater_line_begin;
241 size_t mass_greater_or_median;
242 size_t mass_greater_or_median_line_begin;
245 double quantil_relPos;
247 double quantil_val_line_begin;
250 double mass_smaller_or_equal_needed;
251 double mass_greater_or_equal_needed;
254 vector<Point> *vBorderAdd;
255 vector<Point> *vBorderRem;
260 size_t i_add_rem = 0;
275 STEP_INIT_POINT_LISTS,
277 STEP_SAVE_LINE_BEGIN,
278 STEP_LOAD_LINE_BEGIN,
280 STEP_PIXEL_CHANGE_POS,
281 STEP_PIXEL_CHANGE_POINT_LISTS,
283 STEP_POINT_CHANGE_ADD_REM,
284 STEP_POINT_CHANGE_HIST,
285 STEP_POINT_CHANGE_MASSES_ADD,
286 STEP_POINT_CHANGE_MASSES_REM,
287 STEP_POINT_CHECK_MASSES,
288 STEP_POINT_QUANTIL_DECREASE_CHANGE_MASS_GREATER,
289 STEP_POINT_QUANTIL_DECREASE_CHANGE_QUANTIL,
290 STEP_POINT_QUANTIL_DECREASE_CHANGE_MASS_QUANTIL,
291 STEP_POINT_QUANTIL_DECREASE_CHANGE_MASS_SMALLER,
293 STEP_POINT_QUANTIL_INCREASE_CHANGE_MASS_SMALLER,
294 STEP_POINT_QUANTIL_INCREASE_CHANGE_MASS_QUANTILE,
295 STEP_POINT_QUANTIL_INCREASE_CHANGE_QUANTIL,
296 STEP_POINT_QUANTIL_INCREASE_CHANGE_MASS_GREATER,
300 STEP_PIXEL_WRITE_OUT,
301 STEP_PIXEL_CHANGE_DIRECTION,
307 size_t step_next = STEP_INIT_POSITION;
310 #endif // D_MAKRO_HUANGVISUALIZATION_H
cv::Mat Mat
Definition: d_opencv_typedefs.h:28
@ ER_okay
Definition: d_enum.h:133
const int BORDER_CONSTANT
Definition: d_opencv_typedefs.h:77
static function< double(double x, double y)> Function_2D_to_1D(int type, double a=1, double b=0, double c=1, double d=0, double e=0, double f=0, double nan_val=0, double inf_val=0)
Definition: d_math.cpp:88
@ c_MATH_2D_TO_1D_ELLIPSE
Definition: d_enum.h:1065
void set_dir_M_Huang(QString path)
Definition: d_storage.h:120
void Set_Aspect_Mode(bool keep)
D_Viewer::Set_Aspect_Mode Set aspect ratio handling mode to fit an image to a viewer of different siz...
Definition: d_viewer.cpp:2227
static int Convert_8UC1(Mat *pMA_Out, Mat *pMA_In)
Definition: d_img_proc.cpp:3406
The D_Viewer class Display images (Mat) in QGraphicsView in the user interface.
Definition: d_viewer.h:58
The D_Storage class Used for storing data. There is only one instance in D_MainWindow .
Definition: d_storage.h:49
void resizeEvent(QResizeEvent *event)
Definition: d_makro_huangvisualization.cpp:93
cv::Vec3b Vec3b
Definition: d_opencv_typedefs.h:51
void Update_Image(Mat *MA_new)
D_Viewer::Update_Image Set and show image.
Definition: d_viewer.cpp:2079
void Set_Transformation_Mode(bool smooth)
D_Viewer::Set_Transformation_Mode Set transformation mode to fit an image to a viewer of different si...
Definition: d_viewer.cpp:2213
@ c_DIR2D_R
Definition: d_enum.h:2112
cv::Point Point
Definition: d_opencv_typedefs.h:35
static int Threshold_Relative_1C(Mat *pMA_Out, Mat *pMA_In, double max_val, double thres_rel)
Definition: d_img_proc.cpp:6352
static int Padding(Mat *pMA_Out, Mat *pMA_In, int size_x, int size_y, int type=BORDER_CONSTANT)
Definition: d_img_proc.cpp:5708
static int Load_From_Path_Gray(Mat *pMA_Out, QFileInfo FI_path)
Definition: d_img_proc.cpp:51
const int BORDER_REPLICATE
Definition: d_opencv_typedefs.h:82
void set_ClosingPossible(bool closeable)
Definition: d_makro_huangvisualization.h:76
cv::Scalar Scalar
Definition: d_opencv_typedefs.h:30
~D_MAKRO_HuangVisualization()
Definition: d_makro_huangvisualization.cpp:74
void set_GV(QGraphicsView *GV_ui)
Definition: d_viewer.cpp:49
Definition: d_analysiswindow.h:58
@ c_DIR2D_D
Definition: d_enum.h:2114
void closeEvent(QCloseEvent *event)
Definition: d_makro_huangvisualization.cpp:79
QDir * dir_M_Huang()
Definition: d_storage.h:92
D_MAKRO_HuangVisualization(D_Storage *pStorage, QWidget *parent=nullptr)
Definition: d_makro_huangvisualization.cpp:13
static int Convert_Color(Mat *pMA_Out, Mat *pMA_In, int cvt_mode)
Definition: d_img_proc.cpp:2524
void connect_Zoom(D_Viewer *viewer)
Definition: d_viewer.cpp:128
The D_MAKRO_HuangVisualization class visualization of huangs rank order filtering.
Definition: d_makro_huangvisualization.h:67
static int Generate_byValueFunction(Mat *pMA_Out, int width, int height, function< double(double x, double y)> value_function)
Definition: d_img_proc.cpp:332