[TASK] Prepare structure for hough transformation.

This commit is contained in:
Jan Philipp Timme 2016-01-06 17:36:04 +01:00
parent 102a38e5ae
commit 79cf72d33d
3 changed files with 52 additions and 0 deletions

33
hough_machine.cpp Normal file
View File

@ -0,0 +1,33 @@
#ifndef HOUGH_MACHINE_C
#define HOUGH_MACHINE_C
#include <QtGlobal>
#include <QMainWindow>
#include <QColor>
#include <iostream>
#include <math.h>
class HoughMachine {
private:
public:
HoughMachine() {
};
~HoughMachine() {
};
void convertToMonochrome(void) {
};
};
#endif

View File

@ -764,6 +764,17 @@ void ImageViewer::doUnsharpMasking(void) {
free(blurred_intensity); free(blurred_intensity);
updateImageDisplay(); updateImageDisplay();
} }
/**
* Do the hough transformation
*
* @brief ImageViewer::runHoughTransformation
*/
void ImageViewer::runHoughTransformation(void) {
logFile << "Let's run a hough transformation!" << std::endl;
renewLogging();
updateImageDisplay();
}
/**************************************************************************************** /****************************************************************************************
* *
* GUI elements related to the tasks are set up here. * GUI elements related to the tasks are set up here.
@ -1105,7 +1116,11 @@ void ImageViewer::generateControlPanels() {
task_tab6_scrolllayout->setSizeConstraint(QLayout::SetMaximumSize); task_tab6_scrolllayout->setSizeConstraint(QLayout::SetMaximumSize);
task_tab6_scrollwidget->setLayout(task_tab6_scrolllayout); task_tab6_scrollwidget->setLayout(task_tab6_scrolllayout);
run_hough_transformation = new QPushButton("Run hough transformation!");
QObject::connect(run_hough_transformation, SIGNAL(clicked()), this, SLOT(runHoughTransformation()));
task_tab6_scrolllayout->addWidget(new QLabel("Task #6 and stuff")); task_tab6_scrolllayout->addWidget(new QLabel("Task #6 and stuff"));
task_tab6_scrolllayout->addWidget(run_hough_transformation);
tabWidget->addTab(task_tab6_widget, "Task #6"); tabWidget->addTab(task_tab6_widget, "Task #6");

View File

@ -58,6 +58,7 @@
#include "lazy_image.cpp" #include "lazy_image.cpp"
#include "filter_gui.cpp" #include "filter_gui.cpp"
#include "canny_edge_machine.cpp" #include "canny_edge_machine.cpp"
#include "hough_machine.cpp"
class QAction; class QAction;
class QLabel; class QLabel;
@ -167,6 +168,8 @@ class ImageViewer : public QMainWindow {
QScrollArea* task_tab6_scrollarea; QScrollArea* task_tab6_scrollarea;
QVBoxLayout* task_tab6_scrolllayout; QVBoxLayout* task_tab6_scrolllayout;
QPushButton* run_hough_transformation;
// "My" space for storing data/results // "My" space for storing data/results
LazyImage* original; LazyImage* original;
LazyImage* working_copy; LazyImage* working_copy;
@ -196,6 +199,7 @@ class ImageViewer : public QMainWindow {
void runCannyEdgeSecondStep(void); void runCannyEdgeSecondStep(void);
void runCannyEdgeThirdStep(void); void runCannyEdgeThirdStep(void);
void doUnsharpMasking(void); void doUnsharpMasking(void);
void runHoughTransformation(void);
void open(); void open();
void openReference(); void openReference();