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:
image processing

Subject: image processing

From: pier

Date: 10 Nov, 2010 12:33:05

Message: 1 of 6

Hi all!
I've this image http://drop.io/fq1hhph and I need to separate the good cells from the
bad cells.The good cells are the cells that you can recognize very well with perfect edges.
the bad cells are the cells that are difficult to recognize and are very dark.and than i ve to calulate the area of good cells and if is possible also count the cells after segmentation(maybe watershed).

Can you help me.

tank you!!!

Subject: image processing

From: Sean

Date: 10 Nov, 2010 15:20:05

Message: 2 of 6

"pier " <pieralessandrogiorgetti@yahoo.it> wrote in message <ibe3e0$25h$1@fred.mathworks.com>...
> Hi all!
> I've this image http://drop.io/fq1hhph and I need to separate the good cells from the
> bad cells.The good cells are the cells that you can recognize very well with perfect edges.
> the bad cells are the cells that are difficult to recognize and are very dark.and than i ve to calulate the area of good cells and if is possible also count the cells after segmentation(maybe watershed).
>
> Can you help me.
>
> tank you!!!

here's a few lines of code for you to play with:
It = I(:,:,1)>75;
Iskel = imdilate((bwmorph(It,'skel',inf)),strel('disk',2));
CC = bwconncomp(~Iskel,4);
idx = cellfun(@numel,CC.PixelIdxList)<1000;

M = false(size(It));
M(cell2mat(CC.PixelIdxList().')) = true;

You'll have to adjust the size threshold for the index calculation, but basically the idea is to keep only white areas in the ~dilated skeleton image that are about the size of the cells you want to keep. I'm busy today and can't play with it today.

Subject: image processing

From: pier

Date: 15 Nov, 2010 14:03:03

Message: 3 of 6

Hi Sean,tanks a lot now i m able also to count the cells after a crop of the image.The problem is that I ve a lot of image very similar as the previus and i ve to measure for each image the pigmentation that is the brown color and I ve to plot with a graph the amount of the pigmentation for each image,can you help me?

thank you a lot

Alessandro

Subject: image processing

From: ImageAnalyst

Date: 15 Nov, 2010 14:30:15

Message: 4 of 6

On Nov 15, 9:03 am, "pier " <pieralessandrogiorge...@yahoo.it> wrote:
> Hi Sean,tanks a lot now i m able also to count the cells after a crop of the image.The problem is that I ve a lot of image very similar as the previus and i ve to measure for each image the pigmentation that is the brown color and I ve to plot with a graph the amount of the pigmentation for each image,can you help me?
>
> thank you a lot
>
> Alessandro

Why can't you just put the same code in a loop?
for k = 1 : numberOfImages
  % Read in kth image
  % Process kth image
  % Save results for the kth image:
  results(k) = resultForThisImage
end
% Plot results for all images.
bar(results);
Seems rather straightforward.

Subject: image processing

From: pier

Date: 21 Nov, 2010 19:23:04

Message: 5 of 6

perfect but how can I convert the number of the pixel in %?

Subject: image processing

From: ImageAnalyst

Date: 21 Nov, 2010 19:32:30

Message: 6 of 6

On Nov 21, 2:23 pm, "pier " <pieralessandrogiorge...@yahoo.it> wrote:
> perfect but how can I convert the number of the pixel in %?

-----------------------------------------------------------------------
Are you wondering how to calculate a percentage???
I don't mean to patronize you by stating the obvious but I don't know
how else to interpret what you wrote.
percentArea = numberOfPixels / (double(rowsInImage) *
double(columnsInImage));

Tags for 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