<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Insomart</title>
	<atom:link href="http://insomart.com/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://insomart.com</link>
	<description>Creating art through code</description>
	<lastBuildDate>Mon, 02 Aug 2010 05:56:31 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Content Aware Image resizing</title>
		<link>http://insomart.com/?p=57</link>
		<comments>http://insomart.com/?p=57#comments</comments>
		<pubDate>Mon, 02 Aug 2010 05:56:31 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://insomart.com/?p=57</guid>
		<description><![CDATA[One of the interesting applications of image processing on the web is what is called “Seam Carving”. The idea is that it is possible to identify areas of an image that can be added/removed as an image is resized. This &#8230; <a href="http://insomart.com/?p=57">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>One of the interesting applications of image processing on the web is what is called “<a href="http://en.wikipedia.org/wiki/Content_Aware_Image_Resizing">Seam Carving</a>”. The idea is that it is possible to identify areas of an image that can be added/removed as an image is resized. This means that when downscaling, instead of reducing the size of the full image, regions are taken out. On the flip side, when upscaling, either regions are added, or <a href="http://en.wikipedia.org/wiki/Inpainting">inpainting</a> is used to extend areas.</p>
<p>There is a <a href="http://www.youtube.com/watch?v=qadw0BRKeMk">video</a> that explains the technique in mode detail from the Siggraph presentation, and several image processing applications have implemented it. GIMP happens to have an implementation of this algorithm (called <a href="http://liquidrescale.wikidot.com/">Liquid Rescale</a>), so I gave it a try to see how well it works.</p>
<p>Below is our test image, which is a shot taken at the summit of Little Si. Using Liquid resize, I first tried to reduce the image to about half the width. The output was a decent image (regarding the inpainting job). The blending of the background (which does not have clear unique shapes) was good, but when it came to the subjects of the photo, it is clear that the algorithm can’t really determine which areas are good to remove and which are not.</p>
<p>
<table border="0" cellspacing="0" cellpadding="2" width="400">
<tbody>
<tr>
<td valign="top" width="200"><a href="http://insomart.com/wp-content/uploads/2010/08/61240406A4.jpg"><img style="border-bottom: 0px; border-left: 0px; margin: 10px 0px; display: inline; border-top: 0px; border-right: 0px" class="wlDisabledImage" title="" border="0" alt="" src="http://insomart.com/wp-content/uploads/2010/08/61240406A4_thumb.jpg" width="305" height="230" /></a></td>
<td valign="top" width="200"><a href="http://insomart.com/wp-content/uploads/2010/08/image22.png"><img style="border-bottom: 0px; border-left: 0px; margin: 10px 0px; display: inline; border-top: 0px; border-right: 0px" class="wlDisabledImage" title="image[22]" border="0" alt="image[22]" src="http://insomart.com/wp-content/uploads/2010/08/image22_thumb.png" width="117" height="230" /></a></td>
</tr>
</tbody>
</table>
<p>I tried next to provide feedback regarding areas to preserve. I decided to keep myself in the picture and make any other area eligible for removal:</p>
<table border="0" cellspacing="0" cellpadding="2" width="400">
<tbody>
<tr>
<td valign="top" width="200">
<p align="center"><a href="http://insomart.com/wp-content/uploads/2010/08/image9.png"><img style="border-bottom: 0px; border-left: 0px; margin: 10px 0px; display: inline; border-top: 0px; border-right: 0px" class="wlDisabledImage" title="image[9]" border="0" alt="image[9]" src="http://insomart.com/wp-content/uploads/2010/08/image9_thumb.png" width="277" height="229" /></a></p>
</td>
<td valign="top" width="200"><a href="http://insomart.com/wp-content/uploads/2010/08/image11.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" class="wlDisabledImage" title="image[11]" border="0" alt="image[11]" src="http://insomart.com/wp-content/uploads/2010/08/image11_thumb.png" width="124" height="244" /></a></td>
</tr>
</tbody>
</table>
<p>Providing feedback definitely helped, though it ended up with a distorted view of my friend. That is where the opposite feedback of areas to remove comes into play:</p>
<p>&#160;</p>
<p>
<table border="0" cellspacing="0" cellpadding="2" width="400">
<tbody>
<tr>
<td valign="top" width="200"><a href="http://insomart.com/wp-content/uploads/2010/08/image.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" class="wlDisabledImage" title="image" border="0" alt="image" src="http://insomart.com/wp-content/uploads/2010/08/image_thumb.png" width="318" height="232" /></a></td>
<td valign="top" width="200"><a href="http://insomart.com/wp-content/uploads/2010/08/image1.png"><img style="border-bottom: 0px; border-left: 0px; margin: 0px; display: inline; border-top: 0px; border-right: 0px" class="wlDisabledImage" title="image" border="0" alt="image" src="http://insomart.com/wp-content/uploads/2010/08/image_thumb1.png" width="124" height="244" /></a></td>
</tr>
</tbody>
</table>
<p>Now I have a decent image. There are some artifacts still in the front, which are not uncommon with inpainting techniques, but in general I think the output is good. I tried to upscale the image to twice the size with no hinting first. Again, not indicating areas to preserve is not a good idea. </p>
<p><a href="http://insomart.com/wp-content/uploads/2010/08/image2.png"><img style="border-bottom: 0px; border-left: 0px; margin: 10px 0px; display: inline; border-top: 0px; border-right: 0px" class="wlDisabledImage" title="image" border="0" alt="image" src="http://insomart.com/wp-content/uploads/2010/08/image_thumb2.png" width="450" height="171" /></a></p>
<p>After providing a hint to preserve both my friend and I, the results were pretty good.</p>
<p>   <a href="http://insomart.com/wp-content/uploads/2010/08/image3.png"><img style="border-bottom: 0px; border-left: 0px; margin: 10px 0px; display: inline; border-top: 0px; border-right: 0px" class="wlDisabledImage" title="image" border="0" alt="image" src="http://insomart.com/wp-content/uploads/2010/08/image_thumb3.png" width="449" height="171" /></a>  <br /> 
<p>&#160;</p>
<p>For modifying a 1600 x 1200 photo, the tool took about 4 seconds per operation, which is fine for an app, but not there yet for an interactive control for a web page. However, the biggest blocking problem I see is the need of feedback to get back useful results. I think that using Seam carving combined with a simple foreground/background detection algorithm can go a long way into automating the process. </p>
<p>The GIMP implementation seems pretty useful for doing photo and other edits, and Photoshop also has an implementation. To close on this, I tried using an insomart image. I liked the results, as it let me emphasize some of the image details while keeping the full background.</p>
<p><a href="http://insomart.com/wp-content/uploads/2010/08/1.jpg"><img style="border-bottom: 0px; border-left: 0px; margin: 10px 0px; display: inline; border-top: 0px; border-right: 0px" class="wlDisabledImage" title="1" border="0" alt="1" src="http://insomart.com/wp-content/uploads/2010/08/1_thumb.jpg" width="244" height="244" /></a>    </p>
<p>   <a href="http://insomart.com/wp-content/uploads/2010/08/image4.png"><img style="border-bottom: 0px; border-left: 0px; margin: 10px 0px; display: inline; border-top: 0px; border-right: 0px" class="wlDisabledImage" title="image" border="0" alt="image" src="http://insomart.com/wp-content/uploads/2010/08/image_thumb4.png" width="392" height="198" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://insomart.com/?feed=rss2&amp;p=57</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Photo Fuse in the new Windows Live Photo Gallery</title>
		<link>http://insomart.com/?p=34</link>
		<comments>http://insomart.com/?p=34#comments</comments>
		<pubDate>Sat, 17 Jul 2010 08:08:10 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://insomart.com/?p=34</guid>
		<description><![CDATA[One of the projects I worked in on college was an image smart erase. It was my final project at the Computer Vision course in Brown University, and I decided to implement the tool based on the description in a &#8230; <a href="http://insomart.com/?p=34">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>One of the projects I worked in on college was an image smart erase. It was my final project at the Computer Vision course in Brown University, and I decided to implement the tool based on the description in a paper by <a href="http://research.microsoft.com/apps/pubs/default.aspx?id=67276">Antonio Criminisi from Microsoft Research</a>. My implementation (on Matlab of course) diverged a little from the paper, but gave me decent results, which made me wonder what was missing for that kind of technology to make it into a more mainstream product. A couple years later, the new Windows Live Photo gallery shipped a feature called Photo Fuse, which is using in-painting to replace a patch of one image from another image. </p>
<p>The way the feature works, is that you need to select a couple images, and then are given the option to replace one patch from patches in other images. What the tool asks you is for images to be “similar and with the same point of view”, and also let’s you use at most 10 images. My guess is that it is trying to do a similar matching as <a href="http://photosynth.com">Photosynth</a>, where it tries to identify features on the image, and based on those features align the photos. On all my in-painting work, I generally considered the whole image, but this might help in narrowing down the area from which to take content from.</p>
<p>I gave the tool a couple tests. First, something easy with objects on top of an uniform texture:</p>
<p>Here I am replacing one person against a water background. The tool seems to be doing it pretty well:</p>
<p><a href="http://insomart.com/wp-content/uploads/2010/07/image.png"><img style="border-bottom: 0px; border-left: 0px; margin: 10px 0px; display: inline; border-top: 0px; border-right: 0px" class="wlDisabledImage" title="image" border="0" alt="image" align="left" src="http://insomart.com/wp-content/uploads/2010/07/image_thumb.png" width="337" height="212" /></a></p>
<p><a href="http://insomart.com/wp-content/uploads/2010/07/image1.png"><img style="border-bottom: 0px; border-left: 0px; margin: 10px 0px; display: inline; border-top: 0px; border-right: 0px" class="wlDisabledImage" title="image" border="0" alt="image" src="http://insomart.com/wp-content/uploads/2010/07/image_thumb1.png" width="334" height="210" /></a></p>
<p> 
<p>Now it is time to try out a more structured background. I struggled on this scenario a bit more, as the tool is not very flexible at letting the user correct it’s mistakes. It also seems that any change in depth can really throw it off. It seems that a possible improvement to the technology is to better consider scale factors when suggesting patches to replace. I ended up with a bit of a weird composition:</p>
<p><a href="http://insomart.com/wp-content/uploads/2010/07/image2.png"><img style="border-bottom: 0px; border-left: 0px; margin: 10px 0px; display: inline; border-top: 0px; border-right: 0px" class="wlDisabledImage" title="image" border="0" alt="image" src="http://insomart.com/wp-content/uploads/2010/07/image_thumb2.png" width="304" height="192" /></a><a href="http://insomart.com/wp-content/uploads/2010/07/image3.png"><img style="border-bottom: 0px; border-left: 0px; margin: 10px 0px; display: inline; border-top: 0px; border-right: 0px" class="wlDisabledImage" title="image" border="0" alt="image" src="http://insomart.com/wp-content/uploads/2010/07/image_thumb3.png" width="305" height="192" /></a></p>
<p>Finally, an example I liked of another fuse, again with a texturized background and 2 photos with similar depth.</p>
<p><a href="http://insomart.com/wp-content/uploads/2010/07/image4.png"><img style="border-bottom: 0px; border-left: 0px; margin: 10px 0px; display: inline; border-top: 0px; border-right: 0px" class="wlDisabledImage" title="image" border="0" alt="image" src="http://insomart.com/wp-content/uploads/2010/07/image_thumb4.png" width="298" height="188" /></a><a href="http://insomart.com/wp-content/uploads/2010/07/image5.png"><img style="border-bottom: 0px; border-left: 0px; margin: 10px 0px; display: inline; border-top: 0px; border-right: 0px" class="wlDisabledImage" title="image" border="0" alt="image" src="http://insomart.com/wp-content/uploads/2010/07/image_thumb5.png" width="299" height="188" /></a></p>
<p>In general, I think that the Photo fuse feature is a cool use of In-painting. I will try to take some photos with some of my observations in mind (try with textures and with similar depth) </p>
]]></content:encoded>
			<wfw:commentRss>http://insomart.com/?feed=rss2&amp;p=34</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>I like (working with) pictures</title>
		<link>http://insomart.com/?p=21</link>
		<comments>http://insomart.com/?p=21#comments</comments>
		<pubDate>Sat, 17 Jul 2010 06:57:31 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://insomart.com/?p=21</guid>
		<description><![CDATA[One of the areas that I am really like in technology is image processing. It all comes back to my early days at INAOE, where I assisted at the image science lab. Part of my work was to write code &#8230; <a href="http://insomart.com/?p=21">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://insomart.com/wp-content/uploads/2010/07/morningflower.jpg"><img style="border-right-width: 0px; margin: 10px auto; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" class="wlDisabledImage" title="morningflower" border="0" alt="morningflower" src="http://insomart.com/wp-content/uploads/2010/07/morningflower_thumb.jpg" width="244" height="244" /></a>One of the areas that I am really like in technology is image processing. It all comes back to my early days at <a href="http://www-optica.inaoep.mx/en/">INAOE</a>, where I assisted at the image science lab. Part of my work was to write code to automate lab processes, or to do analysis on experiments, which often came back as images. It was during this time that I learned about topics like FFT, image filters, edge detection, etc. It was also when I started to experiment with a combination of algorithms to come up with the images in this site, which I called Insomart.</p>
<p>After some time away from image processing, I want to go and discover what is new about it, and what new ideas are taking place. This blog is about me spending some of my time playing with new image processing tools, algorithms and more to see what it is new that we can do with images today.</p>
]]></content:encoded>
			<wfw:commentRss>http://insomart.com/?feed=rss2&amp;p=21</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Welcome to Insomart.com</title>
		<link>http://insomart.com/?p=4</link>
		<comments>http://insomart.com/?p=4#comments</comments>
		<pubDate>Mon, 02 Nov 2009 06:47:10 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://insomart.com/?p=4</guid>
		<description><![CDATA[Welcome to Insomart.com. Insomart (Short for Insomniac Art) is a generative art form based on image filters and mathematical transformations. There is little to no post-processing to these images, though we often create new images based on Insomart patterns or combining &#8230; <a href="http://insomart.com/?p=4">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<div class="mceTemp">Welcome to Insomart.com. Insomart (Short for Insomniac Art) is a <a href="http://en.wikipedia.org/wiki/Generative_art" target="_blank">generative art</a> form based on image filters and mathematical transformations. There is little to no post-processing to these images, though we often create new images based on Insomart patterns or combining our techniques with other generative techniques, manual editing and image processing software.</div>
<div class="mceTemp">Most of the insomart portafolio is posted at our <a href="http://flickr.com/insomart" target="_blank">flickr</a> page.</div>
]]></content:encoded>
			<wfw:commentRss>http://insomart.com/?feed=rss2&amp;p=4</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>
