Added an error message if a camera isn't available.

This commit is contained in:
Davis King 2016-05-18 22:22:56 -04:00
parent 617ffba652
commit 0cd76f899b
1 changed files with 6 additions and 0 deletions

View File

@ -42,6 +42,12 @@ int main()
try
{
cv::VideoCapture cap(0);
if (!cap.isOpened())
{
cerr << "Unable to connect to camera" << endl;
return 1;
}
image_window win;
// Load face detection and pose estimation models.