Added ability to use daemon with local webcam

This commit is contained in:
psaintjust
2015-06-29 11:36:02 -04:00
parent fc6dcdb7a3
commit d95730d40e
2 changed files with 11 additions and 8 deletions

View File

@@ -107,7 +107,15 @@ void imageCollectionThread(void* arg)
{
cv::VideoCapture cap=cv::VideoCapture();
dispatcher->log_info("Video stream connecting...");
cap.open(dispatcher->mjpeg_url);
if (dispatcher->mjpeg_url == "webcam")
{
cap.open(0);
}
else
{
cap.open(dispatcher->mjpeg_url);
}
if (cap.isOpened())
{
@@ -198,4 +206,4 @@ void getALPRImages(cv::VideoCapture cap, VideoDispatcher* dispatcher)
// Delay 100ms
sleep_ms(100);
}
}
}