Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
unwanted part of an image

Subject: unwanted part of an image

From: antonio ferreira

Date: 14 May, 2013 18:05:09

Message: 1 of 3

Hi all.
I have an image of an object (tree). I am interested in computing the number of pixels in layers (from the base of the tree) of 2 cm, i.e, how many pixels corresponds to a height of 2 cm, 4 cm, etc.. I know that i can use regionprops to compute the number of pixels in each layer I just do not know how can I perform this "mask". Can someone give me a hint on this please?
Thanks

Subject: unwanted part of an image

From: Yehonatan Peleg

Date: 14 May, 2013 22:22:10

Message: 2 of 3

I don't actually understand the basics behind working with images but i can help you with the mask.

If you can create a matrix that is the same size as your tree image, and it will contain only zero and ones you can tell matlab to check only the cells that have a one in them. That is the only mask i know.
Is this the solution you want?

Subject: unwanted part of an image

From: antonio ferreira

Date: 16 May, 2013 17:00:10

Message: 3 of 3

"Yehonatan Peleg" <math8yehonatan@gmail.com> wrote in message <kmudei$sm3$1@newscl01ah.mathworks.com>...
> I don't actually understand the basics behind working with images but i can help you with the mask.
>
> If you can create a matrix that is the same size as your tree image, and it will contain only zero and ones you can tell matlab to check only the cells that have a one in them. That is the only mask i know.
> Is this the solution you want?

Hi there.
Yes, thanks for the hint. I have used the function roipoly, which does a nice jog for my case.

Tags for this Thread

No tags are associated with this thread.

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.

Contact us