Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Purpose of script

Script

1

Start of Auto-Uragan program module

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

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

}

2

Shutdown of Auto-Uragan program module

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

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

}

3

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

OnEventif(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 { DoReact("DIALOG","black_list","RUN","number<param0<"+number+">,comment<column.4.value<"+ comment m+">,date<"+ 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")

{

DoReactStrOnEvent("ULPR","1","NUMBER_DETECTED")
{if(strequal(plate,"с590ае97")){[time1=time;DoReact("CAM","1","REC_STOP","");Sleep(500);DoReact

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");

}

t1=extract_substr(time1,":",0);t2=extract_substr(time1,":",1);t3=extract_substr(time1,":",2);t3=str(t3-1);
if (atof(t3)<0) {t3=str(60+t3);t2=str(t2-1);}if (atof(t2)<0) {t2=59;t1=str(t1-1);}if (atof(t1)<0) {t1=23;}
if (atof(t3)<10) {t3=strltrim(" 0"+t3);}if (atof(t2)<10) {t2=strltrim(" 0"+t2);}if (atof(t1)<10) {t1=strltrim(" 0"+t1);}
time2=t1+":"t2":"+t3;Sleep(1000);DoCommand("c:\intellect\tools\converter.exe c:\backup\"date"_"t1+t2+t3".avi,1,"date" "time2","date" "+time1);]}}

5

Raising of turnpike

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

{

DoReactStr [ DoReact("GRELE","21","ON","");

Sleep(5000);

DoReactStr DoReact("GRELE","21","OFF",""); ]

}

6

Manual start of recognition.

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

Info
titleNote.

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.

 

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

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

}

 

OnEventif(Event.SourceType == "MACRO" ,"2",&& Event.SourceId == "1" && Event.Action == "RUN"){

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

}