<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Nattadet C. on Medium]]></title>
        <description><![CDATA[Stories by Nattadet C. on Medium]]></description>
        <link>https://medium.com/@ntd.ctnts?source=rss-94d9c00df859------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/2*Gkwc44V_aYN4t2fCFhwmng.jpeg</url>
            <title>Stories by Nattadet C. on Medium</title>
            <link>https://medium.com/@ntd.ctnts?source=rss-94d9c00df859------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 05 Dec 2026 14:21:56 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@ntd.ctnts/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Navigating Social Media’s Impact: Embracing Advantages, Mitigating Disadvantages]]></title>
            <link>https://medium.com/@ntd.ctnts/navigating-social-medias-impact-embracing-advantages-mitigating-disadvantages-a36c8bab74b4?source=rss-94d9c00df859------2</link>
            <guid isPermaLink="false">https://medium.com/p/a36c8bab74b4</guid>
            <dc:creator><![CDATA[Nattadet C.]]></dc:creator>
            <pubDate>Sun, 06 Aug 2023 08:25:04 GMT</pubDate>
            <atom:updated>2023-08-08T14:35:57.538Z</atom:updated>
            <content:encoded><![CDATA[<p>In the evolution of society, technology has played a crucial role in transforming how we communicate and share information. As a powerful communication tool, social media enables information to reach people faster and across distant locations, surpassing the limitations of face-to-face interactions. While some express concerns about the rapid spread of misinformation, others harness this phenomenon to disseminate ideas and shape our society. This essay will explore both perspectives on the advantages and disadvantages of social media usage, and I will also share my responsible approach to its influence.</p><p>Social media offers numerous advantages, significantly transforming how we connect in modern society. Firstly, it enhances communication by enabling constant connectivity between individuals, even when physical distances separate them. For instance, parents can stay in touch with their children while they are at work or school, fostering stronger family bonds. Additionally, people can connect with others globally, facilitating the formation of friendships transcending geographical boundaries. Secondly, social media provides a platform to share thoughts and ideas with a wider audience beyond one’s immediate circle of friends. This accessibility empowers individuals and businesses alike to promote their work, thereby aiding in professional growth and expanding their reach. Furthermore, it allows like-minded individuals to find each other easily, fostering communities around shared interests and hobbies.</p><p>Social media also has multiple disadvantages and gives rise to new forms of criminal activity, as well as shaping a society that perpetuates individual isolation. Firstly, the rapid and wide dissemination of information on social media is a double-edged sword, encompassing not only beneficial news and content but also spreading misinformation and fake news. For instance, there have been instances where sensational fake news, such as claims of people unknowingly eating spiders while asleep, went viral, causing unnecessary panic and highlighting the detrimental impact of false information on society. Secondly, the sharing of personal information, such as location and daily activities, on social media raises grave concerns about privacy and security. This could expose individuals to potential threats, like stalkers tracking their movements or burglars targeting their homes based on disclosed whereabouts.</p><p>In conclusion, while social media offers undeniable advantages, individuals must exercise caution and responsibility in its usage. Embracing its benefits, such as instant connectivity and the ability to discover like-minded communities, can strengthen personal bonds and foster a sense of belonging. Nevertheless, one must remain vigilant against the perils of misinformation and privacy breaches. To navigate the influence of social media responsibly, users should critically evaluate the information they encounter, verify its authenticity before sharing, and employ privacy settings to safeguard personal data. By setting clear boundaries and exercising mindful engagement, individuals can harness the power of social media while safeguarding their well-being and the integrity of the online community.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a36c8bab74b4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Data structures and Algorithms]]></title>
            <link>https://medium.com/@ntd.ctnts/data-structures-and-algorithms-686cff7724a4?source=rss-94d9c00df859------2</link>
            <guid isPermaLink="false">https://medium.com/p/686cff7724a4</guid>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[thinking]]></category>
            <dc:creator><![CDATA[Nattadet C.]]></dc:creator>
            <pubDate>Sun, 19 Jan 2020 09:05:03 GMT</pubDate>
            <atom:updated>2020-01-19T09:05:03.768Z</atom:updated>
            <content:encoded><![CDATA[<blockquote>Nowadays, there is very easy to learn to program but almost every online class skips the foundation of programming which is the structure of data and algorithms of how computer compute or understand your code. However, I hope this article will helpful :)</blockquote><h3>What is Data Structure?</h3><ul><li>Definition — data organization, management, and storage format enable efficient access and modification. In other words, the data structure is a way in which data is stored on a computer.</li></ul><p>Array data structure — a collection of elements of the same type placed in contiguous memory locations that can be individually referenced by using an index to a unique identifier.</p><pre>int numbers[4] = { 10, 20, 30, 40 };</pre><p>Start with the abstract data type:<br>abstract data types are entities that are definitions of data and operations but do not have implementation details. We divided the perspective of this integers array into 2 terms’ point of view, Abstract view and implementation view.</p><p>In terms of abstract view:<br>- store a set of elements of int type<br>- read elements by position. for example, index<br>- modify elements by index<br>- perform sorting</p><p>In terms of Implementation view:</p><pre>int numbers[4] = {10, 20, 30, 40};<br>cout &lt;&lt; arr[1];  //access index<br>arr[2] = 10;     // modify index<br>// sorting operation is one of Algorithms technique</pre><h3>What is an Algorithm</h3><ul><li>Definition — a finite set of instructions that are carried the order to perform a specific task. The algorithm has the following characteristics<br>- Inputs<br>- Outputs<br>- Unambiguity — clear and simple instructions.<br>- Finiteness — the limited number of instructions.<br>- Effectiveness — the impact on the process.</li></ul><p>for the example of an Algorithm<br>- Declare variables<br>- read the values of variables <br>- add the num a and b then assign the result to variable sum<br>- display result, which is “sum”</p><pre>var a, b, sum;<br>a = 5;<br>b = 10;<br>sum = a + b;<br>cout &lt;&lt; sum &lt;&lt; endl;</pre><pre>15</pre><p>In addition, most algorithms are base on mathematics. If you are good at mathematics you will optimize some algorithms and find the best performance way of algorithms from these basic things.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=686cff7724a4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Social Status and kindness]]></title>
            <link>https://medium.com/nattadet-c/social-status-and-kindness-68dfa8352259?source=rss-94d9c00df859------2</link>
            <guid isPermaLink="false">https://medium.com/p/68dfa8352259</guid>
            <category><![CDATA[life]]></category>
            <category><![CDATA[thinking]]></category>
            <dc:creator><![CDATA[Nattadet C.]]></dc:creator>
            <pubDate>Wed, 08 Jan 2020 15:53:08 GMT</pubDate>
            <atom:updated>2020-01-08T17:34:24.474Z</atom:updated>
            <content:encoded><![CDATA[<p>Nowadays, social status is very valuable. Whilst some people are of the opinion that kindness and trust are more important. I believe the kindness and trust that come from their hearts is as much value as social status.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FHoO0qccZv7DmcR7ptFTxg.jpeg" /><figcaption><a href="http://www.freepik.com/">Designed by macrovector_official</a></figcaption></figure><p>It is generally taught that social status and material possessions are the person’s worth. To put it in another way, the purpose of human beings in society is wanting to be accepted by the others so, they are finding something that can evaluate their own value such as money, ranking or rating of their own career path. But, it is not the real purpose of their life. One illustrated this is that if the man’s goal is to be a manager in his company but he has to broke up with his friend or his girlfriend for some reason such as do not have enough time with his family. Finally, he gets in a manger but, he will feel lonely and it is not worth for.</p><p>Nevertheless, people have to focus on both aims his goal and also keep in touch with their kindness to the other. In addition, the real purpose of your life is not only got accepted by the others but it is to be useful. In other words, to be useful, you have to understand yourself and the others, the people around you. Why the people love you or respect you is not about your money or your possessions, it is about you are important to them which is you helping them. When you respect and trust others. They will be respected and trust you because this is how the society drive for the long years, trust each other.</p><p>In conclusion, social status is important but it is not the only one thing. Kindness trust and honor are very valuable. This is the worth of people’s life. To be useful to the other.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=68dfa8352259" width="1" height="1" alt=""><hr><p><a href="https://medium.com/nattadet-c/social-status-and-kindness-68dfa8352259">Social Status and kindness</a> was originally published in <a href="https://medium.com/nattadet-c">Nattadet C.</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[ทำความรู้จักกับ Synaptic Plasticity ที่เกี่ยวข้องกับความทรงจำ และการเรียนรู้]]></title>
            <link>https://medium.com/nattadet-c/%E0%B8%97%E0%B8%B3%E0%B8%84%E0%B8%A7%E0%B8%B2%E0%B8%A1%E0%B8%A3%E0%B8%B9%E0%B9%89%E0%B8%88%E0%B8%B1%E0%B8%81%E0%B8%81%E0%B8%B1%E0%B8%9A-synaptic-plasticity-%E0%B8%97%E0%B8%B5%E0%B9%88%E0%B9%80%E0%B8%81%E0%B8%B5%E0%B9%88%E0%B8%A2%E0%B8%A7%E0%B8%82%E0%B9%89%E0%B8%AD%E0%B8%87%E0%B8%81%E0%B8%B1%E0%B8%9A%E0%B8%84%E0%B8%A7%E0%B8%B2%E0%B8%A1%E0%B8%97%E0%B8%A3%E0%B8%87%E0%B8%88%E0%B8%B3-%E0%B9%81%E0%B8%A5%E0%B8%B0%E0%B8%81%E0%B8%B2%E0%B8%A3%E0%B9%80%E0%B8%A3%E0%B8%B5%E0%B8%A2%E0%B8%99%E0%B8%A3%E0%B8%B9%E0%B9%89-f95cd45ddd89?source=rss-94d9c00df859------2</link>
            <guid isPermaLink="false">https://medium.com/p/f95cd45ddd89</guid>
            <category><![CDATA[cognitive-science]]></category>
            <category><![CDATA[neurotech]]></category>
            <category><![CDATA[neuroscience]]></category>
            <dc:creator><![CDATA[Nattadet C.]]></dc:creator>
            <pubDate>Mon, 06 Jan 2020 18:15:24 GMT</pubDate>
            <atom:updated>2020-04-19T10:00:09.791Z</atom:updated>
            <content:encoded><![CDATA[<blockquote>บทความนี้เป็นการสรุปจากเนื้อหาที่ผู้เขียนรวบรวมและดัดแปลงมาเป็นภาษาที่(พยายาม) ทำให้เข้าใจง่ายมากขึ้น อย่างไรก็ตาม หากเนื้อหาขาดตกบกพร่องประการใด ต้องขออภัยด้วย สามารถเพิ่มเติมข้อมูลหรือพูดคุยกับผู้เขียน โพสข้างล่างนี้ได้เลยนะครับ</blockquote><p>ความทรงจำของเราเกิดจากการพูดคุยกันระหว่าง neuron เท่านั้นเอง ซึ่ง neuron ทั้งสองตัวนี้จะมีจุดเชื่อมต่อที่เรียกว่า Synapse เพื่อเอาไว้สื่อสารกัน โดยการสื่อสารจะมีสองแบบ คือ Electrical และ Chemical</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ong-eR_OCmsT-3eItQZcgg.jpeg" /></figure><ul><li>Electrical Synapses คือการสื่อสารกันด้วย <a href="https://youtu.be/BbUcWbtVjT4">Action potential</a> หรือการถ่ายเทกระแสไฟฟ้า ซึ่งจะวิ่งผ่าน Gap Junction</li><li>Chemical Synapses คือการสื่อสารกันด้วยสารสื่อประสาทที่เรียกว่า <a href="https://qbi.uq.edu.au/brain/brain-physiology/what-are-neurotransmitters">Neurotransmitter</a></li></ul><p>ซึ่ง ณ จุดนี้นี่แหละครับที่ทำให้นักวิจัยเกิดคำถามว่า ถ้าปกติ neuron สามารถคุยกันผ่าน Action potential แล้วทำไมต้องมี Chemical Synapses ด้วย เพราะ ผลของมันเองก็ไม่มีอะไรนอกจาก ทำให้ neuron กระตุ้น เหมือน ๆ กันกับ Electrical Synapse​, คำตอบ… เพราะ Neurotransmitter สามารถควบคุมปริมาณ ที่ผู้ส่งจะให้กับผู้รับได้ด้วย โดยฝ่ายส่ง จะสามารถกำหนดจำนวนถุงที่จะส่งให้ผู้รับได้ และผู้รับเองก็สามารถกำหนดจำนวนที่จะรับถุงได้ด้วยเช่นกัน</p><p>เนื่องจากการคุยด้วย Chemical Synapses สามารถกำหนดได้ และยืดหยุ่นมาก จึงอาจจะเป็นส่วนสำคัญที่เกี่ยวข้องกับสิ่งที่เรียกว่า “การเรียนรู้”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/200/0*im5aoEBHLLff_qT5" /><figcaption><em>© </em><a href="https://www.cdnmedhall.org/inductees/donaldhebb"><em>Irma Coucill and the CMHF</em></a></figcaption></figure><p>มีนักวิจัยชาวแคนนาดาคนหนึ่งชื่อ <a href="http://www.historyofinformation.com/detail.php?id=3902">Donald Hebb</a> คิดคนโมเดลการปรับตัวของ Synapses เรียกว่า “Hebbian theory” ซึ่งคีย์สำคัญของทฤษฎีนี้คือ Synapses Plasticity</p><h3>Synapses Plasticity</h3><p>จากทฤษฎีของ Hebb เขาได้กล่าวไว้ง่าย ๆ ว่า <em>“ If neuron A repeatedly takes part in firing neuron B, then the synapse from A to B is Strengthened”</em> หรือก็คือ ถ้าผู้ส่งยังส่งสารสื่อประสาทไปที่เดิมซ้ำ ๆ จะทำให้ synapse ระหว่าง A และ B จะทำให้มันแข็งแรงขึ้น, แข็งแรงขึ้นในที่นี้ไม่ได้หมายความว่ามันแยกออกจากกันยากขึ้นนะครับ แต่หมายความว่า neuron B มัน response ได้มากขึ้น ทั้ง ๆ ที่ neuron A ส่งสารสื่อประสาทเท่าเดิม</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yKkoAA11BYdzL-lJJZdlXA.jpeg" /><figcaption>Neuron A fire the signal and the volume of neuron B signal is increased</figcaption></figure><p>จึงทำให้เกิดคำอธิบายปรากฏการณ์ของความแข็งแรงนี้ครับ คือ Long Term Potentiation (LTP) เป็นการระบุการเพิ่มขึ้นของค่า Excitatory Postsynaptic Potential (EPSP) แปรผันตามเวลา โดยที่ค่า input ยังเท่าเดิม, ในทิศทางตรงกันข้าม ความแข็งแรงนี้ก็สามารถลดลงได้ ด้วยเหตุการณ์ Long Term Depression (LTD) คือการที่ค่า EPSP ลดลง แปรผันตามเวลานั่นเอง</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*sTG5pcY9eRuUj3B8.png" /><figcaption>image from <a href="https://rt.dgyblog.com/">Random Thoughts</a></figcaption></figure><p>โดยได้มีกลุ่มคนที่ทำการทดลองว่า LTP กับ LTD มันต่างกันยังได้อย่างไร พบว่าเกิดจาก “ความต่างของเวลาในการส่งสารสื่อประสาทของ neuron A” หมายความว่า ถ้าเราไม่ได้ฝึกหรือกระตุ้นให้ neuron A ส่งสารสื่อประสาทเรื่อย ๆ เนี่ย ความแข็งแรงระหว่าง A และ B นั่นจะค่อย ๆ หายไป (โคตรเศร้า)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/831/0*vCUXX2rEKqPj0Wi6.png" /><figcaption>image from <a href="https://rt.dgyblog.com/">Random Thoughts</a></figcaption></figure><p>จากทฤษฏีเบื้องต้นจะพบว่า การเรียนรู้ และความจำ ของเรา มันคือสารสื่อประสาทที่ถ้าเราฝึกอะไรแบบเดิมซ้ำ ๆ จะทำให้ Synapses ในสมองเราปรับตัว ให้มันแข็งแรงมากขึ้น (เก่งขึ้น) หรือความจำของเราเป็นเพียงแค่ ก้อนสารสื่อประสาทที่วิ่งไปวิ่งมาในหัวของเรา…</p><p>แต่ในประสาทวิทยาด้านความทรงจำสมัยใหม่ ก็ได้ค้นคว้ากันว่าอาจจะไม่ใช่ Synapses แต่เพียงผู้เดียวที่เก็บความทรงจำเอาไว้ แต่เป็นชุดของกระบวนการ neuro encoding ไม่ว่าจะเป็น biochemical, cellular, molecular, หรือจนระดับการเรียงลำดับวงจรของ neuron เช่นการติดต่อกับ Hippocampus หรือ Amygdala เองก็ตาม ซึ่งในอนาคตอันใกล้นี้เราอาจจะเจอ “ตัวตน” ของเราที่ทำให้เรามีความรู้สึกถึงตัวเองอยู่ก็ได้นะครับ<em><br>สมองเรายังมีเรื่องให้น่าค้นหาอีกเยอะเลยละครับ เจอกันบทความหน้า อยากอ่านเรื่องอะไร แนวไหนคอมเม้นไว้ด้านล่างได้เลย</em></p><h4>Reference</h4><ul><li><a href="https://www.ncbi.nlm.nih.gov/pmc/articles/PMC6212519/">https://www.ncbi.nlm.nih.gov/pmc/articles/PMC6212519</a></li><li><a href="https://www.ncbi.nlm.nih.gov/pubmed/18094707">https://www.ncbi.nlm.nih.gov/pubmed/18094707</a></li><li><a href="https://qbi.uq.edu.au/brain-basics/brain/brain-physiology/what-synaptic-plasticity">https://qbi.uq.edu.au/brain-basics/brain/brain-physiology/what-synaptic-plasticity</a></li><li><a href="http://www.historyofinformation.com/detail.php?id=3902">http://www.historyofinformation.com/detail.php?id=3902</a></li><li><a href="https://www.nature.com/articles/1301559">https://www.nature.com/articles/1301559</a></li><li><a href="http://www.cdnmedhall.org/inductees/donaldhebb">http://www.cdnmedhall.org/inductees/donaldhebb</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f95cd45ddd89" width="1" height="1" alt=""><hr><p><a href="https://medium.com/nattadet-c/%E0%B8%97%E0%B8%B3%E0%B8%84%E0%B8%A7%E0%B8%B2%E0%B8%A1%E0%B8%A3%E0%B8%B9%E0%B9%89%E0%B8%88%E0%B8%B1%E0%B8%81%E0%B8%81%E0%B8%B1%E0%B8%9A-synaptic-plasticity-%E0%B8%97%E0%B8%B5%E0%B9%88%E0%B9%80%E0%B8%81%E0%B8%B5%E0%B9%88%E0%B8%A2%E0%B8%A7%E0%B8%82%E0%B9%89%E0%B8%AD%E0%B8%87%E0%B8%81%E0%B8%B1%E0%B8%9A%E0%B8%84%E0%B8%A7%E0%B8%B2%E0%B8%A1%E0%B8%97%E0%B8%A3%E0%B8%87%E0%B8%88%E0%B8%B3-%E0%B9%81%E0%B8%A5%E0%B8%B0%E0%B8%81%E0%B8%B2%E0%B8%A3%E0%B9%80%E0%B8%A3%E0%B8%B5%E0%B8%A2%E0%B8%99%E0%B8%A3%E0%B8%B9%E0%B9%89-f95cd45ddd89">ทำความรู้จักกับ Synaptic Plasticity ที่เกี่ยวข้องกับความทรงจำ และการเรียนรู้</a> was originally published in <a href="https://medium.com/nattadet-c">Nattadet C.</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Morphological Filters]]></title>
            <link>https://medium.com/nattadet-c/morphological-filters-d99860d39b85?source=rss-94d9c00df859------2</link>
            <guid isPermaLink="false">https://medium.com/p/d99860d39b85</guid>
            <category><![CDATA[image-processing]]></category>
            <category><![CDATA[image]]></category>
            <dc:creator><![CDATA[Nattadet C.]]></dc:creator>
            <pubDate>Tue, 25 Dec 2018 16:22:34 GMT</pubDate>
            <atom:updated>2020-01-01T12:09:21.153Z</atom:updated>
            <content:encoded><![CDATA[<p>If you are new about image processing. First, we have to understand about filters, check out this site:</p><p>These filters are aimed at binary images, pixels values are 0 and 1 which is black and white color. Binary images can be achieved from grayscale images by threshold image processing methods. The morphological filters can rounded off such as fill the holes of a certain size and remove the single dots or lines.</p><h4>Shrink and Let Grow</h4><p>the first point we want to round off larger image structure and remove the smaller structures in the binary image (to clean an image from noise or dirt). There is the idea of the methods to shrunk it and growing it back by the same amount.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3z5MwZD7AnKvZfD1gOdPRA.jpeg" /><figcaption>The main idea of shrink and grow</figcaption></figure><ol><li>First, shrunk the structures of images by peeling off a layer</li><li>Shrinking removes the smaller structures and left the larger structures</li><li>Grown back by the same amount</li></ol><p>Shrinking operation means to remove a layer of pixels from a foreground region around all its borders against the background. Growing operation means to adds a layer of pixels around the foreground region.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VyA2-CML1eZoPCaNEdXXQw.jpeg" /><figcaption>Shrinking methods</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*17SDtuQ3MkJh-mWv95KQUw.jpeg" /><figcaption>Growing methods</figcaption></figure><h4>Basic Morphological Operations</h4><p>Shrinking and growing are the two basic morphological operations that base on erosion and dilation. however, there are many general operations that goes well for removing or attaching single pixels and can perform much more complex operation. In this section, I will talk about 5 methods of this operation.</p><ul><li><strong>The Structuring Element</strong>: using coefficient matrix H that the hot spot must its value be 1.</li><li><strong>Point Sets</strong>: it is helpful to describe binary images as sets of two-dimensional coordinate points.</li><li><strong>Dilation</strong>: the morphological operation that corresponds to the concept of growing</li><li><strong>Erosion</strong>: The quasi-inverse of dilation which is the concept of shrinking</li></ul><h4>Coding Section</h4><p>in this section, we are going to coding morphological operation with openCV in googlecolab with python</p><p>Set up: download the file into googlecolab and then import the module that we are going to use.</p><pre>from google.colab import files<br>uploaded = files.upload()</pre><pre>import cv2<br>import numpy as np<br>from matplotlib import pyplot as plt</pre><p><strong>Dilation code</strong><br>in OpenCV, it has a function for dilation image called “dilate” function and this is how to use it.</p><pre>img = cv2.imread(&#39;Pic1.jpg&#39;, 0)</pre><pre>kernel = np.ones((5,5),np.uint8)<br>dilation = cv2.dilate(img,kernel,iterations = 1)</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/501/1*SsQreLHiUDX4lztRpHsJHg.png" /><figcaption>The result from dilation.</figcaption></figure><p><strong>Erosion code</strong><br>similar to the dilation method. In OpenCV also has the function that called “erode” function</p><pre>img = cv2.imread(&#39;Pic1.jpg&#39;, 0)</pre><pre>kernel = np.ones((5,5),np.uint8)<br>erosion = cv2.erode(img,kernel,iterations = 1)</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/499/1*cJK_hp3v0Gd2yhJXIJT7wA.png" /><figcaption>The result from Erosion</figcaption></figure><p>The application for morphological design is to implement erosion and dilation that depend on your work. I hope this article will help you to inspire your project in some way.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d99860d39b85" width="1" height="1" alt=""><hr><p><a href="https://medium.com/nattadet-c/morphological-filters-d99860d39b85">Morphological Filters</a> was originally published in <a href="https://medium.com/nattadet-c">Nattadet C.</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Image Filters]]></title>
            <link>https://medium.com/nattadet-c/image-filters-41c23f09c600?source=rss-94d9c00df859------2</link>
            <guid isPermaLink="false">https://medium.com/p/41c23f09c600</guid>
            <category><![CDATA[image]]></category>
            <category><![CDATA[image-processing]]></category>
            <dc:creator><![CDATA[Nattadet C.]]></dc:creator>
            <pubDate>Sun, 02 Dec 2018 13:20:21 GMT</pubDate>
            <atom:updated>2020-01-08T09:57:03.697Z</atom:updated>
            <content:encoded><![CDATA[<h3>Image Filters with Python and OpenCV</h3><blockquote>This article is about Image filters and just a little bit coding with openCV and googleColabs. I am just a student that interested in image processing.</blockquote><h4>Filters and Point operations</h4><p>Filters generally use many pixels for computing each new pixel value but point operations can use one pixel to perform an image processing. The filters can use for blurred or fuzzy the local intensity of the image to make it smooth. The idea is to replace every pixel by the average of its neighbor pixels.</p><h4>Type of filters</h4><p>we can classify the filters into 2 types.</p><ul><li><em>Linear filter</em></li><li><em>Non-linear filter</em></li></ul><h4>Linear filter</h4><p>The convolution of matrix pixels and kernel matrix to reduce the intensity of the image, that is blurring the image.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*re-GD-uyLHdUoiiUSVqoAA.jpeg" /></figure><p>This process of the linear filter can be done in 2 ways. First, filter the original image into an intermediate image and then copy it to the original image. Second, copy the original image into intermediate image and then filtering it and replace to original image. Both ways make the same result but in general, we using the second way.</p><p>There are 3 types of linear filter</p><ul><li><em>Box filter</em></li><li><em>Gauss filter</em></li><li><em>Laplace filter or Mexican hat filter</em></li></ul><p>Box filter and Gauss filter are smooth filters but Laplace filter is a difference filter. The difference of these filter is the weighted number of kernel matrix as the picture</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*a-sTxiuz6-iNKC7qQVTUQg.jpeg" /></figure><h4>Box filter</h4><p>You can use a box filter by following this code.</p><pre>kernel = np.ones((5,5),np.float32)/25<br>blur = cv2.filter2D(img,-1,kernel)</pre><p>First, you have to create the kernel matrix. In this code, I using a 5x5 kernel matrix then convolution with function filter2D in OpenCV. This is the result.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/255/1*jUqXUrMObgvrqeUedQajvg.png" /><figcaption>The top is the original image. The bottom is the filtered image. You can see that the edge of pixels has gone and the picture looks more smooth.</figcaption></figure><h4>Gauss filter</h4><p>To compute Gauss filter can using this equation or using function from OpenCV as <em>GaussianBlur</em></p><pre>Gblur = cv2.GaussianBlur(img,(5,5),21)</pre><p>The last number ‘21’ is the sigma of this Gaussian function determines the amount of smoothing. The higher number of sigma, it is the higher of smoothness too. these are the result.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/484/1*i-3MkT2JgdZVZqceVQeAjA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/484/1*iW7kfhBAbc9xSaAzRPc3nw.png" /></figure><h4>Laplace filter</h4><p>To compute Laplace filter, OpenCV has function called “Laplacian” to calculate the pixel convolution to weighted the kernel matrix.</p><pre>LaplacePic = cv2.Laplacian(img, 24, (5,5))</pre><p>Number ‘24’ is called “DDepth”, represent depth of the destination image. This is the result of Laplace filter.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/484/1*BwUNr9AjFvfWuM09r6mYmw.png" /></figure><p>You can see that this picture has a white line appear. These lines from the edge between white pixel and black pixel. This filter can use in an application for showing the cutting line in the picture such as in engineering or in medical technique.</p><h4>Non-Linear Filter</h4><p>Using some non-linear function from the source pixel value. The idea is to replace the target pixel value with its neighbor pixels value from some ordering mechanism or function.</p><p>There are many types of Non-Linear Filter but in this article, I will show you just 3 of them</p><ul><li>Minimum Filter</li><li>Maximum Filter</li><li>Median Filter</li></ul><h4>Minimum Filter</h4><p>This algorithm is to select the lowest pixel value from the neighbors&#39; pixels around the target then replace it.</p><h4>Maximum Filter</h4><p>This algorithm also similar to minimum filter but pick the highest one.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/495/1*n-mogLGD1gQiela8WtbxwQ.png" /><figcaption>a) and b) are the sample image with salts and peppers c) and d) are the example of minimum filter e) and f) are the example of the maximum filter</figcaption></figure><h4>Median Filter</h4><p>First, this filter selects the neighbor pixels then sort it from the lowest to highest then pick the middle one to replace at the targeted pixel.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/468/1*Re4ZFLfrsTbSdqm3Q3tQaw.png" /><figcaption>Median algorithms</figcaption></figure><p>In OpenCV has the function for the median filter you picture which is <strong>medianBlur </strong>function. This is an example of using it.</p><pre>MedianPic = cv2.medianBlur(img, 5)</pre><p>Number “5” represents the area of Kernel. And this is the result!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/484/1*KWXBhU6_5JPUbso_WmmG7w.png" /></figure><p>for more clarity of the advantage of this filter, Here is the example that used in salt and pepper pictures.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/611/1*eaK61pAHjduw2CVhL8kHOw.png" /><figcaption>a) and b) are the original picture with salts and peppers&#39; noise. c) and d) are the result of Linear 3x3 filter (box filter). e) and f) are the result of the Median filter that effectively eliminates salts and peppers noise</figcaption></figure><blockquote>That’s all from my class. Thanks for reading my article. Enjoy your image processing and don’t afraid to build an interesting project. See you next time ❤ :)</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=41c23f09c600" width="1" height="1" alt=""><hr><p><a href="https://medium.com/nattadet-c/image-filters-41c23f09c600">Image Filters</a> was originally published in <a href="https://medium.com/nattadet-c">Nattadet C.</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Point operator in image processing]]></title>
            <link>https://medium.com/nattadet-c/point-operator-in-image-processing-9923a54afd41?source=rss-94d9c00df859------2</link>
            <guid isPermaLink="false">https://medium.com/p/9923a54afd41</guid>
            <category><![CDATA[image-processing]]></category>
            <category><![CDATA[image]]></category>
            <dc:creator><![CDATA[Nattadet C.]]></dc:creator>
            <pubDate>Sun, 02 Dec 2018 11:31:00 GMT</pubDate>
            <atom:updated>2018-12-02T13:21:28.296Z</atom:updated>
            <content:encoded><![CDATA[<blockquote>This article is about overview of image processing and basic principle. I am just a student that interested in image processing.</blockquote><h4>What is Image processing?</h4><p>Image processing is the methods of editing your picture before you post it on your Instagram or Facebook. It using mathematics function to produced output image from the original one.</p><p>Image processing can classify into two types, point operators and neighborhood operators. Point operators we can call pixel transformation. Neighborhood operators we can call area transformation.</p><h4>Point operators or pixel transformation</h4><p>According to Principles of digital image processing textbook(written by Wilhelm Burger and Mark J. Burge), its classify into 6 types</p><ul><li>Brightness or contrast</li><li>Applying arbitrary intensity transformations</li><li>Quantizing images</li><li>Global threshold</li><li>Gamma correction</li><li>Color transfornmation</li></ul><p>We can modify <strong><em>Brightness and contrast</em></strong> by using this equation.</p><blockquote>g(x) = alpha * f(x) + beta</blockquote><blockquote>where g(x) as an out put image and f(x) as source image pixel.<br>Alpha and beta are control variables often called the gain and bias parameters, where alpha should more than 0.</blockquote><h4>Point operation and histogram</h4><p>We can also use the histogram to transformation the pixel of an image but in these methods can make a permanent loss of information in the image. There are many methods for modifying brightness and contrast. These methods are part of its and usually used.</p><ul><li>Automatic Contrast Adjustment<br>we can adjust the contrast of an image by the factor. Map the lowest pixel value to zero and the highest value to the max by using this equation</li></ul><blockquote>fac(a) = amin + (a-alow)*amax-amin/ahigh-alow</blockquote><ul><li>Histogram Equalization<br>this method can find and apply a point operation such that the histogram of the modified image approximates a uniform distribution. I already explain this method and how to code by using OpenCV and google colab here!.</li><li>Gamma Correction<br>this method uses to control the intensity and brightness of the pixel value. I have to explain that pixel value is represented the amount of light falling onto a camera sensor that emitted by a monitor or a number of toners deposited by the printer. It is usually complex and almost nonlinear in the film. In the digital world, we have to apply the intensity of the image to calibrated intensity space — human perception of intensity and minimum of bits to represent intensity range. Gamma correction is base on power function. Its use to change signal from camera to the corrected signal to show on monitor or printer. In real life, many cameras have a gamma value of around 1.3 and around 2.2 in the monitor.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TU8c_KnMYwOBIYKrWrTfug.jpeg" /><figcaption>Power function for different gamma values. pic from Principles of digital image processing text book<em>(written by Wilhelm Burger and Mark J. Burge)</em></figcaption></figure><blockquote>That’s all from my class. Thanks for reading my article. Enjoy your image processing and don’t afraid to build an interesting project. See you next time ❤ :)</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9923a54afd41" width="1" height="1" alt=""><hr><p><a href="https://medium.com/nattadet-c/point-operator-in-image-processing-9923a54afd41">Point operator in image processing</a> was originally published in <a href="https://medium.com/nattadet-c">Nattadet C.</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Basic Open-CV, GoogleColab, and Histogram]]></title>
            <link>https://medium.com/nattadet-c/open-cv-and-googlecolab-and-histogram-7a173f8d61b6?source=rss-94d9c00df859------2</link>
            <guid isPermaLink="false">https://medium.com/p/7a173f8d61b6</guid>
            <category><![CDATA[image-processing]]></category>
            <category><![CDATA[google-colab]]></category>
            <category><![CDATA[opencv]]></category>
            <category><![CDATA[image]]></category>
            <dc:creator><![CDATA[Nattadet C.]]></dc:creator>
            <pubDate>Mon, 17 Sep 2018 20:23:19 GMT</pubDate>
            <atom:updated>2020-01-01T12:15:26.226Z</atom:updated>
            <content:encoded><![CDATA[<p><em>At first, this article is from my image processing class in the open-ended question for understanding about histogram and code. I used google colab and openCV that is python base in this article.</em></p><h4>Reach to the picture</h4><p>Because to coding with googleColab is not the same as others. We need to upload files or picture to it. There are two easiest ways to import picture to GoogleColab. First is uploading directly by run the code and second is using google drive.</p><blockquote>this code for uploading image.</blockquote><pre>from google.colab import files<br>uploaded = files.upload()</pre><p>When you run this section the upload button will appear. Then you choose your image from you local drive. After that the uploaded files will appear on your left side.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/451/1*Xl_yE8L-o1otmFoF2VtXpQ.png" /></figure><blockquote>this code for access google drive.</blockquote><pre>from google.colab import drive<br>drive.mount(&#39;/content/drive&#39;)</pre><p>Then your files in google drive will appear on your left side same as uploaded files.</p><h4>Set up</h4><p>Next, we need to import library that will use in calculating histogram. First is openCV for using function “calcHist” and second is matplot for plotting the histogram.</p><pre>import cv2<br>from matplotlib import pyplot as plt</pre><blockquote>In this article I using OpenCV version 3.4.3. <br>You can check version by using this code</blockquote><pre>cv2.__version__</pre><h4>Calculate and plot</h4><pre>jpg = cv2.imread(&#39;image.jpg&#39;,0)</pre><p>This code is for reading your image files.<br>The number after file name is to select type of image.</p><p><em>1 for load image in color<br>0 for load image in gray scale<br>-1 for load image that include alpha channel in pixel values</em></p><p>Then we will using calcHist function from openCV and plot it by using matplotlib for comparing between picture and graph.</p><pre>Hist = cv2.calcHist([jpg],[0],none,[256],[0,256])<br>plt.subplot(121), plt.imshow(jpg, &#39;gray&#39;)<br>plt.subplot(122), plt.plot(Hist)<br>plt.xlim([0,256])</pre><p><em>in the brackets of calcHist function.</em><strong><br>[jpg]</strong><em> — your image</em></p><p><strong>[0]</strong><em> — channel color of histogram chose [0] if your image is in gray scale. in case of color image [0] is for blue, [1] for green and [2] for red.</em></p><p><strong>none</strong> <em>— this is for select point of the picture that you want to calculate. none is for full frame. If you want to choose the frame, you need to made it before but in this article I didn’t do that.</em></p><p><strong>[256]</strong><em> — this is for “bin” or we can call “brackets” so you can read more about bin </em><a href="https://cran.r-project.org/web/packages/colordistance/vignettes/binning-methods.html"><em>here</em></a><em>. Anywhere for full of gray scale we use 256</em></p><p><strong>[0,256]</strong><em> — this is the ranges of pixel values</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/488/1*GTWSHSuloSMqDq9DdD8z6Q.png" /><figcaption>Result of picture and histogram</figcaption></figure><blockquote>Beware, openCV does not support GIF files. Check out how to change GIF to pic by python <a href="https://github.com/asharma327/Read_Gif_OpenCV_Python">here</a>.</blockquote><h4>Histogram equalization</h4><p>Histogram equalization is for improving the contrast of images. In the theory, It talks about changing the curve cumulative graph in to linear cumulative graph. <br><em>more information about cumulative theory </em><a href="https://en.wikipedia.org/wiki/Cumulative_distribution_function"><em>here</em></a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/250/1*i5IXRID7a7NBwNKZSIAIww.png" /><figcaption>Cumulative graph</figcaption></figure><p>We can check cumulative graph by using “cumsum()” and change it to normalization by multiply by max of hist and divide by max of cumsum in hist.</p><pre>cdf = hist.cumsum()<br>cdfnmhist = cdf * hist.max()/ cdf.max()</pre><p>OpenCV has function for equalization called “equalizeHist”.</p><pre>hist = cv2.calcHist([img],[0],None,[256],[0,256])<br>eq = cv2.equalizeHist(img)</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/488/1*kA1diQ96Df8GyWka3_CvRw.png" /><figcaption>before and after equalization of images and histograms</figcaption></figure><p>The dark zone of image after equalization changing to brighter than before. Because we improve contrast of this image by using “equalizeHist” function. Then in cumulative graph is going to linear as the purpose.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/488/1*aH4uIfPopfHfuKdzrWYVZQ.png" /><figcaption>Cumulative graph (green)</figcaption></figure><blockquote>Check out the full code of this method.</blockquote><pre>import cv2<br>from matplotlib import pyplot as plt<br>img = cv2.imread(&#39;JPG.jpg&#39;,0)</pre><pre>hist = cv2.calcHist([img],[0],None,[256],[0,256])<br>eq = cv2.equalizeHist(img)<br>cdf = hist.cumsum()<br>cdfnmhist = cdf * hist.max()/ cdf.max()<br>histeq = cv2.calcHist([eq],[0],None,[256],[0,256])<br>cdfeq = histeq.cumsum()<br>cdfnmhisteq = cdfeq * histeq.max()/ cdf.max()</pre><pre>plt.subplot(221), plt.imshow(img,&#39;gray&#39;)<br>plt.subplot(222), plt.plot(hist), plt.plot(cdfnmhist)<br>plt.subplot(223), plt.imshow(eq,&#39;gray&#39;)<br>plt.subplot(224), plt.plot(histeq), plt.plot(cdfnmhisteq)<br>plt.xlim([0,256])</pre><p><em>That is all of my stuffs. In my opinion, I like Google.Colab for some reason. May be because I don’t have to set a lot of software environment for writing and compiling my code. However, thank you for reading my article. I hope this article will helpful for someone that want to start coding in image processing like me.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7a173f8d61b6" width="1" height="1" alt=""><hr><p><a href="https://medium.com/nattadet-c/open-cv-and-googlecolab-and-histogram-7a173f8d61b6">Basic Open-CV, GoogleColab, and Histogram</a> was originally published in <a href="https://medium.com/nattadet-c">Nattadet C.</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What exactly is PNG?]]></title>
            <link>https://medium.com/nattadet-c/what-exactly-is-png-3a929abe408f?source=rss-94d9c00df859------2</link>
            <guid isPermaLink="false">https://medium.com/p/3a929abe408f</guid>
            <category><![CDATA[image]]></category>
            <category><![CDATA[knowledge]]></category>
            <category><![CDATA[image-processing]]></category>
            <dc:creator><![CDATA[Nattadet C.]]></dc:creator>
            <pubDate>Wed, 12 Sep 2018 16:13:52 GMT</pubDate>
            <atom:updated>2018-09-17T17:48:41.556Z</atom:updated>
            <content:encoded><![CDATA[<blockquote>First, this article is from my curious during my Image processing class. So, I’m just a student that searched about these stuffs and concluded them in my understanding.</blockquote><p><strong>PNG</strong> stands for <em>“Portable Network Graphic”. </em>According to the history of PNG format, we had to travel back to 1995 when the first draft had been developed by <em>“PNG Development Group”</em></p><p>The purpose of PNG format is designed for replacing GIF format files because of LZW compression’s patent, which expired on June 20 2003. Thus, the new compress algorithm called<em> “DEFLATE (LZ77)” was created.</em></p><blockquote>“PNG don’t have background color?”</blockquote><p>Do you know that PNG format has the extra channel that called “<em>alpha”</em>? This channel is used for transparency that are included in pixel value. It will perform this transparency effect when the other pixels are placed over by the alpha channel and it has 16 maximum bits depth.</p><p>So, PNG image has the background color but it can transparency by alpha channel.</p><blockquote>“PNG and GIF”</blockquote><p>PNG format has similarity to GIF format but it cannot create the simple animation as GIF’s ability, that uses multiple images. Meanwhile, PNG format supports 24-bit color RGB but GIF supports only 8-bit color which creating better quality in a single PNG image than the GIF one.</p><p>The biggest issue of PNG format comparing to JPEG file is the size of big file. In term of full quality of 24-bit PNG file, it is bigger than twice of 24-bit JPEG file because of lossless compression algorithm.</p><p>However, PNG format is not designed for replacing JPEG format. It was created using lossless compression format and transparency channel which is best served in small files on the website.</p><p><em>“You can read more about the history of PNG </em><a href="http://www.libpng.org/pub/png/book/chapter07.html"><em>here</em></a><em>, there are a lot of interesting things about the PNG format developing progress. By the way, thank you for reading my article. There are many image types that I had learn in class such as JPEG, TIFF, GIF, BMP, etc.… Next time, I will talk about histogram of picture and cumulative histogram as well as how to contrast the picture by histogram using mathematics functions and coding”</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3a929abe408f" width="1" height="1" alt=""><hr><p><a href="https://medium.com/nattadet-c/what-exactly-is-png-3a929abe408f">What exactly is PNG?</a> was originally published in <a href="https://medium.com/nattadet-c">Nattadet C.</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>