About Raspberry Pi:
Raspberry Pi is a Linux-based PC equipped with a 256 MHz processor, memory, SD card and Ethernet support. It has two USB interfaces and supports HDMI and RCA output. It is reported that although the Raspberry Pi looks very mini-it only has one credit card, it can run games like thunder hammer 3: arena and play P videos. The hardware foundation is
ARM is an open-source Linux operating system. Its built-in Iceweasel, KOffice, and other software can meet basic network browsing, text processing, and computer learning needs.
(For more information, see Phodal's blog)
Before getting started
Use raspberrypi properly by referring to your known manual or guide. You also need a camera.
It is based on 2013-02-09-wheezy-raspbian. That is to say, Raspbian is used Based On debian. Install opencv
sudo apt-get updatesudo apt-get install libopencv-dev
sudo apt-get install python-opencv
Test
import wxfrom opencv.cv import *from opencv.highgui import * class MyFrame(wx.Frame): def __init__(self): wx.Frame.__init__(self, None, -1, 'camera') self.SetClientSize((640, 480)) self.cap = cvCreateCameraCapture(0) self.Bind(wx.EVT_IDLE, self.onIdle) def onIdle(self, event): img = cvQueryFrame(self.cap) self.displayImage(img) event.RequestMore() def displayImage(self, img, offset=(0,0)): bitmap = wx.BitmapFromBuffer(img.width, img.height, img.imageData) dc = wx.ClientDC(self) dc.DrawBitmap(bitmap, offset[0], offset[1], False) if __name__=="__main__": app = wx.App() frame = MyFrame() frame.Show(True) app.MainLoop()
Source: http://www.phodal.com