<< return to Vizycam.com

User Tools

Site Tools


wiki:radar_app

This is an old revision of the document!


Radar Application

Overview

This app will log vehicular traffic on a road or thoroughfare. It will also measure the speed of each vehicle and determine if the speed limit is being broken. It can be configured to text you if someone exceeds the speed limit that you set. The pictures are strategically taken to achieve the best possible view of a vehicle's license plate. Additionally, the pictures are uploaded to Google Photos if you wish.

Getting started

Set up Vizy in the location that you think works best. Here are the general guidelines for setting up Vizy.

  1. It's likely that you will need a zoom lens if you want to be able to read the characters on the license plate of a vehicle, but a zoom lens isn't necessary. Without a zoom lens will more likely get a picture of the entire vehicle without a zoom lens.
  2. Vizy should be pointed at about 45 degrees with respect to the roadway, so that you can get a good estimate of the velocity, while also being able to see the license plate.
  3. You have a choice of pointing Vizy 45 degrees to the left or to the right when facing the roadway. Bear in mind that if you point Vizy to the left (for example), you will get pictures of the rear license plate for cars traveling to the left, and you will get pictures of the front license plate for cars traveling to the right. Not all vehicles have front license plates, so pointing Vizy in the direction that is more important to you is a good rule of thumb. If it makes no difference, pick either direction.
  4. An outdoor enclosure will be necessary if you want Vizy to stay outside, but it's probably a good idea to get the Radar application working without an outdoor enclosure first.

Begin by turning on your Vizy and pointing your browser to it. (Please refer to the getting started guide if you need help with connecting to your Vizy, etc.) Run the Radar application by clicking on the ☰ icon in the upper right corner and selecting Apps/examples. Then scroll over to Radar in Apps, then click on Run.

FIXME select app

You'll be presented with a screen similar to below. The image at the top of the screen is the live video feed of what Vizy sees (for example, the road). Various controls (buttons, sliders) are shown below the video feed, which we'll describe in more detail.

FIXME app pic

To test, take your hand and swipe it across the image such that your hand appears on one side of the image and exits the opposite side of the image. It should detect your hand and estimate its speed as shown below.

FIXME hand

Media Queue

You'll notice that when detecting vehicles (or your hand), the recent detections are displayed below the live feed with the measured speed.

FIXME picture of media queue

Calibration

The Radar application measures the distance a vehicle travels between each frame and then fits a straight line across all measurements. This method is quite accurate, but it needs to be calibrated to accurately associate the pixels in the image with actual distances so it can estimate the speed of the vehicle (either kph or mph). This can be done by either driving in front of Vizy at a known speed, or by estimating the speed of a given vehicle. Because of camera geometry, lanes closer to Vizy's lens will have faster apparent motion than lanes further away from Vizy's lens. For this reason, it's best to calibrate the speed of vehicles moving in both directions to achieve the most accurate speed measurements. (Currently, the Radar application assumes there are only two lanes, one for each direction of travel.)

To calibrate, just click on the image that contains the vehicle that you know the speed of. Then click anywhere within the image to bring up the calibration dialog.

FIXME calibration dialog

Type in the speed and click on Calibrate. This will set the calibration for this image. Note, it won't change the speeds of other detection images, however, but new vehicle detections will be affected.

For the most accurate results, be sure to calibrate in both directions. That is, calibrate using an image of a vehicle going in one direction. And calibrate using an image of a vehicle going in the opposite direction. You only need to do this once for each direction. This can be done by driving in front of Vizy at a known speed in both directions. Or it can be done by simply estimating the velocity of a given vehicle (the lazy method), but this usually results in less accurate speed estimates.

Once it's calibrated, Vizy will provide accurate speed measurements from then on. If you accidentally knock Vizy such that its angle or position is significantly changed, just use an older image to realign Vizy such that it's looking at the same section of the roadway as before. In general, small changes in angle and position don't affect the speed estimates significantly.

Controls and settings

* Speed limit: * Sensitivity: * Kilometers per hour:

Settings dialog

Configuring Google services

Texting

Text commands

Customizations, tweaks, etc.

Deploying Vizy

Customized handlers

Event handler

Text handler

wiki/radar_app.1683302893.txt.gz · Last modified: 2023/05/05 11:08 by vizycam