diff --git a/hough_machine.cpp b/hough_machine.cpp new file mode 100644 index 0000000..dd6852b --- /dev/null +++ b/hough_machine.cpp @@ -0,0 +1,33 @@ +#ifndef HOUGH_MACHINE_C +#define HOUGH_MACHINE_C + +#include +#include +#include + +#include + +#include + +class HoughMachine { + + private: + + + public: + HoughMachine() { + + }; + + ~HoughMachine() { + + }; + + void convertToMonochrome(void) { + + }; + +}; + + +#endif diff --git a/imageviewer-qt4.cpp b/imageviewer-qt4.cpp index d909dd7..3215623 100644 --- a/imageviewer-qt4.cpp +++ b/imageviewer-qt4.cpp @@ -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"); diff --git a/imageviewer-qt4.h b/imageviewer-qt4.h index 2c622be..5cc117d 100644 --- a/imageviewer-qt4.h +++ b/imageviewer-qt4.h @@ -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();