Compare commits

..
2 Commits
Author SHA1 Message Date
zeunerti74726 e45f46c102 Proper error message, Check if grab() was successfull 2022-11-30 18:55:20 +01:00
zeunerti74726 551d5f4bb3 Set video size higher 2022-11-30 18:53:50 +01:00
2 changed files with 9 additions and 7 deletions
+5 -3
View File
@@ -39,13 +39,15 @@ Mat Input::readWebcam()
Mat image;
if(!cap.isOpened()) {
cout << "Fehler";
cout << "Video capture not opened" << std::endl;
return Mat();
}
cap.grab();
if(!cap.grab()) {
cout << "Could not grab frame from camera" << std::endl;
return Mat();
}
cap.retrieve(image);
return image;
}
+2 -2
View File
@@ -7,8 +7,8 @@ int main(void)
cv::utils::logging::setLogLevel(cv::utils::logging::LOG_LEVEL_WARNING);
const int thresholdBinary = 140;
const int videoHeight = 240;
const int videoWidth = 320;
const int videoHeight = 720;
const int videoWidth = 1280;
const int gaussKernelSize = 21;
const int thresholdCanny1 = 50;
const int thresholdCanny2 = 100;