未验证 提交 97b500d8 编写于 作者: 飞龙 提交者: GitHub

Merge pull request #16 from fastislow/patch-1

Update 8.自动化特征提取器:图像特征提取和深度学习.md
......@@ -62,8 +62,8 @@ SIFT最初是为对象识别的任务而开发的,它不仅涉及将图像正
```python
import matplotlib.pyplot as plt
import numpy as np from skimage
import data, color
import numpy as np
from skimage import data, color
# Load the example image and turn it into grayscale
image = color.rgb2gray(data.chelsea())
......@@ -78,8 +78,10 @@ gx[:, -1] = 0
gx[:, 1:-1] = image[:, :-2] - image[:, 2:]
# Same deal for the vertical gradient
gy = np.empty(image.shape, dtype=np.double) gy[0, :] = 0
gy[-1, :] = 0 gy[1:-1, :] = image[:-2, :] - image[2:, :]
gy = np.empty(image.shape, dtype=np.double)
gy[0, :] = 0
gy[-1, :] = 0
gy[1:-1, :] = image[:-2, :] - image[2:, :]
# Matplotlib incantations
fig, (ax1, ax2, ax3) = plt.subplots(3, 1,figsize=(5, 9),sharex=True,sharey=True)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册