#ifndef VISION_METHOD_H
#define VISION_METHOD_H

#pragma once
#include <libs/camera/camera.h>
#include <stdio.h>
#include <opencv2/opencv.hpp>
#include <ctime>
#include <sstream>
#include <thread>      
#include <chrono>               
#include <iostream>

#include "libs/cv/line.h"

#define FLAG false

//namespace cv{
//    struct Line{
//        cv::Point begin, end;
//    };
//};


cv::Point getMiddleofPoints(cv::Point first, cv::Point second);

void getMin(std::vector<cv::Line> &lines);

std::vector<cv::Point> getIntersectionPointofLines(cv::Mat& img, std::vector<cv::Line> lines, bool showPoint = true);

std::vector<cv::Line> Hough_transform(cv::Mat& input);

std::vector<cv::Line> Hough_transform(cv::Mat& input, cv::Mat& output, bool showALL = false);

cv::Point getTCP(cv::Mat& inputBIN, std::vector<cv::Line> lines, bool showALL = false);

#endif // VISION_METHOD_H
