mirror of
https://github.com/kerberos-io/openalpr-base.git
synced 2025-10-07 07:40:56 +08:00
Added ability to use daemon with local webcam
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user