필터 지우기
필터 지우기

Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

I need region based segmentation code urgently

조회 수: 1 (최근 30일)
komal kella
komal kella 2017년 7월 12일
마감: Walter Roberson 2017년 7월 12일
% Demo of "Region Based Active Contours" % % Example: % seg_demo % % Coded by: Shawn Lankton (www.shawnlankton.com)
I = imread('ex.jpg'); %-- load the image m = zeros(size(I,1),size(I,2)); %-- create initial mask m(111:222,123:234) = 1; % m(333:444,345:234) = 1;
I = imresize(I,.5); %-- make image smaller m = imresize(m,.5); % for fast computation
subplot(2,2,1); imshow(I); title('Input Image'); subplot(2,2,2); imshow(m); title('Initialization'); subplot(2,2,3); title('Segmentation');
seg = region_seg(I, m, 150); %-- Run segmentation
subplot(2,2,4); imshow(seg); title('Global Region-Based Segmentation');
n=size(m);
M=n(1);
N=n(2);
MSE = sum(sum((m-seg).^2))/(M*N);
PSNR = 10*log10(256*256/MSE);
fprintf('\nMSE: %7.2f ', MSE);
fprintf('\nPSNR: %9.7f dB', PSNR);

답변 (0개)

이 질문은 마감되었습니다.

Community Treasure Hunt

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

Start Hunting!

Translated by