Historical Orthoimage : Différence entre versions

De MicMac
Aller à : navigation, rechercher
Ligne 14 : Ligne 14 :
  
 
==Internal Orientation==
 
==Internal Orientation==
MicMac use EXIF metadat in order to determine image format and focal length. However, historical images often don't have such metadata, so we have first to create a file <i>MicMac-LocalChantierDescripteur.xml</i> like this :
+
MicMac use EXIF metadat in order to determine image format and focal length. However, historical images often don't have such metadata, so we have first to create a xml file called <i>MicMac-LocalChantierDescripteur.xml</i> that looks like this :
  
 
<pre>
 
<pre>
 
 
<Global>
 
<Global>
 
   <ChantierDescripteur >
 
   <ChantierDescripteur >
  
<!-- Define a camera model (name and sensor/film size) -->
+
    <!-- Define a camera model (name and sensor/film size) -->
 
     <LocCamDataBase>
 
     <LocCamDataBase>
 
         <CameraEntry>
 
         <CameraEntry>
Ligne 30 : Ligne 29 :
 
     </LocCamDataBase>
 
     </LocCamDataBase>
  
<!-- Associate images to a camera model -->
+
    <!-- Associate images to a camera model -->
 
     <KeyedNamesAssociations>
 
     <KeyedNamesAssociations>
 
             <Calcs>
 
             <Calcs>
Ligne 42 : Ligne 41 :
 
     </KeyedNamesAssociations>
 
     </KeyedNamesAssociations>
 
 
<!-- Associate images to a focal length -->
+
    <!-- Associate images to a focal length -->
 
     <KeyedNamesAssociations>
 
     <KeyedNamesAssociations>
 
             <Calcs>
 
             <Calcs>
Ligne 56 : Ligne 55 :
 
   </ChantierDescripteur>
 
   </ChantierDescripteur>
 
</Global>
 
</Global>
 +
</pre>
 +
 +
Scanned images also need to be normalized so the calibration is the same for all images. In order to achieve that, the fiduciary marks coordinates need to be know both in film space (these values should be in the calibration report) and in image space.
 +
 +
To report the film space coordinatesto MicMac , you need to create an xml file called <i>MeasuresCamera.xml</i> in a sub folder called <i>Ori-InternScan</i>. MicMac is not friendly with negative coordinates, so please translate them into positive space (usually +120mm in x and y should do). The file should look like this:
 +
 
<pre>
 
<pre>
 +
<?xml version="1.0" ?>
 +
<MesureAppuiFlottant1Im>
 +
    <NameIm>Glob</NameIm>
 +
    <OneMesureAF1I>
 +
          <NamePt>P1</NamePt>
 +
          <PtIm>1.004 1.005</PtIm>
 +
    </OneMesureAF1I>
 +
    <OneMesureAF1I>
 +
          <NamePt>P2</NamePt>
 +
          <PtIm>226.992 227.004</PtIm>
 +
    </OneMesureAF1I>
 +
    <OneMesureAF1I>
 +
          <NamePt>P3</NamePt>
 +
          <PtIm>0.996 226.993</PtIm>
 +
    </OneMesureAF1I>
 +
    <OneMesureAF1I>
 +
          <NamePt>P4</NamePt>
 +
          <PtIm>226.993 1.005</PtIm>
 +
    </OneMesureAF1I>
 +
</MesureAppuiFlottant1Im>
 +
</pre>
  
 +
Then to input the image coordinate of the fiduciary marks, you should use the SaisieAppuisInitQT command on each image like this (id_fiduciary.txt is a text file with a point name on each line):
 +
<pre>mm3d SaisieAppuisInitQT "image.tif" NONE id_fiduciary.txt image.tif.xml </pre>
  
<pre>mm3d SaisieAppuisInitQT "image.tif" NONE id_appuis.txt image.tif.xml </pre>
+
The resutlting <i>image.tif.xml</i> file should be moved in the <i>Ori-InternScan</i> directory.
<pre>mm3d Kugelhupf 1987.*tif Ori-InterneScan/image.tif.xml SearchIncertitude= ??</pre>
+
 
 +
If you have images where the fiduciary marks are easily recognizable (they look like targets, not just a dot), and if the images are already close to be aligned, you can use Kugelhupf to compute the position of the points starting with the second image (appearance and position of the points are dictated by the first image that you processed manually).
 +
 
 +
<pre>mm3d Kugelhupf .*tif Ori-InterneScan/image.tif.xml SearchIncertitude= ??</pre>
 +
 
 +
Then all the images can be re-sampled to fit in the same geometry and can therefore be processed like digital images. The user need to input the scan resolution (in the example line, 0.025 -> 0.025mm=25microns). This process is slow (ca. a minute per image), but is parallelised.
 +
 
 +
<pre>mm3d ReSampFid ".*.tif" 0.025</pre>
 +
 
 +
The user should then move the original images to a sub-folder, or state OIS.*.tif as the regular expression in futur steps.
  
 
== External orientation ==
 
== External orientation ==
 +
 +
  
 
<pre>mm3d OriConvert OriTxtInFile GPS_sommets.txt Sommets NameCple=Couples.xml</pre>
 
<pre>mm3d OriConvert OriTxtInFile GPS_sommets.txt Sommets NameCple=Couples.xml</pre>

Version du 2 janvier 2017 à 15:28

Picto-liste.png Tutorials index

Description

This tutorial will present the method to process historical aerial images into DEM and Orthoimages. With this kind of products, you can monitor changes in an arean (urbanization, landscape changes, etc...).

The USGS NAPP program offers a large amount of free scanned images over the continental US (mostly), often with calibration data, though the Earth Explorer.

If you are looking for a special area in France, you can use the Geoportail (IGN) to download your own images and process it.

Download

Presentation

Tutorial

Internal Orientation

MicMac use EXIF metadat in order to determine image format and focal length. However, historical images often don't have such metadata, so we have first to create a xml file called MicMac-LocalChantierDescripteur.xml that looks like this :

<Global>
  <ChantierDescripteur >

    <!-- Define a camera model (name and sensor/film size) -->
    <LocCamDataBase>
        <CameraEntry>
              <Name> ZeissRMKATOP15  </Name>
              <SzCaptMm>  226.004 226.008  </SzCaptMm> <!-- MidSideFiducials or "MaxFidX-MinFidX MaxFidY-MinFidY"-->
              <ShortName> Zeiss RMK A Top15* and Zeiss Pleogon A3/4 </ShortName>
         </CameraEntry>
    </LocCamDataBase>

    <!-- Associate images to a camera model -->
    <KeyedNamesAssociations>
            <Calcs>
                 <Arrite>  1 1 </Arrite>
                 <Direct>
                       <PatternTransform> .*  </PatternTransform> <!-- Regular expressions of the group of images with the following camera model -->
                       <CalcName> ZeissRMKATOP15 </CalcName> <!-- Name of the camera for these images -->
                 </Direct>
             </Calcs>
             <Key>   NKS-Assoc-STD-CAM </Key>
    </KeyedNamesAssociations>
	
    <!-- Associate images to a focal length -->
    <KeyedNamesAssociations>
            <Calcs>
                 <Arrite>  1 1 </Arrite>
                 <Direct>
                       <PatternTransform> .*  </PatternTransform> <!-- Regular expressions of the group of images with the following focal length -->
                       <CalcName> 153.664 </CalcName>	<!-- See calibration report -->
                 </Direct>
             </Calcs>
             <Key>   NKS-Assoc-STD-FOC  </Key>
    </KeyedNamesAssociations>
	
  </ChantierDescripteur>
</Global>

Scanned images also need to be normalized so the calibration is the same for all images. In order to achieve that, the fiduciary marks coordinates need to be know both in film space (these values should be in the calibration report) and in image space.

To report the film space coordinatesto MicMac , you need to create an xml file called MeasuresCamera.xml in a sub folder called Ori-InternScan. MicMac is not friendly with negative coordinates, so please translate them into positive space (usually +120mm in x and y should do). The file should look like this:

<?xml version="1.0" ?>
<MesureAppuiFlottant1Im>
     <NameIm>Glob</NameIm>
     <OneMesureAF1I>
          <NamePt>P1</NamePt>
          <PtIm>1.004 1.005</PtIm>
     </OneMesureAF1I>
     <OneMesureAF1I>
          <NamePt>P2</NamePt>
          <PtIm>226.992 227.004</PtIm>
     </OneMesureAF1I>
     <OneMesureAF1I>
          <NamePt>P3</NamePt>
          <PtIm>0.996 226.993</PtIm>
     </OneMesureAF1I>
     <OneMesureAF1I>
          <NamePt>P4</NamePt>
          <PtIm>226.993 1.005</PtIm>
     </OneMesureAF1I>
</MesureAppuiFlottant1Im>

Then to input the image coordinate of the fiduciary marks, you should use the SaisieAppuisInitQT command on each image like this (id_fiduciary.txt is a text file with a point name on each line):

mm3d SaisieAppuisInitQT "image.tif" NONE id_fiduciary.txt image.tif.xml 

The resutlting image.tif.xml file should be moved in the Ori-InternScan directory.

If you have images where the fiduciary marks are easily recognizable (they look like targets, not just a dot), and if the images are already close to be aligned, you can use Kugelhupf to compute the position of the points starting with the second image (appearance and position of the points are dictated by the first image that you processed manually).

mm3d Kugelhupf .*tif Ori-InterneScan/image.tif.xml SearchIncertitude= ??

Then all the images can be re-sampled to fit in the same geometry and can therefore be processed like digital images. The user need to input the scan resolution (in the example line, 0.025 -> 0.025mm=25microns). This process is slow (ca. a minute per image), but is parallelised.

mm3d ReSampFid ".*.tif" 0.025

The user should then move the original images to a sub-folder, or state OIS.*.tif as the regular expression in futur steps.

External orientation

mm3d OriConvert OriTxtInFile GPS_sommets.txt Sommets NameCple=Couples.xml
mm3d Tapioca File Couples.xml 2000
mm3d SaisieMasqQT "image.tif"
mm3d HomolFilterMasq 1987.*tif GlobalMasq=filtre.tif
mm3d Tapas RadialBasic 1987.*tif InCal=CalibInit Out=Relative SH=HomolMasqFiltered LibFoc=0
mm3d AperiCloud 1987.*tif Relative SH=HomolMasqFiltered
meshlab AperiCloud_Relative.ply
mm3d SaisieAppuisInitQT 1987_FR4053_07.*tif Relative id_appuis.txt MesuresInit.xml
mm3d SaisieAppuisInitQT 1987_FR4053_08.*tif Relative id_appuis.txt MesuresInit.xml
mm3d SaisieAppuisInitQT 1987_FR4053_09.*tif Relative id_appuis.txt MesuresInit.xml
mm3d GCPBascule 1987.*tif Relative TerrainInit Mesures_appuis.xml  MesuresInit-S2D.xml
mm3d SaisieAppuisPredicQT 1987.*tif TerrainInit Mesures_appuis.xml MesuresFinales.xml
mm3d GCPBascule 1987.*tif TerrainInit TerrainBrut Mesures_appuis.xml  MesuresFinales-S2D.xml
mm3d Campari 1987.*tif TerrainBrut TerrainFinal GCP=[Mesures_appuis.xml,0.1,MesuresFinales-S2D.xml,0.5]<pre>
<pre>mm3d AperiCloud 1987.*tif TerrainFinal SH=HomolMasqFiltered
meshlab AperiCloud_TerrainFinal.ply

DEM processing and orthorectification

mm3d Tarama 1987.*tif TerrainFinal
mm3d SaisieMasqQT TA/TA_LeChantirer.tif
mm3d Malt Ortho 1987.*tif TerrainFinal MasqImGlob=filtre.tif NbVI=2 ZoomF=1 ResolTerrain=0.5 DefCor=0 CostTrans=4
mm3d GrShade  Z_Num8_DeZoom2_STD-MALT.tif ModeOmbre=IgnE Out=ModeleOmbre.tif Mask=MEC-Malt/AutoMask_STD-MALT_Num_7.tif
mm3d to8Bits MEC-Malt/Z_Num8_DeZoom2_STD-MALT.tif Out=hypso.tif Coul=1 Dyn=3 Mask=MEC-Malt/AutoMask_STD-MALT_Num_7.tif
mm3d Tawny Ortho-MEC-Malt Out=Mosaique.tif