<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="bbPress/1.0.2" -->
<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">
	<channel>
		<title>LeafLabs Garden &#187; Topic: Detect scene brightness with camera</title>
		<link>http://forums.leaflabs.com/topic.php?id=838</link>
		<description>A place to share, learn, and grow...</description>
		<language>en-US</language>
		<pubDate>Fri, 22 Jan 2016 00:21:48 +0000</pubDate>
		<generator>http://bbpress.org/?v=1.0.2</generator>
		<textInput>
			<title><![CDATA[Search]]></title>
			<description><![CDATA[Search all topics from these forums.]]></description>
			<name>q</name>
			<link>http://forums.leaflabs.com/search.php</link>
		</textInput>
		<atom:link href="http://forums.leaflabs.com/rss.php?topic=838" rel="self" type="application/rss+xml" />

		<item>
			<title>poslathian on "Detect scene brightness with camera"</title>
			<link>http://forums.leaflabs.com/topic.php?id=838#post-5122</link>
			<pubDate>Fri, 10 Jun 2011 14:31:03 +0000</pubDate>
			<dc:creator>poslathian</dc:creator>
			<guid isPermaLink="false">5122@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;You can use an array of ambient sensors (as few as two...) and use the differential readings to determine the gradient of the ambient light (what direction is brighter/darker). &#60;/p&#62;
&#60;p&#62;The canonical example of this is a drive-towards-the-light robot. Take two take two ambient light sensors on a little horizontal bar. Put a small piece of cardboard in the middle to separate them, then turn your robot towards whichever sensor has the lower output. &#60;/p&#62;
&#60;p&#62;Not sure what you are doing, but if you just need to know what part of the scene is light/dark, you can play tricks like this. 3 ambient light sensors and you should be able to triangulate the center of mass of the lighting input.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>josiah47 on "Detect scene brightness with camera"</title>
			<link>http://forums.leaflabs.com/topic.php?id=838#post-5043</link>
			<pubDate>Tue, 07 Jun 2011 13:06:40 +0000</pubDate>
			<dc:creator>josiah47</dc:creator>
			<guid isPermaLink="false">5043@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;well im hoping i do not need to use a camera since a ambient light sensor might work, but if one part of the scene is darker and another lighter i don't know if the ambient light will sense that i guess it will since its an average, i think maybe ill test it first.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>gbulmer on "Detect scene brightness with camera"</title>
			<link>http://forums.leaflabs.com/topic.php?id=838#post-5040</link>
			<pubDate>Tue, 07 Jun 2011 12:30:28 +0000</pubDate>
			<dc:creator>gbulmer</dc:creator>
			<guid isPermaLink="false">5040@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;josiah47 - are you willing to try to program the camera?&#60;/p&#62;
&#60;p&#62;If you are, look at Canon Hack Development Kit&#60;br /&#62;
&#60;a href=&#34;http://chdk.wikia.com/wiki/CHDK&#34; rel=&#34;nofollow&#34;&#62;http://chdk.wikia.com/wiki/CHDK&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;In theory, with the right Canon camera, you could do everything in the camera. There are some advantages to this, including a faster processor, and plenty of RAM. Also, no need for anything except a camera. I picked up some Canon cameras at a reasonable price on eBay.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>robodude666 on "Detect scene brightness with camera"</title>
			<link>http://forums.leaflabs.com/topic.php?id=838#post-5039</link>
			<pubDate>Tue, 07 Jun 2011 12:11:34 +0000</pubDate>
			<dc:creator>robodude666</dc:creator>
			<guid isPermaLink="false">5039@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Why would you use a camera to get the brightness of a scene? Use a camera to take a picture. Use an &#60;a href=&#34;http://www.pololu.com/catalog/product/1608/resources&#34;&#62;ambient light sensor&#60;/a&#62; or &#60;a href=&#34;http://www.ladyada.net/learn/sensors/cds.html&#34;&#62;LDR&#60;/a&#62; to determine the brightness in an area. Alas, as for cameras.. I know SparkFun has a &#60;a href=&#34;http://www.sparkfun.com/products/10061&#34;&#62;LinkSprite TTL&#60;/a&#62; camera, but it captures JPEG images. You may need a camera that gets raw values. The &#60;a href=&#34;http://www.4dsystems.com.au/prod.php?id=75&#34;&#62;4D Systems µCAM-TTL&#60;/a&#62; claims to offer RAW RGB modes.&#60;/p&#62;
&#60;p&#62;Once you get your camera to communicate with the Maple, look at the RGB value of every pixel and calculate the &#60;a href=&#34;http://en.wikipedia.org/wiki/Luminance_(relative)&#34;&#62;luminance&#60;/a&#62;. Sum them up and divide by the number of pixels to get the average luminance of the entire picture. You'll be doing a lot of math, so I'd recommend taking a look at &#60;a href=&#34;http://forums.leaflabs.com/topic.php?id=266&#38;amp;page=2#post-3874&#34;&#62;libfixmath&#60;/a&#62; to help with all those calculations.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>josiah47 on "Detect scene brightness with camera"</title>
			<link>http://forums.leaflabs.com/topic.php?id=838#post-5036</link>
			<pubDate>Tue, 07 Jun 2011 11:38:13 +0000</pubDate>
			<dc:creator>josiah47</dc:creator>
			<guid isPermaLink="false">5036@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Okay, I have a little project that I can't give the full details but, basically what I need to do is get a camera hooked up to the Maple and then make it look at a scene, take the average brightness of the scene, so pixel by pixel calculation and then send the average brightness to the pc via serial.&#60;/p&#62;
&#60;p&#62;Any clues on how to go about this,&#60;br /&#62;
camera choice? anyone currently using a camera with the controller?&#60;br /&#62;
code to do the numbering crunching?&#60;/p&#62;
&#60;p&#62;Thanks
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
