这篇文章里我们会演示如何在pcDuino上运行simpleCV, 在开始之前要确保有一个兼容USB 摄像头的万能接头,还要在这里下载万能USB摄像头驱动程序的内核补丁。在pcDuino终端上下载这个补丁后,用以下命令解压: - $ tar -zxvf uImage_20130316.tar.gz
复制代码注:如果你在这篇文章后已经释放一个图像,说明你可能已经有正确的驱动程序那么你可以跳过这一步。
使用以下命令应用补丁: 1、更新内核 - sudo mount /dev/nanda /boot
- sudo cp uImage /boot/ -f
复制代码2、安装guvcview - sudo apt-get install guvcview
复制代码3、重新启动后运行guvcview
从以下菜单运行gucvview:Start Menu ==> Sound Video => guvcview,检查相机是否工作。 按照以下步骤安装simpleCV: - sudo apt-get install ipython python-opencv python-scipy python-numpy python-setuptools python-pip
- sudo pip install https://github.com/ingenuitas/SimpleCV/zipball/master
- sudo apt-get install python-pygame
- sudo apt-get install python-imaging
复制代码键入 “$ simpleCV”启动simpleCV,simpleCV是交互式的shell,我们可以输入以下命令:
- ubuntu@ubuntu:~$ simplecv
- +-----------------------------------------------------------+
- SimpleCV 1.3.0 [interactive shell] - http://simplecv.org
- +-----------------------------------------------------------+
- Commands:
- "exit()" or press "Ctrl+ D" to exit the shell
- "clear" to clear the shell screen
- "tutorial" to begin the SimpleCV interactive tutorial
- "example" gives a list of examples you can run
- "forums" will launch a web browser for the help forums
- "walkthrough" will launch a web browser with a walkthrough
- Usage:
- dot complete works to show library
- for example: Image().save("/tmp/test.jpg") will dot complete
- just by touching TAB after typing Image().
- Documentation:
- help(Image), ?Image, Image?, or Image()? all do the same
- "docs" will launch webbrowser showing documentation
- SimpleCV:1> cam=Camera()
- VIDIOC_QUERYMENU: Invalid argument
- VIDIOC_QUERYMENU: Invalid argument
- VIDIOC_QUERYMENU: Invalid argument
- VIDIOC_QUERYMENU: Invalid argument
- VIDIOC_QUERYMENU: Invalid argument
- VIDIOC_QUERYMENU: Invalid argument
- VIDIOC_QUERYMENU: Invalid argument
- SimpleCV:2> img=cam.getImage()
- SimpleCV:3> img.show()
- SimpleCV:5:
复制代码以下是截图
|