Introduce variables for canny stuff instead of hardcoding

This commit is contained in:
2022-11-16 11:18:56 +01:00
parent d9628550d4
commit 8611a47b75
6 changed files with 21 additions and 9 deletions
+4 -1
View File
@@ -18,6 +18,9 @@ int main(void)
const int videoHeight = 720;
const int videoWidth = 960;
const int gaussKernelSize = 21;
const int thresholdCanny1 = 50;
const int thresholdCanny2 = 100;
const int apertureSizeCanny = 3;
@@ -29,7 +32,7 @@ int main(void)
{
Mat image = input.readFile("Der\\Pfad\\zum\\Input\\Bilder\\Ordner\\auf\\deinem\\System");
Mat processedImage = image;
processing.processImage(processedImage, thresholdBinary, gaussKernelSize);
processing.processImage(processedImage, thresholdBinary, gaussKernelSize, thresholdCanny1, thresholdCanny2 ,apertureSizeCanny);
std::vector<Vec4i> lines = processing.calculateLineSegments(processedImage);
for( size_t i = 0; i < lines.size(); i++ )
{