<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-3626977803304967003</id><updated>2012-02-16T03:36:36.112-08:00</updated><category term='Texture Synthesis'/><category term='Computer Graphics'/><category term='Computational Photography'/><category term='Autodesk Maya'/><title type='text'>Federico Perazzi</title><subtitle type='html'>fedeperazzi@gmail.com</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://www.fedeperazzi.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3626977803304967003/posts/default'/><link rel='alternate' type='text/html' href='http://www.fedeperazzi.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Federico Perazzi</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>14</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-3626977803304967003.post-5796851731965068532</id><published>2010-05-12T20:44:00.000-07:00</published><updated>2010-07-17T21:03:54.879-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Computational Photography'/><title type='text'>Seam Carving - Content Aware Image Resizing</title><content type='html'>Sometimes we have an image too big and we want to re-size it. Until recently we had two ways to handle this problem: &lt;i&gt;scaling&lt;/i&gt; or &lt;i&gt;cropping&lt;/i&gt;. Both techniques present drawbacks, in particular &lt;i&gt;scaling&lt;/i&gt; leads to unnatural distortions, and &lt;i&gt;cropping&lt;/i&gt; entails lost of content.&lt;br /&gt; &lt;br /&gt;In 2007, &lt;i&gt;Shai Avidan&lt;/i&gt;&lt;a href="#AVIDAN"&gt;&lt;sup&gt;1&lt;/sup&gt;&lt;/a&gt; and &lt;i&gt;Ariel Shamir&lt;/i&gt;&lt;a href="#SHAMIR"&gt;&lt;sup&gt;2&lt;/sup&gt;&lt;/a&gt; presented an algorithm, called &lt;i&gt;Seam Carving&lt;/i&gt; or &lt;i&gt;Content Aware Image Resizing&lt;/i&gt;&lt;a href="#CARVING"&gt;&lt;sup&gt;3&lt;/sup&gt;&lt;/a&gt;, capable or reducing the size of an image, in a content-aware manner, that is without removing important information from the image itself.&lt;br /&gt;&lt;br /&gt;Given as input an image and a target size the algorithm proceeds removing connected straight paths of unnoticeable pixel that blend well with their neighbors. The paths selection is based on an energy function, in my case a &lt;i&gt;Sobel Filter&lt;/i&gt;, computed over the image. Once it has been given an energy value to each pixel, as the next step, the algorithm uses dynamic programming to find the minimum cost path connecting the image from top to bottom or left to right depending on the dimension we are reducing. This is really similar to what has been done by &lt;i&gt;Alexei Efros&lt;/i&gt;&lt;a href="#EFROS"&gt;&lt;sup&gt;4&lt;/sup&gt;&lt;/a&gt; in &lt;i&gt;Image Quilting for Texture Synthesis&lt;/i&gt;&lt;a href="#QUILTING"&gt;&lt;sup&gt;5&lt;/sup&gt;&lt;/a&gt;, where he uses the same dynamic programming algorithm to cut the boundaries of overlapping blocks of textures.&amp;nbsp; &lt;br /&gt;&lt;br /&gt;Finally the pixels that are part of the selected path are removed generating the final result.&lt;br /&gt;&lt;br /&gt;&lt;table align="left" cellspacing="0"&gt; &lt;caption style="caption-side: bottom; text-align: left;"&gt;&lt;small&gt;&lt;i&gt;Original image by &lt;a href="http://www.flickriver.com/photos/7455207@N05/tags/catalogna "&gt;SBA73&lt;/a&gt;, http://www.flickriver.com&lt;/i&gt;&lt;/small&gt;&lt;/caption&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;img border="0" src="http://3.bp.blogspot.com/_h79Be84WZ2U/TECykCpoj_I/AAAAAAAAAGc/Dy1Nw6gbWq8/s800/illaroja.jpg"/&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br clear="all" /&gt;&lt;br /&gt;&lt;table align="left" cellspacing="0"&gt; &lt;caption style="caption-side: bottom; text-align: left;"&gt;&lt;small&gt;&lt;i&gt;Left: scaled image. Right: seam-carved image.&lt;/i&gt;&lt;/small&gt;&lt;/caption&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;img border="0" src="http://3.bp.blogspot.com/_h79Be84WZ2U/TECyTeJijSI/AAAAAAAAAGU/Q383R_28qJU/s800/illaroja_final_scaled.jpg"/&gt;&lt;/td&gt;&lt;td&gt;&lt;img border="0" src="http://3.bp.blogspot.com/_h79Be84WZ2U/TECyRCVRSoI/AAAAAAAAAGQ/U2kzYqaQLRk/s800/illaroja_final.jpg"/&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br clear="all" /&gt;&lt;br /&gt;&lt;table align="left" cellspacing="0"&gt; &lt;caption style="caption-side: bottom; text-align: left;"&gt;&lt;small&gt;&lt;i&gt;Original image by &lt;a href="http://interfacelift.com/wallpaper_beta/details/2179/pier_to_nowhere.html"&gt;TJP&lt;/a&gt;, http://interfacelift.com&lt;/i&gt;&lt;/small&gt;&lt;/caption&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;img border="0" src="http://2.bp.blogspot.com/_h79Be84WZ2U/TEDvN7NM8JI/AAAAAAAAAGo/iKMbJzpUlfI/s640/piertonowhere800.jpg"/&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br clear="all" /&gt;&lt;br /&gt;&lt;table align="left" cellspacing="0"&gt; &lt;caption style="caption-side: bottom; text-align: left;"&gt;&lt;small&gt;&lt;i&gt;Horizontally seam-carved image.&lt;/i&gt;&lt;/small&gt;&lt;/caption&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;img border="0" src="http://3.bp.blogspot.com/_h79Be84WZ2U/TEDwTy-pYgI/AAAAAAAAAGw/TqDwtanYMVY/s640/piertonowhere_resized800.jpg" /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br clear="all" /&gt;&lt;br /&gt;References:&lt;br /&gt;&lt;a name="AVIDAN"&gt;&lt;sup&gt;1&lt;/sup&gt;&lt;/a&gt;&lt;i&gt;Shai Avidan, Mitsubishi Electric Research Labs (MERL), http://www.shaiavidan.org&lt;/i&gt;&lt;br /&gt;&lt;a name="SHAMIR"&gt;&lt;sup&gt;2&lt;/sup&gt;&lt;/a&gt;&lt;i&gt;Ariel Shamir, Interdisciplinary Center and MERL, http://www.faculty.idc.ac.il/arik/site/index.asp&lt;/i&gt;&lt;sup&gt;&amp;nbsp;&lt;/sup&gt;&lt;br /&gt;&lt;a name="CARVING"&gt;&lt;sup&gt;3&lt;/sup&gt;&lt;/a&gt;&lt;i&gt;Seam Carving, http://www.shaiavidan.org/papers/imretFinal.pdf&lt;/i&gt;&lt;br /&gt;&lt;a name="EFROS"&gt;&lt;sup&gt;4&lt;/sup&gt;&lt;/a&gt;&lt;i&gt;Alexei Efros, Carnegie Mellon University, http://www.cs.cmu.edu/~efros&lt;/i&gt;&lt;br /&gt;&lt;a name="QUILTING"&gt;&lt;sup&gt;5&lt;/sup&gt;&lt;/a&gt;&lt;i&gt;Image Quilting, http://www.eecs.berkeley.edu/Research/Projects/CS/vision/papers/efros-siggraph01.pdf&lt;/i&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3626977803304967003-5796851731965068532?l=www.fedeperazzi.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3626977803304967003/posts/default/5796851731965068532'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3626977803304967003/posts/default/5796851731965068532'/><link rel='alternate' type='text/html' href='http://www.fedeperazzi.com/2010/07/context-aware-image-resize.html' title='Seam Carving - Content Aware Image Resizing'/><author><name>Federico Perazzi</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_h79Be84WZ2U/TECykCpoj_I/AAAAAAAAAGc/Dy1Nw6gbWq8/s72-c/illaroja.jpg' height='72' width='72'/></entry><entry><id>tag:blogger.com,1999:blog-3626977803304967003.post-6462000515588585236</id><published>2010-05-05T12:02:00.000-07:00</published><updated>2010-09-18T00:26:40.065-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Computer Graphics'/><title type='text'>PansaSE Project</title><content type='html'>&lt;table align="left" cellspacing="0"&gt; &lt;caption style="caption-side: bottom; text-align: left;"&gt;&lt;small&gt;&lt;i&gt;&lt;/i&gt;&lt;/small&gt;&lt;/caption&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;img border="0" src="http://3.bp.blogspot.com/_h79Be84WZ2U/TFXKAlw4pGI/AAAAAAAAALs/yGWZRCeJKxA/s700/panda_se_banner.png" /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br clear="all" /&gt;&lt;br /&gt;PandaSE was my last semester-long project I took part at the &lt;i&gt;Carnegie Mellon Entertainment Technology Center.&lt;/i&gt; In this project we had the chance to work in conjunction with Walt Disney Imagineering on the open-source Panda3D Game Engine. In particular I worked on the shader system of the engine, adding support to all the NVIDIA Cg 2.0 inputs.&lt;br /&gt;&lt;br /&gt;Here is a couple of posts I wrote on the Panda3D forum to introduce the new features to the commnutity:&lt;br /&gt;1. &lt;a href="http://www.panda3d.org/forums/viewtopic.php?t=9099"  target="blank"&gt;Shader Inputs&lt;/a&gt;&lt;br /&gt;2. &lt;a href="http://www.panda3d.org/forums/viewtopic.php?t=9099"  target="blank"&gt;Texture Arrays&lt;/a&gt;&lt;br /&gt;&lt;br clear="all" /&gt;This demo showcases the use of &lt;i&gt;Hardware Based Instancing&lt;/i&gt; in conjunction with &lt;i&gt;Texture Arrays&lt;/i&gt;. &lt;br /&gt;&lt;br /&gt;&lt;table&gt;&lt;tr&gt;&lt;td&gt;&lt;object width="640" height="360"&gt;&lt;param name="allowfullscreen" value="true" /&gt;&lt;param name="allowscriptaccess" value="always" /&gt;&lt;param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=13796756&amp;amp;server=vimeo.com&amp;amp;show_title=0&amp;amp;show_byline=0&amp;amp;show_portrait=0&amp;amp;color=ff9933&amp;amp;fullscreen=1" /&gt;&lt;embed src="http://vimeo.com/moogaloop.swf?clip_id=13796756&amp;amp;server=vimeo.com&amp;amp;show_title=0&amp;amp;show_byline=0&amp;amp;show_portrait=0&amp;amp;color=ff9933&amp;amp;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="640" height="360"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;br clear="all" /&gt;&lt;br /&gt;More demos are available on the project &lt;a href="http://www.etc.cmu.edu/projects/pandase/" target="blank"&gt;website&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3626977803304967003-6462000515588585236?l=www.fedeperazzi.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3626977803304967003/posts/default/6462000515588585236'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3626977803304967003/posts/default/6462000515588585236'/><link rel='alternate' type='text/html' href='http://www.fedeperazzi.com/2010/08/pansase-project.html' title='PansaSE Project'/><author><name>Federico Perazzi</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_h79Be84WZ2U/TFXKAlw4pGI/AAAAAAAAALs/yGWZRCeJKxA/s72-c/panda_se_banner.png' height='72' width='72'/></entry><entry><id>tag:blogger.com,1999:blog-3626977803304967003.post-7844678022143701462</id><published>2010-04-18T09:46:00.000-07:00</published><updated>2010-08-01T15:11:30.828-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Computational Photography'/><title type='text'>Stitching Photo Mosaics (including autostitching)</title><content type='html'>The described algorithm generates a panorama from a set of adjacent photos and it is based on the paper &lt;i&gt;Multi-Image Matching using Multi-Scale Oriented Patches&lt;/i&gt; but with several simplifications. The algorithm consider that the transformations between different images are projective and therefore the photographs should be taken from the same point of view but with different view directions. To align the images, the algorithm needs to recover the parameters of the transformation between each pair of images. In this case the transformation is an homography. This process involves several steps to make sure no outliers are present in the final set of points used to compute the projective transformation.&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;1. Interest Points Selection&lt;/h3&gt;A large set of interest points is initially generated by a &lt;i&gt;Single Scale Harris Corner Detector (code provided by A. Efros)&lt;/i&gt;, and then sub-sampled by the &lt;i&gt;Adaptive Non-Maximal Suppression Algorithm&lt;/i&gt;, that based on the corner strength, retains only the points that are a maximum in a neighbor of a certain radius. In this way the &lt;i&gt;ANMS&lt;/i&gt; ensures that the sample points are spatially well distributed over the  entire image.&lt;br /&gt;&lt;br /&gt;&lt;table align="left" cellspacing="0"&gt; &lt;caption style="caption-side: bottom; text-align: left;"&gt;&lt;small&gt;&lt;i&gt;In green, interest points etained by the ANMS algorithm.&lt;/i&gt;&lt;/small&gt;&lt;/caption&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;img border="0" src="http://2.bp.blogspot.com/_h79Be84WZ2U/TEIstrmzBKI/AAAAAAAAAHA/c-0Lafkg0Rs/s350/anms1_1024.png"/&gt;&lt;/td&gt;&lt;td&gt;&lt;img border="0" src="http://4.bp.blogspot.com/_h79Be84WZ2U/TEIt2CCvniI/AAAAAAAAAHI/YJnNmaEhElA/s350/anms2_1024.png"/&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br clear="all" /&gt;&lt;br /&gt;&lt;h3&gt;2. Feature Descriptors Extraction&lt;/h3&gt;Pairs of corresponding interest points from the two images, are coupled based on the similarity of the pixels around them. An axis-aligned 40×40 patch, is extracted around the location of each interest point. This &lt;i&gt;feature descriptor&lt;/i&gt;, is subsequently blurred and reduced to 8x8 in order to make the &lt;i&gt;feature matching process&lt;/i&gt; translation invariant in a range of about five pixels in every direction.&lt;br /&gt;&lt;br /&gt;&lt;table align="left" cellspacing="0"&gt; &lt;caption style="caption-side: bottom; text-align: left;"&gt;&lt;small&gt;&lt;i&gt;Set of zero-mean feature descriptors.&lt;/i&gt;&lt;/small&gt;&lt;/caption&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;img border="0" src="http://3.bp.blogspot.com/_h79Be84WZ2U/TEIupW5lUAI/AAAAAAAAAHQ/T5tiRzZYzds/s800/descriptors1.png"/&gt;&lt;/td&gt;&lt;td&gt;&lt;img border="0" src="http://4.bp.blogspot.com/_h79Be84WZ2U/TEIuwgJJXjI/AAAAAAAAAHY/fWjVgII9l7w/s800/descriptors2.png"/&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br clear="all" /&gt;&lt;br /&gt;&lt;h3&gt;3. Feature Matching Process&lt;/h3&gt;This process consist of finding couples of feature descriptors that looks similar. This is accomplished through an exhaustive &lt;i&gt;Nearest Neighbor Search&lt;/i&gt; where the distance is considered the &lt;i&gt;l2-norm&lt;/i&gt; of the difference between pairs of descriptors. Feature descriptors are considered coupled only if their 1-NN/2-NN ratio is within 0.3 otherwise they are discarded. Setting the threshold at 0.3 highly reduce the number of &lt;i&gt;outliers&lt;/i&gt;, making the final step almost useless.&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;4. RANdom SAmple Consensus&lt;/h3&gt;The RANSAC algorithm first randomly selects four interest points retained by the &lt;i&gt;Feature Matching Process&lt;/i&gt;. Given these four interest points the algorithm computes an exact homography and then counts the number of &lt;i&gt;inliers&lt;/i&gt; (couples of interest points) that agree with that particular transformation. This process is repeated until the number of &lt;i&gt;inliers&lt;/i&gt; that agree with a particular homography computed through the four randomly selected points, is bigger of a user-defined threshold. In the last step, the RANSAC algorithm calculate a more robust &lt;i&gt;least square homography&lt;/i&gt;, using all the &lt;i&gt;inliers&lt;/i&gt; that agreed with the selected exact homography.&lt;br /&gt;&lt;br /&gt;&lt;table align="left" cellspacing="0"&gt; &lt;caption style="caption-side: bottom; text-align: left;"&gt;&lt;small&gt;&lt;i&gt;Final set of points used to compute the homography.&lt;/i&gt;&lt;/small&gt;&lt;/caption&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;img border="0" src="http://4.bp.blogspot.com/_h79Be84WZ2U/TEIveOvHJgI/AAAAAAAAAHg/jMhDq7yL_ZY/s350/ransac1_1024.png"/&gt;&lt;/td&gt;&lt;td&gt;&lt;img border="0" src="http://1.bp.blogspot.com/_h79Be84WZ2U/TEIvkOHEHpI/AAAAAAAAAHo/YWiCkymmTrA/s350/ransac2_1024.png"/&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br clear="all" /&gt;&lt;br /&gt;&lt;h3&gt;5. Image Warping and Blending&lt;/h3&gt;The &lt;i&gt;least square homography&lt;/i&gt; computed in the previous step is utilized to warp one of the two images, that is subsequently blended together with the other image, giving the final result.&lt;br /&gt;&lt;br /&gt;&lt;table align="left" cellspacing="0"&gt; &lt;caption style="caption-side: bottom; text-align: left;"&gt;&lt;small&gt;&lt;i&gt;Panorama of Don's Office made of three adjacent photographs.&lt;/i&gt;&lt;/small&gt;&lt;/caption&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;img border="0" src="http://3.bp.blogspot.com/_h79Be84WZ2U/TEIxSTvBjZI/AAAAAAAAAH4/7oW6bkCp16M/s700/panorama_1024.jpg"/&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br clear="all" /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3626977803304967003-7844678022143701462?l=www.fedeperazzi.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3626977803304967003/posts/default/7844678022143701462'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3626977803304967003/posts/default/7844678022143701462'/><link rel='alternate' type='text/html' href='http://www.fedeperazzi.com/2010/07/stitching-photo-mosaics-including.html' title='Stitching Photo Mosaics (including autostitching)'/><author><name>Federico Perazzi</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_h79Be84WZ2U/TEIstrmzBKI/AAAAAAAAAHA/c-0Lafkg0Rs/s72-c/anms1_1024.png' height='72' width='72'/></entry><entry><id>tag:blogger.com,1999:blog-3626977803304967003.post-9217828775838603938</id><published>2010-03-21T21:48:00.000-07:00</published><updated>2010-08-02T11:22:21.606-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Computational Photography'/><title type='text'>HDR Images</title><content type='html'>In photography the &lt;i&gt;dynamic range&lt;/i&gt; is the ratio between the maximum and the minimum light intensity measurable by the camera film or the camera digital sensors. Basically we live in a &lt;i&gt;High Dynamic Range&lt;/i&gt; world but our cameras can capture only a part of it. In 2004 &lt;i&gt;Paul Debevec&lt;/i&gt; presented an algorithm to recover the HDR radiance map of a scene from a set of images taken at different exposures. The pixel values of the HDR radiance map are proportional to the real world radiance values and, once remapped to RBG values through some &lt;i&gt;tone-mapping&lt;/i&gt; technique, they represent the image more accurately.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;Algorithm Overview&lt;/h3&gt;&lt;br /&gt;The pixel values of an image are the result of a non linear function &lt;i&gt;f(X)&lt;/i&gt; where &lt;i&gt;X&lt;/i&gt; is the exposure. This function is a composition of the characteristic curve (the response to the variations in exposure) of the film or, for digital images, of the digital sensors, and of others non linearities introduced by the next processing steps. The problems is that camera sensors record only a low dynamic range of light intensities while the real scenes are made of a much wider range. &lt;i&gt;Debevec&lt;/i&gt; solves this problem reconstructing the radiance map from a set of images representing the same scene but  recorded at different exposure levels. The algorithm can be splitted into the following steps: &lt;br /&gt; &lt;br /&gt;&lt;h3&gt;1. Recovering the camera response curve &lt;i&gt;g(Z)&lt;/i&gt;.&lt;/h3&gt;The response curve is recovered solving an over-constrained linear system of equations &lt;i&gt;[(g(Z) - lnE - lnDT)]&lt;/i&gt;, where &lt;i&gt;g(Z)&lt;/i&gt; is the logarithm of the exposure corresponding to the pixel value &lt;i&gt;Z&lt;/i&gt;, &lt;i&gt;lnE&lt;/i&gt; is the logarithm of the irradiance and &lt;i&gt;lnDT&lt;/i&gt; is the logarithm of the exposure time (shutter speed). Once built, the over-constrained linear system is solved in a least square sense. &lt;br /&gt;&lt;br /&gt;&lt;table align="left" cellspacing="0"&gt; &lt;caption style="caption-side: bottom; text-align: left;"&gt;&lt;small&gt;&lt;i&gt;In green, interest points etained by the ANMS algorithm.&lt;/i&gt;&lt;/small&gt;&lt;/caption&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;img border="0" src="http://1.bp.blogspot.com/_h79Be84WZ2U/TEfgrhp52cI/AAAAAAAAAJg/bJq8qRQJ18s/s140/_MG_8170.JPG"/&gt;&lt;/td&gt;&lt;td&gt;&lt;img border="0" src="http://4.bp.blogspot.com/_h79Be84WZ2U/TEfguFAuZMI/AAAAAAAAAJo/ReT6jd8tIe8/s140/_MG_8171.JPG"/&gt;&lt;/td&gt;&lt;td&gt;&lt;img border="0" src="http://3.bp.blogspot.com/_h79Be84WZ2U/TEfgwq9rWjI/AAAAAAAAAJw/rgHqSwdqYGQ/s140/_MG_8173.JPG"/&gt;&lt;/td&gt;&lt;td&gt;&lt;img border="0" src="http://2.bp.blogspot.com/_h79Be84WZ2U/TEfg4hi6IaI/AAAAAAAAAKA/VJXlcFbY2u0/s140/_MG_8174.JPG"/&gt;&lt;/td&gt;&lt;td&gt;&lt;img border="0" src="http://4.bp.blogspot.com/_h79Be84WZ2U/TEfg8YnddcI/AAAAAAAAAKI/LQ8HfAmzWRg/s140/_MG_8175.JPG"/&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br clear="all" /&gt;&lt;br /&gt;&lt;h3&gt;2. Reconstructing the HDR radiance map.&lt;/h3&gt;Through the camera response function it is possible to construct the HDR radiance map. This is equal to the exponential of the weighted average of the radiance maps of the images taken at different exposures.&lt;br /&gt;&lt;br /&gt;&lt;table align="left" cellspacing="0"&gt; &lt;caption style="caption-side: bottom; text-align: left;"&gt;&lt;small&gt;&lt;i&gt;In green, interest points etained by the ANMS algorithm.&lt;/i&gt;&lt;/small&gt;&lt;/caption&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;img border="0" src="http://4.bp.blogspot.com/_h79Be84WZ2U/TEfjbdX10xI/AAAAAAAAAKY/0myt1YrHasw/s350/HDRImg.jpg"/&gt;&lt;/td&gt;&lt;td&gt;&lt;img border="0" src="http://3.bp.blogspot.com/_h79Be84WZ2U/TEfixVEoa7I/AAAAAAAAAKQ/bYl1cdrNjjs/s350/toneMappedImg.jpg"/&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br clear="all" /&gt;&lt;br /&gt;&lt;h3&gt;2. Tonemapping.&lt;/h3&gt;The image in High Dynamic Range must be re-mapped to a lower dynamic range to be displayed correctly on a monitor. I used the &lt;i&gt;Reinhard Global Tonemapper Operator&lt;/i&gt; defined as Ld = &lt;i&gt;L / (L + 1)&lt;/i&gt;, where L is a scaled luminance value. Here is the final result:&lt;br /&gt;&lt;br /&gt;&lt;table align="left" cellspacing="0"&gt; &lt;caption style="caption-side: bottom; text-align: left;"&gt;&lt;small&gt;&lt;i&gt;In green, interest points etained by the ANMS algorithm.&lt;/i&gt;&lt;/small&gt;&lt;/caption&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;img border="0" src="http://3.bp.blogspot.com/_h79Be84WZ2U/TEfixVEoa7I/AAAAAAAAAKQ/bYl1cdrNjjs/s700/toneMappedImg.jpg"/&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br clear="all" /&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3626977803304967003-9217828775838603938?l=www.fedeperazzi.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3626977803304967003/posts/default/9217828775838603938'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3626977803304967003/posts/default/9217828775838603938'/><link rel='alternate' type='text/html' href='http://www.fedeperazzi.com/2010/07/hdr-images.html' title='HDR Images'/><author><name>Federico Perazzi</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_h79Be84WZ2U/TEfgrhp52cI/AAAAAAAAAJg/bJq8qRQJ18s/s72-c/_MG_8170.JPG' height='72' width='72'/></entry><entry><id>tag:blogger.com,1999:blog-3626977803304967003.post-2057371048199275456</id><published>2010-02-20T22:43:00.000-08:00</published><updated>2010-09-18T00:27:56.545-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Computer Graphics'/><title type='text'>Deformable Sphere</title><content type='html'>A parametric sphere is deformed using &lt;i&gt;Perlin Noise&lt;/i&gt; computed directly on the GPU.  &lt;br clear="all" /&gt;&lt;br /&gt;&lt;table&gt;&lt;tr&gt;&lt;td&gt;&lt;object width="640" height="360"&gt;&lt;param name="allowfullscreen" value="true" /&gt;&lt;param name="allowscriptaccess" value="always" /&gt;&lt;param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=13777413&amp;amp;server=vimeo.com&amp;amp;show_title=0&amp;amp;show_byline=0&amp;amp;show_portrait=0&amp;amp;color=ff9933&amp;amp;fullscreen=1" /&gt;&lt;embed src="http://vimeo.com/moogaloop.swf?clip_id=13777413&amp;amp;server=vimeo.com&amp;amp;show_title=0&amp;amp;show_byline=0&amp;amp;show_portrait=0&amp;amp;color=ff9933&amp;amp;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="640" height="360"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3626977803304967003-2057371048199275456?l=www.fedeperazzi.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3626977803304967003/posts/default/2057371048199275456'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3626977803304967003/posts/default/2057371048199275456'/><link rel='alternate' type='text/html' href='http://www.fedeperazzi.com/2010/07/blog-post_30.html' title='Deformable Sphere'/><author><name>Federico Perazzi</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-3626977803304967003.post-8438336799934202483</id><published>2010-02-18T13:21:00.000-08:00</published><updated>2010-07-19T10:42:06.345-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Computational Photography'/><title type='text'>Image Morphing</title><content type='html'>Morphing is a technique to turn an image into another through a seamless transition and it is mostly used to create a metamorphosis between two person's faces.&lt;br /&gt;&lt;br /&gt;To generate this seamless transition, we should know where the pixels of a source image &lt;i&gt;S&lt;/i&gt; will end up being in a target image &lt;i&gt;T&lt;/i&gt;. To make some calculations simpler, we reverse the problem and instead we find from which position &lt;i&gt;x(S)&lt;/i&gt; a pixel of &lt;i&gt;T&lt;/i&gt; located at &lt;i&gt;x(T)&lt;/i&gt; came from. This sort of inverse warp resembles the semi-lagrangian advection developed by Jos Stam in his famous paper Stable Fluids.&lt;br /&gt;&lt;br /&gt;Defined by hand pairs of corresponding points &lt;i&gt;p(S) and p(T)&lt;/i&gt;, we initially compute a &lt;i&gt;Delaunay Triangulation&lt;/i&gt; for the set of points &lt;i&gt;(p(S) + p(T)) / 2&lt;/i&gt;. The resulting mesh is displaced to fit into &lt;i&gt;p(S)&lt;/i&gt; and &lt;i&gt;p(T)&lt;/i&gt; generating a pair of corresponding triangulations &lt;i&gt;t(S)&lt;/i&gt; and &lt;i&gt;t(T)&lt;/i&gt;. Given &lt;i&gt;t(S)&lt;/i&gt; and &lt;i&gt;t(T)&lt;/i&gt; we proceed computing the set of affine matrices &lt;i&gt;M&lt;/i&gt; that maps triangles of &lt;i&gt;t(T)&lt;/i&gt; into corresponding triangles of &lt;i&gt;t(S)&lt;/i&gt; so that &lt;i&gt;M*t(T) = t(S)&lt;/i&gt;. Subsequently for each pixel of &lt;i&gt;T&lt;/i&gt; located at &lt;i&gt;x(T) = (x,y)&lt;/i&gt;, contained into a triangle &lt;i&gt;Tr&lt;/i&gt;, we compute its corresponding position &lt;i&gt;x(S)&lt;/i&gt; through the matrix-vector multiplication &lt;i&gt;M(Tr) * x(T) = x(S)&lt;/i&gt;. Finally, we warp &lt;i&gt;S&lt;/i&gt; into &lt;i&gt;T&lt;/i&gt; interpolating the color of the surrounding pixels at &lt;i&gt;x(S)&lt;/i&gt; and placing the resulting value in &lt;i&gt;x(T)&lt;/i&gt;.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;table align="left" cellspacing="0"&gt; &lt;caption style="caption-side: bottom; text-align: left;"&gt;&lt;small&gt;&lt;i&gt;Left: source image; Right: target image. http://www2.imm.dtu.dk/~aam/datasets/datasets.html&lt;/i&gt;&lt;/small&gt;&lt;/caption&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;img border="0" src="http://3.bp.blogspot.com/_h79Be84WZ2U/TESFtWCjJwI/AAAAAAAAAIQ/av3VKDEm1Oo/s350/36-1m.jpg"/&gt;&lt;/td&gt;&lt;td&gt;&lt;img border="0" src="http://4.bp.blogspot.com/_h79Be84WZ2U/TESFq5l2QyI/AAAAAAAAAII/Ybkbxv4JioQ/s350/10-2m.jpg"/&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br clear="all" /&gt;&lt;br /&gt;&lt;table align="left" cellspacing="0"&gt; &lt;caption style="caption-side: bottom; text-align: left;"&gt;&lt;small&gt;&lt;i&gt;Pairs of correspondent points defined over the two images.&lt;/i&gt;&lt;/small&gt;&lt;/caption&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;img border="0" src="http://1.bp.blogspot.com/_h79Be84WZ2U/TESJIegx6nI/AAAAAAAAAIo/BoQOQk5Zqmc/s350/points_from.png"/&gt;&lt;/td&gt;&lt;td&gt;&lt;img border="0" src="http://3.bp.blogspot.com/_h79Be84WZ2U/TESJLa87drI/AAAAAAAAAIw/P-jo3dy51iI/s350/points_to.png"/&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br clear="all" /&gt;&lt;br /&gt;&lt;table align="left" cellspacing="0"&gt; &lt;caption style="caption-side: bottom; text-align: left;"&gt;&lt;small&gt;&lt;i&gt;Delaunay Triangulations.&lt;/i&gt;&lt;/small&gt;&lt;/caption&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;img border="0" src="http://4.bp.blogspot.com/_h79Be84WZ2U/TESFw6--7mI/AAAAAAAAAIY/PuiQXbOxbZ0/s350/delaunay_from.png"/&gt;&lt;/td&gt;&lt;td&gt;&lt;img border="0" src="http://3.bp.blogspot.com/_h79Be84WZ2U/TESF0A201PI/AAAAAAAAAIg/J0HL14DTXVs/s350/delaunay_to.png"/&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br clear="all" /&gt;&lt;br /&gt;&lt;table align="left" cellspacing="0"&gt; &lt;caption style="caption-side: bottom; text-align: left;"&gt;&lt;small&gt;&lt;i&gt;Face morphing.&lt;/i&gt;&lt;/small&gt;&lt;/caption&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;object width="640" height="480"&gt;&lt;param name="allowfullscreen" value="true" /&gt;&lt;param name="allowscriptaccess" value="always" /&gt;&lt;param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=13447880&amp;amp;server=vimeo.com&amp;amp;show_title=0&amp;amp;show_byline=0&amp;amp;show_portrait=0&amp;amp;color=ff9933&amp;amp;fullscreen=1&amp;amp;&amp;autoplay=0&amp;amp;&amp;loop=1" /&gt;&lt;embed src="http://vimeo.com/moogaloop.swf?clip_id=13447880&amp;amp;server=vimeo.com&amp;amp;show_title=0&amp;amp;show_byline=0&amp;amp;show_portrait=0&amp;amp;color=ff9933&amp;amp;fullscreen=1&amp;amp;&amp;autoplay=0&amp;amp;&amp;loop=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="640" height="480"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br clear="all" /&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3626977803304967003-8438336799934202483?l=www.fedeperazzi.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3626977803304967003/posts/default/8438336799934202483'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3626977803304967003/posts/default/8438336799934202483'/><link rel='alternate' type='text/html' href='http://www.fedeperazzi.com/2010/07/image-morphing-mean-face.html' title='Image Morphing'/><author><name>Federico Perazzi</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_h79Be84WZ2U/TESFtWCjJwI/AAAAAAAAAIQ/av3VKDEm1Oo/s72-c/36-1m.jpg' height='72' width='72'/></entry><entry><id>tag:blogger.com,1999:blog-3626977803304967003.post-7151588995375251847</id><published>2009-11-09T14:30:00.000-08:00</published><updated>2010-09-18T00:29:48.072-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Computer Graphics'/><title type='text'>Fluid Simulation</title><content type='html'>The fluid simulation is based on the paper &lt;i&gt;"Stable Fluids" by Jos Stam&lt;/i&gt;.&lt;br clear="all" /&gt;&lt;br /&gt;&lt;table&gt;&lt;tr&gt;&lt;td&gt;&lt;object width="400" height="400"&gt;&lt;param name="allowfullscreen" value="true" /&gt;&lt;param name="allowscriptaccess" value="always" /&gt;&lt;param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=13803389&amp;amp;server=vimeo.com&amp;amp;show_title=0&amp;amp;show_byline=0&amp;amp;show_portrait=0&amp;amp;color=ff9933&amp;amp;fullscreen=1" /&gt;&lt;embed src="http://vimeo.com/moogaloop.swf?clip_id=13803389&amp;amp;server=vimeo.com&amp;amp;show_title=0&amp;amp;show_byline=0&amp;amp;show_portrait=0&amp;amp;color=ff9933&amp;amp;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="400" height="400"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3626977803304967003-7151588995375251847?l=www.fedeperazzi.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3626977803304967003/posts/default/7151588995375251847'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3626977803304967003/posts/default/7151588995375251847'/><link rel='alternate' type='text/html' href='http://www.fedeperazzi.com/2010/08/fluid-simulation.html' title='Fluid Simulation'/><author><name>Federico Perazzi</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-3626977803304967003.post-43772330370319476</id><published>2009-10-11T22:46:00.000-07:00</published><updated>2010-08-01T15:01:16.002-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Computer Graphics'/><title type='text'>Inverse Kinematics</title><content type='html'>Inverse Kinematics entails finding a set of joint angles necessary for the &lt;i&gt;end effector&lt;/i&gt; to reach the desired position. In the video the desired position is defined with the wireframe cubes, while the end-effectors are represented by the hands of the model.I used the &lt;i&gt;Pseudo-Inverse of the Jacobian Matrix&lt;/i&gt; method to approximate the final solution. &lt;br /&gt; &lt;br /&gt; &lt;br clear="all"/&gt; &lt;object width="640" height="360"&gt;&lt;param name="allowfullscreen" value="true" /&gt;&lt;param name="allowscriptaccess" value="always" /&gt;&lt;param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=13808184&amp;amp;server=vimeo.com&amp;amp;show_title=0&amp;amp;show_byline=0&amp;amp;show_portrait=0&amp;amp;color=ff9933&amp;amp;fullscreen=1" /&gt;&lt;embed src="http://vimeo.com/moogaloop.swf?clip_id=13808184&amp;amp;server=vimeo.com&amp;amp;show_title=0&amp;amp;show_byline=0&amp;amp;show_portrait=0&amp;amp;color=ff9933&amp;amp;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="640" height="360"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3626977803304967003-43772330370319476?l=www.fedeperazzi.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3626977803304967003/posts/default/43772330370319476'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3626977803304967003/posts/default/43772330370319476'/><link rel='alternate' type='text/html' href='http://www.fedeperazzi.com/2010/07/inverse-kinematics.html' title='Inverse Kinematics'/><author><name>Federico Perazzi</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-3626977803304967003.post-455888861675137757</id><published>2009-08-10T11:40:00.000-07:00</published><updated>2010-08-01T14:24:50.565-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Computer Graphics'/><title type='text'>Least Square Meshes</title><content type='html'>This is an implementation of the paper &lt;i&gt;"Least-squares Meshes" by Olga Sorkine&lt;/i&gt;.&lt;br /&gt;&lt;br /&gt;Given a set of random control points and the mesh connectivity, the geometry is reconstructed solving an over-constrained sparse linear system. Vertices lie as close as possible to the center of their ring, making the generated mesh &lt;i&gt;“As smooth as possible”&lt;/i&gt;.&lt;br clear="all" /&gt;&lt;br /&gt;&lt;br /&gt;&lt;object width="640" height="360"&gt;&lt;param name="allowfullscreen" value="true" /&gt;&lt;param name="allowscriptaccess" value="always" /&gt;&lt;param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=13806416&amp;amp;server=vimeo.com&amp;amp;show_title=0&amp;amp;show_byline=0&amp;amp;show_portrait=0&amp;amp;color=ff9933&amp;amp;fullscreen=1" /&gt;&lt;embed src="http://vimeo.com/moogaloop.swf?clip_id=13806416&amp;amp;server=vimeo.com&amp;amp;show_title=0&amp;amp;show_byline=0&amp;amp;show_portrait=0&amp;amp;color=ff9933&amp;amp;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="640" height="360"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3626977803304967003-455888861675137757?l=www.fedeperazzi.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3626977803304967003/posts/default/455888861675137757'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3626977803304967003/posts/default/455888861675137757'/><link rel='alternate' type='text/html' href='http://www.fedeperazzi.com/2010/08/least-square-meshes.html' title='Least Square Meshes'/><author><name>Federico Perazzi</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-3626977803304967003.post-6863895254035180800</id><published>2009-07-03T21:42:00.000-07:00</published><updated>2010-07-31T09:09:40.988-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Computer Graphics'/><title type='text'>Cloth Simulation</title><content type='html'>The implementation of the simulation is based on this &lt;a href="http://www.gamasutra.com/resource_guide/20030121/jacobson_01.shtml" target="_blank"&gt;article&lt;/a&gt; appeared on &lt;i&gt;Gamasutra&lt;/i&gt; in 2003.&lt;br /&gt;&lt;br /&gt;A common model for simulating Real-Time Cloths consists of a system of interconnected springs and particles. The corresponding system of ODE suffers of instability in presence of stiff springs (especially when solved with an explicit integrator). On the other hand weak springs lead to elastically looking, bouncy cloths. &lt;br /&gt;&lt;br /&gt;The alternative proposed in the article consists of modeling the cloth over a set of constrained particles, where the constraint is the distance between adjacent particles. The corresponding over-constrained linear system of linear equations is solved through a &lt;i&gt;Gauss-Siedel Relaxation&lt;/i&gt;. The absence of the spring equations in the model leads to a quite stable simulation.&lt;br /&gt;&lt;br /&gt;Collisions are handled projecting the particles out of the external bodies, perpendicularly to the contact direction. &lt;br clear="all"/&gt;&lt;br /&gt;&lt;br /&gt;&lt;object width="640" height="360"&gt;&lt;param name="allowfullscreen" value="true" /&gt;&lt;param name="allowscriptaccess" value="always" /&gt;&lt;param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=13776828&amp;amp;server=vimeo.com&amp;amp;show_title=0&amp;amp;show_byline=0&amp;amp;show_portrait=0&amp;amp;color=ff9933&amp;amp;fullscreen=1" /&gt;&lt;embed src="http://vimeo.com/moogaloop.swf?clip_id=13776828&amp;amp;server=vimeo.com&amp;amp;show_title=0&amp;amp;show_byline=0&amp;amp;show_portrait=0&amp;amp;color=ff9933&amp;amp;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="640" height="360"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3626977803304967003-6863895254035180800?l=www.fedeperazzi.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3626977803304967003/posts/default/6863895254035180800'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3626977803304967003/posts/default/6863895254035180800'/><link rel='alternate' type='text/html' href='http://www.fedeperazzi.com/2010/07/cloth.html' title='Cloth Simulation'/><author><name>Federico Perazzi</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-3626977803304967003.post-9038081119288355049</id><published>2009-05-31T11:47:00.000-07:00</published><updated>2010-08-04T12:55:43.489-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Texture Synthesis'/><title type='text'>Texture Synthesis by Non-parametric Sampling</title><content type='html'>The algorithm is based on the paper: &lt;i&gt;"Texture Synthesis by Non-parametric Sampling" by A. Efros&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;i&gt;Texture Synthesis&lt;/i&gt; is the process of generating an arbitrarily big texture consistent with the pattern of a smaller sample given as input. Assumed a &lt;i&gt;Random Markov Field &lt;/i&gt;model, the probability of a pixel belonging to the new texture to have a certain value depends on its spatial neighborhood. That is, the color of a pixel &lt;i&gt;X&lt;/i&gt; with an l-shaped neighborhood &lt;i&gt;nX&lt;/i&gt;, will be the color of the pixel &lt;i&gt;Y&lt;/i&gt; that has the most similar neighborhood &lt;i&gt;nY&lt;/i&gt; to &lt;i&gt;nX&lt;/i&gt;.&lt;br clear="all" /&gt;&lt;table align="left" cellspacing="15"&gt; &lt;caption style="caption-side: bottom; text-align: left;"&gt;&lt;small&gt;&lt;i&gt;&lt;/i&gt;&lt;/small&gt;&lt;/caption&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;img border="0" src="http://dl.dropbox.com/u/9398901/www.fedeperazzi.com/TextureSynthesis/input.bmp"/&gt;&lt;/td&gt;&lt;td&gt;&lt;img border="0" src="http://dl.dropbox.com/u/9398901/www.fedeperazzi.com/TextureSynthesis/best_3x3.bmp"/&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br clear="all" /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3626977803304967003-9038081119288355049?l=www.fedeperazzi.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3626977803304967003/posts/default/9038081119288355049'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3626977803304967003/posts/default/9038081119288355049'/><link rel='alternate' type='text/html' href='http://www.fedeperazzi.com/2010/07/texture-synthesis-by-non-parametric.html' title='Texture Synthesis by Non-parametric Sampling'/><author><name>Federico Perazzi</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-3626977803304967003.post-8762774128202955834</id><published>2009-05-20T15:54:00.000-07:00</published><updated>2010-08-04T08:56:43.584-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Texture Synthesis'/><title type='text'>Image Quilting</title><content type='html'>This project is based on the paper: &lt;i&gt;"Image Quilting for Texture Synthesis and Transfer" by Alexei A. Efros&lt;/i&gt;.&lt;br /&gt;Prior to this paper &lt;i&gt;Texture Synthesis&lt;/i&gt;, that is the process of generating an arbitrarily big texture consistent with the pattern of a smaller sample given as input, was performed sampling and transferring one pixel at the time. The process, besides being deterministic, was also really slow. &lt;br /&gt;&lt;br /&gt;In this paper &lt;i&gt;Texture Synthesis&lt;/i&gt; is performed sampling and transferring entire tiles (or patches), that once stiched together generate the new image. Basically the new image is a collage made of sub-tiles taken from a smaller existing image.&lt;br /&gt;&lt;br /&gt;To avoid noticeable artifacts samples are selected based on the similarity of their border with the border of their neighbors. This region (the border of the sub-tiles) will eventually overlap and will be cut, to further reduce the non-similarities between adjacent patches.  &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;table align="left" cellspacing="10"&gt; &lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;img border="0" src="http://2.bp.blogspot.com/_h79Be84WZ2U/TFNdSXhrmmI/AAAAAAAAALA/pj4onPDUc3w/s1600/cans195.png"/&gt;&lt;/td&gt;&lt;td&gt;&lt;img border="0" src="http://2.bp.blogspot.com/_h79Be84WZ2U/TFNdMVaPLBI/AAAAAAAAAK4/nxGGAMyCsVo/s1600/incans0.png"/&gt;&lt;/td&gt;&lt;/table&gt;&lt;table align="left" cellspacing="10"&gt; &lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;img border="0" src="http://1.bp.blogspot.com/_h79Be84WZ2U/TFNdZHHjaLI/AAAAAAAAALQ/eypXj6uUP_g/s1600/out195.png"/&gt;&lt;/td&gt;&lt;td&gt;&lt;img border="0" src="http://4.bp.blogspot.com/_h79Be84WZ2U/TFNdVtG8E9I/AAAAAAAAALI/hmSvNp4szC8/s1600/in0.png"/&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;table align="left" cellspacing="10"&gt; &lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;img border="0" src="http://2.bp.blogspot.com/_h79Be84WZ2U/TFNdgk_i-hI/AAAAAAAAALg/aOa2qFBMXEY/s1600/out195.png"/&gt;&lt;/td&gt;&lt;td&gt;&lt;img border="0" src="http://1.bp.blogspot.com/_h79Be84WZ2U/TFNdcfuSlDI/AAAAAAAAALY/A01yBc4HgXU/s1600/in2.png"/&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3626977803304967003-8762774128202955834?l=www.fedeperazzi.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3626977803304967003/posts/default/8762774128202955834'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3626977803304967003/posts/default/8762774128202955834'/><link rel='alternate' type='text/html' href='http://www.fedeperazzi.com/2010/07/image-quilting.html' title='Image Quilting'/><author><name>Federico Perazzi</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_h79Be84WZ2U/TFNdSXhrmmI/AAAAAAAAALA/pj4onPDUc3w/s72-c/cans195.png' height='72' width='72'/></entry><entry><id>tag:blogger.com,1999:blog-3626977803304967003.post-5126299155770706993</id><published>2009-05-20T14:27:00.000-07:00</published><updated>2010-07-26T20:37:21.787-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Computer Graphics'/><title type='text'>Catmull-Clark Subdivision Surface</title><content type='html'>The algorithm that generates smooth surfaces is performed in two steps: &lt;i&gt;Subdivision and Averaging&lt;/i&gt;.&lt;br /&gt;&lt;br /&gt;During the &lt;i&gt;Subdivision step&lt;/i&gt; a new vertex is added at the midpoint of each edge and at the centroid of each face. Given a face with &lt;i&gt;n&lt;/i&gt; vertices &lt;i&gt;{v1, v2, v3, v4}&lt;/i&gt; the centroid is given as &lt;i&gt;(v1 + v2 + ... + vn) / n&lt;/i&gt;. Subsequently the vertices are connected to form &lt;i&gt;m&lt;/i&gt; quads out of each &lt;i&gt;m-sided&lt;/i&gt; polygon. &lt;br /&gt;&lt;br /&gt;In the &lt;i&gt;Averaging step&lt;/i&gt; the position of each vertex is set to be the sum of the centroids of the faces incident to it divided by the vertex valence, that is the number of edges connected to it.&lt;br clear="all" /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;object width="640" height="400"&gt;&lt;param name="allowfullscreen" value="true" /&gt;&lt;param name="allowscriptaccess" value="always" /&gt;&lt;param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=13657124&amp;amp;server=vimeo.com&amp;amp;show_title=0&amp;amp;show_byline=0&amp;amp;show_portrait=0&amp;amp;color=ff9933&amp;amp;fullscreen=1" /&gt;&lt;embed src="http://vimeo.com/moogaloop.swf?clip_id=13657124&amp;amp;server=vimeo.com&amp;amp;show_title=0&amp;amp;show_byline=0&amp;amp;show_portrait=0&amp;amp;color=ff9933&amp;amp;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="640" height="400"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3626977803304967003-5126299155770706993?l=www.fedeperazzi.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3626977803304967003/posts/default/5126299155770706993'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3626977803304967003/posts/default/5126299155770706993'/><link rel='alternate' type='text/html' href='http://www.fedeperazzi.com/2010/07/catmull-clark-subdivision-surface.html' title='Catmull-Clark Subdivision Surface'/><author><name>Federico Perazzi</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-3626977803304967003.post-4203234534274097307</id><published>2008-12-10T20:45:00.000-08:00</published><updated>2010-08-03T12:19:29.554-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Autodesk Maya'/><title type='text'>Maya Animation - Playboy</title><content type='html'>This animation is part of the final project, me and my three teammates did for the &lt;a href="http://bvw.etc.cmu.edu/" target="_blank"&gt;Building Virtual Worlds&lt;/a&gt; course. I textured, lighted and rendered the scene.&lt;br clear="all"/&gt;&lt;br /&gt;&lt;object width="408" height="360"&gt;&lt;param name="allowfullscreen" value="true" /&gt;&lt;param name="allowscriptaccess" value="always" /&gt;&lt;param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=13751537&amp;amp;server=vimeo.com&amp;amp;show_title=0&amp;amp;show_byline=0&amp;amp;show_portrait=0&amp;amp;color=ff9933&amp;amp;fullscreen=1" /&gt;&lt;embed src="http://vimeo.com/moogaloop.swf?clip_id=13751537&amp;amp;server=vimeo.com&amp;amp;show_title=0&amp;amp;show_byline=0&amp;amp;show_portrait=0&amp;amp;color=ff9933&amp;amp;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="480" height="360"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3626977803304967003-4203234534274097307?l=www.fedeperazzi.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3626977803304967003/posts/default/4203234534274097307'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3626977803304967003/posts/default/4203234534274097307'/><link rel='alternate' type='text/html' href='http://www.fedeperazzi.com/2010/07/maya-animation-playboy.html' title='Maya Animation - Playboy'/><author><name>Federico Perazzi</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry></feed>
