Forum

Author Topic: Exporitng dense point could confidence as ASCII PTS  (Read 1538 times)

3DWinter

  • Full Member
  • ***
  • Posts: 103
    • View Profile
Exporitng dense point could confidence as ASCII PTS
« on: July 15, 2022, 12:46:51 AM »
Hello Agisoft support,
I am trying to explore the dense point cloud confidence values that are calculated and can be extracted in .LAS. Unfortunately "Save Point Confidence" is grayed when saving the points as ASCI PTS. Is there a slick way in Metashape around this obstacle? Alternatively, maybe with the Python API  "Save Point Confidence" can be exported as ASCI PTS? 
Thanks

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14854
    • View Profile
Re: Exporitng dense point could confidence as ASCII PTS
« Reply #1 on: July 21, 2022, 06:56:17 PM »
Hello 3DWinter,

As a possible workaround, you can export points to PLY format (disable binary encoding on export) and then use custom script to just table editor to "convert" PLY to PTS - basically you just need to replace PLY header with the total number of points in the file. In the example below the latter column in PLY is confidence value, in PTS - the intensity value goes before RGB color values:
Quote from: PLY
ply
format ascii 1.0
element vertex 9086617     
property double x
property double y
property double z
property uchar red
property uchar green
property uchar blue
property uchar confidence
end_header
12.36442286 28.09524294 620.462 74 66 24 2
12.36442646 28.09524462 620.488 45 43 6 3
12.36442283 28.09524278 620.958 75 68 20 2
12.36441781 28.09524155 620.463 57 53 14 1
12.36442053 28.09523936 620.479 59 48 7 4
12.36442238 28.09524254 620.959 81 72 23 3

Quote from: PTS
9086617     
12.36442286 28.09524294 620.462 63 74 66 24
12.36442646 28.09524462 620.488 39 45 43 6
12.36442283 28.09524278 620.958 64 75 68 20
12.36441781 28.09524155 620.463 49 57 53 14
12.36442053 28.09523936 620.479 46 59 48 7
12.36442238 28.09524254 620.959 69 81 72 23

If you use a table editor, you can calculate the intensity via (0.2126*R + 0.7152*G + 0.0722*B) formula.
Best regards,
Alexey Pasumansky,
Agisoft LLC