Axis 211 - analog input overlaid on the image - solution?

Post here to ask any questions about hardware suitability, configuration in ZoneMinder, or experiences. If you just want to know if something works with ZoneMinder or not, please check the Hardware Compatibility sections in the forum, and the Wiki first. Also search this topic as well.
Post Reply
User avatar
eracc
Posts: 107
Joined: Wed Mar 08, 2006 3:26 pm
Location: USA

Axis 211 - analog input overlaid on the image - solution?

Post by eracc »

Hi folks. I just installed my very first ZoneMinder system with Axis cameras for a client. They had used a pure analog system from another company for a long time but were tired of the screwups those other guys kept doing. Thus I got in the door.

At this point, the system is in place and they are asking me to overlay analog data from software on a Windoze PC that connects to a truck scale. I talked to Axis tech about this and the fellow said something like "you could do that with scripting but we do not provide support for that". So I am on my own.

Has anyone here ever done such a thing? If so, could you please show me a copy of your script for your application? I downloaded the Axis scripting guide but so far see nothing that suggests to me how to overlay input from the analog connector on the Axis 211 camera (if that is even possible). I am supposed to be getting the specs for the output from the scale software but have yet to receive that.

Any help with this would be great. TIA
User avatar
eracc
Posts: 107
Joined: Wed Mar 08, 2006 3:26 pm
Location: USA

Post by eracc »

Wow, no one knows anything about this? Heh, I guess I really am on my own. I still don't have the information from the client about the output from the scale software so I am not under pressure to get it done yet. But I am thinking over the problem and looking at the camera scripting guide.

It does not appear to me Axis includes any tools in the BusyBox Linux on these cameras to do image blending or to overlay input, somehow, from the analog connector on the camera. However, they do offer a way to upload a few frames based on a signal from the analog input. Thinking about that, one should be able to send some frames back to the server when the camera detects an "event" on the connector. Then using scripts on the server capture output from the scale software and use image manipulation tools to blend them server side. Then e-mail the result to an account either on the server or over the LAN/WAN. When talking to my contact at the client about this he said that would be an acceptable solution. Now if I only had that information about his Windoze scale software ...

For the record, if I need outside help on this problem is anyone here able to work on contract to create the solution? If so, contact me privately and we will work out the details on fees and discuss logistics. The client is willing to pay anything reasonable to be able to use our "new" system in place of the old Windoze system from those other guys.
jameswilson
Posts: 5111
Joined: Wed Jun 08, 2005 8:07 pm
Location: Midlands UK

Post by jameswilson »

didnt reply mate cos i aint got a clue, good luck though
James Wilson

Disclaimer: The above is pure theory and may work on a good day with the wind behind it. etc etc.
http://www.securitywarehouse.co.uk
Flash_
Posts: 441
Joined: Wed Jan 11, 2006 12:19 pm

Post by Flash_ »

Yeah, same. I know Axis has a quite powerful scripting interface but I've never touched it myself.
User avatar
eracc
Posts: 107
Joined: Wed Mar 08, 2006 3:26 pm
Location: USA

Post by eracc »

Thanks for at least looking fellows. I appreciate it. At least I can bounce ideas off you guys and maybe you can help that way. Thanks again. :)
jameswilson
Posts: 5111
Joined: Wed Jun 08, 2005 8:07 pm
Location: Midlands UK

Post by jameswilson »

lol bounce away
James Wilson

Disclaimer: The above is pure theory and may work on a good day with the wind behind it. etc etc.
http://www.securitywarehouse.co.uk
User avatar
eracc
Posts: 107
Joined: Wed Mar 08, 2006 3:26 pm
Location: USA

Reviving this thread ...

Post by eracc »

Ok, here is the rough idea of what we are considering at this point:
  • 1. any type of camera capturing an event (including IP camera).
    2. text inserter between transaction PC and printer.
    3. serial stream of data from the text inserter's serial I/O port > ZM server > file.
    4. grab ascii text from file, strip out unwanted text, create new file.
    5. use ImageMagick to manipulate images and insert text from new file.
As is said "the devil is in the details". Anyone care to brain-storm with me about this? I will be the one figuring out how to catch the data coming in on the serial port and manipulating it. I also need to figure out which event to manipulate when data is captured. Any brainiacs that can give me clues, pointers or outright help here?

TIA
Gene
User avatar
Lee Sharp
Posts: 1069
Joined: Sat Mar 31, 2007 9:18 pm
Location: Houston, TX

Post by Lee Sharp »

How about sending the serial data to a tty on the ZM server, and using ZM to overlay the image directly? Will any existing overlay variables allow devices? It can't be limited to just date and time...
User avatar
eracc
Posts: 107
Joined: Wed Mar 08, 2006 3:26 pm
Location: USA

Post by eracc »

Lee Sharp wrote:How about sending the serial data to a tty on the ZM server, and using ZM to overlay the image directly? Will any existing overlay variables allow devices? It can't be limited to just date and time...
The plan is to connect to the ZM server with a serial connection so using a tty port is in the plan. We will probably use a 'serial <> TCP/IP <> serial' adapter since the ZM server is going to be too far away physically to run a serial data cable. If there is a way to get ZM to listen to /dev/tty0 and /dev/tty1 and manipulate the data from two cameras that would be excellent. We only need specific information from the data stream that will come in. As of now the idea is to strip customer name and ticket number out of about 10 to 15 lines of data and insert just those two into the images on separate lines at the top right of the images. The text inserter is just feeding us everything on its' serial port that passes through the printer port loop-through. So it is up to us to strip out just what we need to use.

TIA
Gene
nakedfarmanimals
Posts: 20
Joined: Fri Jun 15, 2007 9:46 pm

In the picture...

Post by nakedfarmanimals »

What about a small LCD display near the bottom of the camera... or a large LCD on the wall near the truck?

It sounds like they want weight, driverID, truckID, plate#, or some other information captured *in* the frame... yes, it could be overlaid, but would it not make a stronger case for those that refuted the weight, etc., if the information was part of the image, and not just overlaid?

With imagemajick, I can overlay nubmers to make that truck weigh anything you want it to weigh...
User avatar
eracc
Posts: 107
Joined: Wed Mar 08, 2006 3:26 pm
Location: USA

Re: In the picture...

Post by eracc »

nakedfarmanimals wrote:What about a small LCD display near the bottom of the camera... or a large LCD on the wall near the truck?

It sounds like they want weight, driverID, truckID, plate#, or some other information captured *in* the frame... yes, it could be overlaid, but would it not make a stronger case for those that refuted the weight, etc., if the information was part of the image, and not just overlaid?

With imagemajick, I can overlay nubmers to make that truck weigh anything you want it to weigh...
The truck weight is already being captured on the software that creates the ticket that is printed. They mainly want to be able to match a video stream with a ticket for audit purposes.

Good point about ImagMagick. I plan to log everything that is done and the script that will overlay the data on the images will be available for review. I will even submit it to the ZM project. I do not think a successful argument could be made that the truck weight as grabbed from the ticket print has been tampered. The original ticket will also be available for review. Arguments about the scale being off would be addressed by the State inspectors that inspect these scales periodically.
nakedfarmanimals
Posts: 20
Joined: Fri Jun 15, 2007 9:46 pm

Time / Date Stamp?

Post by nakedfarmanimals »

Is there a Time/Date stamp on the ticket? Assuming that the trucks are not moving in and out *too* fast, as long as the time/date stamps match up to the same minute / 3 minute interval, etc., then you can be relatively sure that the truck captured and the ticket printed refer to the same weighing.

Zoneminder has some interesting things that it can do with the time/date stamp as presented... it appears to be really flexible.

Instead of "Event-0200 07-01-07 08:30:02" you can have it print 20070101_083002 or 02300801012007, etc. If the ticket ID has a time based component (Ticket #T070107083002), you may be able to get it to appear in the time/date overlay.

Hope that this helps.
User avatar
eracc
Posts: 107
Joined: Wed Mar 08, 2006 3:26 pm
Location: USA

Post by eracc »

It can take anywhere from about a minute to 5 minutes for a truck to be weighed and/or processed. So the trucks are not moving "too fast". :)

Mainly what they want is the truck number (if any), ticket number and customer name overlaid on the video. If there is anything else they have not yet told me.
Post Reply