{"id":48,"date":"2018-06-05T16:28:12","date_gmt":"2018-06-05T20:28:12","guid":{"rendered":"https:\/\/pressbooks.bccampus.ca\/renegade\/?post_type=chapter&#038;p=48"},"modified":"2018-06-13T13:41:54","modified_gmt":"2018-06-13T17:41:54","slug":"chapter-1-1-setting-up-images","status":"publish","type":"chapter","link":"https:\/\/pressbooks.bccampus.ca\/renegade\/chapter\/chapter-1-1-setting-up-images\/","title":{"raw":"Chapter 1.2 - Setting Up Images","rendered":"Chapter 1.2 &#8211; Setting Up Images"},"content":{"raw":"<h1>Overview<\/h1>\r\nIn this chapter, the aim is to ensure that the images captured by the UAS are ready for processing in Agisoft Photoscan Professional (Photoscan). A Photoscan project will be created into which the supplied UAS images will be imported and then aligned.\r\n<h2>Photoscan Project Setup<\/h2>\r\nDownload the UAS images <a href=\"https:\/\/open.bcit.ca\/oer\/islandora\/object\/oer%3A45\">here<\/a>. Create a folder called <strong>BCIT_Field\u00a0<\/strong>in the\u00a0<strong>Documents\u00a0<\/strong>folder\u00a0on your workstation. Open the <strong>BCIT_Field<\/strong><strong>\u00a0<\/strong>folder, create a sub-folder called\u00a0<strong>Images <\/strong>and unzip the downloaded UAS images into this sub-folder.\u00a0You will have to remember the location of the\u00a0<strong>Images<\/strong> folder. Ensure that all 92 images are present.\r\n\r\nFrom the\u00a0<strong>Start<\/strong> menu, find and launch\u00a0<strong>Agisoft Photoscan Professional<\/strong>.\r\n<h2>Import Photos<\/h2>\r\nFrom the\u00a0<strong>Workflow<\/strong> menu, select\u00a0<strong>Add Photos<\/strong>, navigate to the\u00a0<strong>Images<\/strong> sub-folder, select all images and click\u00a0<strong>Open<\/strong>. Your window should look similar to the screenshot below.\r\n\r\n[caption id=\"attachment_49\" align=\"aligncenter\" width=\"535\"]<img src=\"https:\/\/pressbooks.bccampus.ca\/renegade\/wp-content\/uploads\/sites\/473\/2018\/06\/1-e1528227377641-1024x534.png\" alt=\"Screenshot showing the main scree of agisoft photoscan professional with 83 UAS photos lined up along their original flight path\" width=\"535\" height=\"279\" class=\"wp-image-49\" \/> Initial photo alignment in Photoscan[\/caption]\r\n\r\nAll of the photos along with their longitude, latitude, altitude and estimated accuracy are listed in the<strong> top left pane<\/strong>. Each photo thumbnail is also visible in the <strong>bottom pane<\/strong> and a full resolution image can be opened by double-clicking the thumbnail.\r\n\r\nIn the main\u00a0<strong>Model<\/strong> window, all of the image centers (principal point) are shown lined up according to how the UAS flew the pre-programmed image acquisition mission. The ball in the center of the\u00a0<strong>Model<\/strong> window is used to rotate and spin the model in the X, Y and Z axes using the left mouse button. The right mouse button moves the model around while zooming in\/out is done using the scroll-wheel on a mouse or by sliding two fingers on a touchpad.\r\n<h2>Assess Image Quality<\/h2>\r\nThe first quality assurance step is to assess the quality of the input photos. Photoscan checks basic photo attributes such as motion blur, focus, contrast and exposure. Right-click on one of the photos in the bottom pane, select\u00a0<strong>Estimate Image Quality...<\/strong>, select\u00a0<strong>All Photos <\/strong>then switch to\u00a0<strong>Detailed<\/strong>\u00a0view to see the quality score. Scores range from 0 (unacceptable) to 1.0 (perfect) and any photos below 0.6 should not be included in further processing.\r\n<h2>Adjust Altitude &amp; Coordinate System<\/h2>\r\nBy default, the principal points at each photo center are tagged with GPS coordinates in the WGS 84 coordinate system. This means that although the horizontal position (i.e. longitude and latitude) is relatively accurate (<span style=\"text-decoration: underline\">+<\/span>5m), the altitude needs to be adjusted to the actual height that the UAS flew above the ground. This is accomplished by accessing the\u00a0<strong>Tools<\/strong> menu, selecting\u00a0<strong>Scrpits <\/strong>and\u00a0running the following Python script <strong>PS125_load_altitude_DJI.py\u00a0<\/strong>from the C:\\Program Files\\Agisoft\\PhotoScan Pro\\python\\Scripts folder.\r\n<div class=\"bcc-box bcc-info\">\r\n<h3 itemprop=\"educationalUse\"><strong>Change Coordinate System<\/strong><\/h3>\r\nIf the coordinate system needs to be changed from the default WGS 84, click on the\u00a0<strong>Convert<\/strong> icon in the\u00a0<strong>Reference<\/strong> pane and select a new coordinate system of your choice. Apply the conversion to\u00a0<strong>Photos<\/strong> only (uncheck\u00a0<strong>Markers<\/strong>) and click\u00a0<strong>OK<\/strong>.\r\n\r\n<\/div>\r\n<h2>Aligning Photos<\/h2>\r\nSo far, the software only knows where the centre of each photo should be in absolute space (i.e. real-world coordinate system). It doesn't yet know how all the overlapping photos connect or fit together. This is the purpose of the alignment function in Photoscan. Aligning photos is based on a computer vision concept called\u00a0<strong><a href=\"https:\/\/en.wikipedia.org\/wiki\/Structure_from_motion\" target=\"_blank\" rel=\"noopener\">Structure from Motion<\/a><\/strong>.\r\n\r\nFrom the\u00a0<strong>Workflow<\/strong> menu, select\u00a0<strong>Align Photos<\/strong>, adjust the parameters to match the screenshot below and click\u00a0<strong>OK<\/strong>.\r\n\r\n[caption id=\"attachment_82\" align=\"aligncenter\" width=\"366\"]<img src=\"https:\/\/pressbooks.bccampus.ca\/renegade\/wp-content\/uploads\/sites\/473\/2018\/06\/Low_alignment_1.png\" alt=\"Screenshot of the low photo alignment dialogue\" width=\"366\" height=\"405\" class=\"wp-image-82 size-full\" \/> Initial photo alignment[\/caption]\r\n\r\nAfter a few seconds, the sparse point cloud showing the key tie points is generated and the view should look similar to the one below.\r\n\r\n[caption id=\"attachment_103\" align=\"aligncenter\" width=\"1024\"]<img src=\"https:\/\/pressbooks.bccampus.ca\/renegade\/wp-content\/uploads\/sites\/473\/2018\/06\/Low_alignment_3-e1528744157883-1024x553.png\" alt=\"Screenshot of a sparse point cloud showing key tie points and the photo footprints in Agisoft Photoscan professional\" width=\"1024\" height=\"553\" class=\"wp-image-103 size-large\" \/> Sparse point cloud showing key tie points.[\/caption]\r\n\r\nSave the project by accessing the\u00a0<strong>File<\/strong> menu, selecting\u00a0<strong>Save As...<\/strong>, navigating to the <strong>BCIT_Field<\/strong><strong>\u00a0<\/strong>folder, naming it <strong>BCIT_Field<\/strong>\u00a0and clicking\u00a0<strong>OK<\/strong>.","rendered":"<h1>Overview<\/h1>\n<p>In this chapter, the aim is to ensure that the images captured by the UAS are ready for processing in Agisoft Photoscan Professional (Photoscan). A Photoscan project will be created into which the supplied UAS images will be imported and then aligned.<\/p>\n<h2>Photoscan Project Setup<\/h2>\n<p>Download the UAS images <a href=\"https:\/\/open.bcit.ca\/oer\/islandora\/object\/oer%3A45\">here<\/a>. Create a folder called <strong>BCIT_Field\u00a0<\/strong>in the\u00a0<strong>Documents\u00a0<\/strong>folder\u00a0on your workstation. Open the <strong>BCIT_Field<\/strong><strong>\u00a0<\/strong>folder, create a sub-folder called\u00a0<strong>Images <\/strong>and unzip the downloaded UAS images into this sub-folder.\u00a0You will have to remember the location of the\u00a0<strong>Images<\/strong> folder. Ensure that all 92 images are present.<\/p>\n<p>From the\u00a0<strong>Start<\/strong> menu, find and launch\u00a0<strong>Agisoft Photoscan Professional<\/strong>.<\/p>\n<h2>Import Photos<\/h2>\n<p>From the\u00a0<strong>Workflow<\/strong> menu, select\u00a0<strong>Add Photos<\/strong>, navigate to the\u00a0<strong>Images<\/strong> sub-folder, select all images and click\u00a0<strong>Open<\/strong>. Your window should look similar to the screenshot below.<\/p>\n<figure id=\"attachment_49\" aria-describedby=\"caption-attachment-49\" style=\"width: 535px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/renegade\/wp-content\/uploads\/sites\/473\/2018\/06\/1-e1528227377641-1024x534.png\" alt=\"Screenshot showing the main scree of agisoft photoscan professional with 83 UAS photos lined up along their original flight path\" width=\"535\" height=\"279\" class=\"wp-image-49\" srcset=\"https:\/\/pressbooks.bccampus.ca\/renegade\/wp-content\/uploads\/sites\/473\/2018\/06\/1-e1528227377641-1024x534.png 1024w, https:\/\/pressbooks.bccampus.ca\/renegade\/wp-content\/uploads\/sites\/473\/2018\/06\/1-e1528227377641-300x156.png 300w, https:\/\/pressbooks.bccampus.ca\/renegade\/wp-content\/uploads\/sites\/473\/2018\/06\/1-e1528227377641-768x400.png 768w, https:\/\/pressbooks.bccampus.ca\/renegade\/wp-content\/uploads\/sites\/473\/2018\/06\/1-e1528227377641-65x34.png 65w, https:\/\/pressbooks.bccampus.ca\/renegade\/wp-content\/uploads\/sites\/473\/2018\/06\/1-e1528227377641-225x117.png 225w, https:\/\/pressbooks.bccampus.ca\/renegade\/wp-content\/uploads\/sites\/473\/2018\/06\/1-e1528227377641-350x182.png 350w, https:\/\/pressbooks.bccampus.ca\/renegade\/wp-content\/uploads\/sites\/473\/2018\/06\/1-e1528227377641.png 1917w\" sizes=\"auto, (max-width: 535px) 100vw, 535px\" \/><figcaption id=\"caption-attachment-49\" class=\"wp-caption-text\">Initial photo alignment in Photoscan<\/figcaption><\/figure>\n<p>All of the photos along with their longitude, latitude, altitude and estimated accuracy are listed in the<strong> top left pane<\/strong>. Each photo thumbnail is also visible in the <strong>bottom pane<\/strong> and a full resolution image can be opened by double-clicking the thumbnail.<\/p>\n<p>In the main\u00a0<strong>Model<\/strong> window, all of the image centers (principal point) are shown lined up according to how the UAS flew the pre-programmed image acquisition mission. The ball in the center of the\u00a0<strong>Model<\/strong> window is used to rotate and spin the model in the X, Y and Z axes using the left mouse button. The right mouse button moves the model around while zooming in\/out is done using the scroll-wheel on a mouse or by sliding two fingers on a touchpad.<\/p>\n<h2>Assess Image Quality<\/h2>\n<p>The first quality assurance step is to assess the quality of the input photos. Photoscan checks basic photo attributes such as motion blur, focus, contrast and exposure. Right-click on one of the photos in the bottom pane, select\u00a0<strong>Estimate Image Quality&#8230;<\/strong>, select\u00a0<strong>All Photos <\/strong>then switch to\u00a0<strong>Detailed<\/strong>\u00a0view to see the quality score. Scores range from 0 (unacceptable) to 1.0 (perfect) and any photos below 0.6 should not be included in further processing.<\/p>\n<h2>Adjust Altitude &amp; Coordinate System<\/h2>\n<p>By default, the principal points at each photo center are tagged with GPS coordinates in the WGS 84 coordinate system. This means that although the horizontal position (i.e. longitude and latitude) is relatively accurate (<span style=\"text-decoration: underline\">+<\/span>5m), the altitude needs to be adjusted to the actual height that the UAS flew above the ground. This is accomplished by accessing the\u00a0<strong>Tools<\/strong> menu, selecting\u00a0<strong>Scrpits <\/strong>and\u00a0running the following Python script <strong>PS125_load_altitude_DJI.py\u00a0<\/strong>from the C:\\Program Files\\Agisoft\\PhotoScan Pro\\python\\Scripts folder.<\/p>\n<div class=\"bcc-box bcc-info\">\n<h3 itemprop=\"educationalUse\"><strong>Change Coordinate System<\/strong><\/h3>\n<p>If the coordinate system needs to be changed from the default WGS 84, click on the\u00a0<strong>Convert<\/strong> icon in the\u00a0<strong>Reference<\/strong> pane and select a new coordinate system of your choice. Apply the conversion to\u00a0<strong>Photos<\/strong> only (uncheck\u00a0<strong>Markers<\/strong>) and click\u00a0<strong>OK<\/strong>.<\/p>\n<\/div>\n<h2>Aligning Photos<\/h2>\n<p>So far, the software only knows where the centre of each photo should be in absolute space (i.e. real-world coordinate system). It doesn&#8217;t yet know how all the overlapping photos connect or fit together. This is the purpose of the alignment function in Photoscan. Aligning photos is based on a computer vision concept called\u00a0<strong><a href=\"https:\/\/en.wikipedia.org\/wiki\/Structure_from_motion\" target=\"_blank\" rel=\"noopener\">Structure from Motion<\/a><\/strong>.<\/p>\n<p>From the\u00a0<strong>Workflow<\/strong> menu, select\u00a0<strong>Align Photos<\/strong>, adjust the parameters to match the screenshot below and click\u00a0<strong>OK<\/strong>.<\/p>\n<figure id=\"attachment_82\" aria-describedby=\"caption-attachment-82\" style=\"width: 366px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/renegade\/wp-content\/uploads\/sites\/473\/2018\/06\/Low_alignment_1.png\" alt=\"Screenshot of the low photo alignment dialogue\" width=\"366\" height=\"405\" class=\"wp-image-82 size-full\" srcset=\"https:\/\/pressbooks.bccampus.ca\/renegade\/wp-content\/uploads\/sites\/473\/2018\/06\/Low_alignment_1.png 366w, https:\/\/pressbooks.bccampus.ca\/renegade\/wp-content\/uploads\/sites\/473\/2018\/06\/Low_alignment_1-271x300.png 271w, https:\/\/pressbooks.bccampus.ca\/renegade\/wp-content\/uploads\/sites\/473\/2018\/06\/Low_alignment_1-65x72.png 65w, https:\/\/pressbooks.bccampus.ca\/renegade\/wp-content\/uploads\/sites\/473\/2018\/06\/Low_alignment_1-225x249.png 225w, https:\/\/pressbooks.bccampus.ca\/renegade\/wp-content\/uploads\/sites\/473\/2018\/06\/Low_alignment_1-350x387.png 350w\" sizes=\"auto, (max-width: 366px) 100vw, 366px\" \/><figcaption id=\"caption-attachment-82\" class=\"wp-caption-text\">Initial photo alignment<\/figcaption><\/figure>\n<p>After a few seconds, the sparse point cloud showing the key tie points is generated and the view should look similar to the one below.<\/p>\n<figure id=\"attachment_103\" aria-describedby=\"caption-attachment-103\" style=\"width: 1024px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/renegade\/wp-content\/uploads\/sites\/473\/2018\/06\/Low_alignment_3-e1528744157883-1024x553.png\" alt=\"Screenshot of a sparse point cloud showing key tie points and the photo footprints in Agisoft Photoscan professional\" width=\"1024\" height=\"553\" class=\"wp-image-103 size-large\" srcset=\"https:\/\/pressbooks.bccampus.ca\/renegade\/wp-content\/uploads\/sites\/473\/2018\/06\/Low_alignment_3-e1528744157883-1024x553.png 1024w, https:\/\/pressbooks.bccampus.ca\/renegade\/wp-content\/uploads\/sites\/473\/2018\/06\/Low_alignment_3-e1528744157883-300x162.png 300w, https:\/\/pressbooks.bccampus.ca\/renegade\/wp-content\/uploads\/sites\/473\/2018\/06\/Low_alignment_3-e1528744157883-768x414.png 768w, https:\/\/pressbooks.bccampus.ca\/renegade\/wp-content\/uploads\/sites\/473\/2018\/06\/Low_alignment_3-e1528744157883-65x35.png 65w, https:\/\/pressbooks.bccampus.ca\/renegade\/wp-content\/uploads\/sites\/473\/2018\/06\/Low_alignment_3-e1528744157883-225x121.png 225w, https:\/\/pressbooks.bccampus.ca\/renegade\/wp-content\/uploads\/sites\/473\/2018\/06\/Low_alignment_3-e1528744157883-350x189.png 350w, https:\/\/pressbooks.bccampus.ca\/renegade\/wp-content\/uploads\/sites\/473\/2018\/06\/Low_alignment_3-e1528744157883.png 1920w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption id=\"caption-attachment-103\" class=\"wp-caption-text\">Sparse point cloud showing key tie points.<\/figcaption><\/figure>\n<p>Save the project by accessing the\u00a0<strong>File<\/strong> menu, selecting\u00a0<strong>Save As&#8230;<\/strong>, navigating to the <strong>BCIT_Field<\/strong><strong>\u00a0<\/strong>folder, naming it <strong>BCIT_Field<\/strong>\u00a0and clicking\u00a0<strong>OK<\/strong>.<\/p>\n","protected":false},"author":365,"menu_order":2,"template":"","meta":{"pb_show_title":"on","pb_short_title":"","pb_subtitle":"","pb_authors":[],"pb_section_license":""},"chapter-type":[],"contributor":[],"license":[],"class_list":["post-48","chapter","type-chapter","status-publish","hentry"],"part":18,"_links":{"self":[{"href":"https:\/\/pressbooks.bccampus.ca\/renegade\/wp-json\/pressbooks\/v2\/chapters\/48","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pressbooks.bccampus.ca\/renegade\/wp-json\/pressbooks\/v2\/chapters"}],"about":[{"href":"https:\/\/pressbooks.bccampus.ca\/renegade\/wp-json\/wp\/v2\/types\/chapter"}],"author":[{"embeddable":true,"href":"https:\/\/pressbooks.bccampus.ca\/renegade\/wp-json\/wp\/v2\/users\/365"}],"version-history":[{"count":15,"href":"https:\/\/pressbooks.bccampus.ca\/renegade\/wp-json\/pressbooks\/v2\/chapters\/48\/revisions"}],"predecessor-version":[{"id":202,"href":"https:\/\/pressbooks.bccampus.ca\/renegade\/wp-json\/pressbooks\/v2\/chapters\/48\/revisions\/202"}],"part":[{"href":"https:\/\/pressbooks.bccampus.ca\/renegade\/wp-json\/pressbooks\/v2\/parts\/18"}],"metadata":[{"href":"https:\/\/pressbooks.bccampus.ca\/renegade\/wp-json\/pressbooks\/v2\/chapters\/48\/metadata\/"}],"wp:attachment":[{"href":"https:\/\/pressbooks.bccampus.ca\/renegade\/wp-json\/wp\/v2\/media?parent=48"}],"wp:term":[{"taxonomy":"chapter-type","embeddable":true,"href":"https:\/\/pressbooks.bccampus.ca\/renegade\/wp-json\/pressbooks\/v2\/chapter-type?post=48"},{"taxonomy":"contributor","embeddable":true,"href":"https:\/\/pressbooks.bccampus.ca\/renegade\/wp-json\/wp\/v2\/contributor?post=48"},{"taxonomy":"license","embeddable":true,"href":"https:\/\/pressbooks.bccampus.ca\/renegade\/wp-json\/wp\/v2\/license?post=48"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}