<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>MATLAB ile İmge İşlemeye Giriş yazısına yapılan yorumlar</title>
	<atom:link href="http://ismailari.com/blog/matlab-ile-imge-islemeye-giris/feed/" rel="self" type="application/rss+xml" />
	<link>http://ismailari.com/blog/matlab-ile-imge-islemeye-giris/</link>
	<description>İsmail Arı&#039;nın anasayfası</description>
	<lastBuildDate>Sun, 05 Feb 2012 23:46:11 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>Yazar: İsmail Arı</title>
		<link>http://ismailari.com/blog/matlab-ile-imge-islemeye-giris/comment-page-1/#comment-488</link>
		<dc:creator>İsmail Arı</dc:creator>
		<pubDate>Fri, 30 Sep 2011 08:22:47 +0000</pubDate>
		<guid isPermaLink="false">http://www.ismailari.com/?p=1515#comment-488</guid>
		<description>@yeni matlabci: Eldeki az bilgiden çok bilgi elde etmek programlama dilinin yeteneğinden çok araştırmacının yeteneği. Bahsettiğiniz konu, yani &quot;image upsampling&quot;, hala araştırma konusu. Örneğin: http://www.cs.huji.ac.il/~yoavhacohen/upsampling/ veya http://www.cs.huji.ac.il/~raananf/projects/upsampling/results.html.</description>
		<content:encoded><![CDATA[<p>@yeni matlabci: Eldeki az bilgiden çok bilgi elde etmek programlama dilinin yeteneğinden çok araştırmacının yeteneği. Bahsettiğiniz konu, yani "image upsampling", hala araştırma konusu. Örneğin: <a href="http://www.cs.huji.ac.il/~yoavhacohen/upsampling/" rel="nofollow">http://www.cs.huji.ac.il/~yoavhacohen/upsampling/</a> veya <a href="http://www.cs.huji.ac.il/~raananf/projects/upsampling/results.html" rel="nofollow">http://www.cs.huji.ac.il/~raananf/projects/upsampling/results.html</a>.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Yazar: yeni matlabci</title>
		<link>http://ismailari.com/blog/matlab-ile-imge-islemeye-giris/comment-page-1/#comment-487</link>
		<dc:creator>yeni matlabci</dc:creator>
		<pubDate>Fri, 30 Sep 2011 07:50:25 +0000</pubDate>
		<guid isPermaLink="false">http://www.ismailari.com/?p=1515#comment-487</guid>
		<description>matlabi öğrenmeye yeni başladım.bir resmin boyutunu 2 ye çıkarmak için ancak görüntüde bir bozulma olmaması için nasıl bir yol izlemeliyim.</description>
		<content:encoded><![CDATA[<p>matlabi öğrenmeye yeni başladım.bir resmin boyutunu 2 ye çıkarmak için ancak görüntüde bir bozulma olmaması için nasıl bir yol izlemeliyim.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Yazar: Görüntü İşleme &#171; electronious</title>
		<link>http://ismailari.com/blog/matlab-ile-imge-islemeye-giris/comment-page-1/#comment-437</link>
		<dc:creator>Görüntü İşleme &#171; electronious</dc:creator>
		<pubDate>Sun, 28 Aug 2011 12:54:55 +0000</pubDate>
		<guid isPermaLink="false">http://www.ismailari.com/?p=1515#comment-437</guid>
		<description>[...] İsmail Arı &#8211; Matlab ile İmge İşleme [...]</description>
		<content:encoded><![CDATA[<p>[...] İsmail Arı – Matlab ile İmge İşleme [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>Yazar: İsmail Arı</title>
		<link>http://ismailari.com/blog/matlab-ile-imge-islemeye-giris/comment-page-1/#comment-94</link>
		<dc:creator>İsmail Arı</dc:creator>
		<pubDate>Tue, 17 Mar 2009 10:10:58 +0000</pubDate>
		<guid isPermaLink="false">http://www.ismailari.com/?p=1515#comment-94</guid>
		<description>&lt;p&gt;Önceden şöyle bi yazı yazmışım, sonra silmişim. Belki işe yarar:&lt;/p&gt;
&lt;p&gt;Resimlerde indeksleme yaparken “&lt;b&gt;doğrusal&lt;/b&gt; indeksleme” (linear indexing) kullanmak çok faydalı olabiliyor. Bu konu hakkında yazmayı düşündüm.&lt;/p&gt;
&lt;p&gt;Şimdi küçük bir matris oluşturarak başlayalım. Bir sihirli matris yaratalım :)&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;
&lt;pre&gt;A = &lt;span style=&quot;color:rgb(0, 0, 255)&quot;&gt;magic&lt;/span&gt;&lt;span style=&quot;color:rgb(0, 136, 0)&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:rgb(51, 51, 255)&quot;&gt;5&lt;/span&gt;&lt;span style=&quot;color:rgb(0, 136, 0)&quot;&gt;)&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;blockquote&gt;
&lt;pre&gt;A =

    17    24     1     8    15
    23     5     7    14    16
     4     6    13    20    22
    10    12    19    21     3
    11    18    25     2     9&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;p&gt;SORU: A(17) kaçtır?&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;
&lt;pre&gt;A&lt;span style=&quot;color:rgb(0, 136, 0)&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:rgb(51, 51, 255)&quot;&gt;17&lt;/span&gt;&lt;span style=&quot;color:rgb(0, 136, 0)&quot;&gt;)&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;blockquote&gt;
&lt;pre&gt;ans =

    14&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;p&gt;MATLAB, matrisler için tek indeks kullandığımızda, (c gibi çoğu programlama dilinin tersine) sütun sırası ile gider. Yani A(17), 4. sütunun 2. satırıdır: A(2,4).&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;
&lt;pre&gt;A&lt;span style=&quot;color:rgb(0, 136, 0)&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:rgb(51, 51, 255)&quot;&gt;2&lt;/span&gt;, &lt;span style=&quot;color:rgb(51, 51, 255)&quot;&gt;4&lt;/span&gt;&lt;span style=&quot;color:rgb(0, 136, 0)&quot;&gt;)&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;blockquote&gt;
&lt;pre&gt;ans =

    14&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;p&gt;Şimdi yaptıklarımızın imge işleme ile ne ilgisi olduğuna bakalım. Varsayalım ki A bizim imgemiz, birkaç hesap sonunda alttaki satır ve sütunların aradığımız piksellerin indeksleri olduğunu bulduk:&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;
&lt;pre&gt;satir = &lt;span style=&quot;color:rgb(0, 136, 0)&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color:rgb(51, 51, 255)&quot;&gt;2&lt;/span&gt; &lt;span style=&quot;color:rgb(51, 51, 255)&quot;&gt;1&lt;/span&gt; &lt;span style=&quot;color:rgb(51, 51, 255)&quot;&gt;5&lt;/span&gt;&lt;span style=&quot;color:rgb(0, 136, 0)&quot;&gt;]&lt;/span&gt;;
sutun = &lt;span style=&quot;color:rgb(0, 136, 0)&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color:rgb(51, 51, 255)&quot;&gt;1&lt;/span&gt; &lt;span style=&quot;color:rgb(51, 51, 255)&quot;&gt;3&lt;/span&gt; &lt;span style=&quot;color:rgb(51, 51, 255)&quot;&gt;4&lt;/span&gt;&lt;span style=&quot;color:rgb(0, 136, 0)&quot;&gt;]&lt;/span&gt;;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Bu piksellere tek ifade ile erişebilir miyiz? Deneyelim:&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;
&lt;pre&gt;A&lt;span style=&quot;color:rgb(0, 136, 0)&quot;&gt;(&lt;/span&gt;satir, sutun&lt;span style=&quot;color:rgb(0, 136, 0)&quot;&gt;)&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;blockquote&gt;
&lt;pre&gt;ans =

    23     7    14
    17     1     8
    11    25     2&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;p&gt;Ne yazık ki üç yerine dokuz değer döndü, bizim istediğimiz bu değildi. MATLAB bu ifadeyi yazdığımız satır ve sütun değerlerinin kesişimi olarak verdi. Yani toplamda dokuz kesişim noktası.&lt;/p&gt;
&lt;p&gt;Çift indeks yerine tek indeks kullanmamız gerekiyor. Yani:&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;
&lt;pre&gt;M = &lt;span style=&quot;color:rgb(0, 0, 255)&quot;&gt;size&lt;/span&gt;&lt;span style=&quot;color:rgb(0, 136, 0)&quot;&gt;(&lt;/span&gt;A, &lt;span style=&quot;color:rgb(51, 51, 255)&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color:rgb(0, 136, 0)&quot;&gt;)&lt;/span&gt;;
indeksler = M * &lt;span style=&quot;color:rgb(0, 136, 0)&quot;&gt;(&lt;/span&gt;sutun - &lt;span style=&quot;color:rgb(51, 51, 255)&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color:rgb(0, 136, 0)&quot;&gt;)&lt;/span&gt; + satir&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;blockquote&gt;
&lt;pre&gt;indeksler =

     2    11    20&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;p&gt;A(indeksler) ifadesi bizim istediğimiz üç değeri döndürecek:&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;
&lt;pre&gt;A&lt;span style=&quot;color:rgb(0, 136, 0)&quot;&gt;(&lt;/span&gt;indeksler&lt;span style=&quot;color:rgb(0, 136, 0)&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color:rgb(0, 136, 0)&quot;&gt;(&lt;/span&gt;A, &lt;span style=&quot;color:rgb(51, 51, 255)&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color:rgb(0, 136, 0)&quot;&gt;)&lt;/span&gt;;
indeksler = M * &lt;span style=&quot;color:rgb(0, 136, 0)&quot;&gt;(&lt;/span&gt;sutun - &lt;span style=&quot;color:rgb(51, 51, 255)&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color:rgb(0, 136, 0)&quot;&gt;)&lt;/span&gt; + satir&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;blockquote&gt;
&lt;pre&gt;ans =

    23     1     2&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;p&gt;Bu değerleri değiştirebilirdik de:&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;
&lt;pre&gt;A&lt;span style=&quot;color:rgb(0, 136, 0)&quot;&gt;(&lt;/span&gt;indeksler&lt;span style=&quot;color:rgb(0, 136, 0)&quot;&gt;)&lt;/span&gt; = &lt;span style=&quot;color:rgb(0, 0, 255)&quot;&gt;Inf&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;blockquote&gt;
&lt;pre&gt;A =

    17    24   Inf     8    15
   Inf     5     7    14    16
     4     6    13    20    22
    10    12    19    21     3
    11    18    25   Inf     9&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;p&gt;Aslında yaptığımız işlem MATLAB’da fonksiyon olarak bulunuyor. sub2ind ve ind2sub fonksiyonları satır-sütun indekslemesi ve &lt;b&gt;doğrusal&lt;/b&gt; indeksleme arasında dönüşüm sağlıyor.&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;
&lt;pre&gt;indeksler = &lt;span style=&quot;color:rgb(0, 0, 255)&quot;&gt;sub2ind&lt;/span&gt;&lt;span style=&quot;color:rgb(0, 136, 0)&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:rgb(0, 0, 255)&quot;&gt;size&lt;/span&gt;&lt;span style=&quot;color:rgb(0, 136, 0)&quot;&gt;(&lt;/span&gt;A&lt;span style=&quot;color:rgb(0, 136, 0)&quot;&gt;)&lt;/span&gt;, satir, sutun&lt;span style=&quot;color:rgb(0, 136, 0)&quot;&gt;)&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;blockquote&gt;
&lt;pre&gt;indeksler =

     2    11    20&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;div&gt;
&lt;div&gt;
&lt;pre&gt;&lt;span style=&quot;color:rgb(0, 136, 0)&quot;&gt;[&lt;/span&gt;satir, sutun&lt;span style=&quot;color:rgb(0, 136, 0)&quot;&gt;]&lt;/span&gt; = &lt;span style=&quot;color:rgb(0, 0, 255)&quot;&gt;ind2sub&lt;/span&gt;&lt;span style=&quot;color:rgb(0, 136, 0)&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:rgb(0, 0, 255)&quot;&gt;size&lt;/span&gt;&lt;span style=&quot;color:rgb(0, 136, 0)&quot;&gt;(&lt;/span&gt;A&lt;span style=&quot;color:rgb(0, 136, 0)&quot;&gt;)&lt;/span&gt;, indeksler&lt;span style=&quot;color:rgb(0, 136, 0)&quot;&gt;)&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;blockquote&gt;
&lt;pre&gt;satir =

     2     1     5

sutun =

     1     3     4&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;p&gt;Yani &lt;code&gt;A = A(:)&lt;/code&gt; ile matrisi doğrusal yapabilirsiniz. Ama sütunlar arka arkaya eklenir, satırlar değil, dikkat etmek lazım.&lt;/p&gt;
&lt;p&gt;İyi çalışmalar.&lt;/p&gt;</description>
		<content:encoded><![CDATA[<p>Önceden şöyle bi yazı yazmışım, sonra silmişim. Belki işe yarar:</p>
<p>Resimlerde indeksleme yaparken “<b>doğrusal</b> indeksleme” (linear indexing) kullanmak çok faydalı olabiliyor. Bu konu hakkında yazmayı düşündüm.</p>
<p>Şimdi küçük bir matris oluşturarak başlayalım. Bir sihirli matris yaratalım :)</p>
<div>
<div>
<pre>A = <span style="color:rgb(0, 0, 255)">magic</span><span style="color:rgb(0, 136, 0)">(</span><span style="color:rgb(51, 51, 255)">5</span><span style="color:rgb(0, 136, 0)">)</span></pre>
</div>
</div>
<blockquote>
<pre>A =

    17    24     1     8    15
    23     5     7    14    16
     4     6    13    20    22
    10    12    19    21     3
    11    18    25     2     9</pre>
</blockquote>
<p>SORU: A(17) kaçtır?</p>
<p><span></span></p>
<div>
<div>
<pre>A<span style="color:rgb(0, 136, 0)">(</span><span style="color:rgb(51, 51, 255)">17</span><span style="color:rgb(0, 136, 0)">)</span></pre>
</div>
</div>
<blockquote>
<pre>ans =

    14</pre>
</blockquote>
<p>MATLAB, matrisler için tek indeks kullandığımızda, (c gibi çoğu programlama dilinin tersine) sütun sırası ile gider. Yani A(17), 4. sütunun 2. satırıdır: A(2,4).</p>
<div>
<div>
<pre>A<span style="color:rgb(0, 136, 0)">(</span><span style="color:rgb(51, 51, 255)">2</span>, <span style="color:rgb(51, 51, 255)">4</span><span style="color:rgb(0, 136, 0)">)</span></pre>
</div>
</div>
<blockquote>
<pre>ans =

    14</pre>
</blockquote>
<p>Şimdi yaptıklarımızın imge işleme ile ne ilgisi olduğuna bakalım. Varsayalım ki A bizim imgemiz, birkaç hesap sonunda alttaki satır ve sütunların aradığımız piksellerin indeksleri olduğunu bulduk:</p>
<div>
<div>
<pre>satir = <span style="color:rgb(0, 136, 0)">[</span><span style="color:rgb(51, 51, 255)">2</span> <span style="color:rgb(51, 51, 255)">1</span> <span style="color:rgb(51, 51, 255)">5</span><span style="color:rgb(0, 136, 0)">]</span>;
sutun = <span style="color:rgb(0, 136, 0)">[</span><span style="color:rgb(51, 51, 255)">1</span> <span style="color:rgb(51, 51, 255)">3</span> <span style="color:rgb(51, 51, 255)">4</span><span style="color:rgb(0, 136, 0)">]</span>;</pre>
</div>
</div>
<p>Bu piksellere tek ifade ile erişebilir miyiz? Deneyelim:</p>
<div>
<div>
<pre>A<span style="color:rgb(0, 136, 0)">(</span>satir, sutun<span style="color:rgb(0, 136, 0)">)</span></pre>
</div>
</div>
<blockquote>
<pre>ans =

    23     7    14
    17     1     8
    11    25     2</pre>
</blockquote>
<p>Ne yazık ki üç yerine dokuz değer döndü, bizim istediğimiz bu değildi. MATLAB bu ifadeyi yazdığımız satır ve sütun değerlerinin kesişimi olarak verdi. Yani toplamda dokuz kesişim noktası.</p>
<p>Çift indeks yerine tek indeks kullanmamız gerekiyor. Yani:</p>
<div>
<div>
<pre>M = <span style="color:rgb(0, 0, 255)">size</span><span style="color:rgb(0, 136, 0)">(</span>A, <span style="color:rgb(51, 51, 255)">1</span><span style="color:rgb(0, 136, 0)">)</span>;
indeksler = M * <span style="color:rgb(0, 136, 0)">(</span>sutun - <span style="color:rgb(51, 51, 255)">1</span><span style="color:rgb(0, 136, 0)">)</span> + satir</pre>
</div>
</div>
<blockquote>
<pre>indeksler =

     2    11    20</pre>
</blockquote>
<p>A(indeksler) ifadesi bizim istediğimiz üç değeri döndürecek:</p>
<div>
<div>
<pre>A<span style="color:rgb(0, 136, 0)">(</span>indeksler<span style="color:rgb(0, 136, 0)">)</span><span style="color:rgb(0, 136, 0)">(</span>A, <span style="color:rgb(51, 51, 255)">1</span><span style="color:rgb(0, 136, 0)">)</span>;
indeksler = M * <span style="color:rgb(0, 136, 0)">(</span>sutun - <span style="color:rgb(51, 51, 255)">1</span><span style="color:rgb(0, 136, 0)">)</span> + satir</pre>
</div>
</div>
<blockquote>
<pre>ans =

    23     1     2</pre>
</blockquote>
<p>Bu değerleri değiştirebilirdik de:</p>
<div>
<div>
<pre>A<span style="color:rgb(0, 136, 0)">(</span>indeksler<span style="color:rgb(0, 136, 0)">)</span> = <span style="color:rgb(0, 0, 255)">Inf</span></pre>
</div>
</div>
<blockquote>
<pre>A =

    17    24   Inf     8    15
   Inf     5     7    14    16
     4     6    13    20    22
    10    12    19    21     3
    11    18    25   Inf     9</pre>
</blockquote>
<p>Aslında yaptığımız işlem MATLAB’da fonksiyon olarak bulunuyor. sub2ind ve ind2sub fonksiyonları satır-sütun indekslemesi ve <b>doğrusal</b> indeksleme arasında dönüşüm sağlıyor.</p>
<div>
<div>
<pre>indeksler = <span style="color:rgb(0, 0, 255)">sub2ind</span><span style="color:rgb(0, 136, 0)">(</span><span style="color:rgb(0, 0, 255)">size</span><span style="color:rgb(0, 136, 0)">(</span>A<span style="color:rgb(0, 136, 0)">)</span>, satir, sutun<span style="color:rgb(0, 136, 0)">)</span></pre>
</div>
</div>
<blockquote>
<pre>indeksler =

     2    11    20</pre>
</blockquote>
<div>
<div>
<pre><span style="color:rgb(0, 136, 0)">[</span>satir, sutun<span style="color:rgb(0, 136, 0)">]</span> = <span style="color:rgb(0, 0, 255)">ind2sub</span><span style="color:rgb(0, 136, 0)">(</span><span style="color:rgb(0, 0, 255)">size</span><span style="color:rgb(0, 136, 0)">(</span>A<span style="color:rgb(0, 136, 0)">)</span>, indeksler<span style="color:rgb(0, 136, 0)">)</span></pre>
</div>
</div>
<blockquote>
<pre>satir =

     2     1     5

sutun =

     1     3     4</pre>
</blockquote>
<p>Yani <code>A = A(:)</code> ile matrisi doğrusal yapabilirsiniz. Ama sütunlar arka arkaya eklenir, satırlar değil, dikkat etmek lazım.</p>
<p>İyi çalışmalar.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

