NiFi Ingest 23.2

# VehicleAnalysis

Runs number plate recognition, vehicle recognition (make and optionally model), and vehicle color analysis on the file(s) associated with an IDOL document FlowFile, and adds information about vehicles to the IDOL document.

To recognize vehicle models you must train a vehicle model database. For more information about vehicle analysis, including how to train a vehicle model database, refer to the Media Server Administration Guide.

Supported file formats

The processor can handle video files.

The processor can handle the following image formats:

- TIFF
- JPEG
- JPEG 2000
- PNG
- GIF
- BMP (compressed BMP files are not supported) and ICO
- PBM, PGM, and PPM
- WebP

Additionally, if you configure your MediaServiceImpl controller service to use a KeyView Export Service, the processor can handle document formats, including:

- Adobe PDF
- Microsoft Word Document (.DOC and .DOCX)
- Microsoft Excel Sheet (.XLS and .XLSX)
- Microsoft PowerPoint Presentation (.PPT and .PPTX)
- OpenDocument Text (.ODT)
- OpenDocument Spreadsheet (.ODS)
- OpenDocument Presentation (.ODP)
- Rich Text (RTF)

## Properties

Name | Default Value | Description
--- | --- | ---
IDOL License Service |  | An IdolLicenseServiceImpl that provides a way to communicate with an IDOL License Server.
Media Service |  | A MediaServiceImpl that manages media analysis resources.
Number Plate Locations |  | A comma-separated list of ISO-3166 codes to specify the locations for which you want to recognize number plates.
Database File |  | The path of a file that contains the vehicle model database to use. Set this property to use a database that you exported from Media Server, using the action `ExportVehicleModelDatabase`.
Shared Database |  | The name of the vehicle model database to use. Set this property to use a database that is stored in the external database specified by the Media Service (see the "Media Service" property).
Image Output Format |  | When set, the processor saves the full image or best video frame for each detected vehicle, in the specified format (BMP, GIF, JPEG, PDF, PNG, PPM, TIFF or WEBP).
Video Clip Quality |  | When set to "low", "medium", or "high", the processor saves a video clip of the detected vehicle at the specified quality level.
Video Clip Height | 300 | The height of the video clip that is generated when you set Video Clip Quality, in pixels.

## Relationships

Name | Description
--- | ---
success | Processing was successful.
failure | Processing failed.

## Example Output

The following examples show the metadata that can be added to an IDOL document by vehicle analysis.

Image input

    <idol_media>
        <vehicles>
            <vehicle page="1">
                <numberplate>
                    <plateread>AB01CDE</plateread>
                    <origin>GB</origin>
                    <region height="43" left="448" page="1" top="427" width="170">
                        <point x="448" y="428"/>
                        <point x="617" y="427"/>
                        <point x="617" y="466"/>
                        <point x="448" y="469"/>
                    </region>
                </numberplate>
                <make>Ford</make>
                <model>Focus</model>
                <color b="165" g="115" r="91">blue</color>
                <bestRegion>
                    <region height="488" left="112" page="1" top="109" width="718"/>
                    <imagefile>/opt/nifi/idol_repository/Files/VehicleAnalysis_8f44ce0f-0180-1000-3bac-419a0c9e4cdc/40b6f193-6f61-49eb-9012-31941ff4dc14.bmp</imagefile>
                </bestRegion>
                <region height="488" left="112" page="1" top="109" width="718"/>
            </vehicle>
            ...
        </vehicles>
    </idol_media>

Video input

    <idol_media>
        <vehicles>
            <vehicle duration="0.32" start="13.4">
                <numberplate>
                    <plateread>AB01CDE</plateread>
                    <origin>GB</origin>
                    <region duration="0.04" height="29" left="1606" start="13.4" top="719" width="130">
                        <point x="1606" y="719"/>
                        <point x="1735" y="721"/>
                        <point x="1735" y="747"/>
                        <point x="1606" y="746"/>
                    </region>
                    <region duration="0.04" height="28" left="1637" start="13.52" top="761" width="132">
                        <point x="1637" y="761"/>
                        <point x="1768" y="762"/>
                        <point x="1768" y="788"/>
                        <point x="1637" y="786"/>
                    </region>
                    <region duration="0.04" height="29" left="1703" start="13.68" top="816" width="134">
                        <point x="1703" y="816"/>
                        <point x="1836" y="818"/>
                        <point x="1836" y="844"/>
                        <point x="1703" y="842"/>
                    </region>
                </numberplate>
                <make>Ford</make>
                <model>Focus</model>
                <color b="165" g="115" r="91">blue</color>
                <videoFile>/opt/nifi/idol_repository/Files/VehicleAnalysis_8f44ce0f-0180-1000-3bac-419a0c9e4cdc/5b340d04-3ef5-4be8-809a-16fe13d77abe.mp4</videoFile>
                <bestRegion>
                    <region height="..." left="..." timestamp="..." top="..." width="..."/>
                    <imagefile>/opt/nifi/idol_repository/Files/VehicleAnalysis_8f44ce0f-0180-1000-3bac-419a0c9e4cdc/fe20d341-3989-4636-a5c3-8877f9fab003.bmp</imagefile>
                </bestRegion>
                <region duration="0.04" height="385" left="1414" start="13.4" top="433" width="453"/>
                <region duration="0.04" height="410" left="1454" start="13.52" top="487" width="429"/>
                <region duration="0.04" height="427" left="1504" start="13.68" top="534" width="415"/>
            </vehicle>
            ...
            ...
        </vehicles>
    </idol_media>

The XML contains a `vehicle` element for each vehicle.

- The `numberplate` element provides information about the number plate.

  - `plateread` - the characters from the number plate.
  - `origin` - the country of origin.

  - `region` - the position of the number plate in the image.

    When you analyze an image or document the `page` attribute specifies the page on which the number plate was detected. When you analyze a video and a number plate is tracked across multiple frames, there can be multiple `region` elements with `start` and `duration` attributes that provide video timestamps, in seconds.

    The `point` elements describe the corners of a polygon that contains the number plate. All of these values are in pixels, where `x=0`, `y=0` represents the top-left corner of the image.

    The `left`, `top`, `width`, and `height` attributes describe the position and size of a bounding box around the polygon (`left` specifies the distance from the left side of the image to the left side of the region, and `top` specifies the distance from the top of the image to the top of the region).

  - `subread` - the sub-read from the number plate. This field is only used for some locations, such as the United Arab Emirates. If the number plate does not have a sub-read, the element is omitted.
  - `vehicletype` - the vehicle type (private, taxi, military, and so on), if it can be determined from the number plate. If the number plate does not contain this information, the element is omitted.
- The `make` and `model` elements describe the vehicle make and model. The model is present only if you have trained and configured a vehicle model database.
- The `color` element describes the vehicle color. The `r`, `g`, and `b` attributes give the red, green, and blue color components.
- The `videoFile` element contains the path of the video file that is generated when you set the property Video Clip Quality.

- The `bestRegion` element represents the best video frame in which the vehicle was visible. It includes the `region` element for that frame, but can also include:

  - `imageFile` - The path of the image that was generated when you set the property Image Output Format.

- The `region` element describes the location of the vehicle in the image.

  When you analyze an image or document the `page` attribute specifies the page on which the vehicle was detected. When you analyze a video and a vehicle is tracked across multiple frames, there can be multiple `region` elements with `start` and `duration` attributes that provide video timestamps, in seconds.

Copyright 2018-2023 Open Text
Version 23.2 | Last updated March 2023

Send documentation feedback

Close

Send documentation feedback

To send feedback using your default email client, open an email window.

Otherwise, send your feedback and the information below to swpdl.idoldocsfeedback@microfocus.com.

We appreciate your feedback!

Product: IDOL NiFi Ingest 23.2

Topic Title: VehicleAnalysis