Skip to content

Commit 4511189

Browse files
committed
颜色转换
1 parent 557778e commit 4511189

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

ch04-图片/颜色转换.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# -*- coding: utf-8 -*-
2+
# @Time : 2018/1/20 17:15
3+
# @Author : play4fun
4+
# @File : 颜色转换.py
5+
# @Software: PyCharm
6+
7+
"""
8+
颜色转换.py:
9+
"""
10+
import cv2
11+
12+
13+
gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)
14+
15+
16+
temp = cv2.cvtColor(gray, cv2.COLOR_GRAY2BGR)#灰色转RGB

0 commit comments

Comments
 (0)