{"id":313,"date":"2014-06-02T21:02:38","date_gmt":"2014-06-02T20:02:38","guid":{"rendered":"http:\/\/pimpaud.free.fr\/wordpress\/?page_id=313"},"modified":"2020-03-14T01:08:45","modified_gmt":"2020-03-14T00:08:45","slug":"pointcloud-registration-and-texture-extraction-en","status":"publish","type":"page","link":"https:\/\/www.archeo3d.net\/?page_id=313","title":{"rendered":"Pointcloud registration and texture extraction [EN]"},"content":{"rendered":"<pre>[here is a 2012 tutorial, outdated, but for the record]<\/pre>\n<h3>A case study : the epigraphic survey at the Ramesseum<\/h3>\n<p>As a member of the <strong>French Archaeological Mission to Western Thebes<\/strong> (<a title=\"Mission Arch\u00e9ologique Fran\u00e7aise de Th\u00e8bes-Ouest\" href=\"http:\/\/www.mafto.fr\/\" target=\"_blank\" rel=\"noopener noreferrer\">MAFTO<\/a>) leaded by Dr. Christian Leblanc, I have been working with Dr. Philippe Martinez, egyptologist and epigraphist, and Kevin Cain, founder and director of <a title=\"INSIGHT\" href=\"http:\/\/www.insightdigital.org\" target=\"_blank\" rel=\"noopener noreferrer\">INSIGHT<\/a>, at the implementation of a pipeline involving pointcloud data extraction derived from both Structure from Motion (SfM) and ground truth scanned data. The aim was to benefit from the geometric accuracy of the last one, and from the texture information conveyed by the first one, in order to obtain an accurate 3D textured model that may be used as a trustfully document supporting the epigraphic survey process of the hieroglyphic inscriptions of the temple of Ramses II in Western Thebes (production of orthophotographs from any kind of architectonical components, such as columns, lintels, walls, etc.).<\/p>\n<p>The final idea was to define a fully automatic process to be applied to the whole monument, but for some reasons it wasn&rsquo;t possible to achieve that point yet know, so we finally managed to propose a partially manual approach which is conceivable to implement. We decided to proceed to an experimentation on the Coronation Scene of the wall located in the Second Court of the Temple of Ramses II.<\/p>\n<div style=\"width: 1034px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/www.archeo3d.net\/projets\/Coronation\/img\/P1011183-2.jpg\"><img loading=\"lazy\" class=\"   \" style=\"border: 0px none; margin: 0px;\" title=\"The Coronation Wall in the Ramesseum. \u00a9 Ph. Martinez\" src=\"http:\/\/www.archeo3d.net\/projets\/Coronation\/img\/P1011183-2.jpg\" alt=\"The Coronation Wall in the Ramesseum. \u00a9 Ph. Martinez\" width=\"1024\" height=\"768\" \/><\/a><p class=\"wp-caption-text\">Figure 1. The Coronation Wall in the Ramesseum. \u00a9 Ph. Martinez<\/p><\/div>\n<p>The ground truth pointcloud was provided by INSIGHT. The product used in this tutorial is a mesh generated after a Poisson reconstruction filter has been applied the point set. The SfM 3D reconstruction is derived from a set of photographs taken by <strong>Philippe Martinez<\/strong>, <strong>Yann Rantier<\/strong> (MAFTO) and <strong>Mark Eakle<\/strong> (INSIGHT).<\/p>\n<div id=\"attachment_199\" style=\"width: 1034px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/www.archeo3d.net\/projets\/Coronation\/img\/meshlab_pointcloud.jpg\"><img aria-describedby=\"caption-attachment-199\" data-attachment-id=\"199\" data-permalink=\"https:\/\/www.archeo3d.net\/?attachment_id=199\" data-orig-file=\"https:\/\/www.archeo3d.net\/wp-content\/uploads\/logo_amotek.jpg\" data-orig-size=\"72,71\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}\" data-image-title=\"logo_amotek\" data-image-description=\"&lt;p&gt;Amotek&lt;\/p&gt;\n\" data-medium-file=\"https:\/\/www.archeo3d.net\/wp-content\/uploads\/logo_amotek.jpg\" data-large-file=\"https:\/\/www.archeo3d.net\/wp-content\/uploads\/logo_amotek.jpg\" loading=\"lazy\" class=\"size-full wp-image-199\" title=\"Ground truth mesh from scanned pointcloud. \u00a9 INSIGHT\" src=\"http:\/\/www.archeo3d.net\/projets\/Coronation\/img\/meshlab_pointcloud.jpg\" alt=\"Ground truth mesh from scanned pointcloud. \u00a9 INSIGHT\" width=\"1024\" height=\"819\" \/><\/a><p id=\"caption-attachment-199\" class=\"wp-caption-text\">Figure 2. Ground truth mesh from scanned pointcloud. \u00a9 INSIGHT<\/p><\/div>\n<p>The Structure from Motion toolkit used is <strong><a title=\"Visual SFM\" href=\"http:\/\/homes.cs.washington.edu\/~ccwu\/vsfm\/\" target=\"_blank\" rel=\"noopener noreferrer\">VisualSFM (version 0.5.20)<\/a><\/strong>, developped by <strong>Changchang Wu<\/strong> of the University of Washington at Seattle. The dense reconstruction is processed with <strong><a title=\"Clustering Views for Multi-view Stereo\" href=\"http:\/\/grail.cs.washington.edu\/software\/cmvs\/\" target=\"_blank\" rel=\"noopener noreferrer\">CMVS<\/a><\/strong>\/<strong><a title=\"Patch-based Multi-view Stereo\" href=\"http:\/\/grail.cs.washington.edu\/software\/pmvs\/\" target=\"_blank\" rel=\"noopener noreferrer\">PMVS<\/a><\/strong> developped by <strong>Yasutaka Furukawa<\/strong>, University of Washington, and <strong>Jean Ponce<\/strong>, \u00c9cole Normale Sup\u00e9rieure. The pointcloud and the mesh were displayed and edited with <strong><a title=\"Meshlab\" href=\"http:\/\/meshlab.sourceforge.net\/\" target=\"_blank\" rel=\"noopener noreferrer\">Meshlab (version 1.3.2)<\/a><\/strong>, developed at the Visual Computing Lab of the ISTI-CNR \/ University of Pisa (Italy), and we are currently exchanging with <strong>Matteo Dellepiane<\/strong> about the implementation of an automatical approach of the processes described below.<\/p>\n<p>For a whole background of this project, please have a look to <a title=\"A Decade of Digital Documentation at the Ramesseum\" href=\"http:\/\/www.insightdigital.org\/entry\/index.php?option=com_content&amp;view=article&amp;id=144&amp;Itemid=437\" target=\"_blank\" rel=\"noopener noreferrer\">\u00ab\u00a0A Decade of Digital Documentation at the Ramesseum\u00a0\u00bb<\/a>, available on the <a title=\"INSIGHT DIGITAL\" href=\"http:\/\/www.insightdigital.org\/\" target=\"_blank\" rel=\"noopener noreferrer\">INSIGHT website<\/a>.<\/p>\n<p><strong>N.B. : <\/strong>This experimentation is for me a side project and its outcome will definitively be profitable to my main project, the Archaeological Map of the Western Thebes, that I will present hereby soon.<\/p>\n<p><!--more--><\/p>\n<h2>1. Production of the sparse and dense pointclouds<\/h2>\n<p>This part is straightforward and consists in following the steps mentioned in the front page of the <a title=\"Visual SFM\" href=\"http:\/\/homes.cs.washington.edu\/~ccwu\/vsfm\/\" target=\"_blank\" rel=\"noopener noreferrer\">VisualSFM website<\/a>.<\/p>\n<ul>\n<li><strong>File \\ Open + Multi Images<\/strong> or <img loading=\"lazy\" class=\"alignnone size-full wp-image-160 vertalignmiddle\" title=\"Open Multiple Images\" src=\"http:\/\/www.archeo3d.net\/projets\/Coronation\/img\/ico_image.png\" alt=\"\" width=\"23\" height=\"21\" align=\"middle\" \/> (<strong>N.B. : <\/strong>Sometimes, with a huge amount of photographs, the software will encounter some difficulties and will fail to load any of the files. A good work around is to load step by step the photographs by smaller sets).<\/li>\n<\/ul>\n<ul>\n<li><strong>SfM \\ Pairwise Matching \\ Compute Missing Match<\/strong> or <img loading=\"lazy\" class=\"alignnone size-full wp-image-161 vertalignmiddle\" title=\"Compute Missing Image Matches\" src=\"http:\/\/www.archeo3d.net\/projets\/Coronation\/img\/ico_matches.png\" alt=\"\" width=\"23\" height=\"21\" align=\"middle\" \/> (<strong>N.B. : <\/strong>This may take a while, especially with a huge collection of photographs. Therefore it is possible to kill at anytime the pairwise matching process by closing the VisualSFM windows, then launching the software again, loading all the images needed and then resuming the matching process by clicking again the relevant icon. The software will guess automatically how to resume the process. It is to be mentionned also that the software may crash down during an overnight calculation, so whenever possible one has to check if the process is still running).<\/li>\n<\/ul>\n<div id=\"attachment_140\" style=\"width: 674px\" class=\"wp-caption aligncenter\"><img aria-describedby=\"caption-attachment-140\" loading=\"lazy\" class=\"wp-image-140   \" title=\"The photographs collection displayed in VisualSFM\" src=\"http:\/\/www.archeo3d.net\/projets\/Coronation\/img\/coronation_sfm01.jpg\" alt=\"The photographs collection displayed in VisualSFM\" width=\"664\" height=\"544\" \/><p id=\"caption-attachment-140\" class=\"wp-caption-text\">Figure 3. The photographs collection displayed in VisualSFM<\/p><\/div>\n<ul>\n<li><strong>SfM \\ Reconstruct 3D<\/strong> or <img loading=\"lazy\" class=\"alignnone  wp-image-163 vertalignmiddle\" title=\"Compute 3D Reconstruction\" src=\"http:\/\/www.archeo3d.net\/projets\/Coronation\/img\/ico_3D_recons.png\" alt=\"\" width=\"23\" height=\"21\" \/> (<strong>N.B. : <\/strong>After a long lasting calculation, especially if the pairwise matching has been processed just before the reconstruction, it is a good practice to save the result of the reconstruction as an *.nvm file, to have a fresh restart of the system and of the RAM, and then to load the NV match <img loading=\"lazy\" class=\"alignnone size-full wp-image-188 vertalignmiddle\" title=\"Load N-View Match\" src=\"http:\/\/www.archeo3d.net\/projets\/Coronation\/img\/ico_load_nv.png\" alt=\"\" width=\"23\" height=\"21\" \/> before to proceed to the next step).<\/li>\n<\/ul>\n<div id=\"attachment_142\" style=\"width: 674px\" class=\"wp-caption aligncenter\"><img aria-describedby=\"caption-attachment-142\" loading=\"lazy\" class=\"wp-image-142    \" title=\"The sparse pointcloud reconstructed and the camera stations displayed in VisualSFM\" src=\"http:\/\/www.archeo3d.net\/projets\/Coronation\/img\/coronation_sfm02.jpg\" alt=\"The sparse pointcloud reconstructed and the camera stations displayed in VisualSFM\" width=\"664\" height=\"544\" \/><p id=\"caption-attachment-142\" class=\"wp-caption-text\">Figure 4. The sparse pointcloud reconstructed and the camera stations displayed in VisualSFM<\/p><\/div>\n<ul>\n<li><strong>SfM \\ Run CMVS\/PMVS<\/strong> or <img loading=\"lazy\" class=\"alignnone size-full wp-image-164 vertalignmiddle\" title=\"Run CMVS\/PMVS\" src=\"http:\/\/www.archeo3d.net\/projets\/Coronation\/img\/ico_cmvs.png\" alt=\"\" width=\"23\" height=\"21\" \/> (<strong>N.B. : <\/strong>The CMVS\/PMVS binary files are not distributed by the developer of VisualSFM 0.5.20, so the user has to collect those softwares from relevant servers). To switch between the sparse and the dense pointclouds, press \u00ab\u00a0TAB\u00a0\u00bb.<\/li>\n<\/ul>\n<div id=\"attachment_143\" style=\"width: 674px\" class=\"wp-caption aligncenter\"><img aria-describedby=\"caption-attachment-143\" loading=\"lazy\" class=\"wp-image-143   \" title=\"The dense pointcloud reconstructed and displayed in VisualSFM\" src=\"http:\/\/www.archeo3d.net\/projets\/Coronation\/img\/coronation_sfm03.jpg\" alt=\"The dense pointcloud reconstructed and displayed in VisualSFM\" width=\"664\" height=\"544\" \/><p id=\"caption-attachment-143\" class=\"wp-caption-text\">Figure 5. The dense pointcloud reconstructed and displayed in VisualSFM<\/p><\/div>\n<p><strong>Some good practices to follow :<\/strong><\/p>\n<ul>\n<li>The original or raw photos should be exported to JPEG (best quality) downscaled to 3200 pixels (see the VisualSFM <strong><a title=\"Visual SFM Documentation\" href=\"http:\/\/homes.cs.washington.edu\/~ccwu\/vsfm\/doc.html#size\" target=\"_blank\" rel=\"noopener noreferrer\">documentation <\/a><\/strong>for an explanation).<\/li>\n<li>If possible, the chromatic aberration should be corrected (i. e. in <strong>Adobe Lightroom<\/strong>, <strong>Develop \\ Activate the profil correction<\/strong>) before exporting the JPEGs. That should increase the number of matched features amongst the photographs set. That said, there is no need to apply a correction to the lense distortion at this time : <strong>VisualSFM<\/strong> will allow <strong>PMVS<\/strong> to manage it laterly once the cameras parameters are guessed. Meanwhile, it&rsquo;s also a good idea to set the <strong>tone<\/strong> and the<strong> white balance<\/strong> settings to automatic.<\/li>\n<li>For example, the sparse reconstruction can be named <strong>[your_file_name]<\/strong>_sparse.nvm<\/li>\n<li>&#8230; and the dense reconstruction can be named <strong>[your_file_name]<\/strong>_dense.nvm.cmvs<\/li>\n<\/ul>\n<h2>2. Manual Registration of the SfM reconstructions onto the ground truth pointcloud<\/h2>\n<p>The registration of the SfM pointclouds will be based on some measurements taken on the ground truth pointcloud. Those measurements, the <strong>Ground Control Points<\/strong> (GCPs), are to be easily remarkable amongst the ground truth pointcloud and some photographs handled by <strong>VisualSFM<\/strong>, and should be selected throughout all the model or scene we want to process. Here I choose 6 <strong>GCPs<\/strong> spreaded over the wall.<\/p>\n<div id=\"attachment_240\" style=\"width: 810px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/www.archeo3d.net\/projets\/Coronation\/img\/gcp_ensemble.jpg\"><img aria-describedby=\"caption-attachment-240\" data-attachment-id=\"240\" data-permalink=\"https:\/\/www.archeo3d.net\/?attachment_id=240\" data-orig-file=\"https:\/\/www.archeo3d.net\/wp-content\/uploads\/sv90_couv.jpg\" data-orig-size=\"520,520\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}\" data-image-title=\"sv90_couv\" data-image-description=\"\" data-medium-file=\"https:\/\/www.archeo3d.net\/wp-content\/uploads\/sv90_couv-300x300.jpg\" data-large-file=\"https:\/\/www.archeo3d.net\/wp-content\/uploads\/sv90_couv.jpg\" loading=\"lazy\" class=\"size-full wp-image-240\" title=\"Selection of remarkable features in the pointcloud and in the photographs to define GCPs\" src=\"http:\/\/www.archeo3d.net\/projets\/Coronation\/img\/gcp_ensemble.jpg\" alt=\"Selection of remarkable features in the pointcloud and in the photographs to define GCPs\" width=\"800\" height=\"569\" \/><\/a><p id=\"caption-attachment-240\" class=\"wp-caption-text\">Figure 6. Selection of remarkable features in the pointcloud and in the photographs to define GCPs<\/p><\/div>\n<h3><\/h3>\n<h3>2.1. Process in Meshlab<\/h3>\n<ul>\n<li><strong>File \\ Import Mesh<\/strong> or <img data-attachment-id=\"243\" data-permalink=\"https:\/\/www.archeo3d.net\/?attachment_id=243\" data-orig-file=\"https:\/\/www.archeo3d.net\/wp-content\/uploads\/sv94_couv.jpg\" data-orig-size=\"520,520\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}\" data-image-title=\"sv94_couv\" data-image-description=\"\" data-medium-file=\"https:\/\/www.archeo3d.net\/wp-content\/uploads\/sv94_couv-300x300.jpg\" data-large-file=\"https:\/\/www.archeo3d.net\/wp-content\/uploads\/sv94_couv.jpg\" loading=\"lazy\" class=\"alignnone size-full wp-image-243 vertalignmiddlemeshlab\" title=\"Import Mesh\" src=\"http:\/\/www.archeo3d.net\/projets\/Coronation\/img\/ico_Meshlab_import.png\" alt=\"\" width=\"27\" height=\"25\" \/> : import the ground truth pointcloud or the mesh in Meshlab.<\/li>\n<li><strong>Edit \\ Select Vertexes<\/strong> or <img loading=\"lazy\" class=\"alignnone  wp-image-250 vertalignmiddlemeshlab\" title=\"Select Vertexes\" src=\"http:\/\/www.archeo3d.net\/projets\/Coronation\/img\/ico_Meshlab_select_vertex.png\" alt=\"\" width=\"25\" height=\"22\" \/> : select <strong>ONE<\/strong> vertex which optimically matches the <strong>GCP<\/strong> in the photograph.<\/li>\n<li><strong>Filters \\ Selection \\ Invert Selection<\/strong>, uncheck <strong>Invert Face<\/strong>, then <strong>Apply<\/strong> : Select all the other vertices.<\/li>\n<li><strong>Filters \\ Selection \\ Delete Selected Vertices<\/strong> or <img data-attachment-id=\"253\" data-permalink=\"https:\/\/www.archeo3d.net\/?attachment_id=253\" data-orig-file=\"https:\/\/www.archeo3d.net\/wp-content\/uploads\/thermes_01b_couv.jpg\" data-orig-size=\"1523,500\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}\" data-image-title=\"Thermes de Cluny\" data-image-description=\"\" data-medium-file=\"https:\/\/www.archeo3d.net\/wp-content\/uploads\/thermes_01b_couv-300x98.jpg\" data-large-file=\"https:\/\/www.archeo3d.net\/wp-content\/uploads\/thermes_01b_couv-1024x336.jpg\" loading=\"lazy\" class=\"alignnone  wp-image-253 vertalignmiddlemeshlab\" title=\"Delete the current set of selected vertices\" src=\"http:\/\/www.archeo3d.net\/projets\/Coronation\/img\/ico_Meshlab_delete_vertex.png\" alt=\"\" width=\"27\" height=\"25\" \/> : only the initially selected vertex remains.<\/li>\n<li><strong>File \\ Export Mesh as<\/strong> ; make sure not to export the source file (in this case, the previous file will be lost), but to export this one vertex file as a new created one to be named like <strong>[GCP_ID]<\/strong>.ply, then make sure to uncheck <strong>Binary Encoding<\/strong>. For example, let&rsquo;s say that our file is named GCP06.ply<\/li>\n<li>Redo this process for each <strong>GCP<\/strong>.<\/li>\n<\/ul>\n<p><strong>N.B. :<\/strong> To keep a memory of the location of the <strong>GCPs<\/strong>, especially if they are numerous, it&rsquo;s a good practice to create a modified version of a photograph where the GCP appears, and to enlight its location with a mark, in red for example as shown above, then to name the file from the GCP&rsquo;s ID. Ex.: GCP06.jpg<\/p>\n<h3>2.2. Extraction of the GCPs&rsquo; coordinates<\/h3>\n<h4><em>2.2.1. Coordinates expressed in a local system<\/em><\/h4>\n<ul>\n<li>Open the *.ply file in <strong>Notepad<\/strong> or <strong>Notepad++<\/strong>. If the *.ply file was correctly exported from Meshlab with the <strong>Binary Encoding<\/strong> option unchecked, we should obtain something like that :<\/li>\n<\/ul>\n<blockquote><p>ply<br \/>\nformat ascii 1.0<br \/>\ncomment VCGLIB generated<br \/>\nelement vertex 1<br \/>\nproperty float x<br \/>\nproperty float y<br \/>\nproperty float z<br \/>\nelement face 0<br \/>\nproperty list uchar int vertex_indices<br \/>\nend_header<br \/>\n-3379.9 2874.5 -7623.1<\/p><\/blockquote>\n<p>As mentioned within the header of the file, there is only 1 vertex, and its coordinates XYZ are listed just after the last line of the header. So for our GCP #6, we know now that its coordinates from the ground truth pointcloud is x = -3379.9 y = 2874.5 and Z = -7623.1<\/p>\n<p>In some case, you may obtain a more detailed *.ply file, like that :<\/p>\n<blockquote><p>ply<br \/>\nformat ascii 1.0<br \/>\ncomment VCGLIB generated<br \/>\nelement vertex 1<br \/>\nproperty float x<br \/>\nproperty float y<br \/>\nproperty float z<br \/>\nproperty uchar red<br \/>\nproperty uchar green<br \/>\nproperty uchar blue<br \/>\nelement face 0<br \/>\nproperty list uchar int vertex_indices<br \/>\nend_header<br \/>\n-3379.9 2874.5 -7623.1 195 127 97<\/p><\/blockquote>\n<p>In this case, this is quite straightforward, the line relevant to our only vertex should be read as described in the header:<\/p>\n<p>x = -3379.9; y = 2874.5; z = -7623.1; Red = 195; Green = 127; Blue = 97, where the RGB values describe the color of the vertex. By the way, we can therefore decide to attribute any kind of RGB value to each of our GCPs to enhanced their visualization in Meshlab and over the native ground truth point cloud, provide the header structure reflects the set of property describing each vertex.<\/p>\n<ul>\n<li>Eventually, we can create a list or a table with all the GCPs and their relevant XYZ data, which should be kept expressed inline like : <strong>X<\/strong>[space]<strong>Y<\/strong>[space]<strong>Z<\/strong>. Then proceed directly to <strong>part 2.3<\/strong>.<\/li>\n<\/ul>\n<p><strong>N.B. :<\/strong> Obviously, the coordinate of the GCPs would have been more accurately acquired with a Total Station.<\/p>\n<h4><em>2.2.2. Coordinates expressed in a georeferenced system<\/em><\/h4>\n<p><em><strong> ~~ Under preparation ~~<\/strong><\/em><\/p>\n<h3>2.3. Process in VisualSFM<\/h3>\n<ul>\n<li><strong>SfM \\ Load NV Match<\/strong> or <img loading=\"lazy\" class=\"alignnone size-full wp-image-279 vertalignmiddle\" title=\"Load N-View Match\" src=\"http:\/\/www.archeo3d.net\/projets\/Coronation\/img\/ico_load_nv1.png\" alt=\"\" width=\"23\" height=\"21\" \/>. Open the <strong>[your_file_name]<\/strong>_dense.nvm file. Wait until the loading of the pictures, the sparse and the dense reconstructions had been completed (it may take a while). For saving time, it is possible to skip the loading of the image pixel data by <strong>Tools \\ Terminate Task<\/strong> or <img loading=\"lazy\" class=\"alignnone size-full wp-image-282 vertalignmiddle\" title=\"Stop running task thread\" src=\"http:\/\/www.archeo3d.net\/projets\/Coronation\/img\/ico_terminate.png\" alt=\"\" width=\"23\" height=\"21\" \/>. Once done, the task viewer should display some lines like :<\/li>\n<\/ul>\n<blockquote><p>Loading image pixel data &#8230;done in 10s<br \/>\nLoading matching records &#8230;done in 54s<br \/>\n&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br \/>\nLoad existing N-View match, aborted<br \/>\nTotally 125.000 seconds used<\/p><\/blockquote>\n<ul>\n<li><strong>SfM \\ More Function \\ GCP-based Transform<\/strong>. Then the main commands of this mode are displayed in the task-viewer. In the viewport, the pointer of the mouse should be stuck with a blue rectangle (while in 3D Match-view mode) or with a green cross (while in Image mode). Here are the commands :<\/li>\n<\/ul>\n<blockquote><p>CTRL + Left Click: add or modify a point;<br \/>\nCTRL + Menu Click: clear existing data;<br \/>\nSHIFT + Menu Click: apply transformation.<br \/>\nESCAPE: quit the point selection mode.<br \/>\nTAB: switch between dense &amp; sparse points.<br \/>\n\u00ab\u00a0Menu\u00a0\u00bb refers to \u00ab\u00a0GCP-based Transform\u00a0\u00bb.<\/p><\/blockquote>\n<ul>\n<li><strong>Navigate in the 3D view<\/strong> to find a photograph in which the GCP we want to register might be seen. To select a photograph, move the mouse over its 3D icon (a coloured wireframed pyramid) and <strong>Right double-click<\/strong> (tips : if the pyramid icons are too small in the viewport, <strong>CTRL + scrolling the middle-button<\/strong> might help). Once in Image mode, the pointer is stuck with a green cross. A <strong>Right double-click<\/strong> on the photograph will lead back to the 3D view mode.<\/li>\n<\/ul>\n<p>OR<\/p>\n<ul>\n<li><strong>Navigate in the Thumbnails Mode<\/strong> <img loading=\"lazy\" class=\"alignnone size-full wp-image-288 vertalignmiddle\" title=\"Show Image Thumbnails\" src=\"http:\/\/www.archeo3d.net\/projets\/Coronation\/img\/ico_thumbnails.png\" alt=\"\" width=\"23\" height=\"21\" \/> to find a photograph in which the GCP we want to register might be seen (pan, zoom in &amp; out with the mouse). To select a photograph, move the mouse over it and <strong>Left double-click<\/strong>. Once in Image mode, the pointer is stuck with a green cross. A <strong>Right double-click<\/strong> on the photograph will lead back to the Thumbnails view mode.<\/li>\n<\/ul>\n<ul>\n<li>In <strong>Image Mode<\/strong>, navigate to find the location of the GCP (pan, zoom in &amp; out), overlay it with the green cross then press <strong>CTRL + Left Click<\/strong>. A dialog box will pop-up, asking for its XYZ coordinates. Enter, or Copy and Paste from the *.ply file of the GCP previously opened with Notepad (or the list or table you created). A blue cross should now mark the location of the GCP onto the photograph. It&rsquo;s still possible to modify the mark by rolling over the blue cross (a blue square should then appear) and by pressing <strong>CTRL + Left Click<\/strong> then enter again the value.<\/li>\n<\/ul>\n<div id=\"attachment_298\" style=\"width: 674px\" class=\"wp-caption aligncenter\"><img aria-describedby=\"caption-attachment-298\" loading=\"lazy\" class=\"size-full wp-image-298\" title=\"Registration of a GCP in VisualSFM\" src=\"http:\/\/www.archeo3d.net\/projets\/Coronation\/img\/sfm_gcp02.jpg\" alt=\"Registration of a GCP in VisualSFM\" width=\"664\" height=\"1036\" \/><p id=\"caption-attachment-298\" class=\"wp-caption-text\">Figure 7. Registration of a GCP in VisualSFM<\/p><\/div>\n<ul>\n<li>Restart this process with one or two other photographs in which the same GCP appears.<\/li>\n<li>Apply the whole process to the other GCPs, and each time make sure to find and mark two or three differents photographs where each of them appear.<\/li>\n<li>After the second GCP has been successfully registered, the respective location of each GCP should be shown in the 3D View mode as a red square.<\/li>\n<\/ul>\n<div id=\"attachment_302\" style=\"width: 674px\" class=\"wp-caption aligncenter\"><img aria-describedby=\"caption-attachment-302\" loading=\"lazy\" class=\"size-full wp-image-302\" title=\"Registered GCPs displayed as red boxes in the 3D Viewport of VisualSFM\" src=\"http:\/\/www.archeo3d.net\/projets\/Coronation\/img\/sfm_gcp03.jpg\" alt=\"Registered GCPs displayed as red boxes in the 3D Viewport of VisualSFM\" width=\"664\" height=\"587\" \/><p id=\"caption-attachment-302\" class=\"wp-caption-text\">Figure 8. Registered GCPs displayed as red squares in the 3D Viewport of VisualSFM<\/p><\/div>\n<ul>\n<li>After a while, it is always a good idea to save the GCPs, in case of&#8230; While still in GCP-based Transform mode, go to <strong>SfM \\ Save NV Match<\/strong>, and then make sure to give a filename with the extension *.gcp. To recall the GCPs laterly, re-enter the GCP-based transform mode if necessary, and then <strong>SfM \\ Load NV Match<\/strong>, load the *.gcp file.<\/li>\n<li>To delete a GCP marked on a photograph, just rollover it, press <strong>CTRL + Left Click<\/strong> and close the dialog box without modifying its content (don&rsquo;t press OK, just click on the \u00ab\u00a0close\u00a0\u00bb icon) .<\/li>\n<li>It is possible to check the accuracy of the registration process, first, by assessing if the location of the red squares in the 3D sparse pointcloud is trustable (sometimes, you may got mistaken while entering the XYZ value, and the red square will likely to be unappropriately located); secondly, and more accurately, the <em>Root of the Mean Square Error<\/em> and the <em>Mean Absolute Error<\/em> are evaluated and displayed in the task viewer after each GCP registration. The idea is to keep these values as small as possible, so any dramatic change or increase should drive your attention and help you to make some correction in the location of the GCP in the intrinsec coordinates of the photograph, or in its extrinsec coordinates.<\/li>\n<li>Once all the GCPs are trustfully registered and saved in a final *.gcp file (see above), and while still in GCP-based Transform mode, one can press <strong>SHIFT<\/strong> + <strong>SfM \\ More Functions \\ GCP-based Transform<\/strong> to globaly apply the transformation to the sparse (with the cameras locations, parameters, etc) and dense reconstructions. The result should appear quickly, and the task viewer should dispay the transformation parameters.<\/li>\n<li>Then save the result as a new file named <strong>[your_file_name]<\/strong>_dense_registered.nvm. Following the size of your scene, it may take a while to save the *.nvm file for the sparse reconstruction, and the *.ply for the dense pointcloud. It is to be mentionned that the dependancies and folder structure created by the CVMS\/PMVS aren&rsquo;t saved nor transformed (cf. below for exporting those data). Only the final and flattened *.ply located at the root of the project is transformed and saved. Once done, then we can exit the GCP-based Transform mode by pressing the <strong>Escape<\/strong> key after clicking in the viewport.<\/li>\n<\/ul>\n<h2>3. Preparation, Importation and Display of the registered pointclouds<\/h2>\n<h3>3.1. Preparation<\/h3>\n<p>Before going on this project with Meshlab, we still need to prepare some data from VisualSFM : the <strong>bundle.rd.out<\/strong> file containing the sparse reconstruction and the cameras parameters, and the relevant undistorted photographs. As mentioned above, the GCP-based Transform isn&rsquo;t applicable to those secondary files, so we have to process them. They are created after the user launches a dense reconstruction within VisualSFM.<\/p>\n<ul>\n<li><strong>Close<\/strong> then <strong>restart VisualSFM<\/strong> <img loading=\"lazy\" class=\"alignnone  wp-image-330 vertalignmiddlemeshlab\" title=\"VisualSFM\" src=\"http:\/\/www.archeo3d.net\/projets\/Coronation\/img\/VisualSFM.png\" alt=\"\" width=\"24\" height=\"24\" \/><\/li>\n<li><strong>SfM \\ Load NV Match<\/strong> or <img loading=\"lazy\" title=\"Load N-View Match\" src=\"http:\/\/www.archeo3d.net\/projets\/Coronation\/img\/ico_load_nv1.png\" alt=\"\" width=\"23\" height=\"21\" \/> . Load the <strong>[your_file_name]<\/strong>_dense_registered.nvm<\/li>\n<li><strong>SfM \\ Run CMVS\/PMVS<\/strong> or <img loading=\"lazy\" title=\"Run CMVS\/PMVS\" src=\"http:\/\/www.archeo3d.net\/projets\/Coronation\/img\/ico_cmvs.png\" alt=\"\" width=\"23\" height=\"21\" \/> . Name <strong>[your_file_name]<\/strong>_dense_registered_export.nvm.cmvs, then let the process run until the command \u00ab\u00a0pmvs2\u00a0\u00bb appears in the Task-viewer. In other words, you have to <strong>KILL<\/strong> the dense reconstruction process (unless you really want to render it again) after all the dependant files and folders have been created, especially the undistorted and renamed versions of the photographs, and of course the <strong>bundle.rd.out<\/strong>.<\/li>\n<li><strong>Close VisualSFM<\/strong>.<\/li>\n<li><strong>Press Windows Start<\/strong> (at the bottom left of your screen) and type \u00ab\u00a0cmd\u00a0\u00bb in the field to open a Command Window.<\/li>\n<li><strong>Navigate<\/strong> to the folder <strong>[your_file_name]_dense_registered_export.nvm.cmvs\\00\\visualize\\ <\/strong>where are located all the photographs processed and undistorted by PMVS.<strong><br \/>\n<\/strong><\/li>\n<li><strong>Type<\/strong> the command <strong>dir \/on \/b *.jpg &gt; list.txt<\/strong><\/li>\n<li><strong>Close<\/strong> the Command Window ; a file listing all the photographs contained in the current directory as been created.<\/li>\n<\/ul>\n<h3>3.2. Importation<\/h3>\n<ul>\n<li><strong>Start Meshlab <\/strong><strong><img loading=\"lazy\" class=\"alignnone  wp-image-327 vertalignmiddlemeshlab\" title=\"Meshlab\" src=\"http:\/\/www.archeo3d.net\/projets\/Coronation\/img\/meshlab.png\" alt=\"\" width=\"24\" height=\"24\" \/><\/strong><\/li>\n<li><strong>File \\ Open project<\/strong> or <img loading=\"lazy\" class=\"alignnone  wp-image-324 vertalignmiddlemeshlab\" title=\"Open project\" src=\"http:\/\/www.archeo3d.net\/projets\/Coronation\/img\/ico_Meshlab_open.png\" alt=\"\" width=\"27\" height=\"25\" \/> ; in the drop down list, select \u00ab\u00a0Bundle Output (*.out) and open the <strong>bundle.rd.out<\/strong> contained in the folder <strong>[your_file_name]_dense_registered_export.nvm.cmvs\\00\\<\/strong><\/li>\n<li>Then, when asked \u00ab\u00a0<strong>Open image file list<\/strong>\u00ab\u00a0, select the Bundler images list file you previously created (list.txt) in <strong>[your_file_name]_dense_registered_export.nvm.cmvs\\00\\visualize\\ . <\/strong>Don&rsquo;t select<strong> camera_v2.txt<\/strong>.<strong><br \/>\n<\/strong><\/li>\n<li>After a while, according to the size of your scene, the sparse model and all the cameras should have been loaded into Meshlab. On the lower\/middle part of the Layer dialog box (here on the right) are listed the photographs.<\/li>\n<\/ul>\n<div id=\"attachment_338\" style=\"width: 710px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/www.archeo3d.net\/projets\/Coronation\/img\/registered_sparse.jpg\"><img aria-describedby=\"caption-attachment-338\" loading=\"lazy\" class=\"wp-image-338\" title=\"Display of the sparse pointcloud\" src=\"http:\/\/www.archeo3d.net\/projets\/Coronation\/img\/registered_sparse-1024x819.jpg\" alt=\"Display of the sparse pointcloud\" width=\"700\" height=\"559\" \/><\/a><p id=\"caption-attachment-338\" class=\"wp-caption-text\">Figure 9. Display of the sparse pointcloud and list of the registered rasters<\/p><\/div>\n<h3><\/h3>\n<h3>3.3. Display<\/h3>\n<ul>\n<li><strong>File \\ Import Mesh<\/strong> or <img loading=\"lazy\" class=\"vertalignmiddlemeshlab\" title=\"Import Mesh\" src=\"http:\/\/www.archeo3d.net\/projets\/Coronation\/img\/ico_Meshlab_import.png\" alt=\"\" width=\"27\" height=\"25\" \/> : open <strong>[your_file_name]<\/strong>_dense_registered.0.ply (the dense reconstruction), or the ground truth pointcloud\/model.<\/li>\n<li><strong>View \\ Show Current Raster Mode<\/strong> or <img loading=\"lazy\" class=\"alignnone  wp-image-340 vertalignmiddlemeshlab\" title=\"Show Current Raster Mode\" src=\"http:\/\/www.archeo3d.net\/projets\/Coronation\/img\/ico_Meshlab_raster.png\" alt=\"\" width=\"27\" height=\"25\" \/> , then double-click on a *.jpg file listed in the Layer panel <img loading=\"lazy\" class=\"alignnone  wp-image-342 vertalignmiddlemeshlab\" title=\"Show Layer Dialog\" src=\"http:\/\/www.archeo3d.net\/projets\/Coronation\/img\/ico_Meshlab_layer.png\" alt=\"\" width=\"27\" height=\"25\" \/>. The photograph selected should be displayed in the viewport and the viewpoint matches the 3D scene. By scrolling the middle-button of the mouse it is possible to play around the overlay of the photograph over the model \/ pointcloud. A double-click on another jpg of the list will update both the display of the photograph and the viewpoint in the viewport.<\/li>\n<\/ul>\n<p style=\"text-align: center;\">\n<p style=\"text-align: center;\">Figure 10. Display of the registered rasters over the ground truth model.<\/p>\n<h2>4. Preparation and Extraction of the texture<\/h2>\n<p>In order to retrieve the texture from the photographs, we will use the Meshlab filter <strong>Texture \\ Parameterization + texturing from registered rasters<\/strong>. For a quick overview, please watch to Mister P.&rsquo;s Meshlab tutorial <a title=\"Raster Layers: Parameterization and Texturing from rasters\" href=\"http:\/\/www.youtube.com\/watch?v=OJZRuIzHcVw&amp;list=UU70CKZQPj_ZAJ0Osrm6TyTg&amp;index=4&amp;feature=plcp\" target=\"_blank\" rel=\"noopener noreferrer\"><strong>Raster Layers: Parameterization and Texturing from rasters<\/strong><\/a>. As it is said in that tutorial, the filter will be successfully applied if there is only a small number of rasters, which is not the case in our project, so we&rsquo;ll have first to reduce its number through <strong>VisualSFM<\/strong>. The idea is to keep only the photographs we need and that convey the expected texture information, and then to export this modified version of the sparse reconstruction.<\/p>\n<h3>4.1. Removing the unwanted rasters<\/h3>\n<ul>\n<li><strong>Start VisualSFM<\/strong> <img loading=\"lazy\" title=\"VisualSFM\" src=\"http:\/\/www.archeo3d.net\/projets\/Coronation\/img\/VisualSFM.png\" alt=\"\" width=\"24\" height=\"24\" \/><\/li>\n<li><strong>SfM \\ Load NV Match<\/strong> or <img loading=\"lazy\" title=\"Load N-View Match\" src=\"http:\/\/www.archeo3d.net\/projets\/Coronation\/img\/ico_load_nv1.png\" alt=\"\" width=\"23\" height=\"21\" \/> . Load the <strong>[your_file_name]<\/strong>_dense_registered.nvm.<\/li>\n<li><strong>SfM \\ Save NV Match<\/strong> then name the file <strong>[your_file_name]<\/strong>_dense_registered_reduced.nvm.<\/li>\n<li>In <strong>3D View<\/strong> <img loading=\"lazy\" class=\"alignnone size-full wp-image-359 vertalignmiddle\" title=\"Switch 2D\/3D Views\" src=\"http:\/\/www.archeo3d.net\/projets\/Coronation\/img\/ico_2D3D.png\" alt=\"\" width=\"23\" height=\"21\" \/> , select a camera by pressing <strong>Right Click<\/strong> and delete it with the hand icon <img loading=\"lazy\" class=\"alignnone size-full wp-image-357 vertalignmiddle\" title=\"Remove Selected Camera\" src=\"http:\/\/www.archeo3d.net\/projets\/Coronation\/img\/ico_hand.png\" alt=\"\" width=\"23\" height=\"21\" \/> .<\/li>\n<\/ul>\n<p>OR\/AND<\/p>\n<ul>\n<li>Press <strong>F1<\/strong>, draw a selection rectangle over several cameras, and press the hand icon <img loading=\"lazy\" title=\"Remove Selected Camera\" src=\"http:\/\/www.archeo3d.net\/projets\/Coronation\/img\/ico_hand.png\" alt=\"\" width=\"23\" height=\"21\" \/> .<\/li>\n<\/ul>\n<p>OR\/AND<\/p>\n<ul>\n<li>Press <strong>F2<\/strong>, draw a selection rectangle over the 3D matches (sparse pointcloud), and press the hand icon <img loading=\"lazy\" title=\"Remove Selected Camera\" src=\"http:\/\/www.archeo3d.net\/projets\/Coronation\/img\/ico_hand.png\" alt=\"\" width=\"23\" height=\"21\" \/> . The cameras\/rasters related to these matches will be deleted. It&rsquo;s possible to grow the numbers of 3D matches displayed in the viewport by unchecking <strong>View \\ More Options \\ Show 3+ Points<\/strong> or <img loading=\"lazy\" class=\"alignnone size-full wp-image-396 vertalignmiddle\" title=\"Show Points seen by 3+ Cameras\" src=\"http:\/\/www.archeo3d.net\/projets\/Coronation\/img\/ico_3cam.png\" alt=\"\" width=\"23\" height=\"21\" \/> , which is activated by default.<\/li>\n<\/ul>\n<p>OR\/AND<\/p>\n<ul>\n<li>In <strong>Thumbnail Mode<\/strong> <img loading=\"lazy\" title=\"Show Image Thumbnails\" src=\"http:\/\/www.archeo3d.net\/projets\/Coronation\/img\/ico_thumbnails.png\" alt=\"\" width=\"23\" height=\"21\" \/> , <strong>Right Click<\/strong> on a raster and then press the hand icon <img loading=\"lazy\" title=\"Remove Selected Camera\" src=\"http:\/\/www.archeo3d.net\/projets\/Coronation\/img\/ico_hand.png\" alt=\"\" width=\"23\" height=\"21\" \/> .<\/li>\n<\/ul>\n<p>THEN<\/p>\n<ul>\n<li>Once only 10 to 20 registered and necessary rasters are left, prepare a new CMVS\/PMVS export as describe above in <strong>3.1. <\/strong>to generate a new folder structure with the <strong>bundle.rd.out<\/strong>,<strong>list.txt<\/strong> and undistorted <strong>*.jpg<\/strong> files.<strong> No need to fully run the dense reconstruction.<\/strong><\/li>\n<\/ul>\n<h3>Addendum :<\/h3>\n<p>Matteo Dellepiane has kindly drawn my attention to an alternative method to enable the desired rasters without having to delete them and to generate a reduced version of the sparse reconstruction. So, if the desired registered rasters are known, it is just straightforward to disable them before the application of the <strong>Parameterization + texturing from registered rasters<\/strong> filter, which has to be done by unchecking the mark in front of the raster name in the layer dialog box. Many thanks to him for his comment.<\/p>\n<h3>4.2. Processing and correcting the mesh<\/h3>\n<p>The Meshlab filter <strong>Texture \\ Parameterization + texturing from registered rasters<\/strong> will only work on a clean triangulated mesh. To ensure the mesh is fine, here are some corrections to apply :<\/p>\n<ul>\n<li>Start <strong>Meshlab <\/strong><strong><img loading=\"lazy\" title=\"Meshlab\" src=\"http:\/\/www.archeo3d.net\/projets\/Coronation\/img\/meshlab.png\" alt=\"\" width=\"24\" height=\"24\" \/><\/strong><\/li>\n<li><strong>File \\ Import Mesh<\/strong> or <img loading=\"lazy\" title=\"Import Mesh\" src=\"http:\/\/www.archeo3d.net\/projets\/Coronation\/img\/ico_Meshlab_import.png\" alt=\"\" width=\"27\" height=\"25\" \/> : open the mesh derived from the ground truth pointcloud.<\/li>\n<li><strong>Filters \\ Cleaning and Repairing \\ Select Non Manifold Edges<\/strong> , then <strong>Filters \\ Selection \\ Delete Selected Faces and Vertices<\/strong> or <img loading=\"lazy\" class=\"alignnone  wp-image-370 vertalignmiddlemeshlab\" title=\"Delete the current set of selected faces and all the vertices surrounding those faces\" src=\"http:\/\/www.archeo3d.net\/projets\/Coronation\/img\/ico_Meshlab_delete_faces_vertex.png\" alt=\"\" width=\"27\" height=\"25\" \/> or <strong>SHIFT + DEL<\/strong>.<\/li>\n<li><strong>Filters \\ Cleaning and Repairing \\ Select Non Manifold Vertices<\/strong>, then <strong>Filters \\ Selection \\ Delete Selected Vertices<\/strong> or <img loading=\"lazy\" title=\"Delete the current set of selected vertices\" src=\"http:\/\/www.archeo3d.net\/projets\/Coronation\/img\/ico_Meshlab_delete_vertex.png\" alt=\"\" width=\"27\" height=\"25\" \/> or <strong>CTRL + DEL<\/strong>.<\/li>\n<li><strong>File \\ Export Mesh.<\/strong><\/li>\n<li><strong>Close Meshlab<\/strong><\/li>\n<\/ul>\n<h3>4.3. Texture extraction<\/h3>\n<ul>\n<li><strong>Open Meshlab<\/strong><\/li>\n<li><strong>Open<\/strong> the <strong>bundle.rd.out<\/strong> and the <strong>list.txt<\/strong> files located in the <strong>[your_file_name]<\/strong>_dense_registered_reduced.nvm.cmvs folder, following the steps described in <strong>3.2<\/strong>.<\/li>\n<li><strong>File \\ Import Mesh<\/strong> or <img loading=\"lazy\" title=\"Import Mesh\" src=\"http:\/\/www.archeo3d.net\/projets\/Coronation\/img\/ico_Meshlab_import.png\" alt=\"\" width=\"27\" height=\"25\" \/> : open the corrected and cleaned mesh.<\/li>\n<li><strong>Filters<\/strong> \\ <strong>Texture \\ Parameterization + texturing from registered rasters<\/strong>, then, according to your GPU specifications, define an appropriate texture size (512, 1024, 2048, 4096 or more ?). In case the texture size is too big, the filter is likely to crash.<\/li>\n<li>After a while, and once the filter has been successfully applied, export the textured mesh by making sure the option <strong>TexCoord<\/strong> is checked (by default) in the dialog <strong>Choose Saving Options for:<\/strong>. A good idea is to name this mesh <strong>[your_file_name]<\/strong>_tex.ply.<\/li>\n<li>Import <strong>[your_file_name]<\/strong>_tex.ply, then make sure that <strong>Render \\ Color \\ Per Mesh<\/strong> is checked.<\/li>\n<li><strong>Optional<\/strong> : it is possible to transfer the color of the texture to the vertex color.<\/li>\n<\/ul>\n<p style=\"text-align: center;\"><p class=\"jetpack-slideshow-noscript robots-nocontent\">Ce diaporama n\u00e9cessite JavaScript.<\/p><div id=\"gallery-4-1-slideshow\" class=\"slideshow-window jetpack-slideshow slideshow-black\" data-trans=\"fade\" data-autostart=\"1\" data-gallery=\"[{&quot;src&quot;:&quot;https:\\\/\\\/www.archeo3d.net\\\/wp-content\\\/uploads\\\/logo_mobius.gif&quot;,&quot;id&quot;:&quot;439&quot;,&quot;title&quot;:&quot;logo_mobius&quot;,&quot;alt&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;itemprop&quot;:&quot;image&quot;}]\" itemscope itemtype=\"https:\/\/schema.org\/ImageGallery\"><\/div>\n<p style=\"text-align: center;\">Figure 11. Display of the textured ground truth model.<\/p>\n<div id=\"attachment_385\" style=\"width: 710px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/www.archeo3d.net\/projets\/Coronation\/img\/texture_2048.jpg\"><img aria-describedby=\"caption-attachment-385\" loading=\"lazy\" class=\"size-large wp-image-385\" title=\"Texture\" src=\"http:\/\/www.archeo3d.net\/projets\/Coronation\/img\/texture_2048-1024x1024.jpg\" alt=\"Texture\" width=\"700\" height=\"700\" \/><\/a><p id=\"caption-attachment-385\" class=\"wp-caption-text\">Figure 12. Texture issued by the <em>Parameterization + Texturing from registered rasters<\/em> filter<\/p><\/div>\n<h3>4.4. Quality of the texture<\/h3>\n<p>~~ under preparation ~~<\/p>\n<div id=\"attachment_434\" style=\"width: 1034px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/www.archeo3d.net\/projets\/Coronation\/img\/ortho_texture.jpg\"><img aria-describedby=\"caption-attachment-434\" loading=\"lazy\" class=\"size-full wp-image-434\" title=\"Texture applied on the mesh\" src=\"http:\/\/www.archeo3d.net\/projets\/Coronation\/img\/ortho_texture.jpg\" alt=\"Texture applied on the mesh\" width=\"1024\" height=\"916\" \/><\/a><p id=\"caption-attachment-434\" class=\"wp-caption-text\">Figure 13. Texture applied on the mesh.<\/p><\/div>\n<h2><\/h2>\n<div id=\"attachment_436\" style=\"width: 710px\" class=\"wp-caption aligncenter\"><img aria-describedby=\"caption-attachment-436\" loading=\"lazy\" class=\"size-full wp-image-436\" title=\"Compositing of several resolution photographs\" src=\"http:\/\/www.archeo3d.net\/projets\/Coronation\/img\/texture_resolution.jpg\" alt=\"Compositing of several resolution photographs\" width=\"700\" height=\"700\" \/><p id=\"caption-attachment-436\" class=\"wp-caption-text\">Figure 14. Compositing of several resolution photographs<\/p><\/div>\n<h2><\/h2>\n<div id=\"attachment_437\" style=\"width: 710px\" class=\"wp-caption aligncenter\"><img aria-describedby=\"caption-attachment-437\" loading=\"lazy\" class=\"size-full wp-image-437\" title=\"Compositing of several tone \/ contrast \/ white balance photographs\" src=\"http:\/\/www.archeo3d.net\/projets\/Coronation\/img\/texture_threshold.jpg\" alt=\"Compositing of several tone \/ contrast \/ white balance photographs\" width=\"700\" height=\"700\" \/><p id=\"caption-attachment-437\" class=\"wp-caption-text\">Figure 15. Compositing of several tone \/ contrast \/ white balance photographs<\/p><\/div>\n<h2>5. Comparison of the dense and the ground truth pointclouds<\/h2>\n<p>The last point of this tutorial deals with the assessment of the geometric accuracy of the SfM dense model compared to the ground truth data.<\/p>\n<div id=\"attachment_455\" style=\"width: 1034px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/www.archeo3d.net\/projets\/Coronation\/img\/3d_compare.jpg\"><img aria-describedby=\"caption-attachment-455\" loading=\"lazy\" class=\" wp-image-455 \" title=\"Figure 16. Comparison of the ground truth model (1) and the SfM Model (2)\" src=\"http:\/\/www.archeo3d.net\/projets\/Coronation\/img\/3d_compare.jpg\" alt=\"Figure 16. Comparison of the ground truth model (1) and the SfM Model (2)\" width=\"1024\" height=\"598\" \/><\/a><p id=\"caption-attachment-455\" class=\"wp-caption-text\">Figure 16. Comparison of the ground truth model (1) and the SfM Model (2)<\/p><\/div>\n<p>Some screen captures showing the two final meshes viewed in the same conditions are quite eloquent. Although the global structure of the SfM mesh seems to be correct upon an architectural scale (see <strong>Fig. 16<\/strong>), the dense reconstruction produces a busy and noisy pointcloud which, even being smoothed after a Poisson reconstruction, fails in retrieving the very details of the wall surface. Especially the depth of the relief is fakely rendered by the shadowed color of the vertices given by the photograph (see <strong>Fig. 18.2<\/strong> &amp; <strong>18.3<\/strong>), without conveying the expected 3D information. At the contrary, the sparser but pretty more regular pointset derived from LiDAR offers a sharper triangulated mesh that is more successful with the documentation of the geometry of the hieroglyphic and reliefs, even if some parts weren&rsquo;t recorded (i.e. the pseudo-chanfered edges shown in <strong>Fig. 18.5<\/strong>), being in a shadowed coverage area and are therefore wrongly triangulated.<\/p>\n<p style=\"text-align: center;\">\n<p style=\"text-align: center;\">Figure 17. Comparison of the ground truth and SfM textured meshes.<\/p>\n<div id=\"attachment_419\" style=\"width: 710px\" class=\"wp-caption aligncenter\"><img aria-describedby=\"caption-attachment-419\" loading=\"lazy\" class=\"size-full wp-image-419\" title=\"Figure 14. Comparison of the SfM (1-3) and ground truth (4-6) pointclouds and derived meshes.\" src=\"http:\/\/www.archeo3d.net\/projets\/Coronation\/img\/geometry_compare.jpg\" alt=\"Figure 14. Comparison of the SfM (1-3) and ground truth (4-6) pointclouds and derived meshes.\" width=\"700\" height=\"1050\" \/><p id=\"caption-attachment-419\" class=\"wp-caption-text\">Figure 18. Comparison of the SfM (1-3) and ground truth (4-6) pointclouds and derived meshes.<\/p><\/div>\n<h2><\/h2>\n<p>In order to estimate the differences between the two models, we are applying a global comparison between the two meshes following the method explained in this off-site tutorial <a title=\"Measuring the difference between two meshes\" href=\"http:\/\/meshlabstuff.blogspot.com\/2010\/01\/measuring-difference-between-two-meshes.html\" target=\"_blank\" rel=\"noopener noreferrer\">Measuring the difference between two meshes part 1<\/a> and <a title=\"Measuring the distance between two meshes (2) \" href=\"http:\/\/meshlabstuff.blogspot.com\/2010\/03\/measuring-distance-between-two-meshes-2.html\" target=\"_blank\" rel=\"noopener noreferrer\">part 2<\/a>.<\/p>\n<ul>\n<li>Start <strong>Meshlab <\/strong><strong><img loading=\"lazy\" title=\"Meshlab\" src=\"http:\/\/www.archeo3d.net\/projets\/Coronation\/img\/meshlab.png\" alt=\"\" width=\"24\" height=\"24\" \/><\/strong><\/li>\n<li><strong>File \\ Import Mesh<\/strong> or <img loading=\"lazy\" title=\"Import Mesh\" src=\"http:\/\/www.archeo3d.net\/projets\/Coronation\/img\/ico_Meshlab_import.png\" alt=\"\" width=\"27\" height=\"25\" \/> : open the meshes to be compared.<\/li>\n<li><strong>Filter \\ Sampling \\ Hausdorff Distance<\/strong>, select the Ground truth mesh <strong>as Sampled Mesh<\/strong>, and the SfM mesh as <strong>Target Mesh<\/strong>, then check <strong>Save Samples<\/strong> and <strong>Sample Vertices<\/strong>. A <strong>Hausdorff Sample Point<\/strong> new mesh should have been created and colored with a red\/yellow\/green gradient, where red shows the closest vertices and green the farest vertices. If the gradient is to smooth or continuous, it is possible to increase its contrast by :<\/li>\n<li><strong>Filter \\ Color Creation and Processing \\Colorize by vertices quality,<\/strong> and play around the settings, especially<strong> Percentile Crop<\/strong>.<\/li>\n<\/ul>\n<p style=\"text-align: center;\">\n<p style=\"text-align: center;\">Figure 18. Application of the Hausdorff Distance filter. Blue areas illustrate a significant discrepancy between the two meshes. Red ones are the more convergent.<\/p>\n<p>Here are the statistics of the filter applied, the units are expressed in millimeters.<\/p>\n<blockquote><p>min : 0.000000 max 227.992859 mean : 6.822711 RMS : 11.655860<br \/>\nValues w.r.t. BBox Diag (14169.060547)<br \/>\nmin : 0.000000 max 0.016091 mean : 0.000482 RMS : 0.000823<\/p><\/blockquote>\n<p>The Bounding Box Diagonal (BBox Diag) gives us the rough dimensions of our scene, around 14 meters (the length of the wall measured at its bottom is around 10,82 meters), and the Root Mean Square error (RMS) signifies that we have a bit more of 1 cm of discrepancy between the two meshes, which is very satisfactory for recording the global shape of the wall on an architectural point of view, but of course not enough for documenting the hieroglyphics. As shown in<strong> Fig. 18<\/strong>, the Hausdorff Distance surprisely witnesses a ring effect for the very convergence of the vertices (in <strong>red, <em>ca.<\/em> 2 mm<\/strong> of discrepancy), while the most part of the wall shows a yellow to <strong>green<\/strong> gradient (<strong><em>ca.<\/em> 14 mm<\/strong> of discrepancy), and the less accurate records, the few <strong>blue<\/strong> spats (<strong><em>ca.<\/em> 26 mm<\/strong>), are located in the hollow parts, where the shadows casted by the sun are the most likely to vary amongst a huge set of photographs taken at different daytime (see <strong>Fig. 19<\/strong>).<\/p>\n<p style=\"text-align: center;\">\n<p style=\"text-align: center;\">Figure 19. Different lighting conditions through the collection of photographs regarding the Hausdorff Distance.<\/p>\n<h2>6. Discussion<\/h2>\n<h2>7. Conclusion<\/h2>\n<h2>Acknowledgements<\/h2>\n<h2>References<\/h2>\n<ul>\n<li><a title=\"VisualSMF\" href=\"http:\/\/homes.cs.washington.edu\/~ccwu\/vsfm\/\" target=\"_blank\" rel=\"noopener noreferrer\">VisualSFM<\/a><\/li>\n<li><a title=\"Meshlab\" href=\"http:\/\/meshlab.sourceforge.net\/\" target=\"_blank\" rel=\"noopener noreferrer\">Meshlab<\/a><\/li>\n<li><a title=\"Patch-based Multi-view Stereo Software (PMVS - Version 2)\" href=\"http:\/\/grail.cs.washington.edu\/software\/pmvs\/\" target=\"_blank\" rel=\"noopener noreferrer\">PMVS<\/a><\/li>\n<li><a title=\"Clustering Views for Multi-view Stereo (CMVS)\" href=\"http:\/\/grail.cs.washington.edu\/software\/cmvs\/\" target=\"_blank\" rel=\"noopener noreferrer\">CMVS<\/a><\/li>\n<li><a title=\"Notepad++\" href=\"http:\/\/notepad-plus-plus.org\/\" target=\"_blank\" rel=\"noopener noreferrer\">Notepad++<\/a><\/li>\n<\/ul>\n<ul>\n<li>Y. Furukama, J. Ponce, \u00ab\u00a0Accurate, Dense, and Robust Multi-View Stereopsis\u00a0\u00bb, <em>Pattern Analysis and Machine Intelligence<\/em>, Volume 32, Issue 8, 2010, pp. 1362-1376.<\/li>\n<li>P. Cignoni, M. Calliri, M. Corsini, M. Dellepiane, F. Ganovelli, G. Ranzuglia, \u00ab\u00a0Meshlab : an Open-Source Mesh Processing Tool\u00a0\u00bb, <em>Sixth Eurographics Italian Chapter Conference<\/em>, 2008, pp. 129-136. <a title=\"MeshLab: an Open-Source Mesh Processing Tool\" href=\"http:\/\/vcg.isti.cnr.it\/Publications\/2008\/CCCDGR08\" target=\"_blank\" rel=\"noopener noreferrer\">[URL]<\/a><\/li>\n<li>M. Corsini, M. Dellepiane, F. Ganovelli, R. Gherardi, A. Fusiello, R. Scopigno, \u00ab\u00a0Fully Automatic Registration of Image Sets on Approximate Geometry\u00a0\u00bb, <em>International Journal of Computer Vision<\/em>, 2012. <a title=\"Fully Automatic Registration of Image Sets on Approximate Geometry\" href=\"http:\/\/vcg.isti.cnr.it\/Publications\/2012\/CDGGFS12\" target=\"_blank\" rel=\"noopener noreferrer\">[URL]<\/a><\/li>\n<li>J.-M. Frahm, P. Georgel, D. Gallup, T. Johnson, R. Raguram, Ch. Wu, Y.-H. Jen, E. Dunn, B.Clipp, S. Lazebnik, M. Pollefeys, \u00ab\u00a0Building Rome on a Cloudless Day\u00a0\u00bb, ECCV 2010, <a href=\"http:\/\/www.cs.unc.edu\/~jmf\/rome_on_a_cloudless_day\/\" target=\"_blank\" rel=\"noopener noreferrer\">[URL]<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p class=\"excerpt\">[here is a 2012 tutorial, outdated, but for the record] A case study : the epigraphic survey at the Ramesseum As a member of the French Archaeological Mission to Western Thebes (MAFTO) leaded by Dr. Christian Leblanc, I have been working with Dr. Philippe Martinez, egyptologist and epigraphist, and Kevin Cain, founder and director of INSIGHT, at the implementation of&hellip; <a href=\"https:\/\/www.archeo3d.net\/?page_id=313\">Read more &rarr;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"parent":130,"menu_order":0,"comment_status":"open","ping_status":"closed","template":"","meta":{"spay_email":""},"jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/P9Yk8b-53","_links":{"self":[{"href":"https:\/\/www.archeo3d.net\/index.php?rest_route=\/wp\/v2\/pages\/313"}],"collection":[{"href":"https:\/\/www.archeo3d.net\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.archeo3d.net\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.archeo3d.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.archeo3d.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=313"}],"version-history":[{"count":15,"href":"https:\/\/www.archeo3d.net\/index.php?rest_route=\/wp\/v2\/pages\/313\/revisions"}],"predecessor-version":[{"id":3474,"href":"https:\/\/www.archeo3d.net\/index.php?rest_route=\/wp\/v2\/pages\/313\/revisions\/3474"}],"up":[{"embeddable":true,"href":"https:\/\/www.archeo3d.net\/index.php?rest_route=\/wp\/v2\/pages\/130"}],"wp:attachment":[{"href":"https:\/\/www.archeo3d.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=313"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}