Hello all,
I'm a new one here.
I have been doing photogrammetry since 6 years but I'm a newbee in programming....
My request here would be to automate the full process that I descibe below. Is it possible? has something like this ever been scripted? thanks in advance for your answers.
Complete photogrammetric process for agisoft metashape with Python command :
--- I need a loop of the process describe below of all folders in the specific directory ---
1) In the tool panel -> Workflow → add photos (from a folder)
Folder directory : (D:) (I will change it myself)
2) in the reference panel → Convert -> select coordinate system (Belgian Lambert 72 EPSG:31370)
3) In the tool panel -> Workflow -> align photos :
settings : → Accuracy : High
→ Key Point limit : 64.000
→ Tie point limit : 12.000
with generic preselection option checked
with reference preselection option checked
4) In the reference panel :
→ Preference Setting
→ Camera accuracy (m) : 0.1
→ Camera accuracy (deg) : 0.1
5) In the reference panel :
→ Optimize camera : fit f, fit K1, fit K2, fit K3, Fit cx, cy, Fit p1, Fit p2.
→ Fit addictional corrections
6) In the tool panel :
→ Gradual selection : reconstruction Uncertainty → select the level 24
→ Delete selection (delete points)
7) In the reference panel :
→ Optimize camera : fit f, fit K1, fit K2, fit K3, Fit cx, cy, Fit p1, Fit p2.
→ Fit addictional corrections (delete points)
In the tool panel :
→ Gradual selection : projection accuracy → select the 2,5 level
→ Delete selection (delete points)
9) In the reference panel :
→ Optimize camera : fit f, fit K1, fit K2, fit K3, Fit cx, cy, Fit p1, Fit p2.
→ Fit addictional corrections
10) In the reference panel :
→ Preference Setting
→ Tie point Accuracy (pix) : 0.2
11) In the reference panel :
→ Optimize camera : fit f, fit K1, fit K2, fit K3, Fit K4, Fit cx, cy, Fit p1, Fit p2, Fit b1, Fit b2 (all the parameters)
→ Fit addictional corrections
12) In the tool panel :
→ Gradual selection : reprojection error → select the 0.15 level
→ Delete selection (delete points)
13) In the reference panel :
→ Optimize camera : fit f, fit K1, fit K2, fit K3, Fit K4, Fit cx, cy, Fit p1, Fit p2, Fit b1, Fit b2 (all the parameters)
→ Fit addictional corrections
14) In the tool panel -> Workflow -> Build dense cloud :
settings → Quality : medium
Depth filtering → Moderate
with Calculate point colors option checked
15) In the tool panel -> Workflow -> Build DEM :
Type → geographic
Belge 1972/Belgian Lambert 72 (EPSG 31370)
Source data : Dense cloud
Interpolation : Enabled (default)
Point classes : all
with Setup boundaries unchecked
Resolution (m) by default
Total size (pix) : by default
16) In the tool panel -> Workflow -> Build Orthomosaic :
Type → by default
Surface → DEM
Blending mode : Mosaic (default)
with refine seamlines unchecked
with Enable hole filing checked
Pixel size (m) by default
with Max. dimension (pix) unchecked
Setup boundaries unchecked
Total size (pix) unchecked
Interpolation : Enabled (default)
Point classes : all
with Setup boundaries unchecked
Resolution (m) by default
Total size (pix) : by default
17) File → Export → Export Points
select ASPRS LAS (*.las)
File directory : local disk (D:) (I will change it myself)
Coordiante System : Belge 1972 / Belgian Lambert 72 (EPSG : 31370)
Shift X : x:0 - y:0 - z:0
Source data : dense cloud
Point classes : All
With Save point colors checked
With Save point nomals checked
With Save point confidence checked
With Save point classes checked
With split in blocs (m) checked : 950 x 950
With clip to boundary shapes unchecked
18) File → Export → Export Orthomosaic → Export JPEG / TIFF / PNG
Coordiante System : Belge 1972 / Belgian Lambert 72 (EPSG : 31370)
with pixel size checked with default values
with Max. dimension (pix) unchecked
with Split in blocks (pix) checked : 48469 x 48469
with Background color checked : black
with Setup boundaries unchecked
with Total size (pix) default values
with Write tile scheme unchecked
with Wrtite World file unchecked
with No image description
Tiff Compression : JPEG
JPEG quality : 99
with Write tiled TIFF checked
with Generate TIFF overviews checked
with Write alpha channel checked
with Write BigTIFF file checked
EXTENSION NAME : JPEG2000 (*.jp2)
File directory : local disk (D:) (I will change it myself)