Image.meanColor RGB? or BGR?

asked 2012-08-31 22:33:28 -0500

Jeffrey gravatar image

updated 2012-09-01 03:55:24 -0500

My simplecv version is 1.3.0. My OS is Mac OS mountain tiger. When I follow examples from simpleCV book. I found some strange thing in chapter 5. The output of meanColor looks like BGR not RGB. Did anyone find similar problems? is it a kind of bug or my fault?

....

SimpleCV:43> [r, g, b] = only_car.splitChannels()

SimpleCV:47> only_car.meanColor()
SimpleCV:47: (4.482825, 18.878725, 25.601725000000002)

SimpleCV:48> b.meanColor()
SimpleCV:48: (4.482825, 4.482825, 4.482825)

SimpleCV:49> g.meanColor()
SimpleCV:49: (18.878725, 18.878725, 18.878725)

SimpleCV:51> r.meanColor()
SimpleCV:51: (25.601725000000002, 25.601725000000002, 25.601725000000002)
edit retag flag offensive close merge delete

Comments

Thanks Jay. But I think there are some problem in consistency. when I call, splitChannels it returns r, g, b regardless of its colorspace. Also the example image and code in the book does not include this information.

Jeffrey gravatar imageJeffrey ( 2012-09-01 04:06:52 -0500 )edit

Anyway, the reference of simplecv describe that the oder of colorspace is mostly BGR. ^_^

Jeffrey gravatar imageJeffrey ( 2012-09-01 04:17:17 -0500 )edit

Oh god. We have gone back and forth on this issue like ten times. The color order should be the order of the channels in the image. Which by default is BGR. This may belong on the book errata.

kscottz gravatar imagekscottz ( 2012-09-04 10:19:43 -0500 )edit