overlapped objects counting in matlab

hi. i m working on a project which is related to digital image processing but i can't count the overlapped objects it take multiple overlapped objects as one object. please tell me which method i can use for this problem.... and overlapped objects may be two or more than two..... so please tell me that method which is suitable for this......
best regards FAISAL SALEH KHATTAK

댓글 수: 3

FAISAL
FAISAL 2012년 3월 5일
please don't refer me watershed method and otsu algorithm. i have already worked on them. These are not suitable for more than two overlapping objects. please help me out of this.
Laurens Bakker
Laurens Bakker 2012년 3월 7일
Just a second... Do you have multiple images, or just one?
FAISAL
FAISAL 2012년 4월 8일
i have one image in which there are lot small objects and noise and objects are overlapped fully and somewhere object is also overlapped with noise and the overlapped objects are more than two...... i have work a lot on it i can't make it.... if you have any idea about that please help me out....
thanks in advance...

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

답변 (2개)

Laurens Bakker
Laurens Bakker 2012년 3월 7일

0 개 추천

Hi Faisal,
I'm not sure if MATLAB is the right tool for this. Take a look at http://boost-geometry.203548.n3.nabble.com/intersection-of-two-vectors-of-polygons-td2875513.html
Cheers,
Laurens
Image Analyst
Image Analyst 2012년 4월 8일

0 개 추천

If you can't use watershed or similar object splitting methods, then you can try some shaped based methods if you know something about the shape but they will be complicated. For example, you know that all your shapes are hexagons or something. But let's say that you have discs. Now let's say you want to know how many discs (let's say DVD or CD discs) are overlapping in a stack of 50 of them. All you have is an overhead photo of the 50 disc stack. How are you going to know how many discs are in the stack? You can't because they're hidden from view.

댓글 수: 11

FAISAL
FAISAL 2012년 4월 8일
all objects have different size and shape that's why you can't specify one shape.
Md Hafizur Rahman
Md Hafizur Rahman 2020년 2월 11일
If I know that there are 50 discs in the image. How can I count these?
Md, segment them, then call bwareafilt() on the binary image:
mask = bwareafilt(mask, 50); % Extract the 50 largest blobs only.
Md Hafizur Rahman
Md Hafizur Rahman 2020년 2월 12일
편집: Image Analyst 2020년 2월 12일
Thank you for your kind information. I tried that but for my image, that isn't worked.
Here my image link
0000 Screenshot.png
I want to count all objects [ the red circle] from the image. How can I do that?
Image Analyst
Image Analyst 2020년 2월 12일
Md, that's the gray scale image. bwareafilt() only works on the segmented image. You forgot to attach that. Let's see your binary image.
0000 Screenshot.png
Md Hafizur Rahman
Md Hafizur Rahman 2020년 2월 12일
편집: Md Hafizur Rahman 2020년 2월 12일
I have this image. Can I count every objects from the image? Is there any methods to determine the number of the objects?
Walter Roberson
Walter Roberson 2020년 2월 12일
I, as a human, cannot count every object in that image, so I doubt that a computer could do so. Not without a strict definition of what an "object" is for this purpose.
Md Hafizur Rahman
Md Hafizur Rahman 2020년 2월 13일
I know it's quite hard to count all objects- rod-shaped bacteria. At least, I need to count as much as possible the bacteria from the image. Can I do that by using any methods?
Walter Roberson
Walter Roberson 2020년 2월 13일
Often you would start by using a binary threshold on the grayscale image. Image Analyst asked you to show the result of using the binary threshold.
Md Hafizur Rahman
Md Hafizur Rahman 2020년 2월 13일
편집: Md Hafizur Rahman 2020년 2월 13일
The Main Code
A = imread('1_03.png');
figure(1)
imshow(A)
I = rgb2gray(A);
I = adapthisteq(I);
I = wiener2(I, [3 3]);
bw = im2bw(I, graythresh(I));
bw2 = imfill(bw,'holes');
bw3 = imopen(bw2, strel('disk',1));
bw4 = bwareaopen(bw3, 500);
L = bwlabel(bw4);
s = regionprops(L, 'Centroid');
figure(9)
imshow(bw4)
for k = 1:numel(s)
c = s(k).Centroid;
text(c(1), c(2), sprintf('%d', k), 'Color', 'r', ...
'HorizontalAlignment', 'center', ...
'VerticalAlignment', 'middle');
end
bw4_perim = bwperim(bw4);
overlay1 = imoverlay(I, bw4_perim, [1 .3 .3]);
figure(11)
imshow(overlay1)
Output of the code: (Please see the attachment)
The first image is input image the second image is output image
Image Analyst
Image Analyst 2020년 2월 13일
I just don't see how all the bacteria can be automatically identified in this. Even we as humans won't necessarily get the "correct" answer. I'd suggest you just call drawpoint() in a loop to have the user keep dropping down points until he's dropped a point on every single bacteria.

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

질문:

2012년 3월 5일

댓글:

2020년 2월 13일

Community Treasure Hunt

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

Start Hunting!

Translated by