![]() | ![]() | ![]() |
| | |||||||
| Electronic Projects Design/Ideas/Reviews Are you building an electronic project or want to? Maybe you need some assistance? Come and submit your electronic questions here and let our experienced members find a solution. |
| | LinkBack | Thread Tools | Display Modes |
| | (permalink) |
| 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); | |
| |