Forum

Author Topic: Hovermap SLAM normals  (Read 7502 times)

Chani

  • Newbie
  • *
  • Posts: 25
    • View Profile
Hovermap SLAM normals
« on: November 01, 2022, 05:53:38 PM »
Hi, I have some SLAM data that I have captured using Emesent Hovermap and I am trying to take them into Metashape so that I can colour the data using a set of spherical images I have captured at the same time. The problem I am having is that the SLAM data does not have normals and Metashape calculates them with a LOT of inverted normals. This is a capture of an oil and gas facility so there are a lot of pipes, walls and other multi-shape objects.

I have created a chunk and imported our spherical images and aligned them perfectly, then I take the SLAM data in and want to colour it based on the following tutorial: https://agisoft.freshdesk.com/support/solutions/articles/31000157888-colorization-of-the-external-dense-cloud-lidar-based-on-images

The colourisation process works great, it is just the SLAM data that is proving a real headache to generate correct normals for.

I have tried to up the setting to over 200 on 'Generic' during import but this does not help too much. I noticed that there is an option to use a trajectory file (which I have from the Hovermap scan). When I select this option, it just appears to create the normals from the origin of the scan and not along the trajectory. I have tried to strip the trajectory xyz file so that it only contains the fields mentioned in the importer (time,x,y,z) but again, this does not help. I'm guessing the trajectory file must be a specific file and not just any trajectory file.


Can anyone offer any advice on how to get the point normals created correctly or a script that would flip all inverted (black) normals in Metashape? It is seriously frustrating. I have tried to create normals in Cloudcompare but that is also all out of whack. :-\

e.spiridonova

  • Agisoft Technical Support
  • Newbie
  • *****
  • Posts: 38
    • View Profile
Re: Hovermap SLAM normals
« Reply #1 on: November 01, 2022, 06:25:10 PM »
Dear Chani,

Could you please send an example of your data set (point cloud and trajectory file) to support@agisoft.com?
Best regards,
Elizaveta Spiridonova,
Agisoft LLC

Chani

  • Newbie
  • *
  • Posts: 25
    • View Profile
Re: Hovermap SLAM normals
« Reply #2 on: November 01, 2022, 06:46:24 PM »
Dear Chani,

Could you please send an example of your data set (point cloud and trajectory file) to support@agisoft.com?

I have sent the data by WeTransfer. You should have a link in your email (might be in spam folder).

e.spiridonova

  • Agisoft Technical Support
  • Newbie
  • *****
  • Posts: 38
    • View Profile
Re: Hovermap SLAM normals
« Reply #3 on: November 02, 2022, 02:02:28 PM »
Dear Chani,
Thank you, we downloaded your data.
Best regards,
Elizaveta Spiridonova,
Agisoft LLC

Chani

  • Newbie
  • *
  • Posts: 25
    • View Profile
Re: Hovermap SLAM normals
« Reply #4 on: November 02, 2022, 03:49:50 PM »
Dear Chani,
Thank you, we downloaded your data.

Thank you, Elizaveta. I await your response to see if anything can be done to import/calculate clean normals.


e.spiridonova

  • Agisoft Technical Support
  • Newbie
  • *****
  • Posts: 38
    • View Profile
Re: Hovermap SLAM normals
« Reply #5 on: November 03, 2022, 05:59:24 PM »
Dear Chani,
We analyzed your data and imported the trajectory file into the project and the normals are calculated correctly. 

Unfortunately, the *.xyz format for normals is not supported now, and before using it, you need to re-save it to the *.txt format and then use the *.txt file.  Also, the first column in the file cannot be excluded through the GUI of the program (there is a value of 0), you need to delete this column if you want to import the file through the GUI and specify the following parameters (see screen 1.png).

Or we can only suggest resaving the file in *txt format without deleting the first column in the file and using the command via Python for import point cloud.
import Metashape
Metashape.app.document.chunk.importPoints("/path/to/laz_file.laz", use_trajectory=True, traj_path="/path/to/traj.xyz.txt", traj_skip_rows=1, traj_columns="0txyz")

where:
/path/to/laz_file.laz - path to the laz file with the cloud
/path/to/traj.xyz.txt - the path to the txt file with the trajectory
traj_skip_rows=1 - there is 0 in the first column of the trajectory file, so we added the option to skip this column in the script.


Then we can offer the following workflow:
- re-save the file with the trajectory in *txt format;
- open Console pane (select View > Console) and use the command:
import Metashape
Metashape.app.document.chunk.importPoints("/path/to/laz_file.laz", use_trajectory=True, traj_path="/path/to/traj.xyz.txt", traj_skip_rows=1, traj_columns="0txyz")


To check whether the trajectory file was taken into account when importing, you will see similar lines as in screenshot 2.png
Best regards,
Elizaveta Spiridonova,
Agisoft LLC

Chani

  • Newbie
  • *
  • Posts: 25
    • View Profile
Re: Hovermap SLAM normals
« Reply #6 on: November 06, 2022, 11:31:08 AM »
Elizaveta, many thanks for this fix. It definitely appears to work now and most of my normals are the correct way. The ones that are still incorrect might be due to some other factor in how they are created but I can accept that.

This has helped a great deal in dealing with these data sets.

Thank you very much for taking the time to assist and resolve this issue.