필터 지우기
필터 지우기

Image segmentation

조회 수: 3 (최근 30일)
venkat vasu
venkat vasu 2012년 6월 2일
Hi... I am beginner in image processing. i want to segment the grayscale image Histogram normalization Based Segmentation Mode Delineation. i have given the code blow. please tell me guys how to segment the image mode delineation.
a=imread('14.jpg');
if size(a,3)==3
a1=rgb2gray(a);
end
% figure,imshow(a);
% contour(a)
[r c d]=size(a);
% a(a==0)=1;
% a(a==255)=254;
a=im2double(a1);
b1=imhist(a);
figure,plot(b1);
[x y]=size(b1);
k=1;
for i=1:y
for j=2:x
n(i,j)=b1(j,i)-b1(j-1,i);
k=k+1;
end
end
figure,plot(n);
% [f,x] = imhist(a);
% % % subplot(2, 2, 1);
% figure, plot(bins,counts);
%
% Normalize one way - by the max count height
% y=(x-min(min(x)))/(max(max(x))-min(min(x)));
% figure,plot(y);
normCount1 =abs( n/max(n));%/sum(n);
normCount1=smooth(normCount1);
% % subplot(2, 2, 2);
figure,plot(normCount1);
[B, A] = butter(2, 0.25, 'low');
filtered =filtfilt(B, A,normCount1);
J=a1;
figure,plot(filtered);
thank's in advance...

채택된 답변

Image Analyst
Image Analyst 2012년 6월 2일
I don't know what this means: "segment the grayscale image Histogram normalization Based Segmentation Mode Delineation" Do you mean using that method? And is that some special method someone published? How is b1 a 2D array? Isn't it just the pixel counts for your image, and so it's a 1D array? Where did you post your image (so we can see it)?
  댓글 수: 3
Image Analyst
Image Analyst 2012년 6월 4일
I don't know what to say other than to step through the code one line at a time trying to understand what it's doing.
venkat vasu
venkat vasu 2012년 6월 6일
than you so much i gone through the example and i got the solution.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Images에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by