Forum

Author Topic: Quickest way to get to a textured mesh  (Read 1798 times)

kingd0559

  • Newbie
  • *
  • Posts: 4
    • View Profile
Quickest way to get to a textured mesh
« on: June 28, 2018, 09:14:40 PM »
I'm writing a python script (new to scripting PhotoScan as well) that's goal is to take group of photos load them into a PhotoScan project and then iterate through all the steps as quickly as possible. Some of the choices for getting through quickly are obvious but for some I'm still unsure about which ones are best.

Here's my script so far with annotations on what I'm unsure of:

Code: [Select]
import PhotoScan

doc = PhotoScan.app.document
chunk = doc.chunk
# Would it go faster with or without generic preselection? What about reference preselection?
chunk.matchPhotos(accuracy=PhotoScan.LowestAccuracy, generic_preselection=True,reference_preselection=False)
chunk.alignCameras()
# Does NoFiltering speed up or slow down the process?
chunk.buildDepthMaps(quality=PhotoScan.LowestQuality, filter=PhotoScan.NoFiltering)
chunk.buildDenseCloud()
# I'm pretty sure no interpolation is faster, but not entirely.
chunk.buildModel(surface=PhotoScan.Arbitrary, interpolation=PhotoScan.DisabledInterpolation)
chunk.buildUV(mapping=PhotoScan.GenericMapping)
chunk.buildTexture(blending=PhotoScan.MosaicBlending, size=4096)
print("Script finished")
  • Would it go faster with or without generic preselection? What about reference preselection?
  • Does NoFiltering speed up or slow down the process?
  • Is no interpolation faster or slower?

Also, I almost forgot, while running this script on one of my photoscan projects, I ran into a "zero resolution" exception when attempting to build the dense cloud. Any idea on how to deal with that or handle the exception in Python?
« Last Edit: June 28, 2018, 09:58:13 PM by kingd0559 »

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14854
    • View Profile
Re: Quickest way to get to a textured mesh
« Reply #1 on: July 01, 2018, 06:20:51 PM »
Hello kingd0559,

If you do not care about the model quality, you can generate mesh directly from the sparse cloud (i.e. after completing camera alignment operations, thus skipping depth maps and dense cloud generation stages).

"Zero resolution" that you are facing most likely means that there are too few tie points for the image pairs inside the bounding box to define the overlapping images and start the depth maps generation process. Usually there are two main reasons: shifted bounding box or just too few points in the sparse cloud. In your case there are no operations that could affect the bounding box position, so it seems to be a LowestAccuracy parameter that cause the low number of tie points.
I suggest to use at least MediumAccuracy, but if you would like to reduce the processing time, then set keypoint_limit parameter to 10000 and tiepoint_limit to 2000.
Best regards,
Alexey Pasumansky,
Agisoft LLC

kingd0559

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: Quickest way to get to a textured mesh
« Reply #2 on: July 02, 2018, 06:41:55 PM »
Thank you, Alexey! Much appreciated!  :)