<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Image on Yu-Cheng's Notes</title><link>https://linkingmon.github.io/blog/tags/image/</link><description>Recent content in Image on Yu-Cheng's Notes</description><generator>Hugo -- 0.166.0</generator><language>en-us</language><lastBuildDate>Wed, 29 Jul 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://linkingmon.github.io/blog/tags/image/index.xml" rel="self" type="application/rss+xml"/><item><title>Image processing - Zhang-Suen Thinning</title><link>https://linkingmon.github.io/blog/note/rdp3/</link><pubDate>Wed, 29 Jul 2026 00:00:00 +0000</pubDate><guid>https://linkingmon.github.io/blog/note/rdp3/</guid><description>&lt;h1 id="introduction"&gt;Introduction&lt;/h1&gt;
&lt;p&gt;The next step is to implement the thinning algorithm, where we use the zhang-suen thinning algorithm. This method aims to remove all the points until becoming a single line (skeleton).&lt;/p&gt;
&lt;p&gt;The algoritmh check all colored points (will call black), then see if the neighbor&amp;rsquo;s black and white is under some condition, if the condition mets the black point would be removed (that is become white).&lt;/p&gt;
&lt;h1 id="implementation"&gt;Implementation&lt;/h1&gt;
&lt;ol&gt;
&lt;li&gt;&lt;code&gt;CountNonZero8&lt;/code&gt; (result as &lt;code&gt;A&lt;/code&gt;)&lt;/li&gt;
&lt;/ol&gt;
&lt;ul&gt;
&lt;li&gt;count how many &lt;code&gt;1&lt;/code&gt;&amp;rsquo;s in the 8 neighbors.&lt;/li&gt;
&lt;/ul&gt;
&lt;ol start="2"&gt;
&lt;li&gt;&lt;code&gt;Transitions01&lt;/code&gt; (results as &lt;code&gt;B&lt;/code&gt;)&lt;/li&gt;
&lt;/ol&gt;
&lt;ul&gt;
&lt;li&gt;count how many &lt;code&gt;0&lt;/code&gt; to &lt;code&gt;1&lt;/code&gt; for 8 neighbors.&lt;/li&gt;
&lt;/ul&gt;
&lt;ol start="3"&gt;
&lt;li&gt;Two pass checking (slightly differnet)&lt;/li&gt;
&lt;/ol&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;A&lt;/code&gt; should be &lt;code&gt;2~6&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;B&lt;/code&gt; should be &lt;code&gt;1&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;p2&lt;/code&gt; or &lt;code&gt;p4&lt;/code&gt; or &lt;code&gt;p6&lt;/code&gt; should be &lt;code&gt;0&lt;/code&gt; (&lt;code&gt;p2&lt;/code&gt;, &lt;code&gt;p4&lt;/code&gt;, &lt;code&gt;p8&lt;/code&gt; in second pass)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;p4&lt;/code&gt; or &lt;code&gt;p6&lt;/code&gt; or &lt;code&gt;p8&lt;/code&gt; should be &lt;code&gt;0&lt;/code&gt; (&lt;code&gt;p2&lt;/code&gt;, &lt;code&gt;p6&lt;/code&gt;, &lt;code&gt;p8&lt;/code&gt; in second pass)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;denoting as:&lt;/p&gt;</description></item><item><title>Image processing - Chaikin Smoothing</title><link>https://linkingmon.github.io/blog/note/rdp2/</link><pubDate>Fri, 10 Apr 2026 00:00:00 +0000</pubDate><guid>https://linkingmon.github.io/blog/note/rdp2/</guid><description>&lt;h2 id="introduction"&gt;Introduction&lt;/h2&gt;
&lt;p&gt;Follow by the RDP algorithm, we imeplemtat hte chakin smoothhing algorithm. Rhe algorithm tries to smooth the curve by adding new points witin each segmetns:&lt;/p&gt;
&lt;p&gt;For the following example, we can see that we try to split each edge into 3 segements (that is insert 2 points as the red dots), and then tried to connect them.&lt;/p&gt;
&lt;p&gt;&lt;img loading="lazy" src="../rdp/chaikin.jpg"&gt;&lt;/p&gt;
&lt;h2 id="implementation"&gt;Implementation&lt;/h2&gt;
&lt;p&gt;This function is simple nad the input are a list of points and iteration number. Notice that in each iteration, the number of points would become doubled!&lt;/p&gt;</description></item><item><title>Image processing - RDP algorithm</title><link>https://linkingmon.github.io/blog/note/rdp/</link><pubDate>Fri, 20 Mar 2026 00:00:00 +0000</pubDate><guid>https://linkingmon.github.io/blog/note/rdp/</guid><description>&lt;h2 id="introduction"&gt;Introduction&lt;/h2&gt;
&lt;p&gt;Recently I am working on a small to process hand written curve and come up with the RDP algorithm, which stands for &lt;a href="https://en.wikipedia.org/wiki/Ramer%E2%80%93Douglas%E2%80%93Peucker_algorithm"&gt;Ramer–Douglas–Peucker algorithm&lt;/a&gt;. This is the iterative method to simpify the curve by recursively calculateing the distance between the curve, and leave the points that are far away from the curve, and this alogrith ends when the there are no points left.&lt;/p&gt;
&lt;p&gt;The input is a vector of points, and each step we search for all the points distance, and find hte maximum distance one, and then we recursively call the function for two sides.&lt;/p&gt;</description></item></channel></rss>