You are on page 1of 10

Standard Specification for

File Format of Two-Dimensional


and Three-Dimensional (2D/3D)
Pavement Image Data

AASHTO Designation: MP 47-211

First Published: 2021

Technical Subcommittee: Sa, Pavement Measurement

AAS HID
American Association of State Highway and Transportation Officials
555 12th Street NW, Suite 1000
Washington, DC 20004
Standard Specification for

File Format of Two-Dimensional and Three­


Dimensional (2D/3D) Pavement Image Data

AASHTO Designation: MP 47-201 AAS HID


First Published: 2021

Technical Subcommittee: Sa, Pavement Measurement

1. SCOPE

1.1. This specification describes the standard file format of two-dimensional (2D) and three­
dimensional (3D) pavement image data used to determine pavement surface condition and
profiles.

1.2. This specification describes the data elements stored in a binary file.

1.3. This specification is designed to be independent of hardware platform, computer language, and
operating system.

1.4. This standard does not purport to address all the safety concerns, if any, associated with its use. It
is the responsibility of the user of this standard to establish appropriate safety and health practices
and determine the applicability of regulatory limitations prior to use.

2. REFERENCED STANDARDS

2.1. ASTM Standard:


• E867, Terminology Relating to Vehicle-Pavement Systems

2.2. IEEE Standard:


• IEEE 754, IEEE Standard for Floating-Point Arithmetic

3. TERMINOLOGY

3.1. Definitions:

3.1.1. Terminology used in this specification conforms to the definitions included in ASTM E867.

3.2. Definitions of Terms Specific to This Standard:

3.2.1. array:

3.2.1.1. array (numeric datatype)-Sequence of data of the specified numeric data type. The size of the
array will be stored separately.

3.2.1.2. array (string)-ASCII strings separated by null characters. A null character follows the last string.

TS-5a MP 47-1 AASHTO

© 2021 by the American Association of State Highway and Transportation Officials.


All rights reserved. Duplication is a violation of applicable law.
3.2.2. bit depth-Number of binary digits (bits) used to represent a value of image intensity or range.

3.2.3. compatibility:

3.2.3.1. backward compatibility-Ability of a software system, such as a pavement image viewer, to read
an earlier version of the standard file format.

3.2.3.2. forward compatibility-Ability of a software system, such as a pavement image viewer, to read a
future version of the standard file format.

3.2.4. compression-Method to reduce image size by encoding information into fewer bits than the
original representation.

3.2.4.1. lossless compression-Compression method in which no information is lost.

3.2.4.2. lossy compression-Compression method in which information may be lost.

3.2.5. compression quality-Measurement of how much information is lost during compression. In this
specification, compression quality is measured using peak signal-to-noise ratio (PSNR), the ratio
of the maximum possible power of a signal to the power of noise that corrupts the signal fidelity.
When lossless compression is used, the PSNR is infinite.

( --)
The equation for PSNR is:
MAX2
PSNR = I 0 x log10 '
MSE
(1)
where:

MSE= - L: L(IiJ-TiJ)2
l

MN
M

i=I
N

j=l
(2)
I represents the reference image and T represents the image to be tested. The dimensions of both
images are M x N. The MSE is the mean square error between the test image and the reference
image. MAX1 is the maximum possible value of a pixel. For an 8-bit intensity image, it is 28 - 1 =

255, and for a 16-bit range image, it is 216 - 1 65535.


=

3.2.6. FIPS state codes-Federal Information Processing Standard state code. FIPS state codes were
numeric and two-letter alphabetic codes defined in U.S. Federal Information Processing Standard
Publication.

3.2.7. floating point number:

3.2.7.1. Float32-Data type for a 32-bit binary floating point number, defined as "binary 32" by
IEEE 754.

3.2.7.2. Float64-Data type for a 64-bit binary floating point number, defined as "binary 64" by
IEEE 754.

3.2.8. global positioning system (GPS)-Network of navigation satellites used to determine the location
of receiving devices.

3.2.9. integer:

3.2.9.1. signed-Integer capable of representing negative and positive values.

3.2.9.1.1. lnt32-Data type for a 32-bit, signed integer.

TS-5a MP 47-2 AASHTO

© 2021 by the American Association of State Highway and Transportation Officials.


All rights reserved. Duplication is a violation of applicable law.
3.2.9.1.2. lnt64-Data type for a 64-bit, signed integer.

3.2.9.2. unsigned-Integer capable of representing only nonnegative values.

3.2.9.2.1. Uint8-Data type for an 8-bit, unsigned integer.

3.2.9.2.2. Uint32-Data type for a 32-bit, unsigned integer.

3.2.10. lane index-Beginning at I for the leftmost lane in the driving direction and increasing by I for
each lane to the right.

3.2.11. n-byte String-ASCII string ofn characters in length, terminated by the null character '\O', which
is not counted toward n.

3.2.12. offiet-Index measuring the number of bytes from the beginning of a data file. The offsets in the
file header locate the various data sections of the file.

3.2.13. pixel-Picture element; the smallest unit of a digital image that can be displayed and represented
by a value corresponding to intensity for a 2D image and range for 3D image.

3.2.14. registration-Process of determining and applying coordinate transformations to two or more


images to locate both images in a common coordinate system so they are aligned with each other.

3.2.15. transverse pro file-Vertical deviations of the pavement surface from a horizontal reference line
perpendicular to the driving direction.

3.2.16. longitudinal profile-Perpendicular deviations of the pavement surface from an established


reference line parallel to the driving direction, usually measured in the wheel tracks.

4. FILE DATA SPECIFICATIONS

4.1. Image Representation:

4.1.1. Standard Image Representation-Figure 1 defines a two-dimensional, right-handed Cartesian


coordinate system in which the x axis is perpendicular to the driving direction and points to the
right side and they axis is in the driving direction. A line of pixels in the x direction forms a row; a
line of pixels in they direction forms a column. The origin is located at the leftmost pixel in the
first row. Each pixel is located by its column and row numbers, which are counted from 0. In
Figure 1, the column and row numbers of the circled pixel are 14 and 3, respectively. The
coordinate system shown in Figure 1 applies to both 2D and 3D images.

TS-5a MP 47-3 AASHTO

© 2021 by the American Association of State Highway and Transportation Officials.


All rights reserved. Duplication is a violation of applicable law.
Column 14
y n

c
.Q
t5

Ci
Ol
c
">
ero
.�
'O
-
� GPS and Registered
Ol -
c Range Value
0 -
....I Reference Point
- �
,, (14, 3)
I/I Row3
I/
I/I
"
0 x
Transverse Direction

Column 14
y '.

c
0


Ci
Ol
c
·;;:
Q
ro
c
'5
.3 -
·0i GPS and Registered
c t-
Range Value
0 �
....I Reference Point
-
I - (14, 3)
/I Row3
/
/
I# -
0 x
Transverse Direction

Notes:

I. A row parallel to x axis corresponds to a transverse profile.

2. A column parallel toy axis corresponds to a longitudinal profile.

3. The distance between two rows is the longitudinal resolution.

4. The distance between two columns is the transversal resolution.

Figure 1---Graph. Standard Image Representation

4.1.2. Image Size-It is recommended that each file store pavement surface image data one lane in width
and about 5 m (16.4 ft) in length.

TS-5a MP 47-4 AASHTO

© 2021 by the American Association of State Highway and Transportation Officials.


All rights reserved. Duplication is a violation of applicable law.
4.1.3. Reference Point-The reference point is represented by the origin in the standard image
representation in Figure 1.

4.1.4. Pixel Storage Order-Defines the order of the pixels stored of an uncompressed image. If row­
first storage is used, the file is stored as [Row 0, Row 1 . . . Row N] If column-first storage is used,
the file is stored as [Column 0, Column I . . . Column N]. The first element in each column and the
first element in each row lie on the x axis and y axis, respectively.

4.1.5. Invalid Pixel-The maximal value of the 2D/3D data type (255 for 8-bit depth, 65535 for 16 bit­
depth) is reserved for representing invalid pixels.
Note 1-Pavement imaging technology may evolve with new capabilities. Any changes to this
file format should consider backward and forward compatibility of the related software.

4.2. File Structure:

4.2.1. The file comprises six sequential sections: (1) File Signature, (2) File Header, (3) 2D Image Data
(intensity), (4) 3D Image Data (Range), (5) User-Defined Metadata, and (6) File Trailer (Figure 2).

2D Intensity Metadata
File Signature File Header 3D Range Data File Trailer
Data (Optional)

Figure 2-File Structure Diagram

4.2.2. The six sections of the file are described in the following sections.

4.3. File Signature:

4.3.1. The file signature identifies a file defined by this specification.

4.3.2. The three-byte string "psi" should be used as file signature and as the filename extension for the
file.

4.4. File Header:

4.4.1. The file header describes the properties of the 2D/3D data stored in the file. Each property is
denoted by a variable of defined data type and byte length.

4.4.2. The variables and their data types and descriptors are listed in Table l. The data shall be mapped
to the file sequentially at the offsets listed in the file header.

4.4.3. Required Fields-Fields that must have a valid value set. A missing or invalid value in any of
these fields would invalidate the file.

TS-5a MP 47-5 AASHTO

© 2021 by the American Association of State Highway and Transportation Officials.


All rights reserved. Duplication is a violation of applicable law.
Table 1-File Header
Data Offset
(Bytes) Variable Name Data Type Data Details

0 Version 4-byte String Version number of the file format. The format is X.YY where X is the major version
numbered from 1 to 9 and YY is a minor version numbered from 00 to 99. Required
field.
5 Software Version 8-byte String Identifier of the software that produced the file. The major version of the software
shall be included as well, for example "PaveSys2."
14 State Name 2-byte String FIPS state code as described in Section 3.2.21 .
17 Route Name 1 2-byte String Name of the highway.
30 Heading in Float32 Direction of travel degrees from North.
Degrees
34 Lane Index Uint8 Lane index as described in Section 3.2.22.
35 File Serial Uint32 File serial number in continuous data collection.
Number
39 GPS Longitude Float64 GPS longitude of the reference point.
47 GPS Latitude Float64 GPS latitude of the reference point.
55 DMl Reading Float32 Estimated distance traveled from the starting point of the data collection to the
reference point in each image file. Use meter as unit to 0.001 m.
59 Date 8-byte String Date data was collected-(yyyymmdd).
68 Time 6-byte String Time data was collected-(hhmmss).
75 2D Pixel Storage Uint8 0 - Row-first storage; I - Column-first storage
Order Valid only with BIN-uncompressed codecs. See Section 4.1 .4 and Table 2.
76 2D Codec Uint8 Identifies codec for 2D image. See Table 2. "BIN-uncompressed" should be used if
there is no compression. Required field if2D data size is greater than 0.
77 2D Longitudinal Float32 Distance between two data rows in longitudinal direction in millimeters. Required
Resolution field if2D data size is greater than 0.
81 2D Transverse Float32 Distance between two data columns in transverse direction in millimeters. Required
Resolution field if2D data size is greater than 0.
85 2D Width Uint32 Number of pixels in the transverse direction. Required field if 2D data size is greater
than 0.
89 2D Length Uint32 Number of pixels in the longitudinal direction. Required field if2D data size is
greater than 0.
93 2D Data Bit Uint8 Bit depth for each data point in 2D image. See Table 2. Required field if2D data size
Depth is greater than 0.
94 2D Data Size Uint32 Total size of the 2D data, in bytes; if compressed, the size of the compressed data.
Zero if no 2D data is stored. Required field.
98 2D Compression Float32 Compression quality level (PSNR) for lossy compression. When lossless compression
Quality is used, this field should be set to 0.
1 02 3D Pixel Storage Uint8 0 - Row-first storage; 1 - Column-first storage. Valid only with BIN codecs. See
Order Section 4.1 .4 and Table 2.
1 03 3D Codec Uint8 Identifies codec for 3D image; "BIN-uncompressed" should be used if there is no
compression. See Table 2. Required Field if 3D data size is greater than 0."
1 04 3D Longitudinal Float32 DMl-reported distance between two data rows in the longitudinal direction, in
Resolution millimeters. Required field if 3D data size is greater than 0.
1 08 3D Transverse Float32 Distance between two data columns in the transverse direction, in millimeters.
Resolution Required field if3D data size is greater than 0.
112 3 D Vertical Float32 The distance represented by unit change of the range data value, in millimeters.
Resolution Required field if 3D data size is greater than 0.
116 3 D Width Uint32 Number of pixels in the transverse direction. Required field if 3D data size is greater
than 0.
1 20 3D Length Uint32 Number of pixels in the longitudinal direction. Required field if 3D data size is greater
than 0.
1 24 3D Data Bit Uint8 The bit depth for each data point in the 3D image. See Table 2. Required field if3D
Depth data size is greater than 0.
1 25 3D Data Size Uint32 The total size of the 3D data in bytes; if compressed, the size of the compressed data.
Zero if no 3D data is stored. Required field.

Continued on next page.

TS-5a MP 47-6 AASHTO

© 2021 by the American Association of State Highway and Transportation Officials.


All rights reserved. Duplication is a violation of applicable law.
Table 1-File Header (Continued)
Data Offset
(Bytes) Variable Name Data Type Data Details

1 29 3D Compression Float32 Compression quality level (PSNR). When lossless compression is used, this field
Quality should be set to 0.
1 33 3D Registration Uint8 See Section 3.2.24 and Table 2.
1 34 Reference Range Float32 Baseline range value of the reference point. Should be 0 when "3D Registration" is
Value "U." See 3.2.24.
1 38 Metadata Data Uint32 Size in bytes of the metadata. Required field.
Size
1 42 Speed Float32 Average vehicle speed, in meters per second, associated with the image.
1 46 Time Stamp Int64 Milliseconds since UNIX Epoch: Jan I, 1 970 00:00:00.
1 54 Vehicle Name 32-byte String Vehicle identification.
187 Operator Name 32-byte String Operator identification.
220 Contractor Name 32-byte String Contractor identification.
253 Sensor System 32-byte String 2D/3D sensor system identification.
286 Reserved Item 255-byte Reserved for future use or additional vendor-specific information. Unused bytes
String should be padded with nulls.
!fa codec has no internal compression, e.g., OpenCRG, an external compression method, e.g. ZIP, could be designated. Future additional accepted codecs will be
added to Table 2.

Table 2-Enumerated Types and Enumerated Values


Variable Name Enum Name Enum Value Value Type

2D Data Bit Depth Depths 8 Uint8


3D Data Bit Depth Depth1 6 16 Uint8
2D Codec BIN-Uncompressed 0 Uint8
BIN-ZIP Uint8
JPEG 2 Uint8
PNG 3 Uint8
30 Codec BIN-Uncompressed 0 Uint8
BIN-ZIP Uint8
OpenCRG-Uncompressed 2 Uint8
OpenCRG-ZIP 3 Uint8
JPEG2000 4 Uint8
3D Registration Registered 0 Uint8
Unregistered 1 Uint8
Pixel Storage 2D Row 0 Uint8
Column Uint8
Pixel Storage 3D Row 0 Uint8
Column Uint8

4.5. Data Sections:

4.5.1. The data sections store blocks of compressed or uncompressed binary data. The 3D data follows
the 2D data.

4.5.2. The vendor shall specify the algorithm to decode compressed 2D/3D data into standard image
representation. Vendors using proprietary algorithms for data compression shall provide the
compression/decompression algorithms in the form of a software library (DLL or LIB), source
code, or other form of software tools.

TS-5a MP 47-7 AASHTO

© 2021 by the American Association of State Highway and Transportation Officials.


All rights reserved. Duplication is a violation of applicable law.
Note 2-Tf the vendor uses a proprietary algorithm that is not open-source, the future availability
and functionality of the algorithms may be more restricted than if non-proprietary or open-source
algorithms are used.

4.5.3. The 2D and 3D images, if both present, must cover the same area of pavement surface.

4.6. User-Defined Metadata Section (Optional):

4.6.1. The first value in the metadata portion shall provide the number of metadata entries (MDE) as
shown in Table 3. Table 4 shows the partial list of information to construct an MDE. The specific
metadata data entries shall be designed based on the future needs or specific needs of users.

Table 3-Metadata Example


Variable Name Data Type Data
Number ofMDEs lnt32 Number ofMDEs

Table 4-Metadata Entries


Variable Name Data Type Data

Name Length Int32 This value is the length of the metadata name.
Metadata Name String Name of the metadata.
Data Type ofMDE lnt32 Data type index ofmetadata (Table 5)
Array Size lnt32 "-I" if not an array. "O" if array is empty. Numbers greater
than 0 specify the number of elements in the array.
Count Int32 For data types "String" and "Array (String)", count= the
number of bytes in the string. For other data types, count= 1 .
MDE varies Information associated with this user defined MDE.

Table 5-Data Type Index for Metadata Entries (MDE)


Index Data Type Data Size (Bytes) Description

0 String Variable n-byte string; see Section 3.2.1 0


I Ulnt8 [ 8-bit unsigned integer
2 Ulnt32 4 32-bit unsigned integer
3 Int32 4 32-bit signed integer
4 Float32 4 32-bit binary floating point number
5 Int64 8 64-bit signed integer
6 Float64 8 64-bit binary floating point number

4.7. File Trailer:

4.7.1. A 4-byte string "@@@@" signals the end of the file.

5. KEYWORDS

5.1. Pavement images; pavement surface condition; standard data format; three-dimensional (3D)
range data; two-dimensional (2D) intensity data.

TS-5a MP 47-8 AASHTO

© 2021 by the American Association of State Highway and Transportation Officials.


All rights reserved. Duplication is a violation of applicable law.
6. REFERENCES

6.1. ASTM. E2544. Standard Terminology for Three-Dimensional (3D) Imaging Systems. ASTM
International, West Conshohocken, PA.

6.2. ASTM. E2560. Standard Specification for Data Format for Pavement Profile. ASTM
International, West Conshohocken, PA.

6.3. ISO/IEC. 10918-5, Information Technology-Digital Compression and Coding of Continuous­


Tone Still Images: JPEG File Interchange Format (JFIF). International Organization for
Standardization and International Electrotechnical Commission, Geneva, Switzerland.

6.4. FHWA. Highway Performance Monitoring System Field Manual. Office of Highway Policy
Information, Federal Highways Administration, U.S. Department of Transportation, Washington,
DC, 2016.

1 This provisional standard was first published in 2021.

TS-5a MP 47-9 AASHTO

© 2021 by the American Association of State Highway and Transportation Officials.


All rights reserved. Duplication is a violation of applicable law.

You might also like