Comments
This commit is contained in:
parent
6b0e4b04ce
commit
103eeadf0b
@ -1,5 +1,7 @@
|
|||||||
#include "input.h"
|
#include "input.h"
|
||||||
|
|
||||||
|
// TODO: Wenn ihr in die Zeile den Pfad zum Testvideo statt der 0 packt, benmutzt er das Testvideo.
|
||||||
|
//Input::Input(int videoHeight, int videoWidth) : cap("C:\\Users\\User\\Desktop\\Studium\\02_Master_MSY\\2. Semester Winter 22 23\\Projekt\\Line-Following-Robot\\AutonomousMode\\Test_data\\video1.h264"), videoHeight(videoHeight), videoWidth(videoWidth)
|
||||||
Input::Input(int videoHeight, int videoWidth) : cap(0), videoHeight(videoHeight), videoWidth(videoWidth)
|
Input::Input(int videoHeight, int videoWidth) : cap(0), videoHeight(videoHeight), videoWidth(videoWidth)
|
||||||
{
|
{
|
||||||
this->cap.set(CAP_PROP_FRAME_HEIGHT, videoHeight);
|
this->cap.set(CAP_PROP_FRAME_HEIGHT, videoHeight);
|
||||||
|
@ -101,6 +101,14 @@ FrameData Processing::calculateLineSegments(Mat& inputPicture, const cv::Rect& r
|
|||||||
Mat inputPictureRoi = inputPicture(roi);
|
Mat inputPictureRoi = inputPicture(roi);
|
||||||
cv::findContours(inputPictureRoi, data.contours, RETR_LIST, CHAIN_APPROX_SIMPLE);
|
cv::findContours(inputPictureRoi, data.contours, RETR_LIST, CHAIN_APPROX_SIMPLE);
|
||||||
|
|
||||||
|
/* TODO:
|
||||||
|
* Was ich mir hier vorstelle:
|
||||||
|
* Wir haben die konturen und die hough linien
|
||||||
|
* Konturen haben schwäche mit Reflektionen, hough linien sind unvollständig.
|
||||||
|
* Irgendwie sollten die beiden Datensätze gemerged werden, um das "gute" aus beiden zu vereinen.
|
||||||
|
* Evtl in richtung "Schau den Bereich der Contour (+ Toleranz?) im hough bild an. Wenn keine Linie im Bereich ist, ist die Contour eine Reflektion"
|
||||||
|
*/
|
||||||
|
|
||||||
vector<Vec4i> lines;
|
vector<Vec4i> lines;
|
||||||
Canny(inputPicture, inputPicture, 50, 100, 3);
|
Canny(inputPicture, inputPicture, 50, 100, 3);
|
||||||
HoughLinesP(inputPicture, lines, 1, CV_PI/180, 100, 30, 150);
|
HoughLinesP(inputPicture, lines, 1, CV_PI/180, 100, 30, 150);
|
||||||
|
@ -10,6 +10,9 @@
|
|||||||
#include <interpreter.h>
|
#include <interpreter.h>
|
||||||
#include <intersection_handler.h>
|
#include <intersection_handler.h>
|
||||||
|
|
||||||
|
// ToDo:
|
||||||
|
// Hab ich nicht mehr aktuell gehalten. Wenn Ihr hier arbeiten wollt, an aktuellen Stand anpassen.
|
||||||
|
/*
|
||||||
void sweep_em_all(int thresholdBinary, int videoHeight, int videoWidth, int gaussKernelSize, int thresholdCanny1, int thresholdCanny2, int apertureSizeCanny)
|
void sweep_em_all(int thresholdBinary, int videoHeight, int videoWidth, int gaussKernelSize, int thresholdCanny1, int thresholdCanny2, int apertureSizeCanny)
|
||||||
{
|
{
|
||||||
Input input(videoHeight, videoWidth);
|
Input input(videoHeight, videoWidth);
|
||||||
@ -119,7 +122,7 @@ void in_depth_processing_chain(int thresholdBinary, int videoHeight, int videoWi
|
|||||||
imwrite(current_output + "\\06_contours.jpg", original_image);
|
imwrite(current_output + "\\06_contours.jpg", original_image);
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
}
|
}*/
|
||||||
|
|
||||||
|
|
||||||
int main(void)
|
int main(void)
|
||||||
@ -136,5 +139,5 @@ int main(void)
|
|||||||
const int apertureSizeCanny = 3;
|
const int apertureSizeCanny = 3;
|
||||||
|
|
||||||
//sweep_em_all(thresholdBinary, videoHeight, videoWidth, gaussKernelSize, thresholdCanny1, thresholdCanny2, apertureSizeCanny);
|
//sweep_em_all(thresholdBinary, videoHeight, videoWidth, gaussKernelSize, thresholdCanny1, thresholdCanny2, apertureSizeCanny);
|
||||||
in_depth_processing_chain(thresholdBinary, videoHeight, videoWidth, gaussKernelSize, thresholdCanny1, thresholdCanny2, apertureSizeCanny);
|
//in_depth_processing_chain(thresholdBinary, videoHeight, videoWidth, gaussKernelSize, thresholdCanny1, thresholdCanny2, apertureSizeCanny);
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user