mirror of
https://github.com/kerberos-io/openalpr-base.git
synced 2025-10-06 07:06:54 +08:00
Added ability to use daemon with local webcam
This commit is contained in:
@@ -1,5 +1,3 @@
|
||||
|
||||
|
||||
[daemon]
|
||||
|
||||
; country determines the training dataset used for recognizing plates. Valid values are: us, eu
|
||||
@@ -13,14 +11,11 @@ site_id = your-unique-sitename
|
||||
|
||||
stream = http://127.0.0.1/example_video_stream.mjpeg
|
||||
;stream = http://127.0.0.1/example_second_stream.mjpeg
|
||||
|
||||
;stream = webcam
|
||||
|
||||
; topn is the number of possible plate character variations to report
|
||||
topn = 10
|
||||
|
||||
|
||||
|
||||
|
||||
; Determines whether images that contain plates should be stored to disk
|
||||
store_plates = 0
|
||||
store_plates_location = /var/lib/openalpr/plateimages/
|
||||
|
@@ -107,7 +107,15 @@ void imageCollectionThread(void* arg)
|
||||
{
|
||||
cv::VideoCapture cap=cv::VideoCapture();
|
||||
dispatcher->log_info("Video stream connecting...");
|
||||
|
||||
if (dispatcher->mjpeg_url == "webcam")
|
||||
{
|
||||
cap.open(0);
|
||||
}
|
||||
else
|
||||
{
|
||||
cap.open(dispatcher->mjpeg_url);
|
||||
}
|
||||
|
||||
if (cap.isOpened())
|
||||
{
|
||||
|
Reference in New Issue
Block a user