<h1><font face="verdana, sans-serif"><span style="font-weight:normal"><h3 style="text-align:left;font-weight:bold;margin-top:1em;background-color:transparent">
<font size="4" color="#FF9900"><span>Proposal  for digiKam--</span>Clone Tool for Image Editor</font></h3></span><span style="font-size:small;font-weight:normal"><h1 style="font-size:12px">
<span style="font-size:18px">Information about me</span></h1><div>I'm Zhang Jie. <span style="border-collapse:collapse;font-size:13px">As a student  in <span style="font-family:arial, helvetica, sans-serif;line-height:16px;border-collapse:separate">Zhejiang University (ZJU)</span>, my research </span><span style="border-collapse:collapse;font-size:13px">interests are in graphical image processing. I'm very interested </span><span style="border-collapse:collapse;font-size:13px">in the Clone Tool for Image Editor by digiKam at GSoC 2011.</span><span style="border-collapse:collapse;font-size:13px">This is the second year of my Master study period. I'd like to join in the open source. </span></div>



</span></font></h1><h1><span style="border-collapse:collapse;font-size:13px;font-weight:normal"><font face="verdana, sans-serif">I uses digiKam to organize my pictures. So I'm very familiar with this software. </font></span></h1>



<h1><span style="border-collapse:collapse;font-family:verdana, sans-serif;font-size:small;font-weight:normal">I have some experience </span><span style="font-family:helvetica, arial, verdana;font-size:12px;font-weight:normal">that might  be relevant to the project.  </span><span style="border-collapse:collapse;font-size:13px;font-weight:normal"><font face="verdana, sans-serif">I have learned QT for 2 years and I did a simple Image Editing software last year. There are many tools in the software, such as brush, eraser, scissors tool etc. To do the work I studied all the demoes in QT. Also, as a Lab project, I have written a plug-in for photoshop--</font></span><span style="border-collapse:collapse;font-family:verdana, sans-serif;font-size:13px;font-weight:normal">generat </span><span style="border-collapse:collapse;font-family:verdana, sans-serif;font-size:13px;font-weight:normal">mapping graph according to a picture. I use</span><span style="border-collapse:collapse;font-family:arial, sans-serif;font-size:13px;font-weight:normal"> openCV library in the program. </span><span style="border-collapse:collapse;font-family:verdana, sans-serif;font-size:13px;font-weight:normal">For programming language, I use C++. </span></h1>



<div><font face="verdana, sans-serif"><span style="border-collapse:collapse;font-size:13px;font-weight:normal">I will spend more than 40 hours every week to <span style="line-height:19px;border-collapse:separate">work on</span> the project.  For the mentor to </span><span style="font-size:13px;line-height:19px">track my work , I will  submit a progress record once a week. Also, we can have meetings on IRC. In fact, I </span><span style="font-size:13px;line-height:19px">submitted a progress </span><span style="font-size:13px;line-height:19px">record </span><span style="font-size:13px;line-height:19px">to my instructor every week when I worked on a software. As long as I can coordinate with the mentor, it really doesn't matter where he/she lives. </span></font></div>



<div><span style="font-size:13px;line-height:19px"><font face="verdana, sans-serif"><br></font></span></div><div><span style="font-size:13px;line-height:19px"><font face="verdana, sans-serif"><b>Here is my contact information:</b></font></span></div>



<div><span style="font-size:13px;line-height:19px"><font face="verdana, sans-serif"><span style="font-size:small">IRC nick: zhjie</span></font></span></div>
<div><span style="font-size:13px;line-height:19px"><font face="verdana, sans-serif">email address: <a href="mailto:zhangjiehangyuan2005@gmail.com" target="_blank">zhangjiehangyuan2005@gmail.com</a></font></span></div>
<div><font face="verdana, sans-serif"><span style="line-height:19px">postal address:China ,Hang Zhou, <span style="font-family:arial, helvetica, sans-serif;font-size:13px;line-height:16px">Zhejiang University</span>, 38 Zheda Road, Fourth quarters</span></font></div>



<div><font face="verdana, sans-serif"><span style="line-height:19px">telephone number:+</span></font><span style="font-size:12px;line-height:17px">86 15268566953</span></div>
<div><font face="verdana, sans-serif"><span style="line-height:19px"><br></span></font></div><div><span style="font-size:13px;line-height:19px"><font face="verdana, sans-serif">Bye the way, my native language is Chinese, I live in Hang Zhou. As for time, we use Beijing Time Zone , that's 8 hours earlier than UTC.</font></span></div>



<div><span style="color:rgb(83, 83, 83);font-family:'Bitstream Vera Sans', 'Lucida Grande', 'Trebuchet MS', sans-serif;font-size:13px;line-height:19px"><br></span></div>
<h1 style="font-family:helvetica, arial, verdana;font-size:12px"><span style="font-size:18px">Problem description</span></h1><div><font face="verdana, sans-serif"><span style="line-height:19px"><span style="line-height:normal">As a free, open-source, efficient image organizer,  digiKam </span>supports all major image file formats, </span><span style="line-height:19px">and can organize collections of photographs in directory-based albums, or dynamic albums by date, timeline, or by t</span><span style="line-height:19px">ags</span><span style="line-height:19px">. With the help of digiKam, people can organize their pictures in perfect order.</span><span style="line-height:19px">What if you are not satisfy your pictures taken by camera? What if there is  annoying </span>dusts, spots, and other unwanted artefact in your picture? The thing you just need is a clone tool. You can clone from the same picture or other pictures a similar regional to patch the dusts etc.</font></div>



<div><font face="verdana, sans-serif">Recent research has made it possible to seamless clone, clone the clear rectangle that you choose  to the dust area, it can  coordinate with the surrounding environment in the picture, seamlessly.</font></div>



<div><font face="verdana, sans-serif">The aim of this project is to provide a clone tool like this to support picture editing.</font></div><div><font face="verdana, sans-serif"><br>
</font></div><h2 style="font-family:helvetica, arial, verdana"><font size="4">Implementation plan</font></h2><p style="font-size:12px"><font face="verdana, sans-serif">The project consists of two components:</font></p>
<p style="font-family:helvetica, arial, verdana;font-size:12px"><b>A friendly interaction interface for clone tool</b></p><p style="font-size:12px"><font face="verdana, sans-serif"><strong></strong>For convenient operation of the clone tool, I would  like to design the tool as a brush.  You can change the size of the brush as well as shape maybe. First chose a central region(without <span style="font-size:small">dusts, spots, and other unwanted artefact </span>), then  draw on the <span style="font-size:small">dusts area in the picture </span></font><span style="font-family:verdana, sans-serif">use the brush</span><span style="font-family:verdana, sans-serif;font-size:small">. I want to make to tool just like Healing brush tool in Photoshop.</span></p>



<p style="font-family:helvetica, arial, verdana;font-size:12px"><strong>Clone</strong></p><p><font face="verdana, sans-serif">The basic method of clone is to  remove defects in images . Copying  directly  is not advisable, as it cannot suit the environment in the image. The source rectangle may be lighter or has a different color comparing with the target area. What the project should achieve is to change the color and light  of the source rectangle according to the target area. That is seamless clone. </font></p>



<p><font face="verdana, sans-serif"><b><span style="font-size:12px">Related Work </span>in this area are as follows </b></font></p><p><font face="verdana, sans-serif">In paper "Poisson Image Editing" , the authors achieve seamless cloning by solving a Poisson equation to fill in the selected area. The right hand side ’source’ term in the equation is Laplacian of the sampled image. Dirichlet boundary conditions make the solution continuous at the boundary. Source code of the paper is available.</font></p>



<p><font face="verdana, sans-serif">Here are some results of "Poisson Image Editing": (To avoid a too big e-mail, I uploaded the result images to my flickr)</font></p><p><font face="verdana, sans-serif">results from the paper </font></p>


<p><font face="verdana, sans-serif"><a href="http://www.flickr.com/photos/zhjie/5567239315/in/photostream/" target="_blank">http://www.flickr.com/photos/zhjie/5567239315/in/photostream/</a></font></p><p><a href="http://www.flickr.com/photos/zhjie/5567823932/in/photostream/" target="_blank">http://www.flickr.com/photos/zhjie/5567823932/in/photostream/</a></p>


<p><font face="verdana, sans-serif">results got by the source code</font></p><p><font face="verdana, sans-serif"></font></p><p><font face="verdana, sans-serif">source picture:<a href="http://www.flickr.com/photos/zhjie/5566195587/in/photostream/" target="_blank">http://www.flickr.com/photos/zhjie/5566195587/in/photostream/</a></font></p>


<p>maks picture:<a href="http://www.flickr.com/photos/zhjie/5567229627/" target="_blank">http://www.flickr.com/photos/zhjie/5567229627/</a></p>
<p><font face="verdana, sans-serif">target picture:<a href="http://www.flickr.com/photos/zhjie/5566195459/" target="_blank">http://www.flickr.com/photos/zhjie/5566195459/</a></font></p><p><font face="verdana, sans-serif">result picture:<a href="http://www.flickr.com/photos/zhjie/5566196159/in/photostream/" target="_blank">http://www.flickr.com/photos/zhjie/5566196159/in/photostream/</a></font></p>



<p><br></p><p><font face="verdana, sans-serif"><a href="http://www.flickr.com/photos/zhjie/5566196159/in/photostream/" target="_blank"></a>Todor Georgiev, in his paper "Photoshop Healing Brush:a Tool for Seamless Cloning" , proposed that continuity at the boundary is not always sufficient. He said  if we  want higher quality, seamless fill in requires continuity of </font><span style="font-family:verdana, sans-serif">derivatives. He use a fourth order PDE(partial differential equation) for solving that. That is just the method used Photoshop as Healing Brush.</span></p>



<p><span style="font-family:verdana, sans-serif"><br></span></p><p><span style="font-family:verdana, sans-serif">Another paper "Poisson Matting", gives a approach called Poisson matting. As the matte is directly reconstructed from a continuous matte gradient field by solving Poisson equations using boundary information from a user-supplied trimap, the modified local result is seamlessly integrated into the final result. By interactively , people can manipulating the matte gradient field using a number of filtering tools until he or she is satisfied. This approach gives very good result especially in details such as hair. </span></p>



<p><font face="verdana, sans-serif" color="#000000"><a href="http://www.cse.cuhk.edu.hk/~leojia/all_project_webpages/Poisson%20matting/poisson_matting.html" target="_blank">http://www.cse.cuhk.edu.hk/~leojia/all_project_webpages/Poisson%20matting/poisson_matting.html</a></font></p>



<p><br></p><p><font face="verdana, sans-serif">In "Coordinates for Instant Image Cloning", using the general framework of mean-value coordinates,  the authors presented a new approach for seamless cloning of images and video, stitching, and matting.</font></p>



<p><font face="verdana, sans-serif"><a href="http://www.cs.huji.ac.il/~danix/mvclone/" target="_blank">http://www.cs.huji.ac.il/~danix/mvclone/</a></font></p><p><br></p><h2 style="font-family:helvetica, arial, verdana">
<font size="4">Deliverables</font></h2><p></p><ul><li><font face="verdana, sans-serif">A<b style="font-size:large"> </b></font><span style="font-size:13px"><font face="'Bitstream Vera Sans', 'Lucida Grande', 'Trebuchet MS', sans-serif">clone tool to be able to remove quickly dusts, spots, and other unwanted </font><font face="verdana, sans-serif">artefact</font><font face="'Bitstream Vera Sans', 'Lucida Grande', 'Trebuchet MS', sans-serif" style="color:rgb(83, 83, 83)"> </font><font face="'Bitstream Vera Sans', 'Lucida Grande', 'Trebuchet MS', sans-serif"> from an image.</font></span></li>



<li><span style="font-family:'Bitstream Vera Sans', 'Lucida Grande', 'Trebuchet MS', sans-serif">Source code and the <span style="font-family:verdana, sans-serif;font-size:12px">documentation</span>.</span></li>



</ul><p></p><h2 style="font-family:helvetica, arial, verdana"><div title="Page Break" style="font-size:12px"></div><font size="4">Timeline</font></h2><div><b>More than 40 hours is spent on the project every week. More details for timeline are as follows:</b></div>



<p style="font-size:12px"><font face="verdana, sans-serif">This week-by-week timeline provides a rough guideline of how the project will be done.</font></p><p style="font-size:12px"><font face="verdana, sans-serif"><br>
</font></p><p style="font-size:12px"><font face="verdana, sans-serif">3 -- 16 May  </font></p><p style="font-size:12px"><font face="verdana, sans-serif"> Discuss with the mentor and make a determine on the design of the interaction interface.  </font></p>



<span style="font-size:13px"><font face="verdana, sans-serif"><h3 style="text-align:left;font-weight:bold;margin-top:1em;background-color:transparent;font-size:1.2em">
<span style="font-size:12px;font-weight:normal">Make a deeper understanding with related documents and papers. </span></h3><div><span style="font-size:12px">17 -- 30 May </span></div>
</font></span><h3 style="text-align:left;margin-top:1em;background-color:transparent"></h3><h3 style="text-align:left;font-weight:bold;margin-top:1em;background-color:transparent;font-size:1.2em">
<font face="verdana, sans-serif"><span style="font-size:12px;font-weight:normal"> </span><span style="font-size:12px;font-weight:normal">Test and document existing code more thoroughly. </span><span style="font-size:12px;font-weight:normal">Familiarize with the code and do some optimization.</span></font></h3>



<p style="font-size:12px"><font face="verdana, sans-serif">31 May -- 6 June</font></p><p style="font-size:12px"><font face="verdana, sans-serif"><span style="font-size:13px"></span></font></p>
<h3 style="text-align:left;font-weight:bold;margin-top:1em;background-color:transparent;font-size:1.2em">
<font face="verdana, sans-serif"><span style="font-size:12px;font-weight:normal"> Familiar with digiKam source code  and get  the framework design of the process started. At the same time,  start with </span><span style="font-size:12px;font-weight:normal">program  documents writing.</span></font></h3>



<p></p><p style="font-size:12px"><font face="verdana, sans-serif">7 -- 20 June</font></p><p style="font-size:12px"><font face="verdana, sans-serif">Determine algorithms used to do the seamless clone.  Use QT to write the interface. </font></p>



<p style="font-size:12px"><font face="verdana, sans-serif">21 -- 27 June</font></p><p style="font-size:12px"><font face="verdana, sans-serif">Finish the functions that is respond to user actions.</font></p>
<p style="font-size:12px"><font face="verdana, sans-serif">28 June -- 11 July</font></p><p style="font-size:12px"><font face="verdana, sans-serif">Test the logical of the respond to user actions, make it more reasonable and more friendly.</font></p>



<p style="font-size:12px"><font face="verdana, sans-serif">12 -- 25 July</font></p><p style="font-size:12px"><font face="verdana, sans-serif">Finish the coding and program  documents.</font></p>
<p style="font-size:12px"><font face="verdana, sans-serif">26 July -- 1 August</font></p><p style="font-size:12px"><font face="verdana, sans-serif">Test the hole project and the program documentation more thoroughly.</font></p>



<p style="font-size:12px"><font face="verdana, sans-serif">2 -- 16 August</font></p><p style="font-size:12px"><font face="verdana, sans-serif">Further refine tests and documentation for the whole project.</font></p>