RGB通道可视化 |
您所在的位置:网站首页 › lsb板材是什么基材 › RGB通道可视化 |
一、实验介绍
1. 实验内容
本实验将介绍RGB色彩空间。 2. 实验要点RGB通道 3. 实验环境Python 3.6.6 matplotlib 二、实验步骤导入资源 import matplotlib.pyplot as plt import matplotlib.image as mpimg %matplotlib inline image = mpimg.imread('wa_state_highway.jpg') plt.imshow(image)RGB通道 可视化每个颜色通道的级别。 注意交通标志! # 隔离RGB通道 r = image[:,:,0] g = image[:,:,1] b = image[:,:,2] # 可视化各个颜色通道 f, (ax1, ax2, ax3) = plt.subplots(1, 3, figsize=(20,10)) ax1.set_title('R channel') ax1.imshow(r, cmap='gray') ax2.set_title('G channel') ax2.imshow(g, cmap='gray') ax3.set_title('B channel') ax3.imshow(b, cmap='gray') ## 哪个区域的红色值最低? 蓝呢? 三、实验任务 讨论 请仔细思考,上述图片哪个区域的红色值最低? 蓝呢?离我们最近的小车红色最低,小车上面的警示牌蓝色最低。一般在一个通道下,其颜色越浅说明其通道值越高。 |
今日新闻 |
推荐新闻 |
CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3 |