Forum

Author Topic: Reconstructing dense point cloud produces different results  (Read 5214 times)

ebash

  • Newbie
  • *
  • Posts: 3
    • View Profile
Reconstructing dense point cloud produces different results
« on: November 24, 2016, 05:55:06 PM »
I was batch processing a number of projects and exporting the dense point clouds for comparisons. I accidentally processed one project twice, but noticed that the two point clouds are slightly different. I have used all the same parameters, why would this be the case?

Thank you,
Eleanor

Here are some of the summary reports - showing different total number of points are slightly different min/max values:

For Cloud 1:
  number of point records:    228257316
  min x y z:                  619810.484 5618144.535 2508.453
  max x y z:                  620933.901 5619269.224 2656.403

For Cloud 2:
  number of point records:    228101650
  min x y z:                  619810.504 5618144.115 2508.432
  max x y z:                  620933.827 5619269.190 2656.352

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 15086
    • View Profile
Re: Reconstructing dense point cloud produces different results
« Reply #1 on: November 24, 2016, 06:14:58 PM »
Hello Eleanor,

In case you have processed the project from scratch both times, the results may be different due to the stochastic element used in the alignment process. So the position and size of the bounding box may be also slightly different.

Building dense cloud basing on the same alignment should give you the same results.
Best regards,
Alexey Pasumansky,
Agisoft LLC

ebash

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: Reconstructing dense point cloud produces different results
« Reply #2 on: November 25, 2016, 09:12:34 PM »
Thanks Alexey,
I have set up the project file so that the photos are pre-aligned and all the ground control is identified and the coordinates are loaded, then I run the following script:

Code: [Select]
import PhotoScan, os

path = PhotoScan.app.getExistingDirectory("Please choose the folder with .psz files:")

print("Script started")
doc = PhotoScan.app.document
doc.clear()
project_list = os.listdir(path)

for project_name in project_list:
if ".PSX" in project_name.upper():
doc.open(path + "/" + project_name)
chunk = doc.chunks[0]

        #Optimize Cameras
chunk.optimizeCameras(fit_f=True, fit_cxcy=True, fit_b1=True, fit_b2=True, fit_k1k2k3=True, fit_p1p2=True, fit_k4=False, fit_p3=False, fit_p4=False)

        #Build dense cloud
chunk.buildDenseCloud(quality=PhotoScan.HighQuality, filter=PhotoScan.AggressiveFiltering, keep_depth=False, reuse_depth=False)

        #Export dense cloud as a .laz
cloud_name=os.path.splitext(project_name)[0]
chunk.exportPoints(path + "/" + cloud_name +".laz", binary=True, precision=6, normals=True, colors=True, format='laz', projection=PhotoScan.CoordinateSystem('EPSG::26911'))

doc.save()
print("Processed project: " + project_name)

else:
continue

print("Script finished.")

So it should give the same result - or is the stochastic element in the optimization or cloud reconstruction?

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 15086
    • View Profile
Re: Reconstructing dense point cloud produces different results
« Reply #3 on: November 26, 2016, 02:26:42 PM »
Hello ebash,

I suggest to build the dense cloud basing on the same camera alignment with the same bounding box position and size, if you wish to keep the same starting conditions.
Best regards,
Alexey Pasumansky,
Agisoft LLC