Skip to content

Commit acc160f

Browse files
authored
Create blog21-image01.py
1 parent 3f2df65 commit acc160f

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

blog21-pyrDown/blog21-image01.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# -*- coding: utf-8 -*-
2+
import cv2
3+
import numpy as np
4+
import matplotlib.pyplot as plt
5+
6+
#读取原始图像
7+
img = cv2.imread('people.png')
8+
9+
#图像向下取样
10+
r = cv2.pyrDown(img)
11+
12+
#显示图像
13+
cv2.imshow('original', img)
14+
cv2.imshow('PyrDown', r)
15+
cv2.waitKey()
16+
cv2.destroyAllWindows()

0 commit comments

Comments
 (0)