<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://charlesreid1.com/w/index.php?action=history&amp;feed=atom&amp;title=Graphs%2FMinimum_Spanning_Tree%2FImage_Segmentation</id>
	<title>Graphs/Minimum Spanning Tree/Image Segmentation - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://charlesreid1.com/w/index.php?action=history&amp;feed=atom&amp;title=Graphs%2FMinimum_Spanning_Tree%2FImage_Segmentation"/>
	<link rel="alternate" type="text/html" href="https://charlesreid1.com/w/index.php?title=Graphs/Minimum_Spanning_Tree/Image_Segmentation&amp;action=history"/>
	<updated>2026-06-25T05:33:24Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.39.12</generator>
	<entry>
		<id>https://charlesreid1.com/w/index.php?title=Graphs/Minimum_Spanning_Tree/Image_Segmentation&amp;diff=30857&amp;oldid=prev</id>
		<title>Admin: /* Comparison with Other Methods */</title>
		<link rel="alternate" type="text/html" href="https://charlesreid1.com/w/index.php?title=Graphs/Minimum_Spanning_Tree/Image_Segmentation&amp;diff=30857&amp;oldid=prev"/>
		<updated>2026-06-24T21:11:41Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Comparison with Other Methods&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 21:11, 24 June 2026&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l181&quot;&gt;Line 181:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 181:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==Comparison with Other Methods==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==Comparison with Other Methods==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{| class=&amp;quot;wikitable&amp;quot;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{| class=&amp;quot;wikitable&amp;quot; &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;border=&amp;quot;1&amp;quot;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;|+ Comparison of Segmentation Approaches&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|-&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|-&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;! Method !! Graph-Based? !! Complexity !! Key Idea&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;! Method !! Graph-Based? !! Complexity !! Key Idea&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key wikidb:diff::1.12:old-30856:rev-30857 --&gt;
&lt;/table&gt;</summary>
		<author><name>Admin</name></author>
	</entry>
	<entry>
		<id>https://charlesreid1.com/w/index.php?title=Graphs/Minimum_Spanning_Tree/Image_Segmentation&amp;diff=30856&amp;oldid=prev</id>
		<title>Admin: /* Worked Example (Grayscale, 1D) */</title>
		<link rel="alternate" type="text/html" href="https://charlesreid1.com/w/index.php?title=Graphs/Minimum_Spanning_Tree/Image_Segmentation&amp;diff=30856&amp;oldid=prev"/>
		<updated>2026-06-24T21:10:39Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Worked Example (Grayscale, 1D)&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 21:10, 24 June 2026&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l118&quot;&gt;Line 118:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 118:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Pixel: &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt; &lt;/del&gt;0    1    2    3    4    5    6    7&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Pixel: &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;     &lt;/ins&gt;0    1    2    3    4    5    6    7&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Intensity: 10 &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt; &lt;/del&gt;12 &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt; &lt;/del&gt;13 &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt; &lt;/del&gt;50 &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt; &lt;/del&gt;52 &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt; &lt;/del&gt;51 &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt; &lt;/del&gt;90 &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt; &lt;/del&gt;92&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Intensity: 10 &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;  &lt;/ins&gt;12 &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;  &lt;/ins&gt;13 &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;  &lt;/ins&gt;50 &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;  &lt;/ins&gt;52 &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;  &lt;/ins&gt;51 &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;  &lt;/ins&gt;90 &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;  &lt;/ins&gt;92&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key wikidb:diff::1.12:old-30855:rev-30856 --&gt;
&lt;/table&gt;</summary>
		<author><name>Admin</name></author>
	</entry>
	<entry>
		<id>https://charlesreid1.com/w/index.php?title=Graphs/Minimum_Spanning_Tree/Image_Segmentation&amp;diff=30855&amp;oldid=prev</id>
		<title>Admin: /* Algorithm */</title>
		<link rel="alternate" type="text/html" href="https://charlesreid1.com/w/index.php?title=Graphs/Minimum_Spanning_Tree/Image_Segmentation&amp;diff=30855&amp;oldid=prev"/>
		<updated>2026-06-24T21:10:05Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Algorithm&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 21:10, 24 June 2026&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l86&quot;&gt;Line 86:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 86:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;FelzenszwalbHuttenlocher&lt;/del&gt;(G, k):&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Felzenszwalb_Huttenlocher&lt;/ins&gt;(G, k):&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;     sort edges by increasing weight&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;     sort edges by increasing weight&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;     initialize each vertex as its own component&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;     initialize each vertex as its own component&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key wikidb:diff::1.12:old-30854:rev-30855 --&gt;
&lt;/table&gt;</summary>
		<author><name>Admin</name></author>
	</entry>
	<entry>
		<id>https://charlesreid1.com/w/index.php?title=Graphs/Minimum_Spanning_Tree/Image_Segmentation&amp;diff=30854&amp;oldid=prev</id>
		<title>Admin: /* Single-Threshold Method */</title>
		<link rel="alternate" type="text/html" href="https://charlesreid1.com/w/index.php?title=Graphs/Minimum_Spanning_Tree/Image_Segmentation&amp;diff=30854&amp;oldid=prev"/>
		<updated>2026-06-24T21:09:16Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Single-Threshold Method&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 21:09, 24 June 2026&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l47&quot;&gt;Line 47:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 47:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The simplest MST-based segmentation works as follows:&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The simplest MST-based segmentation works as follows:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;pre&amp;gt;&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;# &lt;/ins&gt;Build graph G = (V, E) from the image.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;1. &lt;/del&gt;Build graph G = (V, E) from the image.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;# &lt;/ins&gt;Compute the MST T of G.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;2. &lt;/del&gt;Compute the MST T of G.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;# &lt;/ins&gt;Choose a threshold τ.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;3. &lt;/del&gt;Choose a threshold τ.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;# &lt;/ins&gt;Remove all edges of T with weight &amp;gt; τ.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;4. &lt;/del&gt;Remove all edges of T with weight &amp;gt; τ.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;# &lt;/ins&gt;The remaining connected components are the segments.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;5. &lt;/del&gt;The remaining connected components are the segments.&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;/pre&amp;gt;&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;This approach segments the image into regions where all intra-region pixel differences are below &amp;lt;math&amp;gt;\tau&amp;lt;/math&amp;gt;. The threshold &amp;lt;math&amp;gt;\tau&amp;lt;/math&amp;gt; controls the granularity: lower values produce more, smaller segments; higher values produce fewer, larger segments.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;This approach segments the image into regions where all intra-region pixel differences are below &amp;lt;math&amp;gt;\tau&amp;lt;/math&amp;gt;. The threshold &amp;lt;math&amp;gt;\tau&amp;lt;/math&amp;gt; controls the granularity: lower values produce more, smaller segments; higher values produce fewer, larger segments.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key wikidb:diff::1.12:old-30850:rev-30854 --&gt;
&lt;/table&gt;</summary>
		<author><name>Admin</name></author>
	</entry>
	<entry>
		<id>https://charlesreid1.com/w/index.php?title=Graphs/Minimum_Spanning_Tree/Image_Segmentation&amp;diff=30850&amp;oldid=prev</id>
		<title>Admin: Create page: MST-based image segmentation with overview, examples, and Felzenszwalb-Huttenlocher algorithm (via create-page on MediaWiki MCP Server)</title>
		<link rel="alternate" type="text/html" href="https://charlesreid1.com/w/index.php?title=Graphs/Minimum_Spanning_Tree/Image_Segmentation&amp;diff=30850&amp;oldid=prev"/>
		<updated>2026-06-24T21:04:56Z</updated>

		<summary type="html">&lt;p&gt;Create page: MST-based image segmentation with overview, examples, and Felzenszwalb-Huttenlocher algorithm (via create-page on MediaWiki MCP Server)&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;=Notes=&lt;br /&gt;
&lt;br /&gt;
Image segmentation is the process of partitioning a digital image into multiple segments (sets of pixels, also called superpixels or regions) to simplify or change the representation of the image into something more meaningful and easier to analyze. Minimum spanning trees (MSTs) provide an elegant, graph-based approach to this problem.&lt;br /&gt;
&lt;br /&gt;
==Intuition==&lt;br /&gt;
&lt;br /&gt;
An image can be modeled as a graph where each pixel is a vertex and edges connect neighboring pixels (typically 4-connected or 8-connected neighborhoods). Edge weights represent the dissimilarity between the two pixels — for example, the absolute difference in intensity (grayscale) or the Euclidean distance in RGB color space. The intuition is that pixels within the same object tend to have similar colors/intensities (low edge weights), while pixels on object boundaries have large differences (high edge weights).&lt;br /&gt;
&lt;br /&gt;
The MST of this pixel graph captures the &amp;quot;backbone&amp;quot; of low-dissimilarity connections. Because an MST minimizes the total sum of edge weights, it preferentially connects similar pixels. By cutting the MST at edges whose weight exceeds some threshold, the image can be segmented into homogeneous regions.&lt;br /&gt;
&lt;br /&gt;
==Graph Construction==&lt;br /&gt;
&lt;br /&gt;
===Vertices===&lt;br /&gt;
&lt;br /&gt;
Each pixel &amp;lt;math&amp;gt;p \in P&amp;lt;/math&amp;gt; of the image becomes a vertex &amp;lt;math&amp;gt;v_p \in V&amp;lt;/math&amp;gt;. For an image of size &amp;lt;math&amp;gt;W \times H&amp;lt;/math&amp;gt;, the graph has &amp;lt;math&amp;gt;|V| = W \times H&amp;lt;/math&amp;gt; vertices.&lt;br /&gt;
&lt;br /&gt;
===Edges===&lt;br /&gt;
&lt;br /&gt;
Edges are added between neighboring pixels. Common neighborhood structures:&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;4-connected grid:&amp;#039;&amp;#039;&amp;#039; each pixel connects to its top, bottom, left, and right neighbors. Maximum degree 4.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;8-connected grid:&amp;#039;&amp;#039;&amp;#039; each pixel connects to all eight surrounding pixels. Maximum degree 8.&lt;br /&gt;
&lt;br /&gt;
For an &amp;lt;math&amp;gt;W \times H&amp;lt;/math&amp;gt; image with 4-connectivity, the graph has approximately &amp;lt;math&amp;gt;|E| \approx 2WH - W - H&amp;lt;/math&amp;gt; undirected edges.&lt;br /&gt;
&lt;br /&gt;
===Edge Weights===&lt;br /&gt;
&lt;br /&gt;
The weight of an edge &amp;lt;math&amp;gt;e = (v_p, v_q)&amp;lt;/math&amp;gt; measures dissimilarity:&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Grayscale images:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
w(e) = |I(p) - I(q)|&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
where &amp;lt;math&amp;gt;I(p)&amp;lt;/math&amp;gt; is the intensity of pixel &amp;lt;math&amp;gt;p&amp;lt;/math&amp;gt; (0–255).&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Color images (RGB):&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
w(e) = \sqrt{ (R_p - R_q)^2 + (G_p - G_q)^2 + (B_p - B_q)^2 }&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Additional feature vectors&amp;#039;&amp;#039;&amp;#039; can incorporate texture, position, or higher-level descriptors. The weight function is domain-specific.&lt;br /&gt;
&lt;br /&gt;
==MST-Based Segmentation: Basic Approach==&lt;br /&gt;
&lt;br /&gt;
===Single-Threshold Method===&lt;br /&gt;
&lt;br /&gt;
The simplest MST-based segmentation works as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
1. Build graph G = (V, E) from the image.&lt;br /&gt;
2. Compute the MST T of G.&lt;br /&gt;
3. Choose a threshold τ.&lt;br /&gt;
4. Remove all edges of T with weight &amp;gt; τ.&lt;br /&gt;
5. The remaining connected components are the segments.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This approach segments the image into regions where all intra-region pixel differences are below &amp;lt;math&amp;gt;\tau&amp;lt;/math&amp;gt;. The threshold &amp;lt;math&amp;gt;\tau&amp;lt;/math&amp;gt; controls the granularity: lower values produce more, smaller segments; higher values produce fewer, larger segments.&lt;br /&gt;
&lt;br /&gt;
===Limitations of Single Threshold===&lt;br /&gt;
&lt;br /&gt;
A global threshold fails when different regions of the image have different natural levels of contrast. A shadowed region may have small edge weights throughout (requiring a low threshold), while a high-contrast region may need a high threshold to avoid over-segmentation.&lt;br /&gt;
&lt;br /&gt;
==Felzenszwalb–Huttenlocher Algorithm==&lt;br /&gt;
&lt;br /&gt;
The seminal graph-based segmentation algorithm by Felzenszwalb and Huttenlocher (2004) addresses the global-threshold problem by introducing adaptive, component-aware thresholds.&lt;br /&gt;
&lt;br /&gt;
===Key Idea===&lt;br /&gt;
&lt;br /&gt;
Rather than a fixed threshold, each component &amp;lt;math&amp;gt;C&amp;lt;/math&amp;gt; defines its internal difference:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\text{Int}(C) = \max_{e \in \text{MST}(C)} w(e)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
That is, the maximum edge weight in the component&amp;#039;s MST. This is the minimum threshold at which the component would be split.&lt;br /&gt;
&lt;br /&gt;
The minimum internal difference between two components is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\text{MInt}(C_1, C_2) = \min\left( \text{Int}(C_1) + \frac{k}{|C_1|}, \quad \text{Int}(C_2) + \frac{k}{|C_2|} \right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt; is a scale parameter and &amp;lt;math&amp;gt;|C|&amp;lt;/math&amp;gt; is the number of pixels in the component. The term &amp;lt;math&amp;gt;k/|C|&amp;lt;/math&amp;gt; makes smaller components more tolerant of merging — without it, isolated pixels with small edge weights would never merge.&lt;br /&gt;
&lt;br /&gt;
Two adjacent components are merged if the minimum-weight edge between them is less than or equal to &amp;lt;math&amp;gt;\text{MInt}(C_1, C_2)&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===Algorithm===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
FelzenszwalbHuttenlocher(G, k):&lt;br /&gt;
    sort edges by increasing weight&lt;br /&gt;
    initialize each vertex as its own component&lt;br /&gt;
    threshold[c] = k  for each component c with size 1&lt;br /&gt;
&lt;br /&gt;
    for each edge e = (u, v) in sorted order:&lt;br /&gt;
        find components C1 containing u, C2 containing v&lt;br /&gt;
        if C1 != C2:&lt;br /&gt;
            if w(e) &amp;lt;= min(threshold[C1], threshold[C2]):&lt;br /&gt;
                merge C1 into C2 (or vice versa)&lt;br /&gt;
                new_c = merged component&lt;br /&gt;
                Int[new_c] = w(e)  // largest edge in new MST&lt;br /&gt;
                threshold[new_c] = Int[new_c] + k / |new_c|&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Complexity===&lt;br /&gt;
&lt;br /&gt;
* Sorting edges: &amp;lt;math&amp;gt;O(|E| \log |E|)&amp;lt;/math&amp;gt;&lt;br /&gt;
* Union-find operations: &amp;lt;math&amp;gt;O(|E| \cdot \alpha(|V|))&amp;lt;/math&amp;gt; (nearly linear)&lt;br /&gt;
* Overall: &amp;lt;math&amp;gt;O(N \log N)&amp;lt;/math&amp;gt; for an image with &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt; pixels and constant neighborhood size.&lt;br /&gt;
&lt;br /&gt;
===Parameters===&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;k (scale):&amp;#039;&amp;#039;&amp;#039; governs preference for larger components. Larger &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt; yields larger segments. Typical range: 50–500.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;σ (sigma):&amp;#039;&amp;#039;&amp;#039; pre-smoothing with a Gaussian of width σ before computing edge weights reduces noise sensitivity.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;min_size:&amp;#039;&amp;#039;&amp;#039; a post-processing step merges components smaller than min_size into their nearest neighbor.&lt;br /&gt;
&lt;br /&gt;
==Worked Example (Grayscale, 1D)==&lt;br /&gt;
&lt;br /&gt;
Consider a 1×8 grayscale strip with intensities:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Pixel:  0    1    2    3    4    5    6    7&lt;br /&gt;
Intensity: 10  12  13  50  52  51  90  92&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Edge weights (absolute differences):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
(0,1): 2    (1,2): 1    (2,3): 37   (3,4): 2&lt;br /&gt;
(4,5): 1    (5,6): 39   (6,7): 2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Sort edges by weight: (1,2)=1, (4,5)=1, (0,1)=2, (3,4)=2, (6,7)=2, (2,3)=37, (5,6)=39&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Kruskal construction of MST:&amp;#039;&amp;#039;&amp;#039; all edges except the largest edges that would complete a cycle. Here the graph is a line, so all edges are in the MST.&lt;br /&gt;
&lt;br /&gt;
MST edges sorted: 1, 1, 2, 2, 2, 37, 39&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Single-threshold τ = 10:&amp;#039;&amp;#039;&amp;#039; remove edges &amp;gt; 10 → break at (2,3)=37 and (5,6)=39.&lt;br /&gt;
Segments: {0,1,2}, {3,4,5}, {6,7} — three segments matching the natural intensity clusters.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Single-threshold τ = 3:&amp;#039;&amp;#039;&amp;#039; remove edges &amp;gt; 3 → break at 37 and 39, plus (0,1)=2 and (3,4)=2 and (6,7)=2 stay.&lt;br /&gt;
Segments: {0,1,2}, {3,4,5}, {6,7} — same result here because the internal edges are ≤3.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Single-threshold τ = 1:&amp;#039;&amp;#039;&amp;#039; remove edges &amp;gt; 1.&lt;br /&gt;
Segments: {0}, {1,2}, {3}, {4,5}, {6}, {7} — over-segmented.&lt;br /&gt;
&lt;br /&gt;
==2D Example==&lt;br /&gt;
&lt;br /&gt;
Consider a simple 4×4 grayscale image:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
10  10  80  80&lt;br /&gt;
10  12  82  78&lt;br /&gt;
12  11  79  81&lt;br /&gt;
11  10  77  80&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There is a clear boundary between the left half (dark, values ~10) and right half (bright, values ~80). Edge weights between columns 1–2 and 2–3 are small (~0–2) within each region, while edge weights across the vertical midline (between columns 2 and 3) are large (~65–70).&lt;br /&gt;
&lt;br /&gt;
The MST connects all pixels within each half using low-weight edges and crosses the boundary at exactly one edge (the smallest cross-boundary difference). Cutting that single edge yields two perfect segments — the left and right halves of the image.&lt;br /&gt;
&lt;br /&gt;
This property generalizes: in an image where objects are separated by high-contrast boundaries, the MST crosses each object boundary at a single edge (or a small number of edges), and removing those cuts segments the image.&lt;br /&gt;
&lt;br /&gt;
==Extensions and Variants==&lt;br /&gt;
&lt;br /&gt;
===Iterative MST Segmentation===&lt;br /&gt;
&lt;br /&gt;
After segmenting with a threshold, treat each segment as a super-vertex and build a new graph. This hierarchical approach captures structure at multiple scales.&lt;br /&gt;
&lt;br /&gt;
===Interactive Segmentation===&lt;br /&gt;
&lt;br /&gt;
The user marks certain pixels as foreground or background. Edge weights to marked pixels are modified (boosted or penalized) before computing the MST, guiding the segmentation to respect user input. This is closely related to graph-cut methods (see [[Graphs/Max Flow]]).&lt;br /&gt;
&lt;br /&gt;
===Minimum Spanning Forest with Seeds===&lt;br /&gt;
&lt;br /&gt;
Given seed points for each region, compute a minimum spanning forest (MSF) — an MST where each tree is rooted at a seed. Every pixel is assigned to the nearest seed under the MST distance metric. This is equivalent to running Prim&amp;#039;s algorithm simultaneously from all seeds.&lt;br /&gt;
&lt;br /&gt;
===Normalized Cuts via MST===&lt;br /&gt;
&lt;br /&gt;
The MST can approximate the Normalized Cut criterion by identifying the minimum-cost partition of the MST. While exact normalized cuts are NP-hard, the MST provides an efficient approximation.&lt;br /&gt;
&lt;br /&gt;
==Comparison with Other Methods==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Comparison of Segmentation Approaches&lt;br /&gt;
|-&lt;br /&gt;
! Method !! Graph-Based? !! Complexity !! Key Idea&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;MST (single threshold)&amp;#039;&amp;#039;&amp;#039; || Yes || &amp;lt;math&amp;gt;O(N \log N)&amp;lt;/math&amp;gt; || Global edge-weight threshold&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;Felzenszwalb–Huttenlocher&amp;#039;&amp;#039;&amp;#039; || Yes || &amp;lt;math&amp;gt;O(N \log N)&amp;lt;/math&amp;gt; || Adaptive per-component thresholds&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;K-means (color clustering)&amp;#039;&amp;#039;&amp;#039; || No || &amp;lt;math&amp;gt;O(N K I)&amp;lt;/math&amp;gt; || Clusters pixels by color, ignores spatial layout&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;Mean shift&amp;#039;&amp;#039;&amp;#039; || No || &amp;lt;math&amp;gt;O(N^2)&amp;lt;/math&amp;gt; naive || Mode-seeking in feature space&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;Graph cuts (min-cut)&amp;#039;&amp;#039;&amp;#039; || Yes || &amp;lt;math&amp;gt;O(N^{1.5})&amp;lt;/math&amp;gt; approx || Global energy minimization with source/sink&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;Watershed&amp;#039;&amp;#039;&amp;#039; || No || &amp;lt;math&amp;gt;O(N \log N)&amp;lt;/math&amp;gt; || Topographic flooding from local minima&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
MST-based methods are attractive because they are efficient, deterministic, produce hierarchical segmentations, and naturally respect both spatial and feature information.&lt;br /&gt;
&lt;br /&gt;
==Advantages and Disadvantages==&lt;br /&gt;
&lt;br /&gt;
===Advantages===&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Efficiency:&amp;#039;&amp;#039;&amp;#039; &amp;lt;math&amp;gt;O(N \log N)&amp;lt;/math&amp;gt; runtime for &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt; pixels.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Global optimality:&amp;#039;&amp;#039;&amp;#039; the MST minimizes total connection cost, ensuring internal homogeneity.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Spatial coherence:&amp;#039;&amp;#039;&amp;#039; segments are guaranteed to be connected in the image grid.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Hierarchical:&amp;#039;&amp;#039;&amp;#039; the MST naturally captures segmentations at all scales — cutting at different thresholds yields a dendrogram of regions.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;No prior knowledge:&amp;#039;&amp;#039;&amp;#039; unlike k-means, the number of segments does not need to be specified in advance.&lt;br /&gt;
&lt;br /&gt;
===Disadvantages===&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Sensitive to noise:&amp;#039;&amp;#039;&amp;#039; isolated noisy pixels create spurious small segments. Gaussian pre-smoothing helps.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Boundary leakage:&amp;#039;&amp;#039;&amp;#039; if an object boundary has even one low-weight pixel (e.g., a thin bridge), the MST crosses it and merges the regions. Post-processing with contour-based refinement can mitigate this.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Parameter tuning:&amp;#039;&amp;#039;&amp;#039; the scale parameter &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt; must be chosen appropriately for each image domain.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Global structure:&amp;#039;&amp;#039;&amp;#039; the MST does not directly model high-level shape or texture.&lt;br /&gt;
&lt;br /&gt;
==Applications==&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Medical imaging:&amp;#039;&amp;#039;&amp;#039; segmenting organs, tumors, or lesions in CT/MRI scans.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Object recognition:&amp;#039;&amp;#039;&amp;#039; pre-processing step to generate superpixels for downstream classifiers.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Satellite imagery:&amp;#039;&amp;#039;&amp;#039; partitioning land cover types in remote sensing.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Video segmentation:&amp;#039;&amp;#039;&amp;#039; extending the graph into the temporal dimension with 3D neighborhoods.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Interactive photo editing:&amp;#039;&amp;#039;&amp;#039; selecting foreground objects with minimal user strokes.&lt;br /&gt;
&lt;br /&gt;
==Related Pages==&lt;br /&gt;
&lt;br /&gt;
* [[Graphs/Minimum Spanning Tree]] — parent page: MST definition, properties, and classic algorithms&lt;br /&gt;
* [[Graphs/Cluster Finding]] — uses MSTs for clustering in general graphs&lt;br /&gt;
* [[Graphs/Kruskal]] — Kruskal&amp;#039;s algorithm (basis of Felzenszwalb–Huttenlocher)&lt;br /&gt;
* [[Graphs/Prim Jarnik]] — Prim&amp;#039;s algorithm (basis of seeded segmentation)&lt;br /&gt;
* [[Graphs/Max Flow]] — min-cut / max-flow methods for segmentation&lt;br /&gt;
* [[Graphs/Connectivity]] — graph connectivity fundamentals&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
# Felzenszwalb, P. F., &amp;amp; Huttenlocher, D. P. (2004). &amp;quot;Efficient Graph-Based Image Segmentation.&amp;quot; &amp;#039;&amp;#039;International Journal of Computer Vision&amp;#039;&amp;#039;, 59(2), 167–181.&lt;br /&gt;
# Zahn, C. T. (1971). &amp;quot;Graph-Theoretical Methods for Detecting and Describing Gestalt Clusters.&amp;quot; &amp;#039;&amp;#039;IEEE Transactions on Computers&amp;#039;&amp;#039;, C-20(1), 68–86. (Pioneering MST-based clustering.)&lt;br /&gt;
# Shi, J., &amp;amp; Malik, J. (2000). &amp;quot;Normalized Cuts and Image Segmentation.&amp;quot; &amp;#039;&amp;#039;IEEE Transactions on Pattern Analysis and Machine Intelligence&amp;#039;&amp;#039;, 22(8), 888–905.&lt;br /&gt;
&lt;br /&gt;
=Flags=&lt;br /&gt;
&lt;br /&gt;
{{GraphsFlag}}&lt;/div&gt;</summary>
		<author><name>Admin</name></author>
	</entry>
</feed>