The function cvAvgSdv calculates the average value and standard deviation of array elements, independently for each channel


If the array is IplImage and COI is set, the function processes the selected channel only and stores the average and standard deviation to the first compoenents of output scalars (M0 and S0).