Does anyone know of a way to DIY a digital camera by buying a sensor and lens and processing the image using an Arduino?
-
I assume you know that you can purchase a sensor that captures images and libraries exist to process that signal into an image file (such as a .jpg file)? There are tons of tutorials online for this... but maybe you are wanting something specific? Please clarify if so– Ben RondeauCommented Jul 31, 2015 at 3:56
-
can you be more specific please? what do you want to build, why don't you use a sensor, as Ben said?– 23arsCommented Jul 31, 2015 at 20:55
1 Answer
You can buy a camera module for the Arduino, and you can interface it fairly simply. There are numerous modules around - ask Google, it knows more than me.
But I have yet to work out why people do it. All you can do with an Uno is to pass the data through to something else like a PC to process the image - so why wouldn't you just use a simple webcam?
The Arduino UNO has 2KB of RAM. A 24-bit 640x480 image (VGA) requires (640*480*3)/1024 = 900KB to store it in memory. If you really wanted to process an image on an Uno then you would be limited to (say 8-bit grayscale) 48x32 pixels (1.5KB) which is pretty pointless really.
Even a Due would only allow (again grayscale) around 320x240 (which is better) but nothing colour unless you want to start messing with CLUTs which aren't fun when receiving a truecolour (24-bit) image from a camera.
For this kind of task you are better off with an embedded computer with plenty of RAM such as a Raspberry Pi or maybe a Galileo or something.