Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Blob creation and labeling on detected foreground object in MATLAB

Status
Not open for further replies.

anand_jha_30

Member level 2
Joined
Oct 29, 2010
Messages
50
Helped
2
Reputation
4
Reaction score
2
Trophy points
1,288
Activity points
1,616
I developed a code in in MATLAB to detect the motion. I am getting the foreground objects i.e. the objects that are moving in the field. Now I want to create a blob around each detected objects. Also I have to index them with numerals and find the centroid. Please guide me or give me some links :)
 

Kindly go thru the code


clc;
clear;
close all;
InputImage=imread('eight.tif');
subplot(2,2,1);
imshow(InputImage);title('InputImage');
BinaryImage=im2bw(InputImage);
subplot(2,2,2);
imshow(BinaryImage);
ComplementImage=imcomplement(BinaryImage);
subplot(2,2,3);
imshow(ComplementImage);
HolesClearedImage = imfill(ComplementImage,'holes');
subplot(2,2,4);
imshow(HolesClearedImage);title('HolesClearedImage');
[L,Num] = bwlabel(HolesClearedImage)

for i=1:Num
figure;
imshow(L==i);
pause(1)
end


You can also go thru the presentation

Getting started with image processing using Matlab
 
Thanks for your reply but I know this concept. I just want to create a blob (rectangle) around the detected object with an index as well.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top