Skip to content

Binary File Format Structure

mika edited this page Oct 8, 2019 · 31 revisions

Default custom .bin data (not brekel format or CloudCompare .bin)

EXAMPLE

01 B5 E5 26 00 01 30 4C
2A 40 57 5B D9 3F 7D 3F
9D 3F 00 00 80 3F 00 00
80 3F 00 00 80 3F AA 82
69 40 DC 46 13 40 1E A7
C8 3F FC FB 7B 3F F8 F7

HEADER 5 bytes

  • byte version (0 or 1 for normal point cloud data, 0 is the original first version, use 1 for now)
  • int32 totalPoints (total amount of points in this file
  • bool containsRGB (true or false, if RGB data is included

DATA

  • float x
  • float y
  • float z
  • float R (optional)
  • float G (optional)
  • float B (optional)
  • (repeat for all points)

Custom (v2) .ucpc binary format

EXAMPLE

75 63 70 63 02 01 61 e4
20 00 e3 53 b9 c0 78 b7
d2 bd 67 66 14 c1 4f 58
bd 40 7e 00 82 3e 38 be
03 41 a7 22 b6 c0 8d 62
13 d0 0e 3f 94 08 f1 e4

HEADER 34 Bytes

  • string magic_string : 4 bytes : value = "ucpc"
  • bool binary_version : 1 byte : value = 2
  • bool contains_rgb : 1 byte
  • int pointcount : 4 bytes
  • float bounds_min_x : 4 bytes
  • float bounds_min_y : 4 bytes
  • float bounds_min_z : 4 bytes
  • float bounds_max_x : 4 bytes
  • float bounds_max_y : 4 bytes
  • float bounds_max_z : 4 bytes

DATA

  • float x
  • float y
  • float z (rest of the XYZ values one by one)
  • float R (optional)
  • float G (optional)
  • float B (optional) (rest of the RGB values one by one)

BREKEL OUTPUT .BIN FORMAT

HEADER

  • byte version (2 for brekel data)
  • int32 numberOfFrames (how many frames of data)
  • int32 frameRate (not used)
  • bool containsRGB (true or false, if RGB data is included)
  • int32[] pointsPerFrame (array of how many points for each frame)
  • int64[] binaryPositionForEachFrame (array of indexes to each frame data position in file)

DATA

  • float x
  • float y
  • float z
  • float R (optional)
  • float G (optional)
  • float B (optional)
  • (repeat for all points for each frame)

TOOLS