Manual Plate Extraction GUI

Developed by Rohit Rawat for IPNNL
Image warping code written by Michael J. Futer



This tools reads vehicle images and allows a human user to click on the four corners of the plate and save it to a file. It automatically warps the selected quadrilaterals into rectangular regions.

Obtaining the files

The tool is distributed in the form of MATLAB source code:

Running the tool

The tool is launched by running the Plate_Database_Generator.m script.

GUI elements

This image shows the various GUI elements:

Step by step instructions (video demo)

  1. Click on the browse button(1) and select the folder containing vehicle images.
  2. Initialization will begin with the first image to be processed:
    During initialization, the program determines the approximate size of the plate in the images so that it may determine an appropriate zoom level.
    1. Select the four corners of the license plate with your mouse.
    2. Now either click on the first point again, or right-click anywhere on the image.
  3. The program will display a pop up message with the number of images already processed if you have already run it in the past. Close the pop-ups.
  4. Click on the Begin/Resume button(3).
  5. The first image will be displayed in box(2) and information about the current file and your progress will be shown in (4).
  6. Click once roughly in the center of the license plate. This will zoom into that area of the image.
  7. Now carefully select the four corners of the license plate with your mouse. Now either click on the first point again, or right-click anywhere on the image.
    1. If you accidentally select more than 4 points, the extra ones will be ignored.
    2. If you make a mistake, see below for the Undo function.
    3. If the image does not have a license plate, select a random rectangle in the image. Then click on the "No plate found" button(6). The screen will now display a rectangularly warped image of the extracted license plate.
  8. Click on the Yes/Continue button(5) to move to the next vehicle image. If there was no plate in the image, click on the "No plate found" button. If you made a mistake and want to repeat plate extraction for this plate, click on the "Undo last action" button(7).
  9. You will now be displayed the next vehicle image. Proceed as before form step 6. onwards.

Saving progress and resuming

If the program closes or crashes, your progress is automatically saved. It saves data every time you move to the next vehicle image.

Output files

  1. Cropped plate images are stored inside a sub-folder called plate_output of the current working directory (from where the script is run). The plate images are named with a plate_ prefix to the original vehicle image file.
  2. A MAT file named manual_plate_crop_config.mat is generated in the folder containing the images. This file is used to remember the names of files which have already been processed and the locations of the four corners.
  3. A few text files with lists of files:
    1. pdg_success.txt - files already processed, each filename is followed by the location of the license plate in that image:
      y1 y2 y3 y4 x1 x2 x3 x4 (clockwise starting from the top-left corner).
    2. pdg_failures.txt - files with no plates.
    3. pdg_pending.txt - files that haven't been processed yet.