Documentation for Auto Intellect 5.0. Documentation for other versions of Intellect is [available too].

The following scripts are widely used in the Auto-Intellect software package.

Purpose of script

Script

1

Start of Auto-Uragan 3.5.0.29 program module

if(Event.SourceType == "MACRO" && Event.SourceId == "1" && Event.Action == "RUN"){

DoReactStr("ULPR","1","START","");

}

2

Shutdown of Auto-Uragan 3.5.029 program module

if(Event.SourceType == "MACRO" && Event.SourceId == "1" && Event.Action == "RUN"){

DoReactStr("ULPR","1","STOP","");

}

3

Activation of window of operator request by results of recognized vehicle license plate found in the external database

if(Event.SourceType == "LPRDB" && Event.SourceId == "1" && Event.Action == "SEARCH_RESULT")

{

DoReactStr("ULPR","1","STOP","");

var msg=Event.Clone();

var m=msg.GetParam("comment");

var d=msg.GetParam("date");

var number=msg.GetParam("column.0.value");

DoReactStr("DIALOG","black_list","RUN","param0<"+number+">,column.4.value<"+m+">,date<"+d+">");

}

4

Video convertation to AVI format with record of vehicle, license plate of which is recognized

function printDate(temp)

{

    var dateStr = padStr(temp.getDate())+"-"+

                  padStr(temp.getMonth()) +"-"+

                  padStr(temp.getFullYear()) +" "+

                  padStr(temp.getHours()) +":"+

                  padStr(temp.getMinutes()) +":"+

                  padStr(temp.getSeconds());

return dateStr;

}

function padStr(i)

{

if(i > 1000)

{

var temp = ""+i;

temp = temp.substr(2,2);

return  temp;

}

    return (i < 10) ? "0" + i : "" + i;

}

if(Event.Action == "NUMBER_DETECTED" && Event.SourceType=="ULPR" && Event.SourceId=="1")

{

var plate = Event.GetParam("plate");

debugger;

if(plate == "о270са99")

//if(Event.Action == "RUN" && Event.SourceType=="MACRO" && Event.SourceId=="1")

{

DoReactStr("CAM","1","REC_STOP","");

DoReactStr("CAM","1","REC","delay<500>");

var time = Event.GetParam("time");

var date = Event.GetParam("date");

var tArr = time.split(":");

var dArr = date.split("-");

var shift = new Date("20"+dArr[2],dArr[1],dArr[0],tArr[0],tArr[1], tArr[2]);

shift.setSeconds(shift.getSeconds()+30);

var time1 = printDate(shift);

var filename = date+"_"+time+".avi";

filename = filename.replace(/:/g,"_");

filename = filename.replace(/-/g,"_");

var oShell = new ActiveXObject("Shell.Application");

var commandtoRun = "C:\\Program Files (x86)\\Intellect\\Tools\\Converter.exe";

var arguments = "\"c:\\backup\\"+filename+"\",\"1\",\" "+date+" "+time+"\",\" "+time1+"\"";

DebugLogString(arguments);

oShell.ShellExecute(commandtoRun,arguments,"","open","1");

}

}

5

Raising of turnpike

if(Event.SourceType == "LPRDB" && Event.SourceId == "1" && Event.Action == "SEARCH_RESULT")

{

DoReactStr("GRELE","1","ON","");

Sleep(5000);

DoReactStr("GRELE","1","OFF","");

}

6

Manual start of recognition.

Manual stop of recognition. It is in use if the Parking mode disabled.

Note.

The Parking mode enabled when the value of HKLM\SOFTWARE\ITV\INTELLECT\URMLPR\ParkingMode registry key is 1. In the Parking mode the recognition is stopped if the license plate is not recognized in the frame. If the Parking mode disabled, the recognition continues until the command of recognition stopping will not be entered.

For the CARMEN-parking module the time of one frame processing can run to 30 seconds, i.e. big delay of LP recognition will be detected while the live video recognizing. Manufacturers of the CARMEN-parking module recommend starting the recognition by some trigger (motion in the frame, vehicle appearance in the frame, operator command – as in this example, etc.). Special detections/radars which can be integrated with the help of Sensor object also can be trigger.

 

if(Event.SourceType == "MACRO" && Event.SourceId == "1" && Event.Action == "RUN"){

DoReactStr("ULPR","1","MD_START","");

}

 

if(Event.SourceType == "MACRO" && Event.SourceId == "1" && Event.Action == "RUN"){

DoReactStr("ULPR","1","MD_STOP","");

}