You have no items in your shopping cart.

Subtotal:Rs.0.00
Matlab Tips and Tracks

Matlab Code to Plot BLOB in a Binary Image

matlab-code-to-plot-blob-in-a-binary-image

clc;
clear;
close all;
%Read Input Image
BW = imread(‘TestImage.jpg’);

%Convert Image to Binary
BW=im2bw(BW);

% Trace region boundaries in a binary image.
[B,L,N,A] = bwboundaries(BW);

%Display Images
imshow(BW); hold on;

for k=1:length(B),

if(~sum(A(k,:)))

boundary = B{k};

plot(boundary(:,2), boundary(:,1), ‘r’,’LineWidth’,2);

for l=find(A(:,k))’

boundary = B{l};

plot(boundary(:,2), boundary(:,1), ‘g’,’LineWidth’,2);

end

end

end

matlab-code-for-blob-segmentation
Tags : Matlab Code to Plot BLOB in a Binary Image
Pantech

The author Pantech