/**
    05Robot - Computer Vision Module

    @author P.Kaczmarek,J.Tomczynski,T.Mankowski
    @version 1.0 2017
*/
#ifndef PLANECALIBRATIONWINDOW_H
#define PLANECALIBRATIONWINDOW_H

#include <QWidget>
#include "ProcessorWindow.h"
#include "ui_PlaneCalibrationWindow.h"
#include "ProcessorObject.h"
#include "ProcessorThread.h"

#include <opencv2/opencv.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <opencv2/imgproc/imgproc.hpp>

#include <QDebug>
/** \addtogroup ComputerVisionModule
 *  @{
 */
/**
 @brief Object extraction image window
 
 Preview from image extraction processor. Allows triggering of background capture, load and save.
 
 */
class PlaneCalibrationWindow : public ProcessorWindow
{
	Q_OBJECT

public:
    /**
     @brief Default constructor, initializes object extraction preview window
     
     @param pt corresponding ProcessorThread
     @param parent pointer to parent widget
     @param flags window flags
     */
    PlaneCalibrationWindow(ProcessorThread*,QWidget *parent = 0, Qt::WindowFlags flags = 0);
    /**
     @brief Default destructor, cleans up
     */
	~PlaneCalibrationWindow();

private:
	Ui::PlaneCalibrationWindow ui;
	
public slots:
    /**
     @brief Update displayed picture
     
     @param id Frame ID
     @param frame Pointer to picture
     */
	void frameIn(int id, cv::Mat* frame);
    
private slots:
    void calibrate() {
        qDebug() << "PlaneCalibrationWindow::calibrate()";
        emit signalSpecial(QString("calibrate"));
    }
    void reset() {
        qDebug() << "PlaneCalibrationWindow::reset()";
        emit signalSpecial(QString("reset"));
    }

};
/** @}*/
#endif // PLANECALIBRATIONWINDOW_H
