Thread Subject: isolate

Subject: isolate

From: huda nawaf

Date: 22 Jun, 2008 14:09:02

Message: 1 of 17

hi friends,

please, i need code for isolate object from background.

thanks

Subject: isolate

From: roberson@ibd.nrc-cnrc.gc.ca (Walter Roberson)

Date: 22 Jun, 2008 15:18:47

Message: 2 of 17

In article <g3lmdu$r2h$1@fred.mathworks.com>,
huda nawaf <halmamory@yahoo.com> wrote:

>please, i need code for isolate object from background.

You already have an existing thread on this topic,
"object and background", from June 14th.

The answer you were given there by ImageAnalyst appeared accurate
to me,

"Too many ways to list. An entire industry is based on this."

To which I would add,

  Your problem is too vague to be answerable. You have not defined what
  the characteristics of your "object" or of your "background". There
  is no POSSIBLE code to automatically tell you which is which.
  What is "background" to one person might be the primary portion of
  interest to another, *for the exact same image*. (Consider, for
  example, astronomical images, in which one person might be interested
  in the image of (say) an asteroid, whereas another person might be
  interested in analyzing the radiation fields in the remainder of
  the image.)


To answer the questions you posed at the end of the above-mentioned
thread: Did you TRY it?
--
  "Tired minds don't plan well. Sleep first, plan later."
                                              -- Walter Reisch

Subject: isolate

From: huda nawaf

Date: 22 Jun, 2008 16:09:02

Message: 3 of 17

roberson@ibd.nrc-cnrc.gc.ca (Walter Roberson) wrote in
message <g3lqgn$13g$1@canopus.cc.umanitoba.ca>...
> In article <g3lmdu$r2h$1@fred.mathworks.com>,
> huda nawaf <halmamory@yahoo.com> wrote:
>
> >please, i need code for isolate object from background.
>
> You already have an existing thread on this topic,
> "object and background", from June 14th.
>
> The answer you were given there by ImageAnalyst appeared
accurate
> to me,
>
> "Too many ways to list. An entire industry is based on
this."
>
> To which I would add,
>
> Your problem is too vague to be answerable. You have
not defined what
> the characteristics of your "object" or of
your "background". There
> is no POSSIBLE code to automatically tell you which is
which.
> What is "background" to one person might be the
primary portion of
> interest to another, *for the exact same image*.
(Consider, for
> example, astronomical images, in which one person
might be interested
> in the image of (say) an asteroid, whereas another
person might be
> interested in analyzing the radiation fields in the
remainder of
> the image.)
>
>
> To answer the questions you posed at the end of the
above-mentioned
> thread: Did you TRY it?
> --
> "Tired minds don't plan well. Sleep first, plan later."
> -- Walter
Reisch
 sure , I tried because i need that
i didn't understand this by image analyzing :

measurementStructure =3D regionprops(labeledImage);
> intensityThreshold =3D 200; % Use an appropriate value.
> foregroundImage =3D originalImage > intensityThreshold;
> labeledImage =3D bwlabel(foregroundImage);
> measurementStructure =3D regionprops(labeledImage);

is this code?

regarding the type of image are medical images (brain )
 i need just the brain without background

many thanks

Subject: isolate

From: roberson@ibd.nrc-cnrc.gc.ca (Walter Roberson)

Date: 22 Jun, 2008 16:31:30

Message: 4 of 17

In article <g3lteu$gr0$1@fred.mathworks.com>,
huda nawaf <halmamory@yahoo.com> wrote:

>i didn't understand this by image analyzing :

>> intensityThreshold =3D 200; % Use an appropriate value.
>> foregroundImage =3D originalImage > intensityThreshold;
>> labeledImage =3D bwlabel(foregroundImage);
>> measurementStructure =3D regionprops(labeledImage);

>is this code?

No. However, if you convert the quoted-printable encodings of
the equal signs from equals-sign number-three upper-case-dee to just
plain equals-sign, then Yes, that is code. I am not very familiar
with the image processing toolkit, but it appears to be valid code
to me, at least for grayscale images.


intensityThreshold = 200; % Use an appropriate value.
foregroundImage = originalImage > intensityThreshold;
labeledImage = bwlabel(foregroundImage);
measurementStructure = regionprops(labeledImage);
--
  "Prevention is the daughter of intelligence."
                                              -- Sir Walter Raleigh

Subject: isolate

From: Image Analyst

Date: 22 Jun, 2008 17:30:07

Message: 5 of 17

roberson@ibd.nrc-cnrc.gc.ca (Walter Roberson) wrote in
message <g3lup2$758$1@canopus.cc.umanitoba.ca>...
> In article <g3lteu$gr0$1@fred.mathworks.com>,
> huda nawaf <halmamory@yahoo.com> wrote:
>
> >i didn't understand this by image analyzing :
>
> >> intensityThreshold =3D 200; % Use an appropriate value.
> >> foregroundImage =3D originalImage > intensityThreshold;
> >> labeledImage =3D bwlabel(foregroundImage);
> >> measurementStructure =3D regionprops(labeledImage);
>
> >is this code?
>
> No. However, if you convert the quoted-printable
encodings of
> the equal signs from equals-sign number-three upper-case-
dee to just
> plain equals-sign, then Yes, that is code. I am not very
familiar
> with the image processing toolkit, but it appears to be
valid code
> to me, at least for grayscale images.
>
>
> intensityThreshold = 200; % Use an appropriate value.
> foregroundImage = originalImage > intensityThreshold;
> labeledImage = bwlabel(foregroundImage);
> measurementStructure = regionprops(labeledImage);
> --
> "Prevention is the daughter of intelligence."
> -- Sir
Walter Raleigh
-------------------------------------------------
huda nawaf :
You're using a news reader that's not smart enough to
recognize mime encoding so you get =3D instead of =. Try
using Google or one the the many newsreaders that can
understand mime (Mathworks is not one of them but for you
I'll post the code from my Mathworks account).
Take a look at the following code:
It's a very basic, elementary macro to find objects based
on intensity threshold and outline them and make some basic
measurements. Try it out if you have the image processing
toolbox, which you should if you're going to deal with
images.
Regards
ImageAnalyst

disp(' ');
disp('Running BlobsDemo.m...');
originalImage = imread('coins.png'); % Read in image
binaryImage = im2bw(originalImage, 0.4); % Threshold
to binary

subplot(3,2,1); imagesc(originalImage); colormap(gray
(256)); title('Original Image');
subplot(3,2,2); imagesc(binaryImage); colormap(gray(256));
title('Binary Image');

labeledImage = bwlabel(binaryImage, 8); % Label each
blob so can do calc on it
coloredLabels = label2rgb
(labeledImage, 'hsv', 'k', 'shuffle'); % pseudo random
color labels

subplot(3,2,3); imagesc(labeledImage); title('Labeled
Image');
subplot(3,2,4); imagesc(coloredLabels); title('Pseudo
colored labels');

blobMeasurements = regionprops(labeledImage, 'all'); %
Get all the blob properties.
numberOfBlobs = size(blobMeasurements, 1);

% bwboundaries returns a cell array, where each cell
% contains the row/column coordinates for an object in the
image.
% Plot the borders of all the coins on the original
% grayscale image using the coordinates returned by
bwboundaries.
subplot(3,2,5); imagesc(originalImage); title('Outlines');
hold on;
boundaries = bwboundaries(binaryImage);
for k = 1 : numberOfBlobs
thisBoundary = boundaries{k};
plot(thisBoundary(:,2), thisBoundary
(:,1), 'g', 'LineWidth', 2);
end
hold off;

fprintf(1,'Blob # Mean Intensity Area Perimeter
Centroid\n');
for k = 1 : numberOfBlobs % Loop through all
blobs.
% Find the mean of each blob. (R2008a has a better
way where you can pass the original image
% directly into regionprops. The way below works
for all versions including earlier versions.)
    thisBlobsPixels = blobMeasurements(k).PixelIdxList; %
Get list of pixels in current blob.
    meanGL = mean(originalImage
(thisBlobsPixels)); % Find mean intensity (in
original image!)
blobArea = blobMeasurements(k).Area; %
Get area.
blobPerimeter = blobMeasurements(k).Perimeter;
% Get perimeter.
blobCentroid = blobMeasurements(k).Centroid;
% Get centroid.
    fprintf(1,'#%d %18.1f %11.1f %8.1f %8.1f %8.1f\n', k,
meanGL, blobArea, blobPerimeter, blobCentroid);
end
msgbox('Finished running BlobsDemo.m. Check out the figure
window and the command window for the results.');
%-------------------------------------------------

Subject: isolate

From: roberson@ibd.nrc-cnrc.gc.ca (Walter Roberson)

Date: 22 Jun, 2008 17:35:34

Message: 6 of 17

In article <g3m26v$hlu$1@fred.mathworks.com>,
Image Analyst <imageanalyst@mailinator.com> wrote:

>huda nawaf :
>You're using a news reader that's not smart enough to
>recognize mime encoding so you get =3D instead of =.

Mime encoding is not part of the Usenet nntp standards, not
in RFC 977, and not in RFC2980.
--
  "Whenever there is a hard job to be done I assign it to a lazy
  man; he is sure to find an easy way of doing it."
                                              -- Walter Chrysler

Subject: isolate

From: ImageAnalyst

Date: 22 Jun, 2008 17:59:13

Message: 7 of 17

On Jun 22, 1:35=A0pm, rober...@ibd.nrc-cnrc.gc.ca (Walter Roberson)
wrote:
> In article <g3m26v$hl...@fred.mathworks.com>,
>
> Image Analyst <imageanal...@mailinator.com> wrote:
> >huda nawaf :
> >You're using a news reader that's not smart enough to
> >recognize mime encoding so you get =3D3D instead of =3D.
>
> Mime encoding is not part of the Usenet nntp standards, not
> in RFC 977, and not in RFC2980.
> --
> =A0 "Whenever there is a hard job to be done I assign it to a lazy
> =A0 man; he is sure to find an easy way of doing it."
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =
=A0 =A0 =A0 =A0 =A0 -- Walter Chrysler

-----------------------
OK fine. But many newsreaders can still understand it. They've
chosen to be better than the standard.

Subject: isolate

From: roberson@ibd.nrc-cnrc.gc.ca (Walter Roberson)

Date: 22 Jun, 2008 18:25:08

Message: 8 of 17

In article <f0f79966-cb5e-43c5-8d9b-e30236e37a87@26g2000hsk.googlegroups.com>,
ImageAnalyst <imageanalyst@mailinator.com> wrote:
>On Jun 22, 1:35=A0pm, rober...@ibd.nrc-cnrc.gc.ca (Walter Roberson)
>wrote:
>> In article <g3m26v$hl...@fred.mathworks.com>,

>> Image Analyst <imageanal...@mailinator.com> wrote:

>> >You're using a news reader that's not smart enough to
>> >recognize mime encoding so you get =3D3D instead of =3D.

>> Mime encoding is not part of the Usenet nntp standards, not
>> in RFC 977, and not in RFC2980.

>OK fine. But many newsreaders can still understand it. They've
>chosen to be better than the standard.

However, google groups and fred.mathworks.com, which are interfaces
to Usenet, ought not to be sending out printable-quoted messages:
they should be sending out only conformant messages. It's a pain to
have to correct the mangled text that google groups and matlabcentral
produce.

--
  "Allegories are in the realm of thoughts, what ruins are in
  the realm of things." -- Walter Benjamin

Subject: isolate

From: huda nawaf

Date: 30 Jun, 2008 13:40:20

Message: 9 of 17

"Image Analyst" <imageanalyst@mailinator.com> wrote in
message <g3m26v$hlu$1@fred.mathworks.com>...
> roberson@ibd.nrc-cnrc.gc.ca (Walter Roberson) wrote in
> message <g3lup2$758$1@canopus.cc.umanitoba.ca>...
> > In article <g3lteu$gr0$1@fred.mathworks.com>,
> > huda nawaf <halmamory@yahoo.com> wrote:
> >
> > >i didn't understand this by image analyzing :
> >
> > >> intensityThreshold =3D 200; % Use an appropriate
value.
> > >> foregroundImage =3D originalImage >
intensityThreshold;
> > >> labeledImage =3D bwlabel(foregroundImage);
> > >> measurementStructure =3D regionprops(labeledImage);
> >
> > >is this code?
> >
> > No. However, if you convert the quoted-printable
> encodings of
> > the equal signs from equals-sign number-three upper-
case-
> dee to just
> > plain equals-sign, then Yes, that is code. I am not
very
> familiar
> > with the image processing toolkit, but it appears to
be
> valid code
> > to me, at least for grayscale images.
> >
> >
> > intensityThreshold = 200; % Use an appropriate value.
> > foregroundImage = originalImage > intensityThreshold;
> > labeledImage = bwlabel(foregroundImage);
> > measurementStructure = regionprops(labeledImage);
> > --
> > "Prevention is the daughter of intelligence."
> > -- Sir
> Walter Raleigh
> -------------------------------------------------
> huda nawaf :
> You're using a news reader that's not smart enough to
> recognize mime encoding so you get =3D instead of =.
Try
> using Google or one the the many newsreaders that can
> understand mime (Mathworks is not one of them but for
you
> I'll post the code from my Mathworks account).
> Take a look at the following code:
> It's a very basic, elementary macro to find objects
based
> on intensity threshold and outline them and make some
basic
> measurements. Try it out if you have the image
processing
> toolbox, which you should if you're going to deal with
> images.
> Regards
> ImageAnalyst
>
> disp(' ');
> disp('Running BlobsDemo.m...');
> originalImage = imread('coins.png'); % Read in image
> binaryImage = im2bw(originalImage, 0.4); %
Threshold
> to binary
>
> subplot(3,2,1); imagesc(originalImage); colormap(gray
> (256)); title('Original Image');
> subplot(3,2,2); imagesc(binaryImage); colormap(gray
(256));
> title('Binary Image');
>
> labeledImage = bwlabel(binaryImage, 8); % Label each
> blob so can do calc on it
> coloredLabels = label2rgb
> (labeledImage, 'hsv', 'k', 'shuffle'); % pseudo random
> color labels
>
> subplot(3,2,3); imagesc(labeledImage); title('Labeled
> Image');
> subplot(3,2,4); imagesc(coloredLabels); title('Pseudo
> colored labels');
>
> blobMeasurements = regionprops(labeledImage, 'all'); %
> Get all the blob properties.
> numberOfBlobs = size(blobMeasurements, 1);
>
> % bwboundaries returns a cell array, where each cell
> % contains the row/column coordinates for an object in
the
> image.
> % Plot the borders of all the coins on the original
> % grayscale image using the coordinates returned by
> bwboundaries.
> subplot(3,2,5); imagesc(originalImage); title
('Outlines');
> hold on;
> boundaries = bwboundaries(binaryImage);
> for k = 1 : numberOfBlobs
> thisBoundary = boundaries{k};
> plot(thisBoundary(:,2), thisBoundary
> (:,1), 'g', 'LineWidth', 2);
> end
> hold off;
>
> fprintf(1,'Blob # Mean Intensity Area
Perimeter
> Centroid\n');
> for k = 1 : numberOfBlobs % Loop through all
> blobs.
> % Find the mean of each blob. (R2008a has a
better
> way where you can pass the original image
> % directly into regionprops. The way below works
> for all versions including earlier versions.)
> thisBlobsPixels = blobMeasurements(k).PixelIdxList;
%
> Get list of pixels in current blob.
> meanGL = mean(originalImage
> (thisBlobsPixels)); % Find mean intensity
(in
> original image!)
> blobArea = blobMeasurements(k).Area; %
> Get area.
> blobPerimeter = blobMeasurements(k).Perimeter;
> % Get perimeter.
> blobCentroid = blobMeasurements(k).Centroid;
> % Get centroid.
> fprintf(1,'#%d %18.1f %11.1f %8.1f %8.1f %8.1f\n',
k,
> meanGL, blobArea, blobPerimeter, blobCentroid);
> end
> msgbox('Finished running BlobsDemo.m. Check out the
figure
> window and the command window for the results.');
> %-------------------------------------------------
> thank you sir for code,
I tried it ,the result is image has sevral colored region.
for ex.:the background is green and the object is red.
now how I can deal with red region?
i do appreciate your reply
thanks

Subject: isolate

From: ImageAnalyst

Date: 30 Jun, 2008 17:43:41

Message: 10 of 17

On Jun 30, 9:40=A0am, "huda nawaf" <halmam...@yahoo.com> wrote:
> "Image Analyst" <imageanal...@mailinator.com> wrote in
> message <g3m26v$hl...@fred.mathworks.com>...
>
>
>
> > rober...@ibd.nrc-cnrc.gc.ca (Walter Roberson) wrote in
> > message <g3lup2$75...@canopus.cc.umanitoba.ca>...
> > > In article <g3lteu$gr...@fred.mathworks.com>,
> > > huda nawaf <halmam...@yahoo.com> wrote:
>
> > > >i didn't understand this by image analyzing :
>
> > > >> intensityThreshold =3D3D 200; % Use an appropriate
> value.
> > > >> foregroundImage =3D3D originalImage >
> intensityThreshold;
> > > >> labeledImage =3D3D bwlabel(foregroundImage);
> > > >> measurementStructure =3D3D regionprops(labeledImage);
>
> > > >is this code?
>
> > > No. However, if you convert the quoted-printable
> > encodings of
> > > the equal signs from equals-sign number-three upper-
> case-
> > dee to just
> > > plain equals-sign, then Yes, that is code. I am not
> very
> > familiar
> > > with the image processing toolkit, but it appears to
> be
> > valid code
> > > to me, at least for grayscale images.
>
> > > intensityThreshold =3D 200; % Use an appropriate value.
> > > foregroundImage =3D originalImage > intensityThreshold;
> > > labeledImage =3D bwlabel(foregroundImage);
> > > measurementStructure =3D regionprops(labeledImage);
> > > --
> > > =A0 "Prevention is the daughter of intelligence."
> > > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =
=A0 =A0 =A0 =A0 =A0 =A0 -- Sir
> > Walter Raleigh
> > -------------------------------------------------
> > huda nawaf :
> > You're using a news reader that's not smart enough to
> > recognize mime encoding so you get =3D3D instead of =3D. =A0
> Try
> > using Google or one the the many newsreaders that can
> > understand mime (Mathworks is not one of them but for
> you
> > I'll post the code from my Mathworks account).
> > Take a look at the following code:
> > It's a very basic, elementary macro to find objects
> based
> > on intensity threshold and outline them and make some
> basic
> > measurements. =A0Try it out if you have the image
> processing
> > toolbox, which you should if you're going to deal with
> > images.
> > Regards
> > ImageAnalyst
>
> > disp(' ');
> > disp('Running BlobsDemo.m...');
> > originalImage =3D imread('coins.png'); % Read in image
> > binaryImage =3D im2bw(originalImage, 0.4); =A0 =A0 =A0 %
> Threshold
> > to binary
>
> > subplot(3,2,1); imagesc(originalImage); colormap(gray
> > (256)); title('Original Image');
> > subplot(3,2,2); imagesc(binaryImage); colormap(gray
> (256));
> > title('Binary Image');
>
> > labeledImage =3D bwlabel(binaryImage, 8); =A0 =A0 % Label each
> > blob so can do calc on it
> > coloredLabels =3D label2rgb
> > (labeledImage, 'hsv', 'k', 'shuffle'); % pseudo random
> > color labels
>
> > subplot(3,2,3); imagesc(labeledImage); title('Labeled
> > Image');
> > subplot(3,2,4); imagesc(coloredLabels); title('Pseudo
> > colored labels');
>
> > blobMeasurements =3D regionprops(labeledImage, 'all'); =A0 %
> > Get all the blob properties.
> > numberOfBlobs =3D size(blobMeasurements, 1);
>
> > % bwboundaries returns a cell array, where each cell
> > % contains the row/column coordinates for an object in
> the
> > image.
> > % Plot the borders of all the coins on the original
> > % grayscale image using the coordinates returned by
> > bwboundaries.
> > subplot(3,2,5); imagesc(originalImage); title
> ('Outlines');
> > hold on;
> > boundaries =3D bwboundaries(binaryImage); =A0 =A0
> > for k =3D 1 : numberOfBlobs
> > =A0 =A0thisBoundary =3D boundaries{k};
> > =A0 =A0plot(thisBoundary(:,2), thisBoundary
> > (:,1), 'g', 'LineWidth', 2);
> > end
> > hold off;
>
> > fprintf(1,'Blob # =A0 =A0 =A0Mean Intensity =A0Area =A0 =A0
> Perimeter =A0
> > Centroid\n');
> > for k =3D 1 : numberOfBlobs =A0 =A0 =A0 =A0 =A0 % Loop through all
> > blobs.
> > =A0 =A0% Find the mean of each blob. =A0(R2008a has a
> better
> > way where you can pass the original image
> > =A0 =A0% directly into regionprops. =A0The way below works
> > for all versions including earlier versions.)
> > =A0 =A0 thisBlobsPixels =3D blobMeasurements(k).PixelIdxList; =A0
> %
> > Get list of pixels in current blob.
> > =A0 =A0 meanGL =3D mean(originalImage
> > (thisBlobsPixels)); =A0 =A0 =A0 =A0 =A0 =A0 % Find mean intensity
> (in
> > original image!)
> > =A0 =A0blobArea =3D blobMeasurements(k).Area; =A0 =A0 =A0 =A0 =A0 =A0%
> > Get area.
> > =A0 =A0blobPerimeter =3D blobMeasurements(k).Perimeter; =A0
> > =A0 =A0% Get perimeter.
> > =A0 =A0blobCentroid =3D blobMeasurements(k).Centroid; =A0 =A0
> > =A0 =A0% Get centroid.
> > =A0 =A0 fprintf(1,'#%d %18.1f %11.1f %8.1f %8.1f %8.1f\n',
> k,
> > meanGL, blobArea, blobPerimeter, blobCentroid);
> > end
> > msgbox('Finished running BlobsDemo.m. =A0Check out the
> figure
> > window and the command window for the results.');
> > %-------------------------------------------------
> > thank you sir for code,
>
> I tried it ,the result is image has sevral colored region.
> for ex.:the background is green and the object is red.
> now how I can deal with =A0red region?
> i do appreciate your reply
> thanks- Hide quoted text -
>
> - Show quoted text -

----------------------------------------------------------------------------=
--
huda:
The red region are the pixels that represent one particular labeled
object (one of the coins in the image). I gave you code for measuring
the centroid, perimeter, and area. What do you want to do?
Specifically, please explain in detail what you mean by "deal." There
are other things you can measure - check out the documentation on
regionprops().
Regards,
ImageAnalyst
----------------------------------------------------------------------------=
--

Subject: isolate

From: huda nawaf

Date: 1 Jul, 2008 18:56:02

Message: 11 of 17

ImageAnalyst <imageanalyst@mailinator.com> wrote in
message <85e736d8-0d10-429c-a1f3-
c2405d6b2505@m73g2000hsh.googlegroups.com>...
> On Jun 30, 9:40=A0am, "huda nawaf" <halmam...@yahoo.com>
wrote:
> > "Image Analyst" <imageanal...@mailinator.com> wrote in
> > message <g3m26v$hl...@fred.mathworks.com>...
> >
> >
> >
> > > rober...@ibd.nrc-cnrc.gc.ca (Walter Roberson) wrote
in
> > > message <g3lup2$75...@canopus.cc.umanitoba.ca>...
> > > > In article <g3lteu$gr...@fred.mathworks.com>,
> > > > huda nawaf <halmam...@yahoo.com> wrote:
> >
> > > > >i didn't understand this by image analyzing :
> >
> > > > >> intensityThreshold =3D3D 200; % Use an
appropriate
> > value.
> > > > >> foregroundImage =3D3D originalImage >
> > intensityThreshold;
> > > > >> labeledImage =3D3D bwlabel(foregroundImage);
> > > > >> measurementStructure =3D3D regionprops
(labeledImage);
> >
> > > > >is this code?
> >
> > > > No. However, if you convert the quoted-printable
> > > encodings of
> > > > the equal signs from equals-sign number-three
upper-
> > case-
> > > dee to just
> > > > plain equals-sign, then Yes, that is code. I am not
> > very
> > > familiar
> > > > with the image processing toolkit, but it appears
to
> > be
> > > valid code
> > > > to me, at least for grayscale images.
> >
> > > > intensityThreshold =3D 200; % Use an appropriate
value.
> > > > foregroundImage =3D originalImage >
intensityThreshold;
> > > > labeledImage =3D bwlabel(foregroundImage);
> > > > measurementStructure =3D regionprops(labeledImage);
> > > > --
> > > > =A0 "Prevention is the daughter of intelligence."
> > > > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0
=A0 =A0 =A0 =A0 =A0 =
> =A0 =A0 =A0 =A0 =A0 =A0 -- Sir
> > > Walter Raleigh
> > > -------------------------------------------------
> > > huda nawaf :
> > > You're using a news reader that's not smart enough to
> > > recognize mime encoding so you get =3D3D instead of
=3D. =A0
> > Try
> > > using Google or one the the many newsreaders that can
> > > understand mime (Mathworks is not one of them but for
> > you
> > > I'll post the code from my Mathworks account).
> > > Take a look at the following code:
> > > It's a very basic, elementary macro to find objects
> > based
> > > on intensity threshold and outline them and make some
> > basic
> > > measurements. =A0Try it out if you have the image
> > processing
> > > toolbox, which you should if you're going to deal
with
> > > images.
> > > Regards
> > > ImageAnalyst
> >
> > > disp(' ');
> > > disp('Running BlobsDemo.m...');
> > > originalImage =3D imread('coins.png'); % Read in
image
> > > binaryImage =3D im2bw(originalImage, 0.4); =A0 =A0
=A0 %
> > Threshold
> > > to binary
> >
> > > subplot(3,2,1); imagesc(originalImage); colormap(gray
> > > (256)); title('Original Image');
> > > subplot(3,2,2); imagesc(binaryImage); colormap(gray
> > (256));
> > > title('Binary Image');
> >
> > > labeledImage =3D bwlabel(binaryImage, 8); =A0 =A0 %
Label each
> > > blob so can do calc on it
> > > coloredLabels =3D label2rgb
> > > (labeledImage, 'hsv', 'k', 'shuffle'); % pseudo
random
> > > color labels
> >
> > > subplot(3,2,3); imagesc(labeledImage); title('Labeled
> > > Image');
> > > subplot(3,2,4); imagesc(coloredLabels); title('Pseudo
> > > colored labels');
> >
> > > blobMeasurements =3D regionprops
(labeledImage, 'all'); =A0 %
> > > Get all the blob properties.
> > > numberOfBlobs =3D size(blobMeasurements, 1);
> >
> > > % bwboundaries returns a cell array, where each cell
> > > % contains the row/column coordinates for an object
in
> > the
> > > image.
> > > % Plot the borders of all the coins on the original
> > > % grayscale image using the coordinates returned by
> > > bwboundaries.
> > > subplot(3,2,5); imagesc(originalImage); title
> > ('Outlines');
> > > hold on;
> > > boundaries =3D bwboundaries(binaryImage); =A0 =A0
> > > for k =3D 1 : numberOfBlobs
> > > =A0 =A0thisBoundary =3D boundaries{k};
> > > =A0 =A0plot(thisBoundary(:,2), thisBoundary
> > > (:,1), 'g', 'LineWidth', 2);
> > > end
> > > hold off;
> >
> > > fprintf(1,'Blob # =A0 =A0 =A0Mean Intensity =A0Area
=A0 =A0
> > Perimeter =A0
> > > Centroid\n');
> > > for k =3D 1 : numberOfBlobs =A0 =A0 =A0 =A0 =A0 %
Loop through all
> > > blobs.
> > > =A0 =A0% Find the mean of each blob. =A0(R2008a has a
> > better
> > > way where you can pass the original image
> > > =A0 =A0% directly into regionprops. =A0The way below
works
> > > for all versions including earlier versions.)
> > > =A0 =A0 thisBlobsPixels =3D blobMeasurements
(k).PixelIdxList; =A0
> > %
> > > Get list of pixels in current blob.
> > > =A0 =A0 meanGL =3D mean(originalImage
> > > (thisBlobsPixels)); =A0 =A0 =A0 =A0 =A0 =A0 % Find
mean intensity
> > (in
> > > original image!)
> > > =A0 =A0blobArea =3D blobMeasurements(k).Area; =A0
=A0 =A0 =A0 =A0 =A0%
> > > Get area.
> > > =A0 =A0blobPerimeter =3D blobMeasurements
(k).Perimeter; =A0
> > > =A0 =A0% Get perimeter.
> > > =A0 =A0blobCentroid =3D blobMeasurements
(k).Centroid; =A0 =A0
> > > =A0 =A0% Get centroid.
> > > =A0 =A0 fprintf(1,'#%d %18.1f %11.1f %8.1f %8.1f %
8.1f\n',
> > k,
> > > meanGL, blobArea, blobPerimeter, blobCentroid);
> > > end
> > > msgbox('Finished running BlobsDemo.m. =A0Check out
the
> > figure
> > > window and the command window for the results.');
> > > %-------------------------------------------------
> > > thank you sir for code,
> >
> > I tried it ,the result is image has sevral colored
region.
> > for ex.:the background is green and the object is red.
> > now how I can deal with =A0red region?
> > i do appreciate your reply
> > thanks- Hide quoted text -
> >
> > - Show quoted text -
>
> ---------------------------------------------------------
-------------------=
> --
> huda:
> The red region are the pixels that represent one
particular labeled
> object (one of the coins in the image). I gave you code
for measuring
> the centroid, perimeter, and area. What do you want to
do?
> Specifically, please explain in detail what you mean
by "deal." There
> are other things you can measure - check out the
documentation on
> regionprops().
> Regards,
> ImageAnalyst
> ---------------------------------------------------------
-------------------=
> --
thanks,I want workING with medical image (brain) for a
diagnosis a type of disease. So, I want totaly
separate the object (brain) from its background .
I noted that the object itself has several colors while I
need it one color.
please ,this is the first time I working with this topic
so, I need your advice

Subject: isolate

From: ImageAnalyst

Date: 4 Jul, 2008 04:11:56

Message: 12 of 17

On Jul 1, 2:56=A0pm, "huda nawaf" <halmam...@yahoo.com> wrote:
> ImageAnalyst <imageanal...@mailinator.com> wrote in
> message <85e736d8-0d10-429c-a1f3-
> c2405d6b2...@m73g2000hsh.googlegroups.com>...
>
>
>
> > On Jun 30, 9:40=3DA0am, "huda nawaf" <halmam...@yahoo.com>
> wrote:
> > > "Image Analyst" <imageanal...@mailinator.com> wrote in
> > > message <g3m26v$hl...@fred.mathworks.com>...
>
> > > > rober...@ibd.nrc-cnrc.gc.ca (Walter Roberson) wrote
> in
> > > > message <g3lup2$75...@canopus.cc.umanitoba.ca>...
> > > > > In article <g3lteu$gr...@fred.mathworks.com>,
> > > > > huda nawaf <halmam...@yahoo.com> wrote:
>
> > > > > >i didn't understand this by image analyzing :
>
> > > > > >> intensityThreshold =3D3D3D 200; % Use an
> appropriate
> > > value.
> > > > > >> foregroundImage =3D3D3D originalImage >
> > > intensityThreshold;
> > > > > >> labeledImage =3D3D3D bwlabel(foregroundImage);
> > > > > >> measurementStructure =3D3D3D regionprops
> (labeledImage);
>
> > > > > >is this code?
>
> > > > > No. However, if you convert the quoted-printable
> > > > encodings of
> > > > > the equal signs from equals-sign number-three
> upper-
> > > case-
> > > > dee to just
> > > > > plain equals-sign, then Yes, that is code. I am not
> > > very
> > > > familiar
> > > > > with the image processing toolkit, but it appears
> to
> > > be
> > > > valid code
> > > > > to me, at least for grayscale images.
>
> > > > > intensityThreshold =3D3D 200; % Use an appropriate
> value.
> > > > > foregroundImage =3D3D originalImage >
> intensityThreshold;
> > > > > labeledImage =3D3D bwlabel(foregroundImage);
> > > > > measurementStructure =3D3D regionprops(labeledImage);
> > > > > --
> > > > > =3DA0 "Prevention is the daughter of intelligence."
> > > > > =3DA0 =3DA0 =3DA0 =3DA0 =3DA0 =3DA0 =3DA0 =3DA0 =3DA0 =3DA0 =3DA0=
 =3DA0
>
> =3DA0 =3DA0 =3DA0 =3DA0 =3DA0 =3D
>
>
>
> > =3DA0 =3DA0 =3DA0 =3DA0 =3DA0 =3DA0 -- Sir
> > > > Walter Raleigh
> > > > -------------------------------------------------
> > > > huda nawaf :
> > > > You're using a news reader that's not smart enough to
> > > > recognize mime encoding so you get =3D3D3D instead of
> =3D3D. =3DA0
> > > Try
> > > > using Google or one the the many newsreaders that can
> > > > understand mime (Mathworks is not one of them but for
> > > you
> > > > I'll post the code from my Mathworks account).
> > > > Take a look at the following code:
> > > > It's a very basic, elementary macro to find objects
> > > based
> > > > on intensity threshold and outline them and make some
> > > basic
> > > > measurements. =3DA0Try it out if you have the image
> > > processing
> > > > toolbox, which you should if you're going to deal
> with
> > > > images.
> > > > Regards
> > > > ImageAnalyst
>
> > > > disp(' ');
> > > > disp('Running BlobsDemo.m...');
> > > > originalImage =3D3D imread('coins.png'); % Read in
> image
> > > > binaryImage =3D3D im2bw(originalImage, 0.4); =3DA0 =3DA0
> =3DA0 %
> > > Threshold
> > > > to binary
>
> > > > subplot(3,2,1); imagesc(originalImage); colormap(gray
> > > > (256)); title('Original Image');
> > > > subplot(3,2,2); imagesc(binaryImage); colormap(gray
> > > (256));
> > > > title('Binary Image');
>
> > > > labeledImage =3D3D bwlabel(binaryImage, 8); =3DA0 =3DA0 %
> Label each
> > > > blob so can do calc on it
> > > > coloredLabels =3D3D label2rgb
> > > > (labeledImage, 'hsv', 'k', 'shuffle'); % pseudo
> random
> > > > color labels
>
> > > > subplot(3,2,3); imagesc(labeledImage); title('Labeled
> > > > Image');
> > > > subplot(3,2,4); imagesc(coloredLabels); title('Pseudo
> > > > colored labels');
>
> > > > blobMeasurements =3D3D regionprops
>
> (labeledImage, 'all'); =3DA0 %
>
>
>
> > > > Get all the blob properties.
> > > > numberOfBlobs =3D3D size(blobMeasurements, 1);
>
> > > > % bwboundaries returns a cell array, where each cell
> > > > % contains the row/column coordinates for an object
> in
> > > the
> > > > image.
> > > > % Plot the borders of all the coins on the original
> > > > % grayscale image using the coordinates returned by
> > > > bwboundaries.
> > > > subplot(3,2,5); imagesc(originalImage); title
> > > ('Outlines');
> > > > hold on;
> > > > boundaries =3D3D bwboundaries(binaryImage); =3DA0 =3DA0
> > > > for k =3D3D 1 : numberOfBlobs
> > > > =3DA0 =3DA0thisBoundary =3D3D boundaries{k};
> > > > =3DA0 =3DA0plot(thisBoundary(:,2), thisBoundary
> > > > (:,1), 'g', 'LineWidth', 2);
> > > > end
> > > > hold off;
>
> > > > fprintf(1,'Blob # =3DA0 =3DA0 =3DA0Mean Intensity =3DA0Area
> =3DA0 =3DA0
> > > Perimeter =3DA0
> > > > Centroid\n');
> > > > for k =3D3D 1 : numberOfBlobs =3DA0 =3DA0 =3DA0 =3DA0 =3DA0 %
> Loop through all
> > > > blobs.
> > > > =3DA0 =3DA0% Find the mean of each blob. =3DA0(R2008a has a
> > > better
> > > > way where you can pass the original image
> > > > =3DA0 =3DA0% directly into regionprops. =3DA0The way below
> works
> > > > for all versions including earlier versions.)
> > > > =3DA0 =3DA0 thisBlobsPixels =3D3D blobMeasurements
>
> (k).PixelIdxList; =3DA0> > %
> > > > Get list of pixels in current blob.
> > > > =3DA0 =3DA0 meanGL =3D3D mean(originalImage
> > > > (thisBlobsPixels)); =3DA0 =3DA0 =3DA0 =3DA0 =3DA0 =3DA0 % Find
> mean intensity
> > > (in
> > > > original image!)
> > > > =3DA0 =3DA0blobArea =3D3D blobMeasurements(k).Area; =3DA0
>
> =3DA0 =3DA0 =3DA0 =3DA0 =3DA0%> > > Get area.
> > > > =3DA0 =3DA0blobPerimeter =3D3D blobMeasurements
> (k).Perimeter; =3DA0
> > > > =3DA0 =3DA0% Get perimeter.
> > > > =3DA0 =3DA0blobCentroid =3D3D blobMeasurements
>
> (k).Centroid; =3DA0 =3DA0
>
>
>
> > > > =3DA0 =3DA0% Get centroid.
> > > > =3DA0 =3DA0 fprintf(1,'#%d %18.1f %11.1f %8.1f %8.1f %
> 8.1f\n',
> > > k,
> > > > meanGL, blobArea, blobPerimeter, blobCentroid);
> > > > end
> > > > msgbox('Finished running BlobsDemo.m. =3DA0Check out
> the
> > > figure
> > > > window and the command window for the results.');
> > > > %-------------------------------------------------
> > > > thank you sir for code,
>
> > > I tried it ,the result is image has sevral colored
> region.
> > > for ex.:the background is green and the object is red.
> > > now how I can deal with =3DA0red region?
> > > i do appreciate your reply
> > > thanks- Hide quoted text -
>
> > > - Show quoted text -
>
> > ---------------------------------------------------------
>
> -------------------=3D
>
>
>
> > --
> > huda:
> > The red region are the pixels that represent one
> particular labeled
> > object (one of the coins in the image). =A0I gave you code
> for measuring
> > the centroid, perimeter, and area. =A0What do you want to
> do?
> > Specifically, please explain in detail what you mean
> by "deal." =A0There
> > are other things you can measure - check out the
> documentation on
> > regionprops().
> > Regards,
> > ImageAnalyst
> > ---------------------------------------------------------
>
> -------------------=3D> --
>
> thanks,I want workING with medical image (brain) for a
> diagnosis =A0 a type =A0of disease. So, I =A0want =A0totaly
> separate the object (brain) from its background .
> I noted that the object itself has several colors while I
> need it one color.
> please ,this is the first time I working with this topic
> so, I need your advice- Hide quoted text -
> > - Show quoted text -

------------------------------------------------------------
huda:
There is no object with several different colors. There are several
different objects, each with a single color that the labeling process
has assigned. I showed you how to separate a group of objects from a
background and how to make measurements on each of those objects. You
should be able to adapt this to your situation with little
difficulty. You case might even be simpler since you have just one
object, not several.
Good luck,
ImageAnalyst

Subject: isolate

From: huda nawaf

Date: 23 Jul, 2008 05:09:02

Message: 13 of 17

ImageAnalyst <imageanalyst@mailinator.com> wrote in
message <6b2d16b5-f5d1-4d42-910c-
dd77ab69d02d@m44g2000hsc.googlegroups.com>...
> On Jul 1, 2:56=A0pm, "huda nawaf" <halmam...@yahoo.com>
wrote:
> > ImageAnalyst <imageanal...@mailinator.com> wrote in
> > message <85e736d8-0d10-429c-a1f3-
> > c2405d6b2...@m73g2000hsh.googlegroups.com>...
> >
> >
> >
> > > On Jun 30, 9:40=3DA0am, "huda nawaf"
<halmam...@yahoo.com>
> > wrote:
> > > > "Image Analyst" <imageanal...@mailinator.com>
wrote in
> > > > message <g3m26v$hl...@fred.mathworks.com>...
> >
> > > > > rober...@ibd.nrc-cnrc.gc.ca (Walter Roberson)
wrote
> > in
> > > > > message <g3lup2$75...@canopus.cc.umanitoba.ca>...
> > > > > > In article <g3lteu$gr...@fred.mathworks.com>,
> > > > > > huda nawaf <halmam...@yahoo.com> wrote:
> >
> > > > > > >i didn't understand this by image analyzing :
> >
> > > > > > >> intensityThreshold =3D3D3D 200; % Use an
> > appropriate
> > > > value.
> > > > > > >> foregroundImage =3D3D3D originalImage >
> > > > intensityThreshold;
> > > > > > >> labeledImage =3D3D3D bwlabel
(foregroundImage);
> > > > > > >> measurementStructure =3D3D3D regionprops
> > (labeledImage);
> >
> > > > > > >is this code?
> >
> > > > > > No. However, if you convert the quoted-
printable
> > > > > encodings of
> > > > > > the equal signs from equals-sign number-three
> > upper-
> > > > case-
> > > > > dee to just
> > > > > > plain equals-sign, then Yes, that is code. I
am not
> > > > very
> > > > > familiar
> > > > > > with the image processing toolkit, but it
appears
> > to
> > > > be
> > > > > valid code
> > > > > > to me, at least for grayscale images.
> >
> > > > > > intensityThreshold =3D3D 200; % Use an
appropriate
> > value.
> > > > > > foregroundImage =3D3D originalImage >
> > intensityThreshold;
> > > > > > labeledImage =3D3D bwlabel(foregroundImage);
> > > > > > measurementStructure =3D3D regionprops
(labeledImage);
> > > > > > --
> > > > > > =3DA0 "Prevention is the daughter of
intelligence."
> > > > > > =3DA0 =3DA0 =3DA0 =3DA0 =3DA0 =3DA0 =3DA0
=3DA0 =3DA0 =3DA0 =3DA0=
> =3DA0
> >
> > =3DA0 =3DA0 =3DA0 =3DA0 =3DA0 =3D
> >
> >
> >
> > > =3DA0 =3DA0 =3DA0 =3DA0 =3DA0 =3DA0 -- Sir
> > > > > Walter Raleigh
> > > > > -------------------------------------------------
> > > > > huda nawaf :
> > > > > You're using a news reader that's not smart
enough to
> > > > > recognize mime encoding so you get =3D3D3D
instead of
> > =3D3D. =3DA0
> > > > Try
> > > > > using Google or one the the many newsreaders
that can
> > > > > understand mime (Mathworks is not one of them
but for
> > > > you
> > > > > I'll post the code from my Mathworks account).
> > > > > Take a look at the following code:
> > > > > It's a very basic, elementary macro to find
objects
> > > > based
> > > > > on intensity threshold and outline them and make
some
> > > > basic
> > > > > measurements. =3DA0Try it out if you have the
image
> > > > processing
> > > > > toolbox, which you should if you're going to deal
> > with
> > > > > images.
> > > > > Regards
> > > > > ImageAnalyst
> >
> > > > > disp(' ');
> > > > > disp('Running BlobsDemo.m...');
> > > > > originalImage =3D3D imread('coins.png'); % Read
in
> > image
> > > > > binaryImage =3D3D im2bw(originalImage, 0.4);
=3DA0 =3DA0
> > =3DA0 %
> > > > Threshold
> > > > > to binary
> >
> > > > > subplot(3,2,1); imagesc(originalImage); colormap
(gray
> > > > > (256)); title('Original Image');
> > > > > subplot(3,2,2); imagesc(binaryImage); colormap
(gray
> > > > (256));
> > > > > title('Binary Image');
> >
> > > > > labeledImage =3D3D bwlabel(binaryImage, 8);
=3DA0 =3DA0 %
> > Label each
> > > > > blob so can do calc on it
> > > > > coloredLabels =3D3D label2rgb
> > > > > (labeledImage, 'hsv', 'k', 'shuffle'); % pseudo
> > random
> > > > > color labels
> >
> > > > > subplot(3,2,3); imagesc(labeledImage); title
('Labeled
> > > > > Image');
> > > > > subplot(3,2,4); imagesc(coloredLabels); title
('Pseudo
> > > > > colored labels');
> >
> > > > > blobMeasurements =3D3D regionprops
> >
> > (labeledImage, 'all'); =3DA0 %
> >
> >
> >
> > > > > Get all the blob properties.
> > > > > numberOfBlobs =3D3D size(blobMeasurements, 1);
> >
> > > > > % bwboundaries returns a cell array, where each
cell
> > > > > % contains the row/column coordinates for an
object
> > in
> > > > the
> > > > > image.
> > > > > % Plot the borders of all the coins on the
original
> > > > > % grayscale image using the coordinates returned
by
> > > > > bwboundaries.
> > > > > subplot(3,2,5); imagesc(originalImage); title
> > > > ('Outlines');
> > > > > hold on;
> > > > > boundaries =3D3D bwboundaries(binaryImage);
=3DA0 =3DA0
> > > > > for k =3D3D 1 : numberOfBlobs
> > > > > =3DA0 =3DA0thisBoundary =3D3D boundaries{k};
> > > > > =3DA0 =3DA0plot(thisBoundary(:,2), thisBoundary
> > > > > (:,1), 'g', 'LineWidth', 2);
> > > > > end
> > > > > hold off;
> >
> > > > > fprintf(1,'Blob # =3DA0 =3DA0 =3DA0Mean
Intensity =3DA0Area
> > =3DA0 =3DA0
> > > > Perimeter =3DA0
> > > > > Centroid\n');
> > > > > for k =3D3D 1 : numberOfBlobs =3DA0 =3DA0 =3DA0
=3DA0 =3DA0 %
> > Loop through all
> > > > > blobs.
> > > > > =3DA0 =3DA0% Find the mean of each blob. =3DA0
(R2008a has a
> > > > better
> > > > > way where you can pass the original image
> > > > > =3DA0 =3DA0% directly into regionprops. =3DA0The
way below
> > works
> > > > > for all versions including earlier versions.)
> > > > > =3DA0 =3DA0 thisBlobsPixels =3D3D
blobMeasurements
> >
> > (k).PixelIdxList; =3DA0> > %
> > > > > Get list of pixels in current blob.
> > > > > =3DA0 =3DA0 meanGL =3D3D mean(originalImage
> > > > > (thisBlobsPixels)); =3DA0 =3DA0 =3DA0 =3DA0
=3DA0 =3DA0 % Find
> > mean intensity
> > > > (in
> > > > > original image!)
> > > > > =3DA0 =3DA0blobArea =3D3D blobMeasurements
(k).Area; =3DA0
> >
> > =3DA0 =3DA0 =3DA0 =3DA0 =3DA0%> > > Get area.
> > > > > =3DA0 =3DA0blobPerimeter =3D3D blobMeasurements
> > (k).Perimeter; =3DA0
> > > > > =3DA0 =3DA0% Get perimeter.
> > > > > =3DA0 =3DA0blobCentroid =3D3D blobMeasurements
> >
> > (k).Centroid; =3DA0 =3DA0
> >
> >
> >
> > > > > =3DA0 =3DA0% Get centroid.
> > > > > =3DA0 =3DA0 fprintf(1,'#%d %18.1f %11.1f %8.1f %
8.1f %
> > 8.1f\n',
> > > > k,
> > > > > meanGL, blobArea, blobPerimeter, blobCentroid);
> > > > > end
> > > > > msgbox('Finished running BlobsDemo.m. =3DA0Check
out
> > the
> > > > figure
> > > > > window and the command window for the results.');
> > > > > %------------------------------------------------
-
> > > > > thank you sir for code,
> >
> > > > I tried it ,the result is image has sevral colored
> > region.
> > > > for ex.:the background is green and the object is
red.
> > > > now how I can deal with =3DA0red region?
> > > > i do appreciate your reply
> > > > thanks- Hide quoted text -
> >
> > > > - Show quoted text -
> >
> > > -----------------------------------------------------
----
> >
> > -------------------=3D
> >
> >
> >
> > > --
> > > huda:
> > > The red region are the pixels that represent one
> > particular labeled
> > > object (one of the coins in the image). =A0I gave
you code
> > for measuring
> > > the centroid, perimeter, and area. =A0What do you
want to
> > do?
> > > Specifically, please explain in detail what you mean
> > by "deal." =A0There
> > > are other things you can measure - check out the
> > documentation on
> > > regionprops().
> > > Regards,
> > > ImageAnalyst
> > > -----------------------------------------------------
----
> >
> > -------------------=3D> --
> >
> > thanks,I want workING with medical image (brain) for a
> > diagnosis =A0 a type =A0of disease. So, I =A0want
=A0totaly
> > separate the object (brain) from its background .
> > I noted that the object itself has several colors
while I
> > need it one color.
> > please ,this is the first time I working with this
topic
> > so, I need your advice- Hide quoted text -
> > > - Show quoted text -
>
> ---------------------------------------------------------
---
> huda:
> There is no object with several different colors. There
are several
> different objects, each with a single color that the
labeling process
> has assigned. I showed you how to separate a group of
objects from a
> background and how to make measurements on each of those
objects. You
> should be able to adapt this to your situation with
little
> difficulty. You case might even be simpler since you
have just one
> object, not several.
> Good luck,
> ImageAnalyst

hi,
there is an error when i ran your code:
??? Undefined function or variable 'bwboundaries'.

Error in ==> E:\d\MATLAB6p5\bin\win32\isolate.m
On line 25 ==> boundaries = bwboundaries(binaryImage);

how i can get bwboundaries function?
thanks in advance,
huda

Subject: isolate

From: Steven Lord

Date: 23 Jul, 2008 14:01:20

Message: 14 of 17


"huda nawaf" <halmamory@yahoo.com> wrote in message
news:g66ede$97v$1@fred.mathworks.com...

*snip*

> hi,
> there is an error when i ran your code:
> ??? Undefined function or variable 'bwboundaries'.
>
> Error in ==> E:\d\MATLAB6p5\bin\win32\isolate.m

I would advise against storing/running your M-files in the bin directory of
your MATLAB installation, or running M-files while that's your current
directory.

> On line 25 ==> boundaries = bwboundaries(binaryImage);
>
> how i can get bwboundaries function?

The BWBOUNDARIES function is part of Image Processing Toolbox. You will not
be able to use this function unless you have this toolbox installed.

http://www.mathworks.com/access/helpdesk/help/toolbox/images/bwboundaries.html

--
Steve Lord
slord@mathworks.com


Subject: isolate

From: huda nawaf

Date: 24 Jul, 2008 06:10:06

Message: 15 of 17

"Steven Lord" <slord@mathworks.com> wrote in message
<g67djg$94j$1@fred.mathworks.com>...
>
> "huda nawaf" <halmamory@yahoo.com> wrote in message
> news:g66ede$97v$1@fred.mathworks.com...
>
> *snip*
>
> > hi,
> > there is an error when i ran your code:
> > ??? Undefined function or variable 'bwboundaries'.
> >
> > Error in ==> E:\d\MATLAB6p5\bin\win32\isolate.m
>
> I would advise against storing/running your M-files in
the bin directory of
> your MATLAB installation, or running M-files while
that's your current
> directory.
>
> > On line 25 ==> boundaries = bwboundaries(binaryImage);
> >
> > how i can get bwboundaries function?
>
> The BWBOUNDARIES function is part of Image Processing
Toolbox. You will not
> be able to use this function unless you have this
toolbox installed.
>
>
http://www.mathworks.com/access/helpdesk/help/toolbox/image
s/bwboundaries.html
>
> --
> Steve Lord
> slord@mathworks.com
>
>
thanks sir for your advice ,
I opened that link , but I can't install it because I
didn't find any button for installing .
please help me ,i really need this function.

many thanks,
huda

Subject: isolate

From: roberson@ibd.nrc-cnrc.gc.ca (Walter Roberson)

Date: 24 Jul, 2008 06:29:19

Message: 16 of 17

In article <g696bu$2b7$1@fred.mathworks.com>,
huda nawaf <halmamory@yahoo.com> wrote:
>"Steven Lord" <slord@mathworks.com> wrote in message
><g67djg$94j$1@fred.mathworks.com>...

>> The BWBOUNDARIES function is part of Image Processing
>Toolbox. You will not
>> be able to use this function unless you have this
>toolbox installed.

>http://www.mathworks.com/access/helpdesk/help/toolbox/image
>s/bwboundaries.html

>I opened that link , but I can't install it because I
>didn't find any button for installing .

You didn't find any button for installing because that's
the reference page for the bwboundaries function, not
a page to download software from.

>please help me ,i really need this function.

My recollection from past discussions is that you have the
Image Processing Toolbox installed already. Check that with the
command
ver

I suspect you are using a version of the Image Processing Toolbox
from before bwboundaries was added.

Didn't you say you are using Matlab 6.5? If so then if you
need bwboundaries you should order the latest version of Matlab
and the latest version of the Image Processing Toolbox.
--
  "There's no term to the work of a scientist." -- Walter Reisch

Subject: isolate

From: huda nawaf

Date: 31 Jul, 2008 08:21:02

Message: 17 of 17

roberson@ibd.nrc-cnrc.gc.ca (Walter Roberson) wrote in
message <g697fv$nvn$1@canopus.cc.umanitoba.ca>...
> In article <g696bu$2b7$1@fred.mathworks.com>,
> huda nawaf <halmamory@yahoo.com> wrote:
> >"Steven Lord" <slord@mathworks.com> wrote in message
> ><g67djg$94j$1@fred.mathworks.com>...
>
> >> The BWBOUNDARIES function is part of Image Processing
> >Toolbox. You will not
> >> be able to use this function unless you have this
> >toolbox installed.
>
>
>http://www.mathworks.com/access/helpdesk/help/toolbox/imag
e
> >s/bwboundaries.html
>
> >I opened that link , but I can't install it because I
> >didn't find any button for installing .
>
> You didn't find any button for installing because that's
> the reference page for the bwboundaries function, not
> a page to download software from.
>
> >please help me ,i really need this function.
>
> My recollection from past discussions is that you have
the
> Image Processing Toolbox installed already. Check that
with the
> command
> ver
>
> I suspect you are using a version of the Image
Processing Toolbox
> from before bwboundaries was added.
>
> Didn't you say you are using Matlab 6.5? If so then if
you
> need bwboundaries you should order the latest version of
Matlab
> and the latest version of the Image Processing Toolbox.
> --
> "There's no term to the work of a scientist." --
Walter Reisch
thanks , yes i have 6.5 .i will install 7.

Tags for this Thread

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

rssFeed for this Thread

Public Submission Policy

NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Disclaimer prior to use.

Contact us at files@mathworks.com