Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

2
  • 1
    what is mean? which header? which namesmace? please put the used namespaces when you use such non standard functions. Commented Apr 17, 2020 at 13:15
  • 1
    The problem is not that "the image is 2D" but that an image can have multiple color planes (B,G,R normally for color images in openCV) and the mean value is taken per color plane giving you one value per color plane hence the Scalar. Your solution gives you the average of the blue portion of the image (unless that is a grayscale image). Commented Mar 24, 2021 at 6:01