Agisoft Metashape

Agisoft Metashape => Python and Java API => Topic started by: Wishgranter on September 03, 2012, 12:05:59 AM

Title: command line parameters
Post by: Wishgranter on September 03, 2012, 12:05:59 AM
Hello all, can someone give me hint how im can run pscan on folder with photos from commandline?

align - HIGH
Modely type: ARBITRARY
Geometry: SMOOTH
target Q: HIGH
Face count: 0
Title: Re: command line parameters
Post by: Alexey Pasumansky on September 03, 2012, 03:57:30 PM
Hello Wishgranter,

Please contact us about the details of your project that requires command line support.
Title: Re: command line parameters
Post by: ju523m on September 04, 2012, 11:40:53 PM
Hi,

it would be great to have commandline access to the complete functionality, or  - as was possible up to version 0.8.3 - to run Photoscan python scripts from the commandline. I was very disappointed when this option was no longer implemented from version 0.8.4 onwards, especially because there was no reason given, why this very helpful feature was cancelled from Pro-Version.


Cheers
Title: Re: command line parameters
Post by: scanlab.ca on September 05, 2012, 02:51:33 AM
Or better yet, run a progressive loading of images sourced from a location on a disk with an automatic output of the latest geo. :)
Title: Re: command line parameters
Post by: Alexey Pasumansky on September 06, 2012, 11:11:27 AM
can someone give me hint how im can run pscan on folder with photos from commandline?

align - HIGH
Modely type: ARBITRARY
Geometry: SMOOTH
target Q: HIGH
Face count: 0


Sample script file for this task (works in PhotoScan 0.9.0):


Code: [Select]
import PhotoScan
import os

doc = PhotoScan.Document()

path="D:/Data/Project/Images/"  #path to the image folder

chunk = PhotoScan.Chunk()
chunk.label = "New Chunk"

doc.chunks.add(chunk)

photos_list = os.listdir(path)

for photo_name in photo_list:     #adding all files from the folder
      chunk.photos.add(path + "/" + photo_name)

#Align Photos
chunk.matchPhotos(accuracy = "high", preselection="disabled", filter_mask=False, point_limit=40000)
chunk.alignPhotos()   

#Build Geometry
chunk.buildDepth(quality="high", p1=40, p2=2000, gpu_mask=1, cpu_cores_inactive=1)
chunk.buildModel(object="arbitrary", geometry="smooth", faces=0, filter_threshold=0, hole_threshold=10)   

doc.save("D:/Data/Project/Processing/proj1.psz")
Title: Re: command line parameters
Post by: Wishgranter on September 06, 2012, 11:47:44 AM
Thanx.... will report in few days.....