[TASK] Begin implementing unsharp masking.
This commit is contained in:
		
							parent
							
								
									998fbe3d2e
								
							
						
					
					
						commit
						e3fedb76ad
					
				| @ -715,6 +715,17 @@ void ImageViewer::runCannyEdgeThirdStep(void) { | ||||
|   canny_edge_machine->doThirdStep(); | ||||
|   updateImageDisplay();   | ||||
| } | ||||
| 
 | ||||
| /**
 | ||||
|  * Apply results of canny edge using unsharp masking. | ||||
|  *  | ||||
|  * @brief ImageViewer::doUnsharpMasking | ||||
|  */ | ||||
| void ImageViewer::doUnsharpMasking(void) { | ||||
|   logFile << "Doing USM ..." << std::endl; | ||||
|   renewLogging(); | ||||
|   updateImageDisplay(); | ||||
| } | ||||
| /**************************************************************************************** 
 | ||||
| *    | ||||
| *  GUI elements related to the tasks are set up here. | ||||
| @ -1005,6 +1016,9 @@ void ImageViewer::generateControlPanels() { | ||||
|   t_high_spinbox->setDecimals(5); | ||||
|   t_high_spinbox->setValue(4.0); | ||||
|    | ||||
|   run_usm = new QPushButton("Apply unsharp masking!"); | ||||
|   QObject::connect(run_usm, SIGNAL(clicked()), this, SLOT(doUnsharpMasking())); | ||||
|   | ||||
|   task_tab5_scrolllayout->addWidget(new QLabel("Gauss filter size (NxN)")); | ||||
|   task_tab5_scrolllayout->addWidget(gauss_filter_size); | ||||
|   task_tab5_scrolllayout->addWidget(new QLabel("Gauss filter sigma")); | ||||
| @ -1017,6 +1031,8 @@ void ImageViewer::generateControlPanels() { | ||||
|   task_tab5_scrolllayout->addWidget(t_high_spinbox); | ||||
|   task_tab5_scrolllayout->addWidget(run_canny_edge_third_step); | ||||
|   task_tab5_scrolllayout->addWidget(run_canny_edge); | ||||
|   task_tab5_scrolllayout->addWidget(new QLabel("Unsharp masking")); | ||||
|   task_tab5_scrolllayout->addWidget(run_usm); | ||||
|    | ||||
|   tabWidget->addTab(task_tab5_widget, "Task #5"); | ||||
|    | ||||
|  | ||||
| @ -155,6 +155,7 @@ class ImageViewer : public QMainWindow { | ||||
|     QPushButton* run_canny_edge_first_step; | ||||
|     QPushButton* run_canny_edge_second_step; | ||||
|     QPushButton* run_canny_edge_third_step; | ||||
|     QPushButton* run_usm; | ||||
|      | ||||
|     // "My" space for storing data/results
 | ||||
|     LazyImage* original; | ||||
| @ -184,6 +185,7 @@ class ImageViewer : public QMainWindow { | ||||
|     void runCannyEdgeFirstStep(void); | ||||
|     void runCannyEdgeSecondStep(void); | ||||
|     void runCannyEdgeThirdStep(void); | ||||
|     void doUnsharpMasking(void); | ||||
| 
 | ||||
|     void open(); | ||||
|     void openReference(); | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user