Face Detection and Face Recognition by Different Algorithms Using Python & OpenCV
Face Detection and Face Recognition by Different Algorithms Using Python & OpenCV
The Link to the git repo:
https://bitbucket.org/SpikeSL/vision-systems.git
Run Recogniser_Video_EigonFace.py
gave following error:
Camera dropped frame!
Traceback (most recent call last):
File "Recogniser_Video_EigonFace.py", line 31, in <module>
ID, conf = recognise.predict(gray_face) # Determine the ID of the photo
TypeError: 'int' object is not iterable
Cleaned up camera.
- Due to OpenCV bug, for 3.0 < version < 3.2
- python3 ‘int’ object is not iterable
- Predict confidence no longer accessible from Python #512
- Switch to OpenCV 3.2.0 to resolve issue with Recognizer#predict not r…
As of this writing, Anaconda only has version 3.2.0 for Linux-64:
linux-64 v3.2.0
win-32 v3.1.0
osx-64 v3.1.0
win-64 v3.1.0
Solution
- using OpenCV from MacPorts (3.2.0) or Brew (3.4.0)
/opt/local/bin/python3.5 Recogniser_Video_EigonFace.py
New error:
Traceback (most recent call last):
File "Recogniser_Video_EigonFace.py", line 33, in <module>
NameFind.DispID(x, y, w, h, NAME, gray)
File "/Users/leon/Developer/DeepFaces/vision-systems/Python/NameFind.py", line 69, in DispID
draw_box(Image, x, y, w, h)
File "/Users/leon/Developer/DeepFaces/vision-systems/Python/NameFind.py", line 78, in draw_box
cv2.line(Image, (x, y), (x + (w/5) ,y), WHITE, 2)
TypeError: integer argument expected, got float
Solution
- cast
w/5
to integerint(w/5)
- Markdown和扩展Markdown简洁的语法
- 代码块高亮
- 图片链接和图片上传
- LaTex数学公式
- UML序列图和流程图
- 离线写博客
- 导入导出Markdown文件
- 丰富的快捷键
快捷键
- 加粗
Ctrl + B
- 斜体
Ctrl + I
- 引用
Ctrl + Q
- 插入链接
Ctrl + L
- 插入代码
Ctrl + K
- 插入图片
Ctrl + G
- 提升标题
Ctrl + H
- 有序列表
Ctrl + O
- 无序列表
Ctrl + U
- 横线
Ctrl + R
- 撤销
Ctrl + Z
- 重做
Ctrl + Y
Markdown及扩展
Markdown 是一种轻量级标记语言,它允许人们使用易读易写的纯文本格式编写文档,然后转换成格式丰富的HTML页面。 —— [ 维基百科 ]
使用简单的符号标识不同的标题,将某些文字标记为粗体或者斜体,创建一个链接等,详细语法参考帮助?。
本编辑器支持 Markdown Extra , 扩展了很多好用的功能。具体请参考Github.
表格
Markdown Extra 表格语法:
项目 | 价格 |
---|---|
Computer | $1600 |
Phone | $12 |
Pipe | $1 |
可以使用冒号来定义对齐方式:
项目 | 价格 | 数量 |
---|---|---|
Computer | 1600 元 | 5 |
Phone | 12 元 | 12 |
Pipe | 1 元 | 234 |
定义列表
-
Markdown Extra 定义列表语法:
项目1
项目2
- 定义 A
- 定义 B 项目3
- 定义 C
-
定义 D
定义D内容
代码块
代码块语法遵循标准markdown代码,例如:
@requires_authorization
def somefunc(param1='', param2=0):
'''A docstring'''
if param1 > param2: # interesting
print 'Greater'
return (param2 - param1 + 1) or None
class SomeClass:
pass
>>> message = '''interpreter
... prompt'''
脚注
生成一个脚注1.
目录
用 [TOC]
来生成目录:
数学公式
使用MathJax渲染LaTex 数学公式,详见math.stackexchange.com.
- 行内公式,数学公式为: Γ(n)=(n−1)!∀n∈ℕ Γ ( n ) = ( n − 1 ) ! ∀ n ∈ N 。
- 块级公式:
更多LaTex语法请参考 这儿.
UML 图:
可以渲染序列图:
或者流程图:
离线写博客
即使用户在没有网络的情况下,也可以通过本编辑器离线写博客(直接在曾经使用过的浏览器中输入write.blog.youkuaiyun.com/mdeditor即可。Markdown编辑器使用浏览器离线存储将内容保存在本地。
用户写博客的过程中,内容实时保存在浏览器缓存中,在用户关闭浏览器或者其它异常情况下,内容不会丢失。用户再次打开浏览器时,会显示上次用户正在编辑的没有发表的内容。
博客发表后,本地缓存将被删除。
用户可以选择 把正在写的博客保存到服务器草稿箱,即使换浏览器或者清除缓存,内容也不会丢失。
注意:虽然浏览器存储大部分时候都比较可靠,但为了您的数据安全,在联网后,请务必及时发表或者保存到服务器草稿箱。
浏览器兼容
- 目前,本编辑器对Chrome浏览器支持最为完整。建议大家使用较新版本的Chrome。
- IE9以下不支持
- IE9,10,11存在以下问题
- 不支持离线功能
- IE9不支持文件导入导出
- IE10不支持拖拽文件导入
- 这里是 脚注 的 内容. ↩