圖像分割技術(shù)的matlab實(shí)現(xiàn)_第1頁
圖像分割技術(shù)的matlab實(shí)現(xiàn)_第2頁
圖像分割技術(shù)的matlab實(shí)現(xiàn)_第3頁
圖像分割技術(shù)的matlab實(shí)現(xiàn)_第4頁
圖像分割技術(shù)的matlab實(shí)現(xiàn)_第5頁
已閱讀5頁,還剩5頁未讀, 繼續(xù)免費(fèi)閱讀

下載本文檔

版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)

文檔簡(jiǎn)介

1、s and Settings/Administrator/桌面/代碼/第23章/代碼23-s and Settings/Administrator/桌面/代碼/第23章/代碼23-figure, imshow(f),title(Original figure,imshow(PF),title(Prewitt figure,imshow(RF),title(Roberts n of Gaussian (LoG) figure,imshow(CF),title(Canny s and Settings/Administrator/桌面/代碼/第23章/代碼23-1.txt2011-5-16 s a

2、nd Settings/Administrator/桌面/代碼/第23章/代s and Settings/Administrator/桌面/代碼/第23章/代碼23-% 使用垂直Sobel算子,自動(dòng)選擇閾VSFATfigure, imshow(f),title(Original figure,imshow(VSFAT),title(Sobel Filter - Automatic figure,imshow(SFST),title(Sobel Filter (Horizontal and Vertical); % 顯示邊緣探測(cè)圖像s45=-2 -1 0;-1 0 1;0 1 2;figure,

3、imshow(SFST45),title(SobelFilter(45sm45=0 1 2;-1 0 1;-2 -1 0;figure,imshow(SFSTM45),title(Sobel Filter (-45 s and Settings/Administrator/桌面/代碼/第23章/代碼23-2.txt2011-5-16 s and Settings/Administrator/桌面/代碼/第23章/代碼23-Is and Settings/Administrator/桌面/代碼/第23章/代碼23-I=rotI=e(I,33,crop); % 圖像旋轉(zhuǎn),該函數(shù)具體用法在本書13.

4、3.3有介紹fig1=BW=H,theta,rho = figure, imshow(imadjust(mat2gray(H),XData,theta,YData,rho,.% 設(shè)置顯示屬性 xlabel(theta(degrees),ylabel(rho); axis on, axis normal, hold on; P = houghpeaks(H,5,threshold,ceil(0.3*max(H(:); x = theta(P(:,2);y=s and Settings/Administrator/桌面/代碼/第23章/代碼23-3.txt2011-5-16 s and Setti

5、ngs/Administrator/桌面/代碼/第23章/代碼23-全局閾值 s and Settings/Administrator/桌面/代碼/第23章/代碼23-全局閾值 display(Threshold(T)-Iterative); figure,imshow(f),title(Original title(Global Thresholding - Iterative Method); % 圖像標(biāo)題display(Threshold(T) - Otsus Method); title(Global Thresholding - Otsus Method); display(Thre

6、shold(T) - Local Thresholding); s and Settings/Administrator/桌面/代碼/第23章/代碼23-4.txt2011-5-16 s and Settings/Administrator/桌面/代碼/第23章/代碼23-title(Original Image); title(Negative Image); title(Watershed - Distance s and Settings/Administrator/桌面/代碼/第23章/代碼23-title(Original Image); title(Negative Image);

7、 title(Watershed - Distance ed - Watershed and original sq=sqrt(imfilter(fd,h,replicate).2+imfilter(fd,h,replicate).2); % title(Watershed-Gradient); ed - Watershed and original title(Watershed-MarkerControlled); title(Watershed-GradientandMarkerControlled); ed - Watershed (GM) and original image);s

8、and Settings/Administrator/桌面/代碼/第23章/代碼23-5.txt2011-5-16 s and Settings/Administrator/桌面/代碼/第23章/代碼23-s and Settings/Administrator/桌面/代碼/第23章/代碼23-if numel(s)=1 for k=1:length(s1)gtitle(Segmented Image - Region Growing);s and Settings/Administrator/桌面/代碼/第23章/代碼23-6.txt2011-5-16 s and Settings/Admi

9、nistrator/桌面/代碼/第23章/s and Settings/Administrator/桌面/代碼/第23章/代碼23-I=8(11112361121456111177711116652022202212320222220547202220209124020222020131415Ss and Settings/Administrator/桌面/代碼/第23章/代碼23-7.txt2011-5-16 s and Settings/Administrator/桌面/代碼/第23章/代碼23-I=s and Settings/Administrator/桌面/代碼/第23章/代碼23-

10、I=Sblocks = fordim=512256128643216842numblocks=length(find(S=dim); if (numblocks 0)values=8(1),dimdimvalues(2:dim,2:dim,:) = blocks = blocks(end,1:end)=blocks(1:end,end)=1; figure, s and Settings/Administrator/桌面/代碼/第23章/代碼23-8.txt2011-5-16 s and Settings/Administrator/桌面/代碼/第23章/代碼23-he = imread(he

11、stain.png); Image courtesy of Alan Partin, Johns Hopkins University, . cform=ab = double(lab_he(:,:,2:3);nrowss and Settings/Administrator/桌面/代碼/第23章/代碼23-he = imread(hestain.png); Image courtesy of Alan Partin, Johns Hopkins University, . cform=ab = double(lab_he(:,:,2:3);nrows=size(ab,1); ncols=si

12、ze(ab,2);ab = resh nColors=3;% 重復(fù)聚類3次,以避免局部最小pixel_labels=ols); title(image labeled by cluster index); segmented_images = cell(1,3);rgb_label = repmat(pixel_labels,1 1 3); for k = 1:nColorscolor = he; color(rgb_label=k)=0;segmented_imagesk=color; title(objects in cluster 1); title(objects in cluster

13、 2); title(objects in cluster 3);mean_cluster_value = mean(cluster_center,2); tmp, idx = sort(mean_cluster_value); blue_cluster_num = idx(1);L=blue_idx = find(pixel_labels = blue_cluster_num); L_blue = L(blue_idx);is_light_blue=nuclei_labels=nuclei_labels(blue_idx(is_light_blue=false) = nuclei_labels = repmat(nuclei_labels,1 1 3); blue_nuclei = he;s and Settings/Administrator/桌面/代碼/第23

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。

評(píng)論

0/150

提交評(píng)論