Function in OpenCV to find mean / avg over any one dimension (rows/cols) simultaneously

Viewed 8755

I know that there are Opencv functions mean() for c++ and cvAvg for C , which find average of an image for all channels. I need to find average / mean of all channels of an image in just one direction i.e. mean over all columns (result:a single row vector) and mean over all rows (result:single column vector). Is there any function or efficient method (probably without splitting the channels or using for loop) to do so ?

1 Answers
Related