<< cv_threshold_gaussian ComputerVision cv_tophat >>

ComputerVision >> ComputerVision > cv_threshold_mean

cv_threshold_mean

To provide mean thresholding to an image

Calling Sequence

img_ret=cv_threshold_mean(image,threshold,Block,C)

Arguments

image

Input Image.

It should be grayscale, It will be copy/converted to grayscale image If rgb image is given
threshold

It is the threshold value which is used to classify the pixel values. It should be Integer

Block

It decides the size of neighbourhood area. It should be an odd integer and greater than 2

C

It is just a constant which is subtracted from the mean or weighted mean calculated.Must be an integer.

img_ret

Output Image

Description

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

Examples

img_ret=cv_threshold_mean(input_image,200,101,5)

See Also


Report an issue
<< cv_threshold_gaussian ComputerVision cv_tophat >>