<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://en.formulasearchengine.com/w/index.php?action=history&amp;feed=atom&amp;title=Hermite_distribution</id>
	<title>Hermite distribution - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://en.formulasearchengine.com/w/index.php?action=history&amp;feed=atom&amp;title=Hermite_distribution"/>
	<link rel="alternate" type="text/html" href="https://en.formulasearchengine.com/w/index.php?title=Hermite_distribution&amp;action=history"/>
	<updated>2026-08-28T21:38:53Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.47.0-wmf.7</generator>
	<entry>
		<id>https://en.formulasearchengine.com/w/index.php?title=Hermite_distribution&amp;diff=29921&amp;oldid=prev</id>
		<title>en&gt;LilHelpa: Typo fixing  and general fixes, replaced: nunber → number using AWB</title>
		<link rel="alternate" type="text/html" href="https://en.formulasearchengine.com/w/index.php?title=Hermite_distribution&amp;diff=29921&amp;oldid=prev"/>
		<updated>2014-01-12T18:05:48Z</updated>

		<summary type="html">&lt;p&gt;&lt;a href=&quot;/w/index.php?title=WP:AWB/T&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;WP:AWB/T (page does not exist)&quot;&gt;Typo fixing&lt;/a&gt;  and general fixes, replaced: nunber → number using &lt;a href=&quot;/w/index.php?title=Testwiki:AWB&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;Testwiki:AWB (page does not exist)&quot;&gt;AWB&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{multiple issues|&lt;br /&gt;
{{orphan|date=June 2013}}&lt;br /&gt;
{{technical|date=June 2013}}&lt;br /&gt;
{{Underlinked|date=June 2013}}&lt;br /&gt;
}}&lt;br /&gt;
[[File:PatchMatch.jpg|thumbnail|Flowers at right bottom corner are removed using PatсhMatсh]]&lt;br /&gt;
The core PatchMatch [[algorithm]] quickly finds [[Correspondence problem|correspondences]] between small square regions (or patches) of an image. The algorithm can be used in various applications such as object removal from images, reshuffling or moving contents of images, or retargeting or changing aspect ratios of images.&lt;br /&gt;
&lt;br /&gt;
==Algorithm==&lt;br /&gt;
The goal of the [[algorithm]] is to find the patch correspondence by deﬁning a &amp;#039;&amp;#039;&amp;#039;nearest-neighbor ﬁeld (NNF)&amp;#039;&amp;#039;&amp;#039; as a [[Function (mathematics)|function]] &amp;lt;math&amp;gt;f  : A \to \mathbb{R}^2 &amp;lt;/math&amp;gt; of offsets, which is over all possible matches of patch (location of patch centers) in image A, for some distance function of two patches &amp;lt;math&amp;gt;D&amp;lt;/math&amp;gt;. So, for a given patch coordinate &amp;lt;math&amp;gt;a&amp;lt;/math&amp;gt; in image &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; and its corresponding nearest neighbor &amp;lt;math&amp;gt;b&amp;lt;/math&amp;gt; in image &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;f(a)&amp;lt;/math&amp;gt; is simply &amp;lt;math&amp;gt;b - a&amp;lt;/math&amp;gt;. However, if we search for every point in image &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt;, the work will be too hard to complete. So the following [[algorithm]] is done in a randomized approach in order to accelerate the calculation speed. &lt;br /&gt;
The algorithm has three main components. Initially, the nearest-neighbor ﬁeld is ﬁlled with either random offsets or some prior information. Next, an iterative update process is applied to the NNF, in which good patch offsets are propagated to adjacent pixels, followed by random search in the neighborhood of the best offset found so far. Independent of these three components, the algorithm also use a coarse-to-fine approach by building an image pyramid to obtain the better result.&lt;br /&gt;
&lt;br /&gt;
===Initialization===&lt;br /&gt;
When initializing with random offsets, we use independent uniform samples across the full range of image &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt;. This algorithm avoids using an initial guess from the previous level of the pyramid because in this way the algorithm can avoid being trapped in local minima{{Clarify|date=January 2014}}.&lt;br /&gt;
&lt;br /&gt;
===Iteration===&lt;br /&gt;
After initialization, the algorithm attempted to perform iterative process of improving the &amp;lt;math&amp;gt;NNF&amp;lt;/math&amp;gt;. The iterations examine the offsets in scan order (from left to right, top to bottom), and each undergoes &amp;#039;&amp;#039;&amp;#039;propagation&amp;#039;&amp;#039;&amp;#039; followed by &amp;#039;&amp;#039;&amp;#039;random search&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
===Propagation===&lt;br /&gt;
We attempt to improve &amp;lt;math&amp;gt;f(x,y)&amp;lt;/math&amp;gt; using the known offsets of &amp;lt;math&amp;gt;f(x-1, y)&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;f(x, y-1)&amp;lt;/math&amp;gt;, assuming that the patch offsets&lt;br /&gt;
are likely to be the same. That is, the algorithm will take new value for &amp;lt;math&amp;gt;f(x,y)&amp;lt;/math&amp;gt; to be &amp;lt;math&amp;gt;\arg \min \limits _{(x,y)} {D(f(x, y)), D(f(x - 1, y)), D(f(x, y - 1))}&amp;lt;/math&amp;gt;. &lt;br /&gt;
So if &amp;lt;math&amp;gt;f(x, y)&amp;lt;/math&amp;gt; has a correct mapping and is in a coherent region &amp;lt;math&amp;gt;R&amp;lt;/math&amp;gt;, then all of &amp;lt;math&amp;gt;R&amp;lt;/math&amp;gt; below and to the right of &amp;lt;math&amp;gt;f(x, y)&amp;lt;/math&amp;gt; will be ﬁlled with the correct mapping. Alternatively, on even iterations, the algorithm search for different direction, fill the new value to be &amp;lt;math&amp;gt;\arg \min \limits _{(x,y)} {D(f(x, y)), D(f(x + 1, y)), D(f(x, y + 1))}&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===Random search===&lt;br /&gt;
Let &amp;lt;math&amp;gt;v_0 = f(x, y)&amp;lt;/math&amp;gt;, we attempt to improve&amp;lt;math&amp;gt;f(x, y)&amp;lt;/math&amp;gt; by testing a sequence of candidate offsets at an exponentially decreasing distance  from &amp;lt;math&amp;gt;v_0&amp;lt;/math&amp;gt;&lt;br /&gt;
:&amp;lt;math&amp;gt;&lt;br /&gt;
u_i = v_0+w\alpha^iR_i&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;math&amp;gt;R_i&amp;lt;/math&amp;gt; is a uniform random in &amp;lt;math&amp;gt;[-1, 1] \times [-1, 1]&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;w&amp;lt;/math&amp;gt; is a large window search radius which will be set to maximum picture size, and &amp;lt;math&amp;gt;\alpha&amp;lt;/math&amp;gt; is a fixed ratio often assigned as 1/2. This part of the algorithm allows the &amp;lt;math&amp;gt;f(x,y)&amp;lt;/math&amp;gt; to jump out of local minimum through random process.&lt;br /&gt;
&lt;br /&gt;
===Halting criteria===&lt;br /&gt;
The often used halting criteria is set the iteration times to be about 4~5. Even with low iteration, the algorithm works well.&lt;br /&gt;
&lt;br /&gt;
==Conclusion==&lt;br /&gt;
This is an efficient algorithm since it only takes a few second on a testing computer with [[Intel Core]] i5 CPU and Photoshop CS5.&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
&lt;br /&gt;
* [[Nearest neighbor search]]&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
* Connelly Barnes, Eli Shechtman, Adam Finkelstein, Dan B Goldman(2009), [http://gfx.cs.princeton.edu/pubs/Barnes_2009_PAR/ PatchMatch: A Randomized Correspondence Algorithm for Structural Image Editing]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--Categories--&amp;gt;&lt;br /&gt;
[[Category:Computer vision]]&lt;/div&gt;</summary>
		<author><name>en&gt;LilHelpa</name></author>
	</entry>
</feed>