系统:win10 (Linux和Mac请参见:https://agisoft.freshdesk.com/support/solutions/articles/31000133141-how-to-run-the-script-in-headless-mode-from-the-command-line)
环境配置:将metashape.exe所在目录添加到系统环境变量,这样无论在哪个路径下面都可以直接调用metashape.exe了
然后win+R 输入cmd打开命令行,输入metashape.exe,可以看到metashape主界面会弹出来,这样就说明添加成功了。
在程序外执行python脚本的方式如下:
打开命令行,进入脚本所在目录(否则后面就得输入脚本的绝对路径),输入:
metashape.exe -r [your python script] [args]