package project import ( "html/template" ) var Template *template.Template func init() { Template = template.Must(template.New("webpage").Funcs(template.FuncMap{ "DataURI": dataImg, }).Parse(tpl)) } const tpl = `
save exit
{{.Filename}} Frames: {{.Frames}} Duration: {{.Duration}} Resolution: {{.VideoResolution}}
{{.Filename}}
{{.Frames}}
{{.Duration}}
{{.VideoResolution}}
Instructions: Click on the image below to select the upper left and lower right corner of the frame to perform speed analysis on. After selecting "point1" and "point2" select the "Continue" button.
Selected Range {{.PreCrop}} Cropped Resolution: {{.Response.PreCroppedResolution}}
{{.PreCrop}}
{{.Response.PreCroppedResolution}}
Automatic rotation detection works by picking two points that align with the asis of vehicle movement
Instructions: Click on the image below to select two points on the axis of movement. Typically this will be a lane marking in the middle of the street at either end of the visible range. After selecting "point1" and "point2" select the "Continue" button.
To skip rotation enter 0x0 as both points.
Rotation Angle {{.Rotate}} radians
{{.Rotate}} radians
Selected Range {{.PostCrop}} Cropped Resolution: {{.Response.CroppedResolution}}
{{.PostCrop}}
{{.Response.CroppedResolution}}
Masking allows the detection of vehicles in different lanes to avoid bleeding into each other, and eliminates irrelevant parts of the image (like sidewalks or parked cars). Depending on the visual perspective the masked rows should be closer to wheel position to account for tall vehicles in the lane.
Instructions: Note the X and Y from the image, and enter masks as a row range row:row or a bounding box pair of coordinates 10x20 20x30. To continue without masks enter a mask of -.
Mouse Position:
Masked regions: {{range .Masks }}{{.}} {{end}}
{{.}}
The tunables below adjust what is detected as "active" in an image, and what is treated as a vehicle.
Background Image:
{{.Timestamp}} seconds
Frame: (before masking)
Active Image:
Detected Areas: (after masking)
Tolerance: {{.Tolerance}}
{{.Tolerance}}
Blur: {{.Blur}}
{{.Blur}}
Contiguous Pixels: {{.ContiguousPixels}}
{{.ContiguousPixels}}
Min Mass: {{.MinMass}}
{{.MinMass}}
Calibrations: {{range .Calibrations }}{{.Pretty}}{{end}}
{{.Pretty}}