To provide mean thresholding to an image
img_ret=cv_threshold_mean(image,threshold,Block,C)
Input Image.
![]() | It should be grayscale, It will be copy/converted to grayscale image If rgb image is given |
It is the threshold value which is used to classify the pixel values. It should be Integer
It decides the size of neighbourhood area. It should be an odd integer and greater than 2
It is just a constant which is subtracted from the mean or weighted mean calculated.Must be an integer.
Output Image
Provides Mean Thresholding
Simple Thresholding uses global value as threshold value.But it may not be good in all the conditions where image has different lighting conditions in different areas. In that case, we go for adaptive thresholding.Using this threshold we get different thresholds for different regions of the same image and it gives us better results for images with varying illumination