<?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>atppp&#039;s Blog &#187; CCD</title>
	<atom:link href="http://blog.wuxinan.net/archives/tag/ccd/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.wuxinan.net</link>
	<description></description>
	<lastBuildDate>Tue, 08 Dec 2009 08:20:42 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.4</generator>
		<item>
		<title>Defective Pixels in Canon A570 IS</title>
		<link>http://blog.wuxinan.net/archives/196</link>
		<comments>http://blog.wuxinan.net/archives/196#comments</comments>
		<pubDate>Mon, 26 Nov 2007 02:12:36 +0000</pubDate>
		<dc:creator>atppp</dc:creator>
				<category><![CDATA[Tech]]></category>
		<category><![CDATA[camera]]></category>
		<category><![CDATA[canon]]></category>
		<category><![CDATA[CCD]]></category>
		<category><![CDATA[chdk]]></category>
		<category><![CDATA[defective]]></category>
		<category><![CDATA[dng]]></category>
		<category><![CDATA[lang:en]]></category>
		<category><![CDATA[pixel]]></category>

		<guid isPermaLink="false">http://blog.wuxinan.net/archives/196</guid>
		<description><![CDATA[We know almost every pixel array (CCD sensor in camera, LCD screen, etc) has defective pixels. For camera CCD sensor, a few defective pixels can ruin good pictures, but we usually don&#8217;t see those pixels in the JPEG picture. Here&#8217;s a short story about those defective pixels. I installed CHDK on my Canon A570 IS [...]]]></description>
			<content:encoded><![CDATA[<p>We know almost every pixel array (CCD sensor in camera, LCD screen, etc) has defective pixels. For camera CCD sensor, a few defective pixels can ruin good pictures, but we usually don&#8217;t see those pixels in the JPEG picture. Here&#8217;s a short story about those defective pixels.</p>
<p>I installed CHDK on my Canon A570 IS camera and shot a few test pictures to find out defective pixels of my camera. To my surprise, this 7.1 mega-pixel CCD sensor has couple thousands defective pixels. The following picture represents the raw output from CCD sensor when I shot a 15 sec picture with ridiculously bright light source: (The green border is just showing image boundary, not from the actual picture.)</p>
<p><a title="0486.png" href="http://blog.wuxinan.net/wp-content/uploads/2007/11/0486.png"><img style="border: 3px solid #00ff00" src="http://blog.wuxinan.net/wp-content/uploads/2007/11/0486_small.png" alt="0486.png" /></a></p>
<p>The raw file is 3152 columns by 2340 rows, 10 bits per pixel, so the file size is 3152 x 2340 x 10 bits = 9219600 bytes. The first few columns and rows are used for background subtraction (masked pixels, their values are usually around 30-40 on this 2<sup>10</sup> = 1024 scale), so the active area is actually 3072 x 2304 pixels. The above picture is RAW CCD output down scaled to 0-255 and converted to 8-bit gray PNG (i.e., before demosaicing/gamma correction/any other process taken place). As you can see, there&#8217;re a lot (9205) of 0-valued defective pixels in the active area. There is no defective pixel in the masked area.</p>
<p>When I shot with faster shutter speed, I have less (2991) defective pixels.  The following was shot with 1/250 sec shutter speed, showing CCD value 0 as black (defective pixels), 1-40 as gray (masked pixels), and 40-267 as white. No pixel has value more than 267.</p>
<p><a title="0488.png" href="http://blog.wuxinan.net/wp-content/uploads/2007/11/0488.png"><img style="border: 3px solid #00ff00" src="http://blog.wuxinan.net/wp-content/uploads/2007/11/0488_small.png" alt="0488.png" /></a></p>
<p>I shot a lot of RAW pictures and found the number of  defective pixels is either 9205 or 2991. Generally speaking, the slower the shutter speed, the more chance I get 9205 defective pixels. But I did have 2991 defective pixels with 1/30 sec picture, and 9205 defective pixels with 1/250 sec picture, with all other settings the same. So I have no idea what determines the defective pixel pattern. Also what&#8217;s interesting is those 2991 defective pixels are subset of the 9205 defective pixels.</p>
<p>If I go ahead and demosaic, combining RGB channels together, This is part of the image I get: (You can see defective pixels in different color channels.)</p>
<p><img style="border: 3px solid #00ff00" src="http://blog.wuxinan.net/wp-content/uploads/2007/11/0405-with-bad-pixel-small.png" alt="0405-with-bad-pixel-small.png" /></p>
<p>Instead, most RAW format processors find those 0-valued (sub)pixels and interpolate over with neighbor pixels. By doing that, here&#8217;s what I get: (white balance etc. was tuned a little bit as well)</p>
<p><img style="border: 3px solid #00ff00" src="http://blog.wuxinan.net/wp-content/uploads/2007/11/0405-without-bad-pixel-small.png" alt="0405-without-bad-pixel-small.png" /></p>
<p>Nicely white, no annoying dots any more, right? This &#8220;cheating&#8221; process is done inside the camera when saving JPEG file, and also done in most RAW format conversion. <a href="http://www.adobe.com/products/dng/">DNG specification</a> states that:</p>
<blockquote><p>Defective pixels should be mapped out (interpolated over) before the raw data is stored as DNG.</p></blockquote>
<p>Enjoy your camera with 0.1% defective pixels!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.wuxinan.net/archives/196/feed</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
	</channel>
</rss>

