Kitware / kwiver

Pulls Together Computer Vision Algorithms into Highly-Modular Run-Time Configurable Systems
Other
189 stars 83 forks source link

Prettify dump-klv's printed output #1828

Closed daniel-riehm closed 5 months ago

daniel-riehm commented 5 months ago

Sample frame of original output:

========== Read frame 48 (index 48) ==========

---------------- Metadata from: ts(f: 48, t: 1568233 (Wed Dec 31 18:00:01 1969), d: 0)
Metadata item: Origin of Metadata <std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >>: KLV
Metadata item: Unix Timestamp (microseconds) <unsigned long>: 1221515220926000
Metadata item: Unix Timestamp Source <std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >>: klv
Metadata item: Platform Heading Angle (degrees) <double>: -102.283
Metadata item: Platform Pitch Angle (degrees) <double>: 0.664673
Metadata item: Platform Roll Angle (degrees) <double>: 1.36231
Metadata item: Platform Designation <std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >>: ABCD
Metadata item: Image Width <unsigned long>: 720
Metadata item: Image Height <unsigned long>: 480
Metadata item: Index of Metadata Stream <int>: 1
Metadata item: Is Metadata Stream Synchronous <bool>: 1
Metadata item: Video URI <std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >>: ../../src/test_data/videos/aphill_short.ts
Metadata item: Is Key Frame <bool>: 0
Metadata item: Frame Number <unsigned long>: 48
Metadata item: Video Relative Timestamp <unsigned long>: 1568233
Metadata item: Frame Rate <double>: 29.97
Metadata item: Video Bitrate <unsigned long>: 4000000
Metadata item: Video Compression Type <std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >>: H.264
Metadata item: Video Compression Profile <std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >>: Main
Metadata item: Video Compression Level <std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >>: 4.1
Metadata item: Sensor Geodetic Location (lon/lat/alt) <kwiver::vital::geo_point>: geo_point.[ -77.367953, 38.252153, 1054.4000244140625 ] @ 4326 (67 65 6F 5F 70 6F 69 6E 74 0A 5B 20 2D 37 37 2E 33 36 37 39 35 33 2C 20 33 38 2E 32 35 32 31 35 33 2C 20 31 30 35 34 2E 34 30 30 30 32 34 34 31 34 30 36 32 35 20 5D 20 40 20 34 33 32 36)
Metadata item: Sensor Horizonal Field of View (degrees) <double>: 0.8
Metadata item: Sensor Vertical Field of View (degrees) <double>: 0.6
Metadata item: Slant Range (meters) <double>: 1757.34
Metadata item: Geodetic Frame Center (lon/lat/alt) <kwiver::vital::geo_point>: geo_point.[ -77.354285043062731, 38.245504947946507, nan ] @ 4326 (67 65 6F 5F 70 6F 69 6E 74 0A 5B 20 2D 37 37 2E 33 35 34 32 38 35 30 34 33 30 36 32 37 33 31 2C 20 33 38 2E 32 34 35 35 30 34 39 34 37 39 34 36 35 30 37 2C 20 6E 61 6E 20 5D 20 40 20 34 33 32 36)
Metadata item: Corner Points (lon/lat) <kwiver::vital::geo_polygon>: { -77.354065535034877 / 38.245531895246195, -77.354200990222651 / 38.245336397256558, -77.354501635235408 / 38.245478358183938, -77.354367882964794 / 38.245671065466951 } @ 4326
Metadata item: Angle to North (degrees) <double>: 123.128
Metadata item: Sensor Obliquity Angle (degrees) <double>: -36.8698

Sample frame of new output:

Frame #     48 @ 1.568233 sec
----------------------------------------------------------------
Metadata packet #1
--------------------------------
Origin of Metadata: KLV
Unix Timestamp (microseconds): 1221515220926000
Unix Timestamp Source: klv
Platform Heading Angle (degrees): -102.283
Platform Pitch Angle (degrees): 0.664673
Platform Roll Angle (degrees): 1.36231
Platform Designation: ABCD
Image Width: 720
Image Height: 480
Index of Metadata Stream: 1
Is Metadata Stream Synchronous: true
Video URI: ../../src/test_data/videos/aphill_short.ts
Is Key Frame: false
Frame Number: 48
Video Relative Timestamp: 1568233
Frame Rate: 29.97
Video Bitrate: 4000000
Video Compression Type: H.264
Video Compression Profile: Main
Video Compression Level: 4.1
Sensor Geodetic Location (lon/lat/alt): [ -77.367953, 38.252153, 1054.4000244140625 ] @ 4326
Sensor Horizonal Field of View (degrees): 0.8
Sensor Vertical Field of View (degrees): 0.6
Slant Range (meters): 1757.34
Geodetic Frame Center (lon/lat/alt): [ -77.354285043062731, 38.245504947946507, nan ] @ 4326
Corner Points (lon/lat): { -77.354065535034877 / 38.245531895246195, -77.354200990222651 / 38.245336397256558, -77.354501635235408 / 38.245478358183938, -77.354367882964794 / 38.245671065466951 } @ 4326
Angle to North (degrees): 123.128
Sensor Obliquity Angle (degrees): -36.8698

Suggestions for further formatting tweaks are welcome.

mleotta commented 5 months ago

I have not reviewed the code, but from the sample output it looks like a big improvement.