OpenALPR Tool - Save and Query CSV Exports

Watch this video and you should be able clear out the area of the db that @Gymratz referred to


So I got the images to backup to the folder after clearing the table, but it only backed up the ones that were taken after I updated the SQL DB, Downloader, and Viewer. I have a backup of the SQL DB prior to updating those items. I also have the older downloader & viewer programs backed up too.

Does anyone (@Gymratz @tech101 ) have a guess on the steps to backup the older images or why the older images are not showing up in the viewer ?
 
So, I am not following help me understand.

Your viewer was working fine prior to update, Correct ?

Then you somehow you cleared the table by running some SQL querry and now even though you cleared the viewer is not downloading all the images ? to what ever this new folder or location is ?


My question is this -


When you had the prior image folder alreay, Do you not already have those images copied from earlier to that folder/location?

I am going to guess the sql field is not cleared as you thought for the image backup to run again. Gymratz maybe can guide you on what command to run to clear that field to run that image backup again.


As per my understanding, when you run that image backup the first time, it marks I think somewhere in sql that those images are downloaded/processed. So it does not load them again the next time.

One way to overcome this maybe you can restore to old database backup prior to running the image download for the first time, Then you re-run the update queries and then run the downloader to catch up to the latest record and then run the Image Backup in the viewer this will again take time depending on your number of records to be downloaded/processed.
 
So, I am not following help me understand.

Your viewer was working fine prior to update, Correct ?

Then you somehow you cleared the table by running some SQL querry and now even though you cleared the viewer is not downloading all the images ? to what ever this new folder or location is ?


My question is this -


When you had the prior image folder alreay, Do you not already have those images copied from earlier to that folder/location?

I am going to guess the sql field is not cleared as you thought for the image backup to run again. Gymratz maybe can guide you on what command to run to clear that field to run that image backup again.


As per my understanding, when you run that image backup the first time, it marks I think somewhere in sql that those images are downloaded/processed. So it does not load them again the next time.

One way to overcome this maybe you can restore to old database backup prior to running the image download for the first time, Then you re-run the update queries and then run the downloader to catch up to the latest record and then run the Image Backup in the viewer this will again take time depending on your number of records to be downloaded/processed.


Here are the steps I did:

1) Backup existing SQL DB with approx 5,000 entries and images
2) Shutdown Downloader and Viewer
3) Make a backup of the existing downloader and viewer BIN folders which were originally compiled around 4/2021
4) Download and recompile latest Downloader and Viewer programs with previous settings and added new settings in config
5) Open and execute the latest "SQL Full Install or Update.sql" from the LPR_Downloader-master\0 - Install and Update
6) Start latest Downloader and Viewer programs, notice that I can't view previous images
7) Try manually backing up the existing images which showed over 5,000 images but nothing went into the backup folder location
8) Clear table entries per video sent by Bootlick
9) Run "Simulate Midnight Tasks" which does then create the SQL backup and then copies images that were taken since the latest Downloader and Viewer were created, approximately 38 images
 
1) Backup existing SQL DB with approx 5,000 entries and images
2) Shutdown Downloader and Viewer
3) Make a backup of the existing downloader and viewer BIN folders which were originally compiled around 4/2021
4) Download and recompile latest Downloader and Viewer programs with previous settings and added new settings in config
5) Open and execute the latest "SQL Full Install or Update.sql" from the LPR_Downloader-master\0 - Install and Update
6) Start latest Downloader and Viewer programs, notice that I can't view previous images
7) Try manually backing up the existing images which showed over 5,000 images but nothing went into the backup folder location
8) Clear table entries per video sent by Bootlick
9) Run "Simulate Midnight Tasks" which does then create the SQL backup and then copies images that were taken since the latest Downloader and Viewer were created, approximately 38 images


1) - Here you said you backed up SQL along with 5000 Images ? is that image folder that you took backup off Like copy the image folder with .jpg images ? or you mean LPR Locked image folder?

Can you fire up your old viewer and see if you see images there ?
 
1) - Here you said you backed up SQL along with 5000 Images ? is that image folder that you took backup off Like copy the image folder with .jpg images ? or you mean LPR Locked image folder?

Can you fire up your old viewer and see if you see images there ?

Hmmm the older DB and Viewer seems to be having issues:

1631769893008.png

It shows the vehicle entries but not the images. The Details from that error box area attached in the text file.

If I'm not able restore them, I'm not too heart broken. Plus with the newer Viewer auto-backup feature, I'll be taking better backups of the DB.

Where exactly are the images saved? In the DB or locally somewhere?
 

Attachments

Images prior to the image backup update was only in Open ALPR local agent side of things.

Which is something like this

C: your openalpr folder where it is installed like "Agent\plateimages\image_db" Keep in mind these are locked files it be something like randomnumber.mdb

Did you move to a different PC or anything can you reach your old images from local web server address ?

Can you see the latest images now as they are coming in ?

Did you change any setting in OpenALPR update agent or anything ?
 
Images prior to the image backup update was only in Open ALPR local agent side of things.

Which is something like this

C: your openalpr folder where it is installed like "Agent\plateimages"

Did you move to a different PC or anything can you reach your old images from local web server address ?

Can you see the latest images now as they are coming in ?

Did you change any setting in OpenALPR update agent or anything ?

Uggg I just remembered that I was having some weird imaging issues with the Rekor Scout App with the images being gray and fuzzy. I thought it was the app itself so I had downloaded and re-installed it. It ended up being the camera and somehow had switched codecs. When I look at the OpenALPR Dashboard it shows the old camera under Unmanaged Cameras and I must have set it up differently when I re-installed it =P

1631770992729.png

Sorry about forgetting that detail.

Is there any way to extract the images from the C:\OpenALPR\Agent\plateimages\image_db\xxxx.mdb file currently located there?
 
Currently how old of the files do you see in that C:\OpenALPR\Agent\plateimages\image_db folder Do you see older files ??
 
Currently how old of the files do you see in that C:\OpenALPR\Agent\plateimages\image_db folder Do you see older files ??

No I cannot see the older images in the OpenALPR Dashboard. It gives me an error on not being able to connect to the agent:

1631771745699.png

I created a case with Rekor to see if I can restore them. I'll report back here in case someone else accidentally does something like I did =P my current .mdb file is about 512 MB.

Thanks for your help @tech101. Greatly appreciate it.
 
Not sure if Open ALPR will be of any help there if the images locally saved have been deleted. Unless you were paying for their higher plan where they store images up to 60 days or something.

Keep in mind this is a solution Gymratz build so we do not have to get their Higher plan to save records for longer time along with images and much more functionality.

OpenALPR only offer 5 day data retention that to only on cloud under HOME Plan, so not sure if they will be of any help here.
 
Images are stored locally till you hit the size retention setting you have set forth. This works even on the cheapest plan. They just artificially restrict you on their cloud web portal to 5 days worth of images and don't allow you to see the images beyond that, but they are still there. You can access the local images by enabling the Rektor web server and browsing to your local agent address and putting in the default web server port number of 8355. You have to enable the webserver in the alprd.conf file first. Rekor Documentation

Screenshot from 2021-09-16 05-26-17.png
 
  • Like
Reactions: tech101
It's been working awesome since April 2021. I think I screwed something up though when I reinstalled the Rekor Agent a few days ago before I backed up my SQL DB.

So where does the Downloader app save the images it downloads? Doesn't it store them in the SQL DB?
 
No Images are not stored in SQL, In the viewer you basically tell the location where you want the viewer to save the images.


For example my location for images

1631806842843.png

Viewer will save all the images as .jpg
 
Since I am always tinkering LOL, I was wondering if anyone is running OpenALPR on a Jetson Nano with this tool? I would assume the nano simply gets an IP Address and you point this tool to that IP and away you go?

But I know nothing about Ubuntu Linux, so before I attempt it I wanted to see if someone here has already done this. I know people have to run OpenALPR, but a search came up empty for people using Nano and this tool?
 
  • Like
Reactions: tech101
I tried it for an hour or so on a 2GB nano a couple of weeks ago but the agent kept crashing and restarting, so I went back to my windows based agent. I didn't spend anytime troubleshooting so I'm not sure if I could have worked through the issues or not.
I'm doing 1920x1080, 30fps, CBR, 8192kbps out of my HFW5231E-Z12E x2. I'm guessing the nano didn't like that much thrown at it. The windows agent gets a 6GB GTX1060 to use.
 
I tried it for an hour or so on a 2GB nano a couple of weeks ago but the agent kept crashing and restarting, so I went back to my windows based agent. I didn't spend anytime troubleshooting so I'm not sure if I could have worked through the issues or not.
I'm doing 1920x1080, 30fps, CBR, 8192kbps out of my HFW5231E-Z12E x2. I'm guessing the nano didn't like that much thrown at it. The windows agent gets a 6GB GTX1060 to use.

Thanks. That helps!

I have a 1030 GPU that the agent keeps crashing and restarting, so I was looking at maybe trying Nano, but sounds like that is problematic as well.
 
  • Like
Reactions: tech101
Check this thread out: OpenALPR on a Raspberry Pi 4 and the Jetson Nano

Seemed to work well enough for that guy so it may be worth checking out.

That's actually the thread that prompted me to try the nano after I was less than thrilled with the deepstack performance of the 2GB nano.

I'm thinking that 2GB is the limiting issue for real-time video processing. Don't get me wrong the 2GB nano is a great little device for the price. I currently have it running LXDE @ 4k with Chromium so I can view the BlueIris UI3 feed on my TV.
 
  • Like
Reactions: tech101
Same here, that thread is what got me thinking about a nano, which I know can be done based on that thread, but if I cannot get it to communicate with this Tool, then it is useless to me.

I just wanted to see if anyone had successfully used a nano AND this tool and if so, which nano. I'd be willing to try the 2GB, but a bigger one I might as invest in a beefier computer and/or graphics card.
 
  • Like
Reactions: tech101
when I run view master I get unhandled exception has occurred in your application
procedure or function sp_LPR_AllPlates has too many arguments specified


See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

** Exception Text **
System.Data.SqlClient.SqlException (0x80131904): Procedure or function sp_LPR_AllPlates has too many arguments specified.
at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
at System.Data.SqlClient.SqlDataReader.TryConsumeMetaData()
at System.Data.SqlClient.SqlDataReader.get_MetaData()
at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption, Boolean shouldCacheForAlwaysEncrypted)
at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, Boolean inRetry, SqlDataReader ds, Boolean describeParameterEncryptionRequest)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)
at System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior)
at System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataTable[] dataTables, Int32 startRecord, Int32 maxRecords, IDbCommand command, CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataTable dataTable)
at LPR.Dashboard.Load_Plates() in C:\Users\rilux\Downloads\LPR_Viewer-master (1)\LPR_Viewer-master\Dashboard.cs:line 763
at LPR.Dashboard.Dashboard_Load(Object sender, EventArgs e) in C:\Users\rilux\Downloads\LPR_Viewer-master (1)\LPR_Viewer-master\Dashboard.cs:line 79
at System.Windows.Forms.Form.OnLoad(EventArgs e)
at System.Windows.Forms.Form.OnCreateControl()
at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
at System.Windows.Forms.Control.CreateControl()
at System.Windows.Forms.Control.WmShowWindow(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.Form.WmShowWindow(Message& m)
at System.Windows.Forms.Form.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
ClientConnectionId:088a8f96-4106-4e18-be32-461acc5b589d
Error Number:8144,State:2,Class:16


** Loaded Assemblies **
mscorlib
Assembly Version: 4.0.0.0
Win32 Version: 4.8.4400.0 built by: NET48REL1LAST_C
CodeBase: file://C:/Windows/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll
----------------------------------------
LPR
Assembly Version: 1.0.0.0
Win32 Version: 1.0.0.0
CodeBase: file://C:/Users/rilux/Downloads/LPR_Viewer-master%20(1)/LPR_Viewer-master/bin/Debug/LPR.exe
----------------------------------------
System.Windows.Forms
Assembly Version: 4.0.0.0
Win32 Version: 4.8.4400.0 built by: NET48REL1LAST_C
CodeBase: file://C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System
Assembly Version: 4.0.0.0
Win32 Version: 4.8.4360.0 built by: NET48REL1LAST_C
CodeBase: file://C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Drawing
Assembly Version: 4.0.0.0
Win32 Version: 4.8.4390.0 built by: NET48REL1LAST_C
CodeBase: file://C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System.Data
Assembly Version: 4.0.0.0
Win32 Version: 4.8.4270.0 built by: NET48REL1LAST_C
CodeBase: file://C:/WINDOWS/Microsoft.Net/assembly/GAC_32/System.Data/v4.0_4.0.0.0__b77a5c561934e089/System.Data.dll
----------------------------------------
System.Core
Assembly Version: 4.0.0.0
Win32 Version: 4.8.4390.0 built by: NET48REL1LAST_C
CodeBase: file://C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll
----------------------------------------
System.Configuration
Assembly Version: 4.0.0.0
Win32 Version: 4.8.4190.0 built by: NET48REL1LAST_B
CodeBase: file://C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Xml
Assembly Version: 4.0.0.0
Win32 Version: 4.8.4084.0 built by: NET48REL1
CodeBase: file://C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
System.Windows.Forms.DataVisualization
Assembly Version: 4.0.0.0
Win32 Version: 4.8.4200.0
CodeBase: file://C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms.DataVisualization/v4.0_4.0.0.0__31bf3856ad364e35/System.Windows.Forms.DataVisualization.dll
----------------------------------------
System.Transactions
Assembly Version: 4.0.0.0
Win32 Version: 4.8.4084.0 built by: NET48REL1
CodeBase: file://C:/WINDOWS/Microsoft.Net/assembly/GAC_32/System.Transactions/v4.0_4.0.0.0__b77a5c561934e089/System.Transactions.dll
----------------------------------------
System.EnterpriseServices
Assembly Version: 4.0.0.0
Win32 Version: 4.8.4084.0 built by: NET48REL1
CodeBase: file://C:/WINDOWS/Microsoft.Net/assembly/GAC_32/System.EnterpriseServices/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.EnterpriseServices.dll
----------------------------------------
System.Runtime.Caching
Assembly Version: 4.0.0.0
Win32 Version: 4.8.4084.0
CodeBase: file://C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Runtime.Caching/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Runtime.Caching.dll
----------------------------------------

** JIT Debugging **
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuration>
<system.windows.forms jitDebugging="true" />
</configuration>

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.