Skip to content

Commit b1b05bd

Browse files
committed
update
1 parent 07bc9d1 commit b1b05bd

File tree

11 files changed

+35
-9
lines changed

11 files changed

+35
-9
lines changed

Chapter 1 Hand Tracking/README.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,14 @@ min_tracking_confidence: 跟踪置信度阈值
3333

3434
“Cache” 是指缓存,一种用于临时存储数据的机制,以便更快速地访问。缓存可以减少数据的重复计算或从慢速存储设备读取的次数,从而提高程序性能
3535

36-
对于HandTrackingModule.py而言,当你在其他文件中导入这个模块时,只有类 handDetector 和其中的方法会被使用,而 main() 函数不会,main() 函数只有在直接运行该脚本时才会执行
36+
对于HandTrackingModule.py而言,当你在其他文件中导入这个模块时,只有类 handDetector 和其中的方法会被使用,而 main() 函数不会,main() 函数只有在直接运行该脚本时才会执行
37+
38+
# 注意事项
39+
40+
如果出现如下报错:
41+
42+
43+
> cv2.error: OpenCV(4.10.0) D:\a\opencv-python\opencv-python\opencv\modules\highgui\src\window.cpp:1301: error: (-2:Unspecified error) The function is not implemented. Rebuild the library with Windows, GTK+ 2.x or Cocoa support. If you are on Ubuntu or Debian, install libgtk2.0-dev and pkg-config, then re-run cmake or configure script in function 'cvShowImage'
44+
45+
46+
请把终端移动到最外层文件夹运行(对于vscode就是打开最外层文件夹),我也不是很清楚为什么会出现这种bug
Binary file not shown.

Chapter 2 Pose Estimation/Basics.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
pose = mpPose.Pose() # 创建一个姿势检测对象,用于处理图像并检测人体姿势
99

1010
# 打开视频文件
11-
cap = cv2.VideoCapture("E:\\Advance Computer Vision with Python\\Chapter 2 Pose Estimation\\PoseVideos\\3.mp4")
11+
cap = cv2.VideoCapture("E:\\Advance Computer Vision with Python\\main\\Chapter 2 Pose Estimation\\PoseVideos\\3.mp4")
1212

1313
if not cap.isOpened():
1414
print("Error: Could not open video.")

Chapter 2 Pose Estimation/PoseModule.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ def findAngle(self, img, p1, p2, p3, draw=True):
114114
# 主函数
115115
def main():
116116
cap = cv2.VideoCapture(
117-
"E:\\Advance Computer Vision with Python\\Chapter 2 Pose Estimation\\PoseVideos\\5.mp4"
117+
"E:\\Advance Computer Vision with Python\\main\\Chapter 2 Pose Estimation\\PoseVideos\\5.mp4"
118118
) # 打开视频文件
119119
pTime = 0 # 前一帧时间
120120
detector = poseDetector() # 创建姿势检测器

Chapter 2 Pose Estimation/ProjectExample.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import time
33
import PoseModule as pm
44
cap = cv2.VideoCapture(
5-
"E:\\Advance Computer Vision with Python\\Chapter 2 Pose Estimation\\PoseVideos\\5.mp4"
5+
"E:\\Advance Computer Vision with Python\\main\\Chapter 2 Pose Estimation\\PoseVideos\\5.mp4"
66
)
77
pTime = 0
88
detector = pm.poseDetector()

Chapter 2 Pose Estimation/README.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ min_tracking_confidence=self.min_tracking_confidence # 跟踪置信度阈值
1818

1919
# 注意事项
2020

21-
用vscode执行代码时,请让终端在`Advance Computer Vision with Python`文件夹下(即vs打开这个整体的文件夹),以及视频路径请使用**绝对路径**,否则,将可能出现一些莫名其妙的报错
21+
如果出现如下报错:
2222

23-
比如你让终端在`Chapter 2 Pose Estimation`文件夹下运行,opencv的GUI就要报错,**日怪得很**
23+
> cv2.error: OpenCV(4.10.0) D:\a\opencv-python\opencv-python\opencv\modules\highgui\src\window.cpp:1301: error: (-2:Unspecified error) The function is not implemented. Rebuild the library with Windows, GTK+ 2.x or Cocoa support. If you are on Ubuntu or Debian, install libgtk2.0-dev and pkg-config, then re-run cmake or configure script in function 'cvShowImage'
24+
25+
请把终端移动到最外层文件夹运行(对于vscode就是打开最外层文件夹),我也不是很清楚为什么会出现这种bug
26+
27+
以及视频文件的路径请使用**绝对路径**
10 Bytes
Binary file not shown.

Chapter 3 Face Detection/Basics.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
# 打开视频文件
66
cap = cv2.VideoCapture(
7-
"E:\\Advance Computer Vision with Python\\Chapter 3 Face Detection\\Videos\\4.mp4"
7+
"E:\\Advance Computer Vision with Python\\main\\Chapter 3 Face Detection\\Videos\\4.mp4"
88
)
99

1010
pTime = 0 # 上一帧的时间

Chapter 3 Face Detection/FaceDetectionModule.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ def fancyDraw(self, img, bbox, l=30, t=5, rt=1):
7878
def main():
7979
# 打开视频文件
8080
cap = cv2.VideoCapture(
81-
"E:\\Advance Computer Vision with Python\\Chapter 3 Face Detection\\Videos\\4.mp4"
81+
"E:\\Advance Computer Vision with Python\\main\\Chapter 3 Face Detection\\Videos\\4.mp4"
8282
)
8383
pTime = 0 # 上一帧时间
8484
detector = FaceDetector() # 创建人脸检测器对象

Chapter 3 Face Detection/README.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,4 +53,14 @@ bbox = (
5353

5454
![youtube](./pics/youtube.png)
5555

56-
有个换行的反斜杠,在网站上没显示出来,原本这里应该是逗号连接的元组,结果现在好了,如果直接复制进vscode,它自动识别,帮你把前两个装在一起了,后两个落下了,好在也不难发现
56+
有个换行的反斜杠,在网站上没显示出来,原本这里应该是逗号连接的元组,结果现在好了,如果直接复制进vscode,它自动识别,帮你把前两个装在一起了,后两个落下了,好在也不难发现
57+
58+
# 注意事项
59+
60+
如果出现如下报错:
61+
62+
> cv2.error: OpenCV(4.10.0) D:\a\opencv-python\opencv-python\opencv\modules\highgui\src\window.cpp:1301: error: (-2:Unspecified error) The function is not implemented. Rebuild the library with Windows, GTK+ 2.x or Cocoa support. If you are on Ubuntu or Debian, install libgtk2.0-dev and pkg-config, then re-run cmake or configure script in function 'cvShowImage'
63+
64+
请把终端移动到最外层文件夹运行(对于vscode就是打开最外层文件夹),我也不是很清楚为什么会出现这种bug
65+
66+
以及视频文件的路径请使用**绝对路径**

0 commit comments

Comments
 (0)