OpenALPR Tool - Save and Query CSV Exports

hopalong

n3wb
Joined
Apr 19, 2021
Messages
15
Reaction score
4
Location
California
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 ?
 

tech101

Known around here
Joined
Mar 30, 2015
Messages
1,225
Reaction score
1,377
Location
SF BayArea, USA
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.
 

hopalong

n3wb
Joined
Apr 19, 2021
Messages
15
Reaction score
4
Location
California
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
 

tech101

Known around here
Joined
Mar 30, 2015
Messages
1,225
Reaction score
1,377
Location
SF BayArea, USA
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 ?
 

hopalong

n3wb
Joined
Apr 19, 2021
Messages
15
Reaction score
4
Location
California
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

tech101

Known around here
Joined
Mar 30, 2015
Messages
1,225
Reaction score
1,377
Location
SF BayArea, USA
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 ?
 

hopalong

n3wb
Joined
Apr 19, 2021
Messages
15
Reaction score
4
Location
California
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?
 

tech101

Known around here
Joined
Mar 30, 2015
Messages
1,225
Reaction score
1,377
Location
SF BayArea, USA
Currently how old of the files do you see in that C:\OpenALPR\Agent\plateimages\image_db folder Do you see older files ??
 

hopalong

n3wb
Joined
Apr 19, 2021
Messages
15
Reaction score
4
Location
California
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.
 

tech101

Known around here
Joined
Mar 30, 2015
Messages
1,225
Reaction score
1,377
Location
SF BayArea, USA
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.
 

biggen

Known around here
Joined
May 6, 2018
Messages
1,963
Reaction score
1,896
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
 

hopalong

n3wb
Joined
Apr 19, 2021
Messages
15
Reaction score
4
Location
California
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?
 

tech101

Known around here
Joined
Mar 30, 2015
Messages
1,225
Reaction score
1,377
Location
SF BayArea, USA
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
 

wittaj

Known around here
Joined
Apr 28, 2019
Messages
6,753
Reaction score
9,953
Location
USA
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?
 

Fubduck

Getting the hang of it
Joined
Jul 10, 2018
Messages
79
Reaction score
59
Location
colorado
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.
 

wittaj

Known around here
Joined
Apr 28, 2019
Messages
6,753
Reaction score
9,953
Location
USA
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.
 

Fubduck

Getting the hang of it
Joined
Jul 10, 2018
Messages
79
Reaction score
59
Location
colorado
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.
 

wittaj

Known around here
Joined
Apr 28, 2019
Messages
6,753
Reaction score
9,953
Location
USA
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.
 
Top