Skip to content

Commit f874303

Browse files
committed
Commit
1 parent 856fc91 commit f874303

11 files changed

Lines changed: 8 additions & 8 deletions
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
# -*- coding: utf-8 -*-
22
# @Time : 2017/7/19 上午10:52
3-
# @Author : play4fun
3+
# @Author : play4fun Edit by Anucha
44
# @File : cv2_imread_path_not_found.py
55
# @Software: PyCharm
66

77
"""
88
cv2_imread_path_not_found.py:
9-
"""
9+
"""
1010

1111
import cv2
1212
import numpy as np
1313
import os
1414
import errno
1515

16-
path = 'messi6.jpg'#不正确的路径,文件不存在
17-
# path = '../data/messi5.jpg'
16+
# path = 'messi5.jpg' #Incorrect Path
17+
path = 'data/messi5.jpg'
1818
if not os.path.exists(path):
1919
raise FileNotFoundError(errno.ENOENT, os.strerror(errno.ENOENT), path)
2020

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66

77
"""
88
show_image.py:
9-
制作有用的工具,日常使用
10-
在环境变量中设置:
9+
Make useful tools for daily use
10+
Set in environment variables:
1111
alias show='/Users/play/.py3/bin/python3.6 /Users/play/github/OpenCV-Python-Tutorial/ch04-图片/show_image.py '
1212
1313
"""
@@ -26,7 +26,7 @@
2626
print(e)
2727
sys.exit(-1)
2828

29-
img = cv2.imread(image_path, cv2.IMREAD_UNCHANGED) # 包括图像的 alpha 通道
29+
img = cv2.imread(image_path, cv2.IMREAD_UNCHANGED) # Include the alpha channel of the image
3030
temp = img.copy()
3131

3232
title = image_path.split('/')[-1] + f' {img.shape}'
@@ -38,7 +38,7 @@
3838
k = cv2.waitKey(10)
3939
if k == 27 or k == ord('q'):
4040
break
41-
#TODO 分辨率太大,需要缩放
41+
#TODO resolution is too large and needs to be scaled
4242
if k == ord('g'):
4343
# t = temp == img
4444
# if t.all():

0 commit comments

Comments
 (0)