简体   繁体   English

哪个命令scipy.misc.imread读取彩色图像?

[英]which order scipy.misc.imread reads the color images?

I am using python and for reading the image I am using the following method 我正在使用python和阅读图像我使用以下方法

scipy.misc.imread

I am wondering what is the order of color with respect to axis, is it RGB or BGR or any other order? 我想知道相对于轴的颜色顺序是什么,是RGB or BGR或任何其他顺序?

thanks 谢谢

It is RGB but just to prove it (you can do it yourself easily), first I create an image using a paint tool such as photoshop of solid color (R=75, G=125, B=255): 这是RGB但只是为了证明它(你可以自己轻松地做到),首先我使用绘画工具创建一个图像,如纯色的Photoshop(R = 75,G = 125,B = 255):

在此输入图像描述

Now check it with the following snippet: 现在使用以下代码片段进行检查:

>>> from scipy.misc import imread
>>> img = imread("foo.jpg")
>>> img[0,0,:]
 [ 75 125 255]

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM