Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Urgent help needed

Status
Not open for further replies.

scout_54

New Member
I'm trying to filter off little black spots on my processed image after blob formation. I got some help and came up with this but it doesnt work. Please help as it is quite urgent. My image is "map".
COdes:

% Thresholding
map = DM > 5;

% Form blobs
ccamap = bwlabel(map);
maxlabel = max(max(ccamap));
bufmap = zeros(ImgHeight,ImgWidth);

% Remove small regions
newlabel=1;
for i=1:maxlabel
fInd=[]; fInd = find(ccamap==i);
sizeregion = length(fInd);
if sizeregion>500
bufmap(fInd) = newlabel;
newlabel = newlabel+1;
end
end

ccamap = bufmap;
imshow(ccamap);
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top