<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>eyedbits &#187; Uncategorized</title>
	<atom:link href="http://www.eyedbits.com/?cat=1&#038;feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://www.eyedbits.com</link>
	<description>links, tutorials and code fragments regarding computer graphics</description>
	<lastBuildDate>Sat, 23 Jun 2018 05:45:41 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=4.2.38</generator>
	<item>
		<title>Blender &#8211; configure freestyle rendering for black and white sketches</title>
		<link>http://www.eyedbits.com/?p=208</link>
		<comments>http://www.eyedbits.com/?p=208#comments</comments>
		<pubDate>Sat, 15 Aug 2015 16:22:32 +0000</pubDate>
		<dc:creator><![CDATA[busk]]></dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.eyedbits.com/?p=208</guid>
		<description><![CDATA[World setting &#8211;&#62; Horizon Color &#8211;&#62; white Object Material &#8211;&#62; Diffuse; Intensity: 100%; Shading: Shadeless Rendering &#8211;&#62; Freestyle next to Render Panel: Render Layers, Hidden Edge Mark (render) Strg + E at Edge &#8212;- For Camera View press &#8220;0&#8221;, then &#8230; <a href="http://www.eyedbits.com/?p=208">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>World setting &#8211;&gt; Horizon Color &#8211;&gt; white</p>
<p>Object Material &#8211;&gt; Diffuse; Intensity: 100%; Shading: Shadeless</p>
<p>Rendering &#8211;&gt; Freestyle</p>
<p>next to Render Panel:</p>
<ul>
<li>Render Layers, Hidden</li>
<li>Edge Mark (render) Strg + E at Edge</li>
</ul>
<p>&#8212;-</p>
<p>For Camera View press &#8220;0&#8221;, then press &#8220;N&#8221; for Properties, then View &#8211;&gt; &#8220;Lock Camera to View&#8221;</p>
<p>Strg+ 0</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.eyedbits.com/?feed=rss2&#038;p=208</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Python &#8211; Simulate talking enums and bitsflags</title>
		<link>http://www.eyedbits.com/?p=205</link>
		<comments>http://www.eyedbits.com/?p=205#comments</comments>
		<pubDate>Fri, 10 May 2013 10:35:18 +0000</pubDate>
		<dc:creator><![CDATA[busk]]></dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.eyedbits.com/?p=205</guid>
		<description><![CDATA[Enum &#8220;id&#8221; of entry is rising 1 by 1 (seen at http://stackoverflow.com/questions/36932/how-can-i-represent-an-enum-in-python) def enum(*sequential): enums = dict(zip(sequential, range(len(sequential)) )) return type('Enum', (), enums) Bitflags &#8220;id&#8221; of entry is rising exponentialto power of 2 to allow check for multiple bits def bitflag(*sequential): &#8230; <a href="http://www.eyedbits.com/?p=205">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p><span style="color: #000000; font-weight: bold;">Enum</span></p>
<p>&#8220;id&#8221; of entry is rising 1 by 1 (seen at <a href="http://stackoverflow.com/questions/36932/how-can-i-represent-an-enum-in-python">http://stackoverflow.com/questions/36932/how-can-i-represent-an-enum-in-python</a>)</p>
<pre>def enum(*sequential):
 enums = dict(zip(sequential, range(len(sequential)) ))
return type('Enum', (), enums)</pre>
<h1>Bitflags</h1>
<p>&#8220;id&#8221; of entry is rising exponentialto power of 2 to allow check for multiple bits</p>
<pre>def bitflag(*sequential):
 bitflags = dict(zip(sequential, [2**i for i in range(len(sequential))] ))
 return type('Bitflag', (), bitflags)</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.eyedbits.com/?feed=rss2&#038;p=205</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Gnuplot tricks</title>
		<link>http://www.eyedbits.com/?p=199</link>
		<comments>http://www.eyedbits.com/?p=199#comments</comments>
		<pubDate>Thu, 18 Apr 2013 15:39:17 +0000</pubDate>
		<dc:creator><![CDATA[busk]]></dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.eyedbits.com/?p=199</guid>
		<description><![CDATA[Conditional plotting Solution: set value to (1/0) Example: plot sin(x) only for positive values: plot sin(x)&#62;0?sin(x):(1/0)]]></description>
				<content:encoded><![CDATA[<h1>Conditional plotting</h1>
<h3>Solution:</h3>
<p>set value to (1/0)</p>
<h3>Example:</h3>
<p>plot sin(x) only for positive values:</p>
<pre>plot sin(x)&gt;0?sin(x):(1/0)</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.eyedbits.com/?feed=rss2&#038;p=199</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>python numpy quickies</title>
		<link>http://www.eyedbits.com/?p=193</link>
		<comments>http://www.eyedbits.com/?p=193#comments</comments>
		<pubDate>Wed, 10 Apr 2013 15:09:25 +0000</pubDate>
		<dc:creator><![CDATA[busk]]></dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.eyedbits.com/?p=193</guid>
		<description><![CDATA[Generate a 2 x 4 array of ints between 0 and 4, inclusive: &#62;&#62;&#62; np.random.randint(5, size=(2, 4)) array([[4, 0, 2, 1], [3, 2, 2, 0]]) see http://docs.scipy.org/doc/numpy/reference/generated/numpy.random.randint.html Evenly spaced values for an interval Specfiy number of segments numpy.linspace(start, stop, num=50, endpoint=True, retstep=False) numpy.linspace reference Return &#8230; <a href="http://www.eyedbits.com/?p=193">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>Generate a 2 x 4 array of ints between 0 and 4, inclusive:</p>
<p>&gt;&gt;&gt; np.random.randint(5, size=(2, 4))<br />
array([[4, 0, 2, 1],<br />
[3, 2, 2, 0]])</p>
<p>see http://docs.scipy.org/doc/numpy/reference/generated/numpy.random.randint.html</p>
<h2>Evenly spaced values for an interval</h2>
<p><span style="font-size: 10px; letter-spacing: 0.1em; line-height: 2.6em; text-transform: uppercase;">Specfiy number of segments</span></p>
<p><tt>numpy.</tt><tt>linspace</tt><big>(</big><em>start</em>, <em>stop</em>, <em>num=50</em>, <em>endpoint=True</em>, <em>retstep=False</em><big>) </big><a title="numpy linspace reference" href="http://docs.scipy.org/doc/numpy/reference/generated/numpy.linspace.html" target="_blank">numpy.linspace reference</a></p>
<p>Return evenly spaced numbers over a specified interval.</p>
<p>May include stop value (endpoint = True)</p>
<h3>Specify step interval size</h3>
<p><tt>numpy.</tt><tt>arange</tt><big>(</big>[<em>start</em>], <em>stop</em>[, <em>step</em>], <em>dtype=None</em><big>) </big><a title="numpy.arange reference" href="http://docs.scipy.org/doc/numpy/reference/generated/numpy.arange.html" target="_blank">numpy.arange reference</a></p>
<p>Return evenly spaced values within a given interval.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<h3>Create Sample Positions for pixels</h3>
<p>def genPixelSamples(width, height, numWidth, numHeight, midPoint = True):<br />
&#8220;if midPoint = true, sample is positioned at pixel center, else in the corner&#8221;<br />
&#8220;output with y in 0 and x in 1 of 3rd dimension&#8221;<br />
output = np.zeros([numHeight, numWidth, 2])<br />
#y<br />
output[:,:,0] = np.outer( np.linspace(0, height, numHeight, False), np.ones([numWidth]) );<br />
#x<br />
output[:,:,1] = np.outer( np.ones([numHeight]), np.linspace(0, width, numWidth, False) );</p>
<p>if midPoint:<br />
output[:,:] += 0.5 * output[1,1]</p>
<p>return output</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.eyedbits.com/?feed=rss2&#038;p=193</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Find object in image using the histograms</title>
		<link>http://www.eyedbits.com/?p=150</link>
		<comments>http://www.eyedbits.com/?p=150#comments</comments>
		<pubDate>Fri, 20 Jul 2012 13:17:56 +0000</pubDate>
		<dc:creator><![CDATA[busk]]></dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.eyedbits.com/?p=150</guid>
		<description><![CDATA[Situation: You want to detect some object (image B) in image A. Therefore you can use the histogram, that is the color/grayscale distribution of the object&#8217;s image. Shorthand said, you have a look onto which values are characteristic for the &#8230; <a href="http://www.eyedbits.com/?p=150">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p><strong>Situation: </strong><br />
You want to detect some object (image B) in image A.</p>
<p>Therefore you can use the histogram, that is the color/grayscale distribution of the object&#8217;s image. Shorthand said, you have a look onto which values are characteristic for the object, which means, they are more probable to appear in the object&#8217;s image than in the rest of the image. Then you select the region in Image A which has most of these characteristic pixel values.</p>
<p>This is done the following way.<br />
Calculate both histograms for image A and B.<br />
By dividing the histogram of image B by the histogram of image A element wise, you get high values for those bins, that have a relative high count for image B in comparison to image A. Note that values, that do not appear in image A lead to infinity, but later on, these bins wont be used. But be careful, if you do more operations on the histogram, like smoothing.</p>
<p>The new &#8220;histogram&#8221; now contains something like likelihood values telling how probable an intensity value belongs to the object.<br />
Now we map each pixel of image A to its likelihood and take the average over a region with size of image B.</p>
<p>High values in the modified image indicate a high probability that this region contains the object.</p>
<p>Here some Octave code:</p>
<pre class="brush: matlabkey; title: ; notranslate">
function [idy, idx] = histMatch(A, B)
%HISTMATCH find Pattern B in A using Histogram

% hit: how to read images into matrices
%A = imread(&quot;img1.png&quot;);
%B = imread(&quot;imgobject.png&quot;);

%calculate histograms
hA = histc(A(:), [0:1:255]);
hB = histc(B(:), [0:1:255]);

%calculate division (max 1)
hC = hB./hA;
%set maximum 1 (not needed, are not accessed anyway)
hC = min(hC, 1);

%map values from A to hC
A2 = hC(A);

%create mask and convolute
mask = ones(size(B));
A3 = conv2(A2, mask, &quot;same&quot;);

%determine coordinates of maximum 
%maximum per column with rowIndex
[colMax, rowIndices] = max(A3);
%maximum over the maxima
[max, colIndex] = max(colMax);

idx = colIndex;
idy = rowIndices(idx);

end
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.eyedbits.com/?feed=rss2&#038;p=150</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Test For latex</title>
		<link>http://www.eyedbits.com/?p=21</link>
		<comments>http://www.eyedbits.com/?p=21#comments</comments>
		<pubDate>Tue, 29 Nov 2011 16:46:36 +0000</pubDate>
		<dc:creator><![CDATA[busk]]></dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.eyedbits.com/?p=21</guid>
		<description><![CDATA[]]></description>
				<content:encoded><![CDATA[<img src='http://s.wordpress.com/latex.php?latex=%20i%5Chbar%5Cfrac%7B%5Cpartial%7D%7B%5Cpartial%20t%7D%5Cleft%7C%5CPsi%28t%29%5Cright%3E%3DH%5Cleft%7C%5CPsi%28t%29%5Cright%3E%20&#038;bg=ffffff&#038;fg=000000&#038;s=4' alt=' i\hbar\frac{\partial}{\partial t}\left|\Psi(t)\right&gt;=H\left|\Psi(t)\right&gt; ' title=' i\hbar\frac{\partial}{\partial t}\left|\Psi(t)\right&gt;=H\left|\Psi(t)\right&gt; ' class='latex' />
]]></content:encoded>
			<wfw:commentRss>http://www.eyedbits.com/?feed=rss2&#038;p=21</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>little main</title>
		<link>http://www.eyedbits.com/?p=10</link>
		<comments>http://www.eyedbits.com/?p=10#comments</comments>
		<pubDate>Thu, 06 Oct 2011 15:35:43 +0000</pubDate>
		<dc:creator><![CDATA[busk]]></dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.eyedbits.com/?p=10</guid>
		<description><![CDATA[int main() { return -1; }]]></description>
				<content:encoded><![CDATA[<div class="smallSourceCode">
<pre class="brush:cpp">int main()
{
  return -1;
}
</pre>
</div>
<pre class="brush: plain; title: ; notranslate">this is a test</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.eyedbits.com/?feed=rss2&#038;p=10</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
