Compare commits
2 Commits
b9965ee956
...
e45f46c102
Author | SHA1 | Date | |
---|---|---|---|
e45f46c102 | |||
551d5f4bb3 |
@ -39,13 +39,15 @@ Mat Input::readWebcam()
|
|||||||
Mat image;
|
Mat image;
|
||||||
|
|
||||||
if(!cap.isOpened()) {
|
if(!cap.isOpened()) {
|
||||||
cout << "Fehler";
|
cout << "Video capture not opened" << std::endl;
|
||||||
return Mat();
|
return Mat();
|
||||||
}
|
}
|
||||||
|
|
||||||
cap.grab();
|
if(!cap.grab()) {
|
||||||
|
cout << "Could not grab frame from camera" << std::endl;
|
||||||
|
return Mat();
|
||||||
|
}
|
||||||
cap.retrieve(image);
|
cap.retrieve(image);
|
||||||
|
|
||||||
return image;
|
return image;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -7,8 +7,8 @@ int main(void)
|
|||||||
cv::utils::logging::setLogLevel(cv::utils::logging::LOG_LEVEL_WARNING);
|
cv::utils::logging::setLogLevel(cv::utils::logging::LOG_LEVEL_WARNING);
|
||||||
|
|
||||||
const int thresholdBinary = 140;
|
const int thresholdBinary = 140;
|
||||||
const int videoHeight = 240;
|
const int videoHeight = 720;
|
||||||
const int videoWidth = 320;
|
const int videoWidth = 1280;
|
||||||
const int gaussKernelSize = 21;
|
const int gaussKernelSize = 21;
|
||||||
const int thresholdCanny1 = 50;
|
const int thresholdCanny1 = 50;
|
||||||
const int thresholdCanny2 = 100;
|
const int thresholdCanny2 = 100;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user