필터 지우기
필터 지우기

Need help with my image processing about circle detection

조회 수: 2 (최근 30일)
john john
john john 2013년 1월 22일
I need help with an image processing problem? I am working on an egg counter...I would like to identify the white dots and then display how many white dots are present in the image. This is my code:
S = imread('29.jpg');
B = imcrop(S,[70 55 576 432]);
S2 = rgb2gray(B);
S3 = S2>180;
H = fspecial('unsharp');
I4 = imfilter(S3,H,'replicate');
se = strel('disk',11);
erodedBW = imerode(S3,se);
imshow(erodedBW)
Here are the original and filtered images:
  댓글 수: 2
Randy Souza
Randy Souza 2013년 1월 28일
I have restored the original text of this question.
john john, this question has a clear subject and an accepted answer, so it may be valuable to someone else in the future. If you have a good reason why it should be removed from MATLAB Answers, please flag the question, explain why it should be deleted, and an administrator or high-reputation contributor will consider deleting the question. Please do not simply edit your question away.
john john
john john 2013년 2월 1일
Hi Randy.. oh I'm very sorry for that i didnt meant too.. peace be with you..

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

채택된 답변

Thorsten
Thorsten 2013년 1월 22일
sigma = 5; % Gaussian smoothing, adapted to the size of the eggs
thres = 0.9; % binary threshold, adapted to the brightness of the eggs
G = rgb2gray(im2double(imread('eggs.jpg')));
B = im2bw(imfilter(G, fspecial('gaussian', sigma*3, sigma), 'replicate'), thres);
Bl = bwlabel(B);
Neggs = max(Bl(:))

추가 답변 (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