Forum

Author Topic: Import Laserscan data -registration lost  (Read 4148 times)

Paulo

  • Hero Member
  • *****
  • Posts: 638
    • View Profile
Re: Import Laserscan data -registration lost
« Reply #45 on: March 23, 2021, 07:05:18 PM »
Dieter,

I am really confused here! I did the same as you, import scan, run quick layout (without triangulating) and generated a mesh with medium quality. I do not get gap in wall going down in hole. Scratch my head  :o..

Post Script: reading Alexey`s post, now I understand why I get good  results compared to you, Dieter. My edited quick_layout script just commented out the chunk.triangulatePoints() line but still has a section where it checks if sensor has depth. If True then it calls normalize_chunk_scale which sets transform scale to 1 as pointed out by Alexey.

Eureka! with determination we have moved the learning clock along!

Thanks all for your patience.
« Last Edit: March 24, 2021, 01:16:02 PM by Paulo »
Best Regards,

Paul Pelletier

Paulo

  • Hero Member
  • *****
  • Posts: 638
    • View Profile
Re: Import Laserscan data -registration lost
« Reply #46 on: March 24, 2021, 01:28:30 PM »
Hi Alexey,

me again, trying to get a better understanding of different parts of this issue and enjoying it! So I ran again  my edited quick layout on project (just with triangulatePoints line commented out). And as you said the normalize chunk scale fixes the scale for Laser Scan Depth but shifts the whole point_cloud (see left side of attachment with Marker 1 shifted from wall). But after running triangulatePoints(), it does reset the point_cloud to its correct position (see right side).

So a quick layout including normalize_chunk_scale and chunk.triangulatePoints()  does not affect the point_cloud and thus no need to recalculate the coordinates of tie points...

Am I right in this ?
Best Regards,

Paul Pelletier

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 12851
    • View Profile
Re: Import Laserscan data -registration lost
« Reply #47 on: March 25, 2021, 06:45:05 PM »
Hello Paulo,

Please check, if the attached version of quick-layout script works in any case.

It includes the normalization of tie point coordinates and bounding box location.
Best regards,
Alexey Pasumansky,
Agisoft LLC

Paulo

  • Hero Member
  • *****
  • Posts: 638
    • View Profile
Re: Import Laserscan data -registration lost
« Reply #48 on: March 25, 2021, 11:25:49 PM »
Hi Alexey,

Thanks for this update. I see that this script does now scale the point cloud within normalize_chunk_scale without having to use triangulatePoints as in my modified script. And it does normaize the Bounding Box but the modified script did a chunk resetRegion after triangulation which is equivalent. So result is the same for both scripts. Any advantage, in using  one or the other?

Also, please note that this script in estimate_rotation_matrices sets the reference orientation of last camera to previous. So this falses the orientation of the loaded Laser Scan. See screen copy.

This problem was fixed for quick layout in github https://github.com/agisoft-llc/metashape-scripts/commit/8955104c7a72582dbf8358019ece16d96cc2d74e by changing:
Code: [Select]
group_cameras[-1].reference.rotation = group_cameras[-2].reference.rotation
with:
Code: [Select]
if group_cameras[-1].reference.rotation is None and group_cameras[-1].reference.location is not None:
group_cameras[-1].reference.rotation = group_cameras[-2].reference.rotation
« Last Edit: March 26, 2021, 03:03:11 PM by Paulo »
Best Regards,

Paul Pelletier

Dieter

  • Full Member
  • ***
  • Posts: 111
    • View Profile
Re: Import Laserscan data -registration lost
« Reply #49 on: March 28, 2021, 05:20:31 PM »
I've lost track of the scripts a little now.

Is there now a final script to download in which the error Paulo mentioned in the last post does not appear?

Dieter

Paulo

  • Hero Member
  • *****
  • Posts: 638
    • View Profile
Re: Import Laserscan data -registration lost
« Reply #50 on: March 28, 2021, 05:30:55 PM »
I've lost track of the scripts a little now.

Is there now a final script to download in which the error Paulo mentioned in the last post does not appear?

Dieter
Dieter,
as far as i am concerned the following script quick_layout_normalize_tls modified to correct the last camera rotation error does the same as quick_layout script I already posted and reposting here.
One uses scaling of point cloud to correct for original chunk scale not being 1 and the other triangulatePoints to fix same issue.

So you could use any of the 2 with same result, I think. Maybe, Alexey can confirm.

« Last Edit: March 28, 2021, 06:56:21 PM by Paulo »
Best Regards,

Paul Pelletier

Dieter

  • Full Member
  • ***
  • Posts: 111
    • View Profile
Re: Import Laserscan data -registration lost
« Reply #51 on: April 06, 2021, 06:41:05 PM »

Unfortunately I have to find out that none of the scripts work properly. I have now tested "quick_layout_normalize_tls.py" from Alexey and the two scripts from Paulo. In doing so, I have already read coordinate-oriented scans into an existing project with photos. Then I tried all the scripts with the following result:

The rotation of the scans is incorrect. If I tap existing points from the photos in the scans, I have deviations of several meters.

The problem must be manageable somehow.

Unfortunately, I don't have enough matches between scans and photos to really align the scans with them.

I urgently ask for help here, otherwise my project will be invalid and I will have to go to the field service again to complete the scans.

Of course I want to prevent that.

Dieter

Paulo

  • Hero Member
  • *****
  • Posts: 638
    • View Profile
Re: Import Laserscan data -registration lost
« Reply #52 on: April 06, 2021, 08:07:44 PM »
Hello Dieter,

this is confusing. For the latest TLS you have tested could you confirm that for imported TLS in MS then that its camera.sensor.mata has 'has_depth' attribute equal to True and camera.sensor.antenna.rotation is ((90,0,-90)) as in following screen capture.

Or better share the tif of latest TLS....
« Last Edit: April 06, 2021, 08:13:09 PM by Paulo »
Best Regards,

Paul Pelletier

Dieter

  • Full Member
  • ***
  • Posts: 111
    • View Profile
Re: Import Laserscan data -registration lost
« Reply #53 on: April 07, 2021, 09:47:53 AM »
Hello Paul,

how can I see your displayed values ​​on the screen? What do I have to enter / set?


I have now found out the following:

Project 1: Georeferencing was done via GCP. The scans match the coordinates.

Project 2:
Georeferencing was carried out using drone flights and GPS. The scans match the coordinates.

Merge project 1 and 2. The images and coordinates match, all control points from GCP and image coordinates match. The scans do NOT match the coordinates and are twisted.

Dieter

Paulo

  • Hero Member
  • *****
  • Posts: 638
    • View Profile
Re: Import Laserscan data -registration lost
« Reply #54 on: April 07, 2021, 10:55:43 AM »
Hi Dieter,

you could run the attached script in each project to print out for each TLS:

- its name;
- X Y Z Yaw Pitch Roll from E57 pose;
- sensor metadata (has depth and has intensity attributes);
- sensor antenna rotation(should be 90.000 0.000 -90.000)

See example capture screen

I would recommend that for each project, once you import the TLSs, only run one of the scripts I sent u, not the one Alexey provided as this has a bug that falses the orientation of last TLS...
« Last Edit: April 07, 2021, 11:08:36 AM by Paulo »
Best Regards,

Paul Pelletier

Dieter

  • Full Member
  • ***
  • Posts: 111
    • View Profile
Re: Import Laserscan data -registration lost
« Reply #55 on: April 07, 2021, 10:57:47 AM »
I found my mistake  >:(

In one of the projects, the reference settings were set instead of Yaw, Nick, Roll -> Alpha, Nu, Kappa before merging.

I have no idea how that got there.

What the heck, thank you very much for your help, now it seems to be working.

Dieter