mirror of
https://github.com/kerberos-io/openalpr-base.git
synced 2025-10-06 04:36:50 +08:00
Updated config
This commit is contained in:
@@ -4,18 +4,13 @@
|
||||
; Declare each stream on a separate line
|
||||
; each unique stream should be defined as stream = [url]
|
||||
|
||||
;stream = http://192.168.0.152/axis-cgi/mjpg/video.cgi?resolution=1280x720&fps=2
|
||||
stream = http://192.168.1.3:8089/videofeed
|
||||
stream = http://192.168.1.3:8089/videofeed
|
||||
stream = http://192.168.1.3:8089/videofeed
|
||||
|
||||
;stream = http://www.google.com/video.stream
|
||||
;stream = http://stream2.com/stream
|
||||
|
||||
site_id = watchtower-hq
|
||||
site_id = site-name
|
||||
|
||||
;image_folder = /var/www/html/plates/
|
||||
image_folder = /tmp/
|
||||
store_plates = 0
|
||||
store_plates_location = /var/www/html/plates/
|
||||
|
||||
; upload address is the destination to POST to
|
||||
upload_address = http://localhost:9000/alpr/push/
|
||||
|
@@ -43,6 +43,7 @@ struct CaptureThreadData
|
||||
|
||||
std::string config_file;
|
||||
std::string country_code;
|
||||
bool output_images;
|
||||
std::string output_image_folder;
|
||||
};
|
||||
|
||||
@@ -157,7 +158,8 @@ int main( int argc, const char** argv )
|
||||
return 1;
|
||||
}
|
||||
|
||||
std::string imageFolder = ini.GetValue("daemon", "image_folder", "/tmp/");
|
||||
bool storePlates = ini.GetBoolValue("daemon", "store_plates", false);
|
||||
std::string imageFolder = ini.GetValue("daemon", "store_plates_location", "/tmp/");
|
||||
std::string upload_url = ini.GetValue("daemon", "upload_address", "");
|
||||
std::string site_id = ini.GetValue("daemon", "site_id", "");
|
||||
|
||||
@@ -175,6 +177,7 @@ int main( int argc, const char** argv )
|
||||
tdata->stream_url = stream_urls[i];
|
||||
tdata->camera_id = i + 1;
|
||||
tdata->config_file = configFile;
|
||||
tdata->output_images = storePlates;
|
||||
tdata->output_image_folder = imageFolder;
|
||||
tdata->country_code = country;
|
||||
tdata->site_id = site_id;
|
||||
@@ -250,10 +253,13 @@ void streamRecognitionThread(void* arg)
|
||||
std::string uuid = newUUID();
|
||||
|
||||
// Save the image to disk (using the UUID)
|
||||
std::stringstream ss;
|
||||
ss << tdata->output_image_folder << "/" << uuid << ".jpg";
|
||||
|
||||
cv::imwrite(ss.str(), latestFrame);
|
||||
if (tdata->output_images)
|
||||
{
|
||||
std::stringstream ss;
|
||||
ss << tdata->output_image_folder << "/" << uuid << ".jpg";
|
||||
|
||||
cv::imwrite(ss.str(), latestFrame);
|
||||
}
|
||||
|
||||
// Update the JSON content to include UUID and camera ID
|
||||
|
||||
|
Reference in New Issue
Block a user