分享

pcDuino上运行simpleCV

 xiaofenglib 2013-08-29
在我们开始之前,需要准备一个USB接口的摄像头,一般的网络摄像头都可以。我们还需要应用内核补丁和USB摄像头驱动程序。这个补丁可以在这里下载:https://s3./pcduino/Images/Ubuntu+Updates/uImage_20130316.tar.gz
1.请下载这个补丁在pcDuino终端,解压它使用以下命令:
  1. tar -zxvf uImage_20130316.tar.gz
复制代码
2.升级内核
  1. sudo mount /dev/nanda /boot
  2. sudo cp uImage /boot/ -f
复制代码
3.安装guvcview,然后重启
  1. sudo apt-get install guvcview
  2. sudo reboot
复制代码
除了上述的方法,其实你还可以直接升级最新的ubuntu系统。。。到这里下载:http://www./?page_id=14
系统自带了这个USB的驱动。。。这时候你只需要执行上的第3步就OK了
4.重启后接着在命令行输入
  1. guvcview
复制代码
就可以看到图像了。。。。
5.再来安装simpleCV
  1. sudo apt-get install ipython python-opencv python-scipy python-numpy python-setuptools python-pip
  2. sudo pip install https://github.com/ingenuitas/SimpleCV/zipball/master
  3. sudo apt-get install python-pygame
  4. sudo apt-get install python-imaging
复制代码
6.安装完成后,输入simplecv,可以直接进入shell编程
  1. ubuntu@ubuntu:~$ simplecv

  2. +-----------------------------------------------------------+
  3. SimpleCV 1.3.0 [interactive shell] - http://
  4. +-----------------------------------------------------------+

  5. Commands:
  6. "exit()" or press "Ctrl+ D" to exit the shell
  7. "clear" to clear the shell screen
  8. "tutorial" to begin the SimpleCV interactive tutorial
  9. "example" gives a list of examples you can run
  10. "forums" will launch a web browser for the help forums
  11. "walkthrough" will launch a web browser with a walkthrough

  12. Usage:
  13. dot complete works to show library
  14. for example: Image().save("/tmp/test.jpg") will dot complete
  15. just by touching TAB after typing Image().

  16. Documentation:
  17. help(Image), ?Image, Image?, or Image()? all do the same
  18. "docs" will launch webbrowser showing documentation

  19. SimpleCV:1> cam=Camera()
  20. VIDIOC_QUERYMENU: Invalid argument
  21. VIDIOC_QUERYMENU: Invalid argument
  22. VIDIOC_QUERYMENU: Invalid argument
  23. VIDIOC_QUERYMENU: Invalid argument
  24. VIDIOC_QUERYMENU: Invalid argument
  25. VIDIOC_QUERYMENU: Invalid argument
  26. VIDIOC_QUERYMENU: Invalid argument

  27. SimpleCV:2> img=cam.getImage()

  28. SimpleCV:3> img.show()
  29. SimpleCV:5:
复制代码
最后的效果图:



    本站是提供个人知识管理的网络存储空间,所有内容均由用户发布,不代表本站观点。请注意甄别内容中的联系方式、诱导购买等信息,谨防诈骗。如发现有害或侵权内容,请点击一键举报。
    转藏 分享 献花(0

    0条评论

    发表

    请遵守用户 评论公约

    类似文章 更多