From 103eeadf0b3e4be470ebf4695720dc4eea459dde Mon Sep 17 00:00:00 2001 From: TimZnr Date: Thu, 8 Dec 2022 11:42:02 +0100 Subject: [PATCH] Comments --- AutonomousMode/Input/input.cpp | 2 ++ AutonomousMode/Processing/processing.cpp | 8 ++++++++ AutonomousMode/Spielwiese/spielwiese.cpp | 7 +++++-- 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/AutonomousMode/Input/input.cpp b/AutonomousMode/Input/input.cpp index e2c5173..c4af429 100644 --- a/AutonomousMode/Input/input.cpp +++ b/AutonomousMode/Input/input.cpp @@ -1,5 +1,7 @@ #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) { this->cap.set(CAP_PROP_FRAME_HEIGHT, videoHeight); diff --git a/AutonomousMode/Processing/processing.cpp b/AutonomousMode/Processing/processing.cpp index bd2f113..8a31f7a 100644 --- a/AutonomousMode/Processing/processing.cpp +++ b/AutonomousMode/Processing/processing.cpp @@ -101,6 +101,14 @@ FrameData Processing::calculateLineSegments(Mat& inputPicture, const cv::Rect& r Mat inputPictureRoi = inputPicture(roi); 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 lines; Canny(inputPicture, inputPicture, 50, 100, 3); HoughLinesP(inputPicture, lines, 1, CV_PI/180, 100, 30, 150); diff --git a/AutonomousMode/Spielwiese/spielwiese.cpp b/AutonomousMode/Spielwiese/spielwiese.cpp index bd44bf1..c42cc21 100644 --- a/AutonomousMode/Spielwiese/spielwiese.cpp +++ b/AutonomousMode/Spielwiese/spielwiese.cpp @@ -10,6 +10,9 @@ #include #include +// 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) { 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); i++; } -} +}*/ int main(void) @@ -136,5 +139,5 @@ int main(void) const int apertureSizeCanny = 3; //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); } \ No newline at end of file