1 # Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved.
3 @page dwx_metadata_ingestion_tool Metadata Ingestion Tool
7 This tool is available on the x86 Host System.
9 This is an executable which takes a binary sensor file as input, extracts the sensor metadata and outputs the result to a JSON file.
11 The tool currently supports Camera, CAN, GPS, IMU and Lidar binary file metadata extraction.
14 The input must be a DriveWorks-supported binary sensor file: *.raw, *.lraw, *.xraw or *.bin.
17 The output JSON file is filled with the sensor metadata. The output format of the metadata is described below for each sensor type.
20 cd install/tools/ingestion
21 ./ingest_metadata --input=[path to input sensor file]
22 --output=[path to output JSON file]
27 - **codec** : *string*, "can"
28 - **fileVersion** : *int32_t*, file version of the recording
31 - **codec** : *string*, codec of the GPS device
32 - **fileVersion** : *int32_t*, file version of the recording
35 - **codec** : *string*, codec of the IMU device
36 - **fileVersion** : *int32_t*, file version of the recording
38 ##### Video - Raw formats
39 - **codec** : *string*, { "image/dwraw", "image/dwlraw", "image/dwlraw_v2", "image/dwxraw" }
40 - **fileVersion** : *int32_t*, file version of the recording
41 - **codecData** : *string*, base64-encoding of a JSON string representing codec metadata
42 - **video** : video properties
43 + **cameraType** : *string*, camera device type
44 + **revision** : *uint8_t*, camera revision number
45 + **frameRate** : *uint32_t*, frame rate
46 + **dimensions** : video dimensions
47 - **x** : *uint32_t*, width
48 - **y** : *uint32_t*, height
49 + **frameRegion** : frame region
50 - **origin** : origin of the frame
51 + **x** : *uint32_t*, x-coordinate of origin
52 + **y** : *uint32_t*, y-coordinate of origin
53 - **size** : size of the frame
54 + **x** : *uint32_t*, width of the frame
55 + **y** : *uint32_t*, height of the frame
56 + **pixelFormat** : *string*, pixel format, e.g. "RCCB"
57 + **pixelType** : *string*, e.g. "int16"
58 - **SIPLInfo** : SIPL header info (for v10 files and higher)
59 + **cameraModuleName** : *string*
60 + **cameraModuleDescription** : *string*
61 + **sensorID** : *uint32_t*
62 + **sensorName** : *string*
63 + **sensorDescription** : *string*
64 - **xrawMetadata** : XRAW header info (for xraw videos only)
65 + **packedFormat** : *uint32_t*
66 + **packedWidth** : *uint32_t*
67 + **packedHeight** : *uint32_t*
68 + **packedGamma** : *float64_t*
69 + **packedCodec** : *uint32_t*
70 + **cameraType** : *uint32_t*
73 - **codec** : *string*, "image/mp4"
74 - **video** : mp4 properties
75 + **frameSize** : the frame dimensions
76 - **x** : *uint32_t*, width
77 - **y** : *uint32_t*, height
78 + **mdatSectionSize** : *size_t*
79 + **maxSampleSize** : *size_t*
80 + **frameRate** : *float32_t*
81 + **frameCount** : *size_t*
82 + **syncEntriesCount** : *size_t*
83 + **startTimestamp** : *int64_t*
84 + **endTimestamp** : *int64_t*
86 - **codec** : *uint32_t*, 4 means H264
87 - **chromaFormat** : *uint32_t*
88 - **bitDepthLumaMinus8** : *uint8_t*
89 - **codedWidth** : *uint32_t*
90 - **codedHeight** : *uint32_t*
91 - **displayWidth** : *uint32_t*
92 - **displayHeight** : *uint32_t*
95 - **codec** : *string*, name of the Lidar device
96 - **fileVersion** : *int32_t*, file version of the recording
97 - **codecData** : *string*, base64-string encoding of the bytes of device-specific metadata/calibration parameters; explained below
98 - **lidar** : lidar properties
99 + **frameRate** : *uint32_t*, spins per second
100 + **pointsPerFrame** : *uint32_t*, points per spin
101 + **packetsPerFrame** : *uint32_t*, packets per spin
103 Bytes encoded in **codecData**:
105 1. for Ouster devices:
106 - encoding version: 4 bytes, *uint32_t*
107 - packets per spin: 4 bytes, *uint32_t*
108 - ticks per azimuth: 4 bytes, *uint32_t*
109 - beam angles: 2080 bytes, *Lidar::beamAngles*
110 2. for Velodyne devices:
111 - encoding version: 4 bytes, *uint32_t*
112 - packets per spin: 4 bytes, *uint32_t*
113 - return mode: 4 bytes, *uint32_t*
114 - calibration parameters: 64 X 44 bytes, *VelodyneCalibrationParams[64]*
116 The byte ordering for each of the data encoded above is little endian.