micmacIGN / micmac

Free open-source photogrammetry software tools
http://micmac.ensg.eu
Other
720 stars 155 forks source link

Problems with PIMs #68

Closed ghost closed 6 years ago

ghost commented 6 years ago

Hi all,

I am currently comparing PIMs and Malt. It seems there are some problems with PIMs regarding the ZoomF settings and the TA_LeChantier. I tried the default settings as well as ZoomF = 1, ZoomF = 2 and ZoomF = 4. Interestingly the resolution of the resulting PIMs-Merged-Prof elevation model is more or less the same. In my example around 1260*1520px. Interestingly the information content is different. The surface model is definitely better when using ZoomF = 1 compared to ZoomF = 2 or 4. So setting ZoomF has an impact - but somehow not on the cell size. The following screenshot shows - from left to right - ZoomF = 4/default, ZoomF = 2 and ZoomF = 1

pims_forest_hillshade_zoomf

These are the commands I used:

mm3d Pims Forest .*.JPG Referenced ZoomF=1 DefCor=0
mm3d Pims2MNT Forest DoOrtho=1

Is there something missing or is this a bug?

Regarding the TA this screenshot shows a comparison of Malt (left) and PIMs (right). All PIMs ZoomF versions look similar.

ta_malt_vs_pims

Would be great if someone could look into it! Thanks a lot in advance, Thorsten

ghost commented 6 years ago

I just tested MicMac and BigMac instead of Forest with ZoomF = 1 with the same results. So it is not only related to Forest. Form the documentation of the C3CD command I would expect that the resolution changes:

if ZoomF is specifed, indicates the Zoom Final (1 is full resolution, 2 is half...). Default value for each type
of matching is:
- BigMac = 2
- MicMac = 4
- QuickMac = 8
- Statue = 2 (epipolair matching)
- Forest = 4 (epipolair matching)

Please me me know if I should run some specific test. Thanks!

erupnik commented 6 years ago

Hi, no matter which ZoomF you choose the output will always be at the norminal resolution (which you should see/verify in the meta xml file that accompanies your surface files). The difference between the three results is that the surface reconstruction stops at the desired ZoomF, but, as the output is set to the nominal resolution it will interpolate from the ZoomF to the nominal res.

It is not a bug and nothing surprising the results differ in quality;

ghost commented 6 years ago

Hi Ewelina,

thanks a lot for your prompt reply! Please bear with me, if my questions are not precise :-)

What I am wondering about is, how I can produce surfaces with different resolutions. In Malt this is done via ZoomF. Hence, I was expecting the same here. In this respect, what do you mean with nominal resolution? When running Malt with ZoomF1 the resultion is 2364 x 2772 instead of 1260 x 1520px with PIMs (see screenshot below). The PIMs-ZNUM-Merged.xml also indicates a finer resolution:

<?xml version="1.0" ?>
<FileOriMnt>
     <NameFileMnt>PIMs-Merged_Prof.tif</NameFileMnt>
     <NameFileMasque>PIMs-Merged_Masq.tif</NameFileMasque>
     <NombrePixels>2522 3042</NombrePixels>
     <OriginePlani>315899.039999999979 4405745.91999999993</OriginePlani>
     <ResolutionPlani>0.0800000000000000017 -0.0800000000000000017</ResolutionPlani>
     <OrigineAlti>0</OrigineAlti>
     <ResolutionAlti>1</ResolutionAlti>
     <Geometrie>eGeomMNTEuclid</Geometrie>
</FileOriMnt>

whereas the PIMs-Merged_Masq.xml does not:

<?xml version="1.0" ?>
<FileOriMnt>
     <NameFileMnt>PIMs-Merged_Prof.tif</NameFileMnt>
     <NameFileMasque>PIMs-Merged_Masq.tif</NameFileMasque>
     <NombrePixels>1261 1521</NombrePixels>
     <OriginePlani>315899.039999999979 4405745.91999999993</OriginePlani>
     <ResolutionPlani>0.160000000000000003 -0.160000000000000003</ResolutionPlani>
     <OrigineAlti>0</OrigineAlti>
     <ResolutionAlti>1</ResolutionAlti>
     <Geometrie>eGeomMNTEuclid</Geometrie>
</FileOriMnt>

So my questions are:

Any help is really appreciated! Best, Thorsten

pims_forest_f1_vs_malt_f1

ghost commented 6 years ago

Hi all and @erupnik I opened a pull request (https://github.com/micmacIGN/micmac/pull/71) which should solve the issue. Would be great if you can have a look. The problem was mainly that ZoomF = 2 was hard coded. I now added the option to set it manually.

Best, Thorsten