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 ,Image segmentation

Subject: Image processing ,Image segmentation

From: Azy

Date: 19 Jul, 2010 09:30:22

Message: 1 of 49

Hi ..Actlly my intrest in image processing has just started growing thru matlab..
 I have take an image which contains cells woth nuclei inside. It was a color image so i converted it to gray scale image. I find it hard to process ,so i converted it to binary image. NOw after connverting it binary image, im not able to plot boundaries of it properly as compared to ur coins boundary tracing example. can u help me out plz.

My aim is to sort out the round cells in image and count them.

Subject: Image processing ,Image segmentation

From: Sean

Date: 19 Jul, 2010 14:08:04

Message: 2 of 49

"Azy " <azhar421@yahoo.com> wrote in message <i215vd$j32$1@fred.mathworks.com>...
> Hi ..Actlly my intrest in image processing has just started growing thru matlab..
> I have take an image which contains cells woth nuclei inside. It was a color image so i converted it to gray scale image. I find it hard to process ,so i converted it to binary image. NOw after connverting it binary image, im not able to plot boundaries of it properly as compared to ur coins boundary tracing example. can u help me out plz.
>
> My aim is to sort out the round cells in image and count them.

Can you show us your images?
Take a look at:
>>doc bwboundaries
>>doc edge

If you want to measure "circularity" one easy way would be to take the (actual area)/(pi*equivdiameter/4) which would measure the the shape compared to an ideal circle. Both actual area and equivdiameter are outputs of regionprops().

Subject: Image processing ,Image segmentation

From: Azy

Date: 26 Jul, 2010 08:46:05

Message: 3 of 49

"Sean " <sean.dewolski@nospamplease.umit.maine.edu> wrote in message <i21m84$t1$1@fred.mathworks.com>...
> "Azy " <azhar421@yahoo.com> wrote in message <i215vd$j32$1@fred.mathworks.com>...
> > Hi ..Actlly my intrest in image processing has just started growing thru matlab..
> > I have take an image which contains cells woth nuclei inside. It was a color image so i converted it to gray scale image. I find it hard to process ,so i converted it to binary image. NOw after connverting it binary image, im not able to plot boundaries of it properly as compared to ur coins boundary tracing example. can u help me out plz.
> >
> > My aim is to sort out the round cells in image and count them.
>
> Can you show us your images?
> Take a look at:
> >>doc bwboundaries
> >>doc edge
>
> If you want to measure "circularity" one easy way would be to take the (actual area)/(pi*equivdiameter/4) which would measure the the shape compared to an ideal circle. Both actual area and equivdiameter are outputs of regionprops().



Thanks for showing your interest:

My image is : http://i29.tinypic.com/4qt1tk.jpg

Its a color image . It has got a cirular red blood cells and a big white cell in a different color. I want to count those red cells excluding all other white cells.

Subject: Image processing

From: zhengjie li

Date: 9 Aug, 2010 16:13:04

Message: 4 of 49

"Azy " <azhar421@yahoo.com> wrote in message <i215vd$j32$1@fred.mathworks.com>...
> Hi ..Actlly my intrest in image processing has just started growing thru matlab..
> I have take an image which contains cells woth nuclei inside. It was a color image so i converted it to gray scale image. I find it hard to process ,so i converted it to binary image. NOw after connverting it binary image, im not able to plot boundaries of it properly as compared to ur coins boundary tracing example. can u help me out plz.
>
> My aim is to sort out the round cells in image and count them.


I find a useful image processing website for matlab : http://img.orgs.co.cc

Subject: Image processing ,Image segmentation

From: ImageAnalyst

Date: 9 Aug, 2010 16:41:18

Message: 5 of 49

I think Sean meant pi*equivdiameter^2/4

Subject: Image processing ,Image segmentation

From: Sean

Date: 9 Aug, 2010 16:52:04

Message: 6 of 49

ImageAnalyst <imageanalyst@mailinator.com> wrote in message <35aed27e-5ee4-4ed4-8bd7-cf01bc8e5574@q22g2000yqm.googlegroups.com>...
> I think Sean meant pi*equivdiameter^2/4

Good catch!

Subject: Image processing ,Image segmentation

From: Azy

Date: 23 Aug, 2010 15:03:05

Message: 7 of 49

"Sean " <sean.dewolski@nospamplease.umit.maine.edu> wrote in message <i3pbnk$ee3$1@fred.mathworks.com>...
> ImageAnalyst <imageanalyst@mailinator.com> wrote in message <35aed27e-5ee4-4ed4-8bd7-cf01bc8e5574@q22g2000yqm.googlegroups.com>...
> > I think Sean meant pi*equivdiameter^2/4
>
> Good catch!
#


hi thanks for your suggestion but it will work for binary images only ..it will not work for color images ....

Subject: Image processing ,Image segmentation

From: Azy

Date: 23 Aug, 2010 15:03:05

Message: 8 of 49

ImageAnalyst <imageanalyst@mailinator.com> wrote in message <35aed27e-5ee4-4ed4-8bd7-cf01bc8e5574@q22g2000yqm.googlegroups.com>...
> I think Sean meant pi*equivdiameter^2/4





hi thanks for your suggestion but it will work for binary images only ..it will not work for color images ....

Subject: Image processing ,Image segmentation

From: Image Analyst

Date: 23 Aug, 2010 16:01:22

Message: 9 of 49

You have to do some sort of processing on your color image to turn it into a binary image, like color classification. Then you can do your measurements.

Subject: Image processing ,Image segmentation

From: Azy

Date: 23 Aug, 2010 16:38:05

Message: 10 of 49

"Image Analyst" <imageanalyst@mailinator.com> wrote in message <i4u60i$q49$1@fred.mathworks.com>...
> You have to do some sort of processing on your color image to turn it into a binary image, like color classification. Then you can do your measurements.




But i think if i convert it into a binary image then i will lose color specifications and instead end up counting in white cells also !!!

Subject: Image processing ,Image segmentation

From: ImageAnalyst

Date: 23 Aug, 2010 19:37:18

Message: 11 of 49

On Aug 23, 12:38 pm, "Azy " <azhar...@yahoo.com> wrote:
> "Image Analyst" <imageanal...@mailinator.com> wrote in message <i4u60i$q4...@fred.mathworks.com>...
> > You have to do some sort of processing on your color image to turn it into a binary image, like color classification.  Then you can do your measurements.
>
> But i think if i convert it into a binary image then i will lose color specifications and instead end up counting in white cells also !!!

---------------------------------------------------------------
You don't understand. You do some kind of processing on the full
color image, such as color classification. Perhaps that means simply
thresholding the blue channel, or something similar. You could also
throw in some things like size filtering, shape filtering, whatever.
When you are all done, you will have a binary image that is 1 where
you have red object pixels, and 0 where you have background or white
objects. Then you find the size, or whatever property you're looking
for, of those red blobs that you have identified. See my color
detection demos if you need an example:
http://www.mathworks.com/matlabcentral/fileexchange/authors/31862

Subject: Image processing ,Image segmentation

From: Azy

Date: 26 Aug, 2010 06:53:04

Message: 12 of 49

ImageAnalyst <imageanalyst@mailinator.com> wrote in message <166320b3-da53-4ad1-8121-cdb3af5e9dca@g17g2000yqe.googlegroups.com>...
> On Aug 23, 12:38 pm, "Azy " <azhar...@yahoo.com> wrote:
> > "Image Analyst" <imageanal...@mailinator.com> wrote in message <i4u60i$q4...@fred.mathworks.com>...
> > > You have to do some sort of processing on your color image to turn it into a binary image, like color classification.  Then you can do your measurements.
> >
> > But i think if i convert it into a binary image then i will lose color specifications and instead end up counting in white cells also !!!
>
> ---------------------------------------------------------------
> You don't understand. You do some kind of processing on the full
> color image, such as color classification. Perhaps that means simply
> thresholding the blue channel, or something similar. You could also
> throw in some things like size filtering, shape filtering, whatever.
> When you are all done, you will have a binary image that is 1 where
> you have red object pixels, and 0 where you have background or white
> objects. Then you find the size, or whatever property you're looking
> for, of those red blobs that you have identified. See my color
> detection demos if you need an example:
> http://www.mathworks.com/matlabcentral/fileexchange/authors/31862

---------------------------------------------------------------------------------------------

I was tryin to use makecform by usinga color from CLUTable ...

C = makecform('clut', profile, LUTtype) ..i didnt understand that profile is read from iccread but iccread reads only file of format TIFF or icc , but my images are JPEG format ..then how to conevrt the image into TIFF format or icc format

Subject: Image processing ,Image segmentation

From: ImageAnalyst

Date: 26 Aug, 2010 10:12:48

Message: 13 of 49

On Aug 26, 2:53 am, "Azy " <azhar...@yahoo.com> wrote:
> I was tryin to use makecform by usinga color from CLUTable ...
>
> C = makecform('clut', profile, LUTtype) ..i didnt understand that profile is read from iccread but iccread reads only file of format TIFF or icc , but my images are JPEG format ..then how to conevrt the image into TIFF format or icc format
----------------------------------------------------------------
Sorry, I know what a look up table is, I know what a TIFF image is, I
know what the ICC and ICC profile is, but I don't know what you're
saying.

Subject: Image processing ,Image segmentation

From: Azy

Date: 26 Aug, 2010 11:32:04

Message: 14 of 49

ImageAnalyst <imageanalyst@mailinator.com> wrote in message <37a21ebf-bcc9-49aa-b3e4-994365c27768@q1g2000yqg.googlegroups.com>...
> On Aug 26, 2:53 am, "Azy " <azhar...@yahoo.com> wrote:
> > I was tryin to use makecform by usinga color from CLUTable ...
> >
> > C = makecform('clut', profile, LUTtype) ..i didnt understand that profile is read from iccread but iccread reads only file of format TIFF or icc , but my images are JPEG format ..then how to conevrt the image into TIFF format or icc format
> ----------------------------------------------------------------
> Sorry, I know what a look up table is, I know what a TIFF image is, I
> know what the ICC and ICC profile is, but I don't know what you're
> saying.

----------------------------------------------------------------------------
Well, im my images i wanted to seperate white cells which were purple in color. through color segemntation example program of yours i was able to segment out upto some extent but for some images i was not able to seperate out ,so i thought of making a another mask of gamut .

 C = makecform('clut', profile, LUTtype)-----> C = makecform('clut', profile, 'gamut')

but its giving me error that its a invalid profile !!! I dont understand this error
 

Subject: Image processing ,Image segmentation

From: ImageAnalyst

Date: 26 Aug, 2010 11:58:59

Message: 15 of 49

Read the documentation on makecform(). 'clut' is not one of the
allowed options for the first argument. Try 'srgb2lab' or something
else that is allowed.

Or just try rgb2hsv().

Subject: Image processing ,Image segmentation

From: Azy

Date: 30 Oct, 2010 14:43:03

Message: 16 of 49

Hi Image analyst,

  after a long time....I have got this image after some iterations using kmeans..
http://img257.imageshack.us/img257/2426/cell1.png

        I wamt to count how many circular round cells are there ...as we can also observe there are some cells overlapping...Can you tell me how to seperate them and count it accurately.. waiting for ur reply...thx




ImageAnalyst <imageanalyst@mailinator.com> wrote in message <02071047-aade-4aaa-98ff-9e628b5ae522@x21g2000yqa.googlegroups.com>...
> Read the documentation on makecform(). 'clut' is not one of the
> allowed options for the first argument. Try 'srgb2lab' or something
> else that is allowed.
>
> Or just try rgb2hsv().

Subject: Image processing ,Image segmentation

From: Sean

Date: 30 Oct, 2010 14:53:03

Message: 17 of 49

> after a long time....I have got this image after some iterations using kmeans..
> http://img257.imageshack.us/img257/2426/cell1.png
>
> I wamt to count how many circular round cells are there ...as we can also observe there are some cells overlapping...Can you tell me how to seperate them and count it accurately.. waiting for ur reply...thx
>

A hint:
doc imerode

Subject: Image processing ,Image segmentation

From: ImageAnalyst

Date: 30 Oct, 2010 16:50:10

Message: 18 of 49

Look into watershed segmentation. MATLAB's Image Processing Toolbox
has a demo on splitting objects using marker controlled watershed
segmentation.

Here's another reference page:
http://cmm.ensmp.fr/~beucher/wtshed.html

Subject: Image processing ,Image segmentation

From: Azy

Date: 1 Nov, 2010 19:52:03

Message: 19 of 49

Well. I have seen it but i dont understand how it can be implemented ..In matlab demo it just shows ,a near example of beans ,which can be seperated by watershed segmentation
but it didnt explain how it is done !!!




ImageAnalyst <imageanalyst@mailinator.com> wrote in message <4741d98e-ef77-4cb7-be39-8a33715569a3@p1g2000yqm.googlegroups.com>...
> Look into watershed segmentation. MATLAB's Image Processing Toolbox
> has a demo on splitting objects using marker controlled watershed
> segmentation.
>
> Here's another reference page:
> http://cmm.ensmp.fr/~beucher/wtshed.html

Subject: Image processing ,Image segmentation

From: ImageAnalyst

Date: 1 Nov, 2010 20:49:28

Message: 20 of 49

On Nov 1, 3:52 pm, "Azy " <azhar...@yahoo.com> wrote:
> Well. I have seen it but i dont understand how it can be implemented ..In matlab demo it just shows ,a near example of beans ,which can be seperated by watershed segmentation
> but it didnt explain how it is done !!!
----------------------------------------------------------
Well here's Steve Eddins's demo that goes through it step by step:
http://blogs.mathworks.com/steve/2006/06/02/cell-segmentation/

Subject: Image processing ,Image segmentation

From: Azy

Date: 6 Nov, 2010 12:42:05

Message: 21 of 49

After processing the image : http://img257.imageshack.us/img257/2426/cell1.png through watershed segmentation .... i got this image...

http://img825.imageshack.us/img825/5052/imwatershed.jpg

..image is shrinked ..donno y ....yet i dont it correct wat of segmenting the cells...

IF its correct way of segmenting ..hw can i count the labelled cells in the image

Subject: Image processing ,Image segmentation

From: ImageAnalyst

Date: 6 Nov, 2010 12:45:44

Message: 22 of 49

On Nov 6, 8:42 am, "Azy " <azhar...@yahoo.com> wrote:
> IF its correct way of segmenting ..hw can i count the labelled cells in the image
----------------------------------------------------------------
It looks like you've done something like this:

[labeledImage numberOfBlobs] = bwlabel(binaryImage, 8); % Label
each blob so we can make measurements of it
coloredLabels = label2rgb (labeledImage, 'hsv', 'k', 'shuffle'); %
pseudo random color labels

If so, the number of what you're calling "cells" is directly returned
as numberOfBlobs from bwlabel().
-ImageAnalyst

Subject: Image processing ,Image segmentation

From: Azy

Date: 12 Dec, 2010 18:44:04

Message: 23 of 49

Hieeee....Image Analyst.....

the original image : http://azhar421.blogspot.com/2010/12/original-image.html

Final waterhsed image : http://azhar421.blogspot.com/2010/12/image-output-after-watershedding.html

My code 4 this
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
i=imread('original image');
i=rgb2gray(i);
i=histeq(i);

se=strel('disk',5,6);
iopen=uint8(imopen(i,se));figure,imshow(iopen),title('imopen')
iclose=imclose(iopen,se);figure,imshow(iclose),title('imclose')


ierode=imdilate(iclose,se);figure,imshow(ierode),title('imerode')
ir_erode=imreconstruct(iclose,ierode);

idilate=imerode(ierode,se);figure,imshow(idilate),title('imdilate');

ir_dilate=imreconstruct(imcomplement(ir_erode),imcomplement(idilate));
ir_dilate=imcomplement(ir_dilate);
figure,imshow(ir_dilate),title('ir_ dilate');

bw=uint8(im2bw(ir_dilate,graythresh(ir_dilate)));figure,imshow(bw)
bw=uint8(bwareaopen(bw,4));


j=bwdist(bw);
o1=watershed(j);figure,imshow(o1)
w=label2rgb(o1);figure,imshow(w)

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

My task is to remove white cell(purple coloured) and retain blood cell(red) .We can directly take out the red chunk but as we can see some overlapping cells . we need to seperate it out ,in order to count them accurately..The output i have achieved i think is only 80% accurate ...I want to make it more accurate by seperating overlapping cells and also tell me how to wrtite down the code to count those cells.

Subject: Image processing ,Image segmentation

From: Azy

Date: 17 Dec, 2010 05:05:22

Message: 24 of 49

IMage Analyst ..r u on holiday !!!!!!!!! U havent replied !!!! I wonder y....???....anywayz can sum1 plz reply

Subject: Image processing ,Image segmentation

From: ImageAnalyst

Date: 17 Dec, 2010 11:41:34

Message: 25 of 49

On Dec 17, 12:05 am, "Azy " <azhar...@yahoo.com> wrote:
> IMage Analyst ..r u on holiday !!!!!!!!! U havent replied  !!!! I wonder y....???....anywayz can sum1 plz reply

-----------------------------------------------------------------
No, not yet. I still have to go in to work today. But I plan on
going on holiday (or "vacation" as we say here) starting tomorrow for
two weeks so maybe I'll get to it then if no one else has. Was there
something about my File Exchange color detection apps that could not
be applied in your case? I would think those should work. In the
meantime, you can post more examples of pictures.

And, for the convenience of those of you using cell phones, I've run
the above through my textspeak app (no, it's not on the File Exchange
yet) to give this translation:

no not yet i sltil hvae to go in to wrok tadoy but i paln on gonig on
hildaoy (or "niatvoca" as we say hree) sirnattg troormow for two wekes
so myabe il'l get to it tehn if no one esle has was trehe soitmheng
abt my flie exahgcne coolr diteocten apps taht culod not be aplpied in
ur csae i wolud tinhk tshoe slhoud wrok in mmtiaene u can psot mroe
emlepaxs of pticeurs!!!!!!!!!!!!!!!!! It URGNT!!!!!!!

Subject: Image processing ,Image segmentation

From: Azy

Date: 17 Dec, 2010 15:30:24

Message: 26 of 49

ur color detection is good..i got some got ideas abt image processing thru that.....but how to count that red chunk n ....i guess it was not working with some pictures..I will try to post those pictures up !!!!!!! But tell me how to cunt that red chunk after segmenting...i tried bwlabel ...but was totally confused...i didnt understand how did it gav the count ,which wa totally an absurd number...Reply b4 goin on holiday plzzzzz

Subject: Image processing ,Image segmentation

From: Geant Bepi

Date: 17 Dec, 2010 15:53:20

Message: 27 of 49

Hey guys!!

sorry for posting something irrelevant to the topic being discussed here.

but I need some urgent help.. (only a little help)

I invite the brains here to look at my simple problem mentioned below and help me with some tips;
link: http://www.mathworks.com/matlabcentral/newsreader/view_thread/297252#804997

appreciate any knowledge you'd like to share on the matter.

thanks heaps!

Subject: Image processing ,Image segmentation

From: ImageAnalyst

Date: 17 Dec, 2010 16:00:51

Message: 28 of 49

On Dec 17, 10:53 am, "Geant Bepi"
<timothyschru_useonlywhatsbeforeundersc...@yahoo.co.uk> wrote:
> Hey guys!!
>
> sorry for posting something irrelevant to the topic being discussed here.
>
> but I need some urgent help.. (only a little help)
>
> I invite the brains here to look at my simple problem mentioned below and help me with some tips;
> link:http://www.mathworks.com/matlabcentral/newsreader/view_thread/297252#...
>
> appreciate any knowledge you'd like to share on the matter.
>
> thanks heaps!

-----------------------------------------------------------------------------------------------
Why apologize in advance for something you already know is wrong,
rather than do it correctly right from the start? In other words, you
knew you should have stuck to your original thread and just replied to
that thread ONLY, yet you added on to unrelated threads anyway, and
then apologized for it. Please don't add on to the other 8000
messages this month, just yours would be sufficient.

Subject: Image processing ,Image segmentation

From: Azy

Date: 17 Dec, 2010 16:26:05

Message: 29 of 49

hi image analyst ,,,,, PLease temme how to count the chunk extracted thru bwlabel ...n regionprops !!!!

Subject: Image processing ,Image segmentation

From: ImageAnalyst

Date: 17 Dec, 2010 16:26:59

Message: 30 of 49

On Dec 17, 11:26 am, "Azy " <azhar...@yahoo.com> wrote:
> hi image analyst ,,,,, PLease temme how to count the chunk extracted thru bwlabel ...n regionprops !!!!

---------------------------------------
One of the values returned from bwlabel is the object count.

Subject: Image processing ,Image segmentation

From: Azy

Date: 17 Dec, 2010 16:33:05

Message: 31 of 49

how to view the returned value.....L=bwlable(i); disp(L(:)) aur in anyother way

Subject: Image processing ,Image segmentation

From: Sean de

Date: 17 Dec, 2010 16:37:22

Message: 32 of 49

"Azy " <azhar421@yahoo.com> wrote in message <ieg3c1$co9$1@fred.mathworks.com>...
> how to view the returned value.....L=bwlable(i); disp(L(:)) aur in anyother way


max(L(:))

or

numel(unique(L(:)))-1 %account for background

Subject: Image processing ,Image segmentation

From: Geant Bepi

Date: 17 Dec, 2010 16:39:06

Message: 33 of 49

ImageAnalyst <imageanalyst@mailinator.com> wrote in message <c752e14d-cf1f-4a19-9b7c-9cc727ae2db7@r29g2000yqj.googlegroups.com>...
> On Dec 17, 10:53 am, "Geant Bepi"
> <timothyschru_useonlywhatsbeforeundersc...@yahoo.co.uk> wrote:
> > Hey guys!!
> >
> > sorry for posting something irrelevant to the topic being discussed here.
> >
> > but I need some urgent help.. (only a little help)
> >
> > I invite the brains here to look at my simple problem mentioned below and help me with some tips;
> > link:http://www.mathworks.com/matlabcentral/newsreader/view_thread/297252#...
> >
> > appreciate any knowledge you'd like to share on the matter.
> >
> > thanks heaps!
>
> -----------------------------------------------------------------------------------------------
> Why apologize in advance for something you already know is wrong,
> rather than do it correctly right from the start? In other words, you
> knew you should have stuck to your original thread and just replied to
> that thread ONLY, yet you added on to unrelated threads anyway, and
> then apologized for it. Please don't add on to the other 8000
> messages this month, just yours would be sufficient.

yes I know..but I think I had a valid reason :)

Subject: Image processing ,Image segmentation

From: Sean de

Date: 17 Dec, 2010 16:47:06

Message: 34 of 49

"Geant Bepi" <timothyschru_useonlywhatsbeforeunderscore@yahoo.co.uk> wrote in
> yes I know..but I think I had a valid reason :)


That makes one person.

Subject: Image processing ,Image segmentation

From: Azy

Date: 17 Dec, 2010 16:49:05

Message: 35 of 49

Thanx sean 4 the command !!!!!!!!!

Subject: Image processing ,Image segmentation

From: Azy

Date: 17 Dec, 2010 17:01:07

Message: 36 of 49

HI Sean and IMage analyst !!!!!!! this is the image where the code of colordetection fails..In the context of counting the cells . After sperating the chunk..wen i tried to count the cells...it gives me as 319....thru bwlabel ....DOnno y...>

Subject: Image processing ,Image segmentation

From: ImageAnalyst

Date: 17 Dec, 2010 17:09:16

Message: 37 of 49

On Dec 17, 12:01 pm, "Azy " <azhar...@yahoo.com> wrote:
> HI Sean and IMage analyst  !!!!!!! this is the image where the code of colordetection fails..In the context of counting the cells . After sperating the chunk..wen i tried to count the cells...it gives me as 319....thru bwlabel ....DOnno y...>

-----------------------------------------------------
I think you should be able to figure it out. You're a smart guy,
right? Maybe it has to do with your keyboard. It seems to be getting
worse and worse. It must be going defective and perhaps inserting
typos into your code that give errors. I don't know why you need
another way of getting the object count - there's nothing wrong with
the value returned from bwlabel and it will give the same value as
Sean's method, and the same as you get by taking the size of the
structure returned from regionprops. They're all the same.

Subject: Image processing ,Image segmentation

From: Geant Bepi

Date: 17 Dec, 2010 17:18:05

Message: 38 of 49

"Sean de " <sean.dewolski@nospamplease.umit.maine.edu> wrote in message <ieg46a$6qc$1@fred.mathworks.com>...
> "Geant Bepi" <timothyschru_useonlywhatsbeforeunderscore@yahoo.co.uk> wrote in
> > yes I know..but I think I had a valid reason :)
>
>
> That makes one person.

I was so desperate coz i'm sitting on this for too long :( it just occurred to me, maybe I should try where people are more active in replying...

 

Subject: Image processing ,Image segmentation

From: Sean de

Date: 17 Dec, 2010 17:21:08

Message: 39 of 49

ImageAnalyst <imageanalyst@mailinator.com> wrote in message <3dfc5715-830b-4459-8ff5-bcb6acf441c0@j25g2000yqa.googlegroups.com>...
> On Dec 17, 12:01 pm, "Azy " <azhar...@yahoo.com> wrote:
> > HI Sean and IMage analyst  !!!!!!! this is the image where the code of colordetection fails..In the context of counting the cells . After sperating the chunk..wen i tried to count the cells...it gives me as 319....thru bwlabel ....DOnno y...>
>
> -----------------------------------------------------
> I think you should be able to figure it out. You're a smart guy,
> right? Maybe it has to do with your keyboard. It seems to be getting
> worse and worse. It must be going defective and perhaps inserting
> typos into your code that give errors. I don't know why you need
> another way of getting the object count - there's nothing wrong with
> the value returned from bwlabel and it will give the same value as
> Sean's method, and the same as you get by taking the size of the
> structure returned from regionprops. They're all the same.

Why don't you calculate the size of each? Could there be a whole bunch of single pixel objects you don't want?

CC = bwconncomp(your_image);
sizes = cellfun(@numel,CC.PixelIdxList);
hist(sizes);

Subject: Image processing ,Image segmentation

From: Azy

Date: 17 Dec, 2010 23:25:08

Message: 40 of 49

Sorry guys ..it seems i have forgotten to publish the image .. here it is http://azhar421.blogspot.com/2010/12/image-fig-2.html and question remains same

HI Sean and IMage analyst !!!!!!! this is the image where the code of colordetection fails..In the context of counting the cells . After sperating the chunk..wen i tried to count the cells...it gives me as 319....thru bwlabel ....DOnno y...>

Subject: Image processing ,Image segmentation

From: Azy

Date: 31 Dec, 2010 11:41:06

Message: 41 of 49

plzzzz...any1 answer to my queries above !!!!!!!!!!!!

Subject: Image processing ,Image segmentation

From: Walter Roberson

Date: 1 Jan, 2011 17:24:24

Message: 42 of 49

On 31/12/10 5:41 AM, Azy wrote:
> plzzzz...any1 answer to my queries above !!!!!!!!!!!!

No, I don't think so, No. I cannot see any mechanical means to determine
whether there is a single blood cell or two overlapping blood cells.
Every criteria I looked at (e.g., supposing that single cells are
translucent but cells that overlap a lot are not) was violated by some
other cell in the picture.

Give us a mechanical criteria that can unfailingly tell single cells
from overlapping cells and we might be able to do something.

Subject: Image processing ,Image segmentation

From: Azy

Date: 2 Jan, 2011 11:45:07

Message: 43 of 49

Thanks Walter for replying ... Allow me to tell my observations in mechanical terms..

If we =observe the cell, each n evry cell in the image has boundary seperated by little white or creamish color. The moment we seperate the cells using their boundaries, (Note?: Even the overlapping cells have boundaries) ... we wud hav even seperated overlapping cells, then we can proceed to count the overlapped cells... Thats my idea..Plz comment on it

Subject: Image processing ,Image segmentation

From: ImageAnalyst

Date: 2 Jan, 2011 16:31:22

Message: 44 of 49

On Jan 2, 6:45 am, "Azy " <azhar...@yahoo.com> wrote:
> Thanks Walter for replying ... Allow me to tell my observations in mechanical terms..
>
> If we =observe the cell, each n evry cell in the image has boundary seperated by little white or creamish color. The moment we seperate the cells using their boundaries, (Note?: Even the overlapping cells have boundaries) ... we wud hav even seperated overlapping cells, then we can proceed to count the overlapped cells... Thats my idea..Plz comment on it

------------------------------------------------------------------

Did you try my "simple color detection by hue" demo?
http://www.mathworks.com/matlabcentral/fileexchange/authors/31862
I did and it worked pretty darn good right out of the box. I only
changed the minimum acceptable area to be 10000
    smallestAcceptableArea = 10000; % Keep areas only if they're
bigger than this.
to get rid of the small noise specks. This gets all of the orange
blobs and ignores white, black, or purple blobs. But the blobs are
still overlapping, and they can't be split apaprt accurately because,
well, look at the purple "white blood cell" - it overlaps a red cell
and if we did a watershed, it would incorrectly split that cell into
multiple spurious cells. So counting will still have false
positives. You're welcome to try it though.

By the way, did I tell you yet to take a look at the 3D gamut with
this plugin for ImageJ:
http://rsb.info.nih.gov/ij/plugins/color-inspector.html
If you do, you will see that the gamut for things blends together so
that's why it's not easy to detect the cells accurately in any color
space, though my demo did a pretty decent job. But my demo added some
stuff on, beyond simple thresholding, like smoothing, filling, and
size filtering.

You say "If we =observe the cell, each n evry cell in the image has
boundary seperated by little white or creamish color." Yes but not
always. Quite a few cells have a white/creamy region that never makes
it to the edge and others have a rounded whitish region in the center,
presumably due to the shape of the cell, so how could you tell these
two situations apart? It's not easy, certainly not the kind of thing
we would solve in a newsgroup posting. Heck, even people would have a
hard time counting these accurately in some cases. You might have to
find interior white/creamy regions and then if it's of the right
linear or crescent shape, extend it out to the edge, thus cutting the
blob in two pieces. So it's not trivial. That's why it's probably a
graduate level project. You may spend years on it to get your Masters
or Ph.D. If this is not your graduate project, then perhaps some
company out there has already conquered this problem and you can just
buy their software.

Subject: Image processing ,Image segmentation

From: Azy

Date: 2 Jan, 2011 17:10:20

Message: 45 of 49

Thankq thanq...Image Anlayst.....Nice 2 c ur reply....ummaahhhh..... Well ur guess was correct...thats mah Master's project.....i thot of cracking it up in project time(i.e in 3 months) but had a miserable failure in attaining so...but becoz of mah interest I learnt a lot thru this mathwork blog and especially 4m ur demos...n all credit goes to u...Hope to continue mah work in this field even if i get job in diff field !!!!!!!! obsessed wt image procesing !!!

  I will reply back aftr trying ur suggestions ...

Subject: Image processing ,Image segmentation

From: Azy

Date: 3 Jan, 2011 12:19:07

Message: 46 of 49

Well Image analyst !!!! With the code of simplecolordetection-hue ...we can separate the chunk of cells with a diff background ( http://3.bp.blogspot.com/_iKoKwaxUrtE/TQuWktXKtRI/AAAAAAAAABU/qq9f8o6GJBs/s1600/f3.JPG) .....and with ur another code of simplecolordetection i can seperate the chunk of cells wt different background ( http://3.bp.blogspot.com/_iKoKwaxUrtE/TQUWKZrYz8I/AAAAAAAAABQ/0M4BwmB0C78/s1600/f1.JPG ) ... Cant we combine both in a single code and put a criteria to decide which code to be applied to the image ???

 I was thinking to put up a criteria of histogram (of both hsv and rgb mask) !!! put up a range of both hsv and rgb..if the value of histogram of given image lies in between these range then we can execute a particular suitable peice of code for the given image. But the problem is I m really confused how to wrtie the code for it.....

Awaiting Reply

Subject: Image processing ,Image segmentation

From: ImageAnalyst

Date: 3 Jan, 2011 13:01:39

Message: 47 of 49

Have you seen this:
http://www.mathworks.com/products/demos/image/color_seg_k/ipexhistology.html
Maybe that method will work for you. It's similar to my method but it
uses kmeans to try to find the clusters in LAB color space rather than
just using hard-coded threshold limits like I used.

Subject: Image processing ,Image segmentation

From: Azy

Date: 4 Jan, 2011 08:10:21

Message: 48 of 49

Yup I have already used but the results are nt always consistent due to the cluster created everytime are differernty thats why it cant be much reliable .....(http://3.bp.blogspot.com/_iKoKwaxUrtE/TQuWktXKtRI/AAAAAAAAABU/qq9f8o6GJBs/s1600/f3.JPG).........

ImageAnalyst <imageanalyst@mailinator.com> wrote in message <05151aa8-98ff-4376-91cf-01a56bf7881b@c2g2000yqc.googlegroups.com>...
> Have you seen this:
> http://www.mathworks.com/products/demos/image/color_seg_k/ipexhistology.html
> Maybe that method will work for you. It's similar to my method but it
> uses kmeans to try to find the clusters in LAB color space rather than
> just using hard-coded threshold limits like I used.

Subject: Image processing ,Image segmentation

From: ImageAnalyst

Date: 4 Jan, 2011 11:07:17

Message: 49 of 49

On Jan 4, 3:10 am, "Azy " <azhar...@yahoo.com> wrote:
> Yup I have already used but the results are nt always consistent  due to the cluster created everytime are differernty thats why it cant be much reliable
----------------------------------------
Yes, but you just showed that your images aren't consistent every
time, so that's why that method should work for your inconsistent
images - it should work exactly *because* it adapts to every image by
itself.

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