フィルターのクリア

how can live tracking be done using blobAnalysis by applying color thresholds after changing few properties of the video acquisition ? kindly correct my code where ever u think its senseless or wrong..thank u

1 回表示 (過去 30 日間)
vid = videoinput('winvideo', 1, 'YUY2_640x360');
src = getselectedsource(vid);
vid.FramesPerTrigger = 15;
src.Brightness = 65;
src.Contrast = 3;
src.Exposure = -7;
vid.ReturnedColorspace = 'rgb';
src.FocusMode = 'manual';
src.FrameRate = '15.0000';
hblob = vision.BlobAnalysis('AreaOutputPort', false,'CentroidOutputPort', true, 'BoundingBoxOutputPort', true','MinimumBlobArea',10);
videoPlayer = vision.VideoPlayer('Name', 'bot motion');
nframe=0;
while (nframe <1000)
frame =getsnapshot(vid);
red=frame(:,:,1);
green=frame(:,:,2);
blue=frame(:,:,3);
f=red>=0.5607 & red<=0.9333 & green>=0.2078 & green<=0.7098 & blue>=0.2509 & blue<=0.8215;
diff= medfilt2(f,[3 3]);
g=bwlabel(diff,4);
[Centroid, bbox] = step(hblob,diff);
Centroid = uint16(Centroid);
result = insertShape(frame, 'Rectangle', bbox, 'Color', 'green');
for object = 1:1:length(bbox(:,1))
X = Centroid(object,1);
Y =Centroid(object,2);
X
Y
end
step(videoPlayer, result);
nframe=nframe+1;
end
release(videoPlayer);
release(vid);

採用された回答

Image Analyst
Image Analyst 2016 年 11 月 16 日
Here's a recent paper on tracking moving objects in live video: http://electronicimaging.spiedigitallibrary.org/article.aspx?articleid=2583607
  3 件のコメント
Image Analyst
Image Analyst 2016 年 11 月 18 日
See my attached demo where I track the green on a Sharpie marker. It might help you.

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

その他の回答 (1 件)

JENNIFER JACOB
JENNIFER JACOB 2016 年 11 月 23 日
what is the significance of Median filter for video processing apart from noise removal and edge preservation? there are many other filters ...so why it is always Median filter?
  1 件のコメント
Image Analyst
Image Analyst 2016 年 11 月 23 日
It's very simple and well known, and probably faster than other methods that may perhaps be better but slower and more complicated.

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

カテゴリ

Help Center および File ExchangeComputer Vision Toolbox についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by