Image segmentation using Otsu thresholding

버전 1.4.0.0 (3.53 KB) 작성자: Damien Garcia
OTSU(I,N) segments the image I into N classes by means of Otsu's N-thresholding method.
다운로드 수: 20.1K
업데이트 날짜: 2010/3/10

라이선스 보기

IDX = OTSU(I,N) segments the image I into N classes by means of Otsu's N-thresholding method. OTSU returns an array IDX containing the cluster indices (from 1 to N) of each point.

IDX = OTSU(I) uses two classes (N=2, default value).

[IDX,sep] = OTSU(I,N) also returns the value (sep) of the separability criterion within the range [0 1]. Zero is obtained only with data having less than N values, whereas one (optimal value) is obtained only with N-valued arrays.

If I is an RGB image, a Karhunen-Loeve transform is first performed on the three R,G,B channels. The segmentation is then carried out on the image component that contains most of the energy.

Example:
---------
load clown
subplot(221)
X = ind2gray(X,map);
imshow(X)
title('Original','FontWeight','bold')
for n = 2:4
IDX = otsu(X,n);
subplot(2,2,n)
imagesc(IDX), axis image off
title(['n = ' int2str(n)],'FontWeight','bold')
end

------
See also:
http://www.biomecardio.com/matlab/otsu.html
-----

인용 양식

Damien Garcia (2024). Image segmentation using Otsu thresholding (https://www.mathworks.com/matlabcentral/fileexchange/26532-image-segmentation-using-otsu-thresholding), MATLAB Central File Exchange. 검색됨 .

MATLAB 릴리스 호환 정보
개발 환경: R2007b
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
버전 게시됨 릴리스 정보
1.4.0.0

Minor modifications

1.3.0.0

The segmentation for RGB image has been improved: a KLT is performed and we keep the component of highest energy.

1.2.0.0

RGB images are now analyzed in the gray, R, G and B scales.

1.1.0.0

New screenshot.

1.0.0.0