Is there an OpenCV function that can convert a 3 channel Mat to std::vector<Vec3b> (or std::vector<Scalar>)? Ie, convert an image just to an array of its colour pixels.
I'm not concerned about preserving/maintaining colour/pixel order. I want the colours over one dimension so I can find colour clusters (identify the most common HSV/colours in an image).