{"id":5944,"date":"2012-01-25T12:40:48","date_gmt":"2012-01-25T12:40:48","guid":{"rendered":"http:\/\/www.knowhowtransfer.com\/?p=5944"},"modified":"2016-02-10T16:47:02","modified_gmt":"2016-02-10T16:47:02","slug":"alce-and-360-panoramic-images","status":"publish","type":"post","link":"https:\/\/www.knowhowtransfer.com\/store\/alce-and-360-panoramic-images\/","title":{"rendered":"ALCE and 360\u00b0 panoramic images"},"content":{"rendered":"<p><!--:en-->Two suggestion for ALCE processing of equirectangular images to be used building 360 degree panoramas.<br \/> <!--:--><!--more--><!--:en--><\/p>\n<p><a href=\"https:\/\/www.knowhowtransfer.com\/store\/wp-content\/uploads\/2014\/05\/davide_barranca.jpg\"><img decoding=\"async\" class=\"alignleft size-full wp-image-6046\" src=\"https:\/\/www.knowhowtransfer.com\/store\/wp-content\/uploads\/2014\/05\/davide_barranca.jpg\" alt=\"davide_barranca\" width=\"150\" height=\"150\" \/><\/a>By Davide Barranca<\/p>\n<p>Equirectangular images, the ones used to build those beautiful, immersive, <a title=\"360\u00b0 panoramas\" href=\"http:\/\/www.gigapan.org\/gigapans\" target=\"_blank\">360 degrees panoramas<\/a>, may require some extra attention with <a title=\"ALCE - Advanced Local Contrast Enhancer\" href=\"http:\/\/www.bigano.com\/ALCE\" target=\"_blank\">ALCE<\/a> , in order to avoid processing differences near the image&#8217;s borders: which must blend seamlessly in the final file.<\/p>\n<p>The italian photographer <a href=\"https:\/\/www.facebook.com\/alfonso.grotta\" target=\"_blank\">Alfonso Grotta<\/a> has kindly given me the permission to use this wonderful image (part of a virtual tour he did over the past 3 years to document the <em>Somma<\/em> chapel restoration, in the <em>San Giovanni a Carbonara<\/em> church in Naples, Italy) to show a suggested workflow.<\/p>\n<p><!--:--><!--more--><!--:en--> An <a title=\"Equirectangular projection\" href=\"http:\/\/en.wikipedia.org\/wiki\/Equirectangular_projection\" target=\"_blank\">equirectangular<\/a> image is a stitch of several single shots, that covers 360\u00b0 horizontally (a full circle), and 180\u00b0 vertically (top to bottom). In the resulting panorama (a quicktime\/flash\/html movie) the image is wrapped around a sphere, so that the top and bottom lines of the borders are condensed into a single point (zenit and nadir) and the left and right borders touch themselves in a meridian. A true equirectangular file must have the <strong>exact 1:2 ratio<\/strong>(e.g. 1000 x 2000 px), not a pixel more, not a pixel less. To be successful with ALCE in your 360\u00b0 panoramas, you should follow just a couple of simple suggestions.<\/p>\n<h3>Avoid the Turbo<\/h3>\n<p><img decoding=\"async\" class=\"alignleft wp-image-5953 size-full\" title=\"ALCE - Turbo option\" src=\"https:\/\/www.knowhowtransfer.com\/store\/wp-content\/uploads\/2012\/01\/Turbo.png\" alt=\"ALCE - Turbo option\" width=\"151\" height=\"151\" \/>First, you should not select the Turbo processing: while it&#8217;s perfectly fine (and a lot faster) for normal, single images, it&#8217;s not recommended with equirectangular files.<\/p>\n<p>It builds the local mask (used by the routine to boost the contrast) in a way that doesn&#8217;t fit well with the image&#8217;s subsequent processing (i.e. the VR movie).<\/p>\n<h3>Offset<\/h3>\n<p>If you keep having troubles with the left\/right borders after ALCE, please try the following: (I suppose you have a flat, single layer, equirectangular image in Photoshop and you know its width in pixels &#8211; check it from the <em>Image &#8211; Image Size..<\/em>. menu).<\/p>\n<ol>\n<li value=\"1\">Duplicate the layer (rename it as SHIFTED)<\/li>\n<li value=\"2\">Run the <em>Filters &#8211; Other &#8211; Offset&#8230;<\/em><\/li>\n<li value=\"3\">Apply an Horizontal offset to the right using as a value the half of the image width in pixels, keeping &#8220;Wrap around&#8221; as the Undefined Areas option.<\/li>\n<\/ol>\n<div id=\"attachment_5948\" style=\"width: 349px\" class=\"wp-caption aligncenter\"><img decoding=\"async\" aria-describedby=\"caption-attachment-5948\" class=\"wp-image-5948 size-full\" title=\"Photoshop filter Offset - positive value\" src=\"https:\/\/www.knowhowtransfer.com\/store\/wp-content\/uploads\/2014\/06\/OffsetPositive.png\" alt=\"Photoshop filter Offset - positive value\" width=\"339\" height=\"233\" \/><p id=\"caption-attachment-5948\" class=\"wp-caption-text\">Photoshop filter Offset, first iteration with positive value<\/p><\/div>\n<p>For instance if your image is 3500px wide, offset it by 3500\/2 = 1750 pixels. Don&#8217;t worry if the width is odd (for instance 3543 pixels): pick up either 3543\/2 = (1770 or 1771), it&#8217;s not a problem at all, but write down the value somewhere. You&#8217;ll see that the whole image is&#8230; offset on the right (compare it with the one at the post start).<\/p>\n<div id=\"attachment_5952\" style=\"width: 580px\" class=\"wp-caption aligncenter\"><img decoding=\"async\" aria-describedby=\"caption-attachment-5952\" class=\"wp-image-5952 size-full\" title=\"Equirectangular after Offset - \u00a9 Alfonso Grotta\" src=\"https:\/\/www.knowhowtransfer.com\/store\/wp-content\/uploads\/2012\/01\/equirectangularOffset.jpg\" alt=\"Equirectangular after Offset - \u00a9 Alfonso Grotta\" width=\"570\" height=\"285\" \/><p id=\"caption-attachment-5952\" class=\"wp-caption-text\">Result of the Offset filter (180 shift in the Yaw)<\/p><\/div>\n<ol>\n<li value=\"4\">Apply ALCE with your chosen radius to the SHIFTED layer (just keep it visible and run ALCE).<\/li>\n<li value=\"5\">ALCE will create a processed layer: rename it &#8220;BORDERS&#8221; and run again on it the Filters-Other-Offset&#8230; with a negative Horizontal offset value: if previously you&#8217;ve used +1770, now choose -1770 to shift the layer back to its original yaw.<\/li>\n<\/ol>\n<p><a href=\"https:\/\/www.knowhowtransfer.com\/store\/alce-and-360-panoramic-images\/offsetnegative\/\"><img decoding=\"async\" class=\"alignnone wp-image-5955 size-full\" title=\"Photoshop filter Offset, second iteration - negative value\" src=\"https:\/\/www.knowhowtransfer.com\/store\/wp-content\/uploads\/2012\/01\/OffsetNegative.png\" alt=\"\" width=\"339\" height=\"233\" \/><\/a><\/p>\n<ol>\n<li value=\"6\">Trash the (now useless) SHIFTED layer, and switch off the visibility of the BORDERS layer.<\/li>\n<li>Run ALCE again with the very same radius on the background (original, un-shifted) layer.<\/li>\n<li>Trash the (now useless) background layer and rename the newly processed layer as CENTER.<\/li>\n<\/ol>\n<p>We&#8217;re almost done, but to recap: we&#8217;ve offset to the right a copy of a layer, processed it with ALCE and offset it back to left. Then we&#8217;ve applied ALCE to the original layer. The unprocessed layers have gone to the trash.<\/p>\n<ol>\n<li value=\"9\">Add a layer mask to the upper, BORDERS layer (click the <img decoding=\"async\" title=\"Layer Mask\" src=\"http:\/\/blog.rbg.bigano.com\/wp-content\/uploads\/2012\/01\/LayerMask.png\" alt=\"Layer Mask\" width=\"14\" height=\"12\" \/> icon in the layer palette, or select the layer and <em>Layer &#8211; Layer Mask &#8211; Reveal All<\/em>).<\/li>\n<li value=\"10\">Select the <em>Gradient Tool<\/em> from the tools palette, <em>Reflected Gradient<\/em> as the option in the upper option bar, black and white the colors.<img decoding=\"async\" class=\"aligncenter wp-image-5956 size-full\" title=\"Photoshop Reflective Gradient\" src=\"https:\/\/www.knowhowtransfer.com\/store\/wp-content\/uploads\/2012\/01\/Gradient-204x300.png\" alt=\"Photoshop Reflective Gradient\" width=\"204\" height=\"300\" \/><\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<ol>\n<li value=\"11\">With the layer mask active (it shows a little stroke in the icon&#8217;s corners), click and drag from the center all the way through the right, releasing the mouse a little bit before the border. You&#8217;ll end up with a layer mask like this one:<\/li>\n<\/ol>\n<div id=\"attachment_5957\" style=\"width: 580px\" class=\"wp-caption aligncenter\"><img decoding=\"async\" aria-describedby=\"caption-attachment-5957\" class=\"wp-image-5957 size-full\" title=\"Layer mask\" src=\"https:\/\/www.knowhowtransfer.com\/store\/wp-content\/uploads\/2012\/01\/Mask.png\" alt=\"Layer Mask\" width=\"570\" height=\"285\" \/><p id=\"caption-attachment-5957\" class=\"wp-caption-text\">The Layer mask for the BORDERS layer<\/p><\/div>\n<p><img decoding=\"async\" class=\"alignleft wp-image-5958 size-full\" title=\"Layers palette\" src=\"https:\/\/www.knowhowtransfer.com\/store\/wp-content\/uploads\/2012\/01\/Layers.png\" alt=\"Layers palette\" width=\"300\" height=\"213\" \/>Now your Layers palette should look like the image at the left: if it doesn&#8217;t, please review the steps above. You can now flatten the file and save it.<\/p>\n<p>Actually, painting a couple of large, soft brush strokes with white in the layer mask would have been enough, nevertheless the mirrored gradient is&#8230; much more elegant, don&#8217;t you agree?<\/p>\n<p>That&#8217;s it, I hope you&#8217;ve found this little trick useful &#8211; it can be used not only for ALCE, but also with all kind of elaborations that may give edge troubles with equirectangular images.<\/p>\n<p><em>I wish to thank again the photographer <a title=\"Alfonso Grotta Photographer\" href=\"http:\/\/www.alfonsogrotta.com\/\" target=\"_blank\">Alfonso Grotta<\/a> for the kind permission to use his picture. If you&#8217;re interested in the San Giovanni a Carbonara church virtual reality tour he made (and high resolution stills to document the restoration), it&#8217;s included in the companion CD of a <a title=\"La Cappella di Somma in San Giovanni a Carbonara a Napoli (book)\" href=\"http:\/\/www.librerianeapolis.it\/new\/index.php\/libri\/118-arte\/2474-la-cappella-di-somma-in-san-giovanni-a-carbonara-a-napoli-annachiara-alabiso-pierluigi-leone-de-castris\" target=\"_blank\">dedicated book<\/a>.<\/em><\/p>\n<hr \/>\n<h3>Davide Barranca<\/h3>\n<p>Lives and works near Bologna, Italy.<br \/> He&#8217;s the developer of ALCE, VitaminBW, Double USM, PS Projects and Floating Adjustments.<br \/> Davide is also a color-management aware photo-retoucher, focused in color-correction and image enhancement in fine-art photography, art reproduction photography and fine-art digital printing. Interested in academic research around digital imaging, stitching, HDRI, custom filters writing.<br \/> Specialties: Pre-press, broad experience in working side by side with photographers trying to convert from artist to technical language.<br \/> <a href=\"http:\/\/www.davidebarranca.com\" target=\"_blank\">You can visit his site here &gt;<\/a><!--:--><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Two suggestion for ALCE processing of equirectangular images to be used building 360 degree panoramas.<\/p>\n","protected":false},"author":10,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_et_pb_use_builder":"","_et_pb_old_content":"","_et_gb_content_width":"","footnotes":""},"categories":[7,111],"tags":[],"class_list":["post-5944","post","type-post","status-publish","format-standard","hentry","category-alce","category-photography"],"_links":{"self":[{"href":"https:\/\/www.knowhowtransfer.com\/store\/wp-json\/wp\/v2\/posts\/5944","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.knowhowtransfer.com\/store\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.knowhowtransfer.com\/store\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.knowhowtransfer.com\/store\/wp-json\/wp\/v2\/users\/10"}],"replies":[{"embeddable":true,"href":"https:\/\/www.knowhowtransfer.com\/store\/wp-json\/wp\/v2\/comments?post=5944"}],"version-history":[{"count":0,"href":"https:\/\/www.knowhowtransfer.com\/store\/wp-json\/wp\/v2\/posts\/5944\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.knowhowtransfer.com\/store\/wp-json\/wp\/v2\/media?parent=5944"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.knowhowtransfer.com\/store\/wp-json\/wp\/v2\/categories?post=5944"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.knowhowtransfer.com\/store\/wp-json\/wp\/v2\/tags?post=5944"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}