How can I detect objects and distinguish them from each other?

They can be in different colors, or maybe it's better to distinguish them bye edge detection, or some thing else which I need you help me to use a suitable method. Purpose is to detect objects and find their movement if exist and estimate their direction and velocity. Thank you

 採用された回答

Image Analyst
Image Analyst 2013 年 12 月 14 日

0 投票

Please try out my image segmentation demos and color segmentation demos: http://www.mathworks.com/matlabcentral/fileexchange/?term=authorid%3A31862
To do object tracking across different images or video frames, you can use the Computer Vision System Toolbox

4 件のコメント

roudabe
roudabe 2013 年 12 月 14 日
Demos was useful, and I detect objects by their colors. Now I need to found the objects which are moving! and their direction and velocity. You mean I should tracking them? Consider that it is part of my project and should contain minimum computation, and takes least possible time.
Image Analyst
Image Analyst 2013 年 12 月 14 日
There are several tracking projects on the File Exchange that track things like laser spots or color balls. Take a look at those.
roudabe
roudabe 2013 年 12 月 21 日
編集済み: roudabe 2013 年 12 月 22 日
Hi, I used regionprops with properties : PixelList to have a set of region pixels, but now I need the pixel list of region for every frame!!! What should I do in for loop?
xyloObj = VideoReader('vid.avi');
nFrames = xyloObj.NumberOfFrames;
vidHeight = xyloObj.Height;
vidWidth = xyloObj.Width;
mov(1:nFrames) = ...
struct('cdata', zeros(vidHeight, vidWidth, 3, 'uint8'),...
'colormap', []);
for k = 1 : nFrames
mov(k).cdata = read(xyloObj, k);
s = regionprops(mov(k).cdata,'PixelList');
region=s.PixelList;
imshow(mov(k).cdata)
end
Image Analyst
Image Analyst 2013 年 12 月 21 日
s is structure array, you need to index it, like s(k).PixelList. A single frame might have 2 or 10 different regions so you need an index. But then after you (attempt to) get it, you aren't doing anything with it.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeConvert Image Type についてさらに検索

質問済み:

2013 年 12 月 14 日

編集済み:

2013 年 12 月 22 日

Community Treasure Hunt

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

Start Hunting!

Translated by