[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);
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.
@ -1105,7 +1116,11 @@ void ImageViewer::generateControlPanels() {
task_tab6_scrolllayout->setSizeConstraint(QLayout::SetMaximumSize);
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(run_hough_transformation);
tabWidget->addTab(task_tab6_widget, "Task #6");

View File

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