diff --git a/docs/101.md b/docs/101.md index 0bd828d7940bcfea1fd6c8c200a6ef13c2fd9ba7..fd48045454e7d3a6fe44ff09071b779ab124e695 100644 --- a/docs/101.md +++ b/docs/101.md @@ -4,7 +4,7 @@ ![Car Tracking with OpenCV](img/41e5801abd44884a07aa898717a7e69e.jpg) -Car Tracking with OpenCV +使用 OpenCV 进行汽车追踪 在本教程中,我们将研究使用 [haar 功能](https://en.wikipedia.org/wiki/Haar-like_features)的车辆跟踪。 我们有一个经过训练的 haar 级联文件。 @@ -49,7 +49,7 @@ while rval: ## 汽车追踪算法 -For every frame: +对于每一帧: * 检测潜在的感兴趣区域 * 根据垂直,水平相似度过滤检测到的区域 diff --git a/docs/102.md b/docs/102.md index bb4cf5bb8874597d1ac243a68a834c97e31ab4ba..b604b239fb568430d1ab660d30a7fb8b2fb11613 100644 --- a/docs/102.md +++ b/docs/102.md @@ -36,7 +36,7 @@ while rval: ## 使用 OpenCV 进行人脸检测 -We will display a rectangle on top of the face. To avoid flickering of the rectangle, we will show it at it latest known position if the face is not detected. +我们将在脸部上方显示一个矩形。 为了避免矩形的闪烁,如果未检测到面部,我们将在最新的已知位置显示该矩形。 ```py #! /usr/bin/python diff --git a/docs/103.md b/docs/103.md index 01e345e6a76972400bf39ac40d0a39c6a9f5c569..ec04461d043c7cd89c3f2ea1b31136d08515d6fa 100644 --- a/docs/103.md +++ b/docs/103.md @@ -11,7 +11,7 @@ ![template matching opencv](img/3d85797cd44b2c4b3348bfd4fc8a7795.jpg) -Template matching with OpenCV and Python. Template (left), result image (right) +与 OpenCV 和 Python 匹配的模板。 模板(左),结果图像(右) [下载代码](https://pythonspot.com/download-vision-examples/) @@ -21,11 +21,11 @@ Template matching with OpenCV and Python. Template (left), result image (right) * **模板图像(T)**:模板图像 -The template image T is slided over the source image S (moved over the source image), and the program tries to find matches using statistics. +模板图像`T`在源图像`S`上滑动(在源图像上移动),并且程序尝试使用统计信息查找匹配项。 ## 模板匹配示例 -Lets have a look at the code: +让我们看一下代码: ```py import numpy as np @@ -63,7 +63,7 @@ cv2.waitKey(0) ## 说明 -First we load both the source image and template image with imread().  We resize themand convert them to grayscale for faster detection: +首先,我们使用`imread()`加载源图像和模板图像。我们调整它们的大小并将其转换为灰度以便更快地进行检测: ```py @@ -80,7 +80,7 @@ templateGray = cv2.cvtColor(template, cv2.COLOR_BGR2GRAY) ![Template Matching](img/671697da89293504fef04cfadad29c6b.jpg) -Pick the right statistical method for your application. TM_CCOEFF (right), TM_SQDIFF(left) +为您的应用选择正确的统计方法。`TM_CCOEFF`(右),`TM_SQDIFF`(左) 此方法具有六个匹配方法:CV_TM_SQDIFF,CV_TM_SQDIFF_NORMED,CV_TM_CCORR,CV_TM_CCORR_NORMED,CV_TM_CCOEFF 和 CV_TM_CCOEFF_NORMED。 这是完全不同的[统计比较方法](https://docs.opencv.org/modules/imgproc/doc/object_detection.html?highlight=matchtemplate#matchtemplate) @@ -89,7 +89,7 @@ Pick the right statistical method for your application. TM_CCOEFF (right), TM_SQ ## 局限性 -Template matching is not scale invariant nor is it rotation invariant. It is a very basic and straightforward method where we find the most correlating area. Thus, this method of object detection depends on the kind of application you want to build. For non scale and rotation changing input, this method works great. +模板匹配不是比例不变的,也不是旋转不变的。 这是一种非常基本和直接的方法,可在其中找到最相关的区域。 因此,这种对象检测方法取决于您要构建的应用程序的类型。 对于非比例和旋转变化的输入,此方法效果很好。 您可能会喜欢:[机器人技术](https://pythonspot.com/robotics)或[具有级联](https://pythonspot.com/car-tracking-with-cascades/)的汽车跟踪。 diff --git a/docs/104.md b/docs/104.md index 7c7c33f6f77c2f62f986e4a0750799dad500a9b4..a3e56c6b61c6e0a3ad5dc6be9c7c702ee1a2fba7 100644 --- a/docs/104.md +++ b/docs/104.md @@ -3,7 +3,7 @@ > 原文: [https://pythonspot.com/netflix-like-thumbnails-with-python/](https://pythonspot.com/netflix-like-thumbnails-with-python/) 受 [Netflix](https://techblog.netflix.com/2016/03/extracting-image-metadata-at-scale.html) 的启发,我们决定实施对焦点算法。 如果您在移动网站上使用生成的缩略图,则可能会增加 YouTube 视频的点击率(CTR)。 -Eiterway,这是一个有趣的实验。 +无论如何,这是一个有趣的实验。 ## 焦点 diff --git a/docs/106.md b/docs/106.md index e66c704796d07651af637374e64140021a279d0a..f0d4d60f97920635e1752b7d520d152b4a8e6eb5 100644 --- a/docs/106.md +++ b/docs/106.md @@ -11,11 +11,11 @@ ![python-text-game](img/e700a43a387c917fef1acdb35ac275a0.jpg) -Simple text game with Python +使用 Python 的简单文字游戏 ## 随机数 -The user will be asked to guess the random number. We first pick the random number: +将要求用户猜测随机数。 我们首先选择随机数: ```py from random import randint @@ -42,7 +42,7 @@ while guess != x: ## Python 猜测游戏 -The code below starts the game: +下面的代码开始游戏: ```py from random import randint diff --git a/docs/108.md b/docs/108.md index 2ea3f0d08db636cd27d27d24feff0b3e26108c20..1d56aec875d7d1388bb7bec0123d21c49b94498c 100644 --- a/docs/108.md +++ b/docs/108.md @@ -137,9 +137,9 @@ if __name__ == "__main__" : 现在,您可以使用箭头键在屏幕上移动该块。 - ### 识别语音 -Speech recognition can by done using the Python SpeechRecognition module. We make use of the [Google Speech API](https://pythonspot.com/speech-recognition-using-google-speech-api/ "Google Speech Recognition in Python") because of it’s great quality. +可以使用 Python 语音识别模块完成语音识别。我们使用 [Google Speech API](https://pythonspot.com/speech-recognition-using-google-speech-api/),因为它的质量很高。 ### 以语音回答(文字转语音) -Various [**APIs and programs are available for text to speech applications**](https://pythonspot.com/speech-engines-with-python-tutorial/ "TTS"). Espeak and pyttsx work out of the box but sound very robotic. We decided to go with the Google Text To Speech API, gTTS. +各种 [**API 和程序可用于文本到语音的应用程序**](https://pythonspot.com/speech-engines-with-python-tutorial/)。Espeak 和 pyttsx 开箱即用,但听起来很机器人。我们决定使用 Google 文字到语音 API gTTS。 ```py @@ -44,11 +44,11 @@ os.system("mpg321 hello.mp3") ``` -[<picture><source srcset="/wp-content/uploads/2015/07/gtts.png.webp" type="image/webp"> <source srcset="/wp-content/uploads/2015/07/gtts.png" type="image/jpeg"> ![gtts](img/538e4461fb4b4cc380ce7b29759028f8.jpg)</picture> ](/wp-content/uploads/2015/07/gtts.png) +![gtts](img/538e4461fb4b4cc380ce7b29759028f8.jpg) ### 完整程序 -The program below will answer spoken questions. +下面的程序将回答口头问题。 ```py