Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

which order scipy.misc.imread reads the color images?

I am using python and for reading the image I am using the following method

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?

thanks

like image 541
Shan Avatar asked Dec 11 '25 05:12

Shan


1 Answers

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):

enter image description here

Now check it with the following snippet:

>>> from scipy.misc import imread
>>> img = imread("foo.jpg")
>>> img[0,0,:]
 [ 75 125 255]
like image 90
jabaldonedo Avatar answered Dec 13 '25 17:12

jabaldonedo