3

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

4

1 に答える 1

5

RGB ですが、それを証明するために (自分で簡単に作成できます)、最初に Photoshop などのペイント ツールを使用して単色 (R=75、G=125、B=255) の画像を作成します。

ここに画像の説明を入力

次のスニペットで確認してください。

>>> from scipy.misc import imread
>>> img = imread("foo.jpg")
>>> img[0,0,:]
 [ 75 125 255]
于 2013-09-10T09:45:32.987 に答える