Forum

Author Topic: Dense cloud classes to vertex colors  (Read 1468 times)

stephan

  • Full Member
  • ***
  • Posts: 129
    • View Profile
Dense cloud classes to vertex colors
« on: December 13, 2021, 05:10:27 PM »
Hi guys,
I realise this workflow may sound a little exotic, but here goes... I need to find a way to convert the "classes" of my dense clouds to vertex colors of my mesh, or at least colorize my mesh based on these classes.

On way to do this would be to export the mesh, export the dense point cloud in segments based on classes, calculate distances and colorize based on proximity... but this is clunky and slow, and I was wondering whether someone might have a workflow to do this directly in Metashape...?

Cheers,

stephan

  • Full Member
  • ***
  • Posts: 129
    • View Profile
Re: Dense cloud classes to vertex colors
« Reply #1 on: December 14, 2021, 12:59:14 PM »
To clarify: what I am looking for is something analogue to "colorize model" with source data = Dense Cloud, but using "Dense Cloud Classes" instead.


stephan

  • Full Member
  • ***
  • Posts: 129
    • View Profile
Re: Dense cloud classes to vertex colors
« Reply #2 on: December 15, 2021, 05:22:05 PM »
OK I guess this is a pretty singular request  ;D

I will work on my own implementation in open3D :)

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14813
    • View Profile
Re: Dense cloud classes to vertex colors
« Reply #3 on: December 22, 2021, 01:53:22 PM »
Hello stephan,

If we have an idea, how to solve this task, I'll post it here.
Best regards,
Alexey Pasumansky,
Agisoft LLC

stephan

  • Full Member
  • ***
  • Posts: 129
    • View Profile
Re: Dense cloud classes to vertex colors
« Reply #4 on: December 22, 2021, 04:30:04 PM »
Thanks Alexey!

I have a solution actually for my purposes... the code is really messy for now but and in different files but these are the steps:
1. classify points
2. export point classes as separate PLY files
3. load PLY files in open3D and create vector field
4. replace each point with geometry (cube or sphere) at same coordinates in vector field, preserving color
5. merge vertices, repeat for each class and merge as single OBJ file

This is not 100% perfect but fulfills my needs of exporting the point cloud classes as colored segmentation maps!