Why would cv2.COLOR_RGB2GRAY and cv2.COLOR_BGR2GRAY give different results?

RGB->gray conversion actually isn’t an average — different channels are weighed differently. Specifically: This is also mentioned in the documentation. Thus, it’s expected that RGB2GRAY and BGR2GRAY give different results. Regarding the discrepancy between sum-then-divide and divide-then-sum approaches, i.e. between and Recall that cv2.imread returns a uint8 numpy array. Thus, the latter operation (where all channels are combined … Read more