Agisoft Metashape

Agisoft Metashape => Bug Reports => Topic started by: Alice on January 19, 2018, 06:18:04 PM

Title: Problem with saving processing parameters while using 'Batch process' .xml files
Post by: Alice on January 19, 2018, 06:18:04 PM
Hello,

I've just upgraded my Agisoft Professional to v1.4.0 build 5650. 

While using 'Batch process' option (creating steps of my workflow (Align,Build Mesh,Export...) as well as setting desired processing parameters (f.e Resolution, Projection...)) it was impossbie to use the created .xml file which was saved for the future projects.

So basically, the software reads in the .xml, remembers the steps of my workflow as presented on the attachment, but it doesn't 'remember' my processing paremeters and always change them to default.

How could I fix this problem? The .xml file I have created for previous version of the program doesn't work either.

Thanks in advance!

Alice















Title: Re: Problem with saving processing parameters while using 'Batch process' .xml files
Post by: Alexey Pasumansky on January 19, 2018, 06:31:03 PM
Hello Alice,

We are already working on the batch export/import issues, some parameters are ignored upon read/write. I think that the fix will be included in 1.4.1 release.
Title: Cannot save Batch Process Parameters
Post by: rexsham on January 20, 2018, 01:46:49 AM
Version 1.4.0 Build 5650

When I use add Align Photos, Build Dense Cloud, Build DEM in batch process dialog box and press "Save"
The xml generated do not contain any parameters that I set in the Batch process dialog box.

Example when you try to set projection of DEM to be WGS84, it will not save all the paramters into the xml.
Like: <param name="projection" value=""/>   it is alwasy empty.

In my test, only "Export Orthomosaic" function can save the parameters that I set in the dialog box to the xml.


<?xml version="1.0" encoding="UTF-8"?>
<batchjobs version="1.2.0" save_project="1">
  <job name="AlignPhotos" target="all">
    <param name="downscale" value="0"/>
  </job>
  <job name="BuildDenseCloud" target="all"/>
  <job name="BuildDem" target="all">
    <param name="projection" value=""/>
  </job>
  <job name="BuildOrthomosaic" target="all">
    <param name="cull_faces" value="1"/>
    <param name="ortho_surface" value=""/>
    <param name="projection" value=""/>
  </job>
  <job name="ExportOrthomosaic" target="all">
    <param name="image_format" value=""/>
    <param name="path" value="//192.168.1.177/fastraid/speedtest.tif"/>
    <param name="projection" value=""/>
    <param name="tiff_big" value="1"/>
    <param name="tile_height" value="4096"/>
    <param name="tile_width" value="4096"/>
    <param name="write_kml" value="1"/>
  </job>
</batchjobs>

Title: Re: Problem with saving processing parameters while using 'Batch process' .xml files
Post by: Alice on January 22, 2018, 12:24:21 PM
Hello,

The .xml files are showing exactly the same behaviour - values are empty. Even though, I have tried to 'hack' the code by typing numerical values to the code as it was written in my old .xml. Unfortunately, it doesn't help at all.


When do you expect the new version to be released?
Title: Re: Problem with saving processing parameters while using 'Batch process' .xml files
Post by: Alexey Pasumansky on January 22, 2018, 01:31:00 PM
Hello,

Version 1.4.1 that includes the batch processing export/import fix can be expected in a couple of weeks.
Title: Re: Problem with saving processing parameters while using 'Batch process' .xml files
Post by: Alice on January 22, 2018, 02:25:16 PM
Thanks a lot for your answer Alexey!
Title: Re: Problem with saving processing parameters while using 'Batch process' .xml files
Post by: willfig on February 22, 2018, 03:58:25 AM
Hello,

Version 1.4.1 that includes the batch processing export/import fix can be expected in a couple of weeks.


Just wondering if you had any update on when 1.4.1 was going to be released?
Title: Re: Problem with saving processing parameters while using 'Batch process' .xml files
Post by: Alexey Pasumansky on February 26, 2018, 01:50:55 PM
Hello,

Version 1.4.1 is already available from the Downloads section:
http://www.agisoft.com/downloads/installer/
Title: Re: Problem with saving processing parameters while using 'Batch process' .xml files
Post by: Hamid Ghayour on August 31, 2020, 05:10:05 AM
Hello Alexey,
.
I'm using version 1.6.3 and it seems there are still some minor issues with saving a FULL structured .XML file during EXPORT DEM / ORTHOMOSAIC from batch processing dialog. I try to set  a specific region with min/max coordinates for X and Y, but I can't see them in the saved .xml file under <region> class. Of course there are many other options neglected in .xml for Export Orthomosaic settings e.g. JPEG compression value, Generate Tiff Overview, Write alpha channel, etc.

By the way, May I ask you to explain what the purpose of these options in saved .xml file is?
   <surface>0</surface>
   <radius>1</radius>
Title: Re: Problem with saving processing parameters while using 'Batch process' .xml files
Post by: Alexey Pasumansky on September 11, 2020, 01:01:28 PM
Hello Hamid,

Thank you for reporting.

We will check the batch XML export for the Export DEM/Orthomosaic operations.

As for the <surface> and <radius> sections, to which task they are referring to?
Title: Re: Problem with saving processing parameters while using 'Batch process' .xml files
Post by: Hamid Ghayour on September 19, 2020, 01:49:00 AM
Thanks Alexey,

In saved .xml file, I see <surface> and <radius> sections, but I'm not sure what these items do for me during exporting dem and orthomosaic.
Title: Re: Problem with saving processing parameters while using 'Batch process' .xml files
Post by: Alexey Pasumansky on September 19, 2020, 01:23:12 PM
Hello Hamid,

I am not observing these sections when exporting XML with build and export tasks for DEM and orthomosaic from the 1.6.4 release version.

The reported issues with Compression, Region and no-data sections should be fixed in the 1.6.5 version update.
Title: Re: Problem with saving processing parameters while using 'Batch process' .xml files
Post by: Hamid Ghayour on October 07, 2020, 03:20:50 PM
Thanks again Alexey for addressing this issue,
Great! I checked .xml save for exporting DEM and Orthomosaic in version 1.6.5, it works well, now many options are available for batchjobs in xml format. I noticed that <surface> and <radius> sections are under <projection>, I'm not sure; but I guess they are related to geometric properties of projected coordinate systems.
Title: Re: Problem with saving processing parameters while using 'Batch process' .xml files
Post by: Alexey Pasumansky on October 08, 2020, 12:42:41 PM
Hello Hamid,

<surface> is related to the orthomosaic projection type (geographic, planar, cylindrical, and <radius> is applicable to the cylindrical projection only, but is saved in any case.
Title: Re: Problem with saving processing parameters while using 'Batch process' .xml files
Post by: calculon on November 10, 2020, 08:15:28 PM
Reading this thread again led me to the solution, thank you for fixing this in Version 1.6.5, just tried it.

Quote
Quote
Of course there are many other options neglected in .xml for Export Orthomosaic settings e.g. JPEG compression value, Generate Tiff Overview, Write alpha channel, etc.
The reported issues with Compression, Region and no-data sections should be fixed in the 1.6.5 version update.

We were missing the BigTIFF parameter in the batch xml. It does not get saved in any way and is not read in again.
I correctly guessed it should be something like tiff_big, and finally these parameters appeared:
Code: [Select]
    <image_compression>
       <tiff_big>false</tiff_big>
       <tiff_tiled>false</tiff_tiled>
       <tiff_overviews>false</tiff_overviews>
       <tiff_compression>5</tiff_compression>
       <jpeg_quality>90</jpeg_quality>
     </image_compression>
None of the image_compression options seemed ever to get saved or read in before v. 1.6.5.
Now they do!

To use it in a python based workflow see https://www.agisoft.com/forum/index.php?topic=11687.msg52407#msg52407 (https://www.agisoft.com/forum/index.php?topic=11687.msg52407#msg52407)

Code: [Select]
compression = Metashape.ImageCompression()
compression.tiff_big = True
chunk.exportRaster(path = "path/to/file.tif", source_data=Metashape.OrthomosaicData, image_compression = compression)