OTSU Gray-level image segmentation using Otsu s method.
Iseg = OTSU(I,n) computes a segmented image (Iseg) containing n classes
by means of Otsu s n-thresholding method (Otsu N, A Threshold Selection
Method from Gray-Level Histograms, IEEE Trans. Syst. Man Cybern.
9:62-66 1979). Thresholds are computed to maximize a separability
criterion of the resultant classes in gray levels.
OTSU(I) is equivalent to OTSU(I,2). By default, n=2 and the
corresponding Iseg is therefore a binary image. The pixel values for
Iseg are [0 1] if n=2, [0 0.5 1] if n=3, [0 0.333 0.666 1] if n=4, ...
[Iseg,sep] = OTSU(I,n) returns the value (sep) of the separability
criterion within the range [0 1]. Zero is obtained only with images
having less than n gray level, whereas one (optimal value) is obtained
only with n-valued images.
標簽:
OTSU
segmentation
Gray-level
segmented
上傳時間:
2017-04-24
上傳用戶:yuzsu
#include<stdio.h>
void main(void)
{int n,k,derivata,a[10],i
printf("n=") scanf(" d",&n)
for(i=0 i<=n i++)
{ printf("a[ d]=",i) scanf(" d",&a[i])
}
printf("k=") scanf(" d",&k)
for(derivata=1 derivata<=k derivata++)
{
for(i=0 i<=n i++)
a[i]=a[i]*(n-i)
n--
for(i=0 i<=n i++)
printf(" d ",a[i])
printf("\n")
}}
標簽:
void
derivata
include
printf
上傳時間:
2017-09-17
上傳用戶:duoshen1989