Damaged area measurement

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

Damaged area measurement

chintalapati Padmavathi


Hello everybody


 

I am an entomologist working on
rice insect pests in India.
Can you please help me in measuring the damaged area (leaf area fed by an
insect) of these attached leaves. I saw ImageJ and tried different methods
mentioned. Selecting ROI and measuring is giving the area but it is very
difficult and time consuming to select the damaged area of each and every leaf
and I do have many such leaves to be measured. Is it possible to measure the
area by selecting the colour (since damaged area is transparent in colour and
rest of the leaf is green)? If there is any easy way of measuring, kindly do
mail me the procedure.

 
Dr.Ch.PadmavathiSenior Scientist - EntomologyDirectorate of Rice ResearchRajendranagarHyderabad


 

DL_-1.JPG (283K) Download Attachment
DL_-_2.JPG (276K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Damaged area measurement

Krs5
Dear Dr.Ch.Padmavathi

Using the images you provided the protocol below seems to work. If you have many images to analyse you can automate this in a macro

Try:
This will give you the infected area
Open image
Process-->Sharpen
Image-->type-->8 Bit
Image-->Adjust-->Threshold (Default; dark background)
Analyze-->Set Measurements (select what you want to measure: Area; need only to do once)
Analyze-->Analyze Particles-->Choose at least "Show: Outlines" and "Summarize".
(infected area = 100 - Area Fraction found)



(You can check if the results are OK by merging the outlines image with the 8 Bit image (without Sharpen):
Image-->Color-->Merge Channels and choose a color for each)


This will give you the total area of the leave.
Open same image
Image-->type-->8 bit
Image-->Adjust-->threshold (MaxEntropy)
Analyze-->Analyze Particle--> Choose a Size that avoids small particles something like "500-Infinity", use outlines and Summarize

Hope this help

Best wishes

Kees


Dr Ir K.R. Straatman
Senior Experimental Officer
Centre for Core Biotechnology Services
College of Medicine, Biological Sciences and Psychology
http://www.le.ac.uk/biochem/microscopy/home.html


----Original Message-----
From: ImageJ Interest Group [mailto:[hidden email]] On Behalf Of chintalapati Padmavathi
Sent: 08 February 2011 09:13
To: [hidden email]
Subject: Damaged area measurement



Hello everybody


 

I am an entomologist working on
rice insect pests in India.
Can you please help me in measuring the damaged area (leaf area fed by an
insect) of these attached leaves. I saw ImageJ and tried different methods mentioned. Selecting ROI and measuring is giving the area but it is very difficult and time consuming to select the damaged area of each and every leaf and I do have many such leaves to be measured. Is it possible to measure the area by selecting the colour (since damaged area is transparent in colour and rest of the leaf is green)? If there is any easy way of measuring, kindly do mail me the procedure.

 
Dr.Ch.PadmavathiSenior Scientist - EntomologyDirectorate of Rice ResearchRajendranagarHyderabad


 
Reply | Threaded
Open this post in threaded view
|

Re: Damaged area measurement

Peter Haub
In reply to this post by chintalapati Padmavathi
Hello

1) Download & install 'Color Space Converter' from IJ plugins page

2) Test the sample macro (attached to this email).
    The resulting images should be similar to the example attached to
this email.

3) An simple color separation is done (for demonstration) in the HUE and
the BRIGHTNESS channel of the image.
    Fixed threshold parameters are use.
    Do some tests and find out reasonable settings.

If the color of the illumination, the damaged area or the leaves are
varying to much, you have to utilize a more sophisticated color
separation techniques.

Hope this gives an idea  ..

Regards
Peter

Macro code
rice.ijm  ::

open("C:\\Temp\\DL_-1.JPG");

run("Duplicate...", "title=DL_-1mask.JPG");
run("8-bit");
setAutoThreshold("Default");
//run("Threshold...");
setAutoThreshold("Default");
setThreshold(0, 249);
run("Convert to Mask");
run("Erode");
run("Erode");
//setTool("rectangle");
makeRectangle(44, 52, 2376, 3416);
run("Clear Outside");
run("Select None");
imageCalculator("AND create", "DL_-1.JPG","DL_-1mask.JPG");


selectWindow("Result of DL_-1.JPG");
run("Color Space Converter", "from=RGB to=HSB white=D65 separate");
selectWindow("Result of DL_-1.JPG (S)");
close();

selectWindow("Result of DL_-1.JPG (B)");
run("8-bit");
setAutoThreshold("Default");
//run("Threshold...");
setThreshold(134, 255);
run("Convert to Mask");


selectWindow("Result of DL_-1.JPG (H)");
setAutoThreshold("Default");
//run("Threshold...");
setThreshold(0.0311, 0.1400);
run("NaN Background");





Am 08.02.2011 10:12, schrieb chintalapati Padmavathi:

>
> Hello everybody
>
>
>  
>
> I am an entomologist working on
> rice insect pests in India.
> Can you please help me in measuring the damaged area (leaf area fed by an
> insect) of these attached leaves. I saw ImageJ and tried different methods
> mentioned. Selecting ROI and measuring is giving the area but it is very
> difficult and time consuming to select the damaged area of each and every leaf
> and I do have many such leaves to be measured. Is it possible to measure the
> area by selecting the colour (since damaged area is transparent in colour and
> rest of the leaf is green)? If there is any easy way of measuring, kindly do
> mail me the procedure.
>
>  
> Dr.Ch.PadmavathiSenior Scientist - EntomologyDirectorate of Rice ResearchRajendranagarHyderabad
>
>
>  

DL_-1mask.jpg (15K) Download Attachment
Result of DL_-1.jpg (24K) Download Attachment
Result of DL_-1.JPG (B).jpg (26K) Download Attachment
Result of DL_-1.JPG (H).jpg (20K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Damaged area measurement

Francis Burton-3
Hi,

I have just downloaded 'Color Space Converter'. When I tried to
"Compile and Run..." it in ImageJ (1.45a, java.version: 1.6.0_21),
I got the following:

java.lang.NullPointerException
        at
Color_Space_Converter$ColorSpaceConverter.<init>(Color_Space_Converter.j
ava:79)
        at Color_Space_Converter.setup(Color_Space_Converter.java:751)
        at
ij.plugin.filter.PlugInFilterRunner.<init>(PlugInFilterRunner.java:46)
        at ij.IJ.runUserPlugIn(IJ.java:185)
        at ij.ImageJ.runUserPlugIn(ImageJ.java:264)
        at ij.plugin.PlugInExecuter.run(Compiler.java:264)
        at java.lang.Thread.run(Thread.java:619)

Any ideas why? (And is this the appropriate place to bring up problems
like this?)

Francis

> -----Original Message-----
> From: ImageJ Interest Group [mailto:[hidden email]] On
> Behalf Of Peter Haub
> Sent: 09 February 2011 09:22
> To: [hidden email]
> Subject: Re: Damaged area measurement
>
> Hello
>
> 1) Download & install 'Color Space Converter' from IJ plugins page
>[...]
Reply | Threaded
Open this post in threaded view
|

Re: Damaged area measurement

dscho
Hi,

On Wed, 9 Feb 2011, Francis Burton wrote:

> I have just downloaded 'Color Space Converter'. When I tried to
> "Compile and Run..." it in ImageJ (1.45a, java.version: 1.6.0_21),
> I got the following:
>
> java.lang.NullPointerException
> at Color_Space_Converter$ColorSpaceConverter.<init>(Color_Space_Converter.java:79)
> at Color_Space_Converter.setup(Color_Space_Converter.java:751)
> at ij.plugin.filter.PlugInFilterRunner.<init>(PlugInFilterRunner.java:46)
> at ij.IJ.runUserPlugIn(IJ.java:185)
> at ij.ImageJ.runUserPlugIn(ImageJ.java:264)
> at ij.plugin.PlugInExecuter.run(Compiler.java:264)
> at java.lang.Thread.run(Thread.java:619)

I loaded the Clown sample and started the plugin (by Compile & Run...ing
it in Fiji, which does it slightly differently from ImageJ, but that
should not matter here), and I cannot reproduce. Does the line 79 in your
Color_Space_Converter.java also read

        if (white.equalsIgnoreCase("d50")) {

?

> (And is this the appropriate place to bring up problems like this?)

Yep, absolutely.

Ciao,
Johannes
Reply | Threaded
Open this post in threaded view
|

Re: Damaged area measurement

Francis Burton-3
Hi Johannes,

> On Wed, 9 Feb 2011, Francis Burton wrote:
>
> > I have just downloaded 'Color Space Converter'. When I tried to
> > "Compile and Run..." it in ImageJ (1.45a, java.version: 1.6.0_21),
> > I got the following:
> >
> > java.lang.NullPointerException
> > at
> Color_Space_Converter$ColorSpaceConverter.<init>(Color_Space_C
> onverter.java:79)
> > at Color_Space_Converter.setup(Color_Space_Converter.java:751)
> > at
> ij.plugin.filter.PlugInFilterRunner.<init>(PlugInFilterRunner.java:46)
> > at ij.IJ.runUserPlugIn(IJ.java:185)
> > at ij.ImageJ.runUserPlugIn(ImageJ.java:264)
> > at ij.plugin.PlugInExecuter.run(Compiler.java:264)
> > at java.lang.Thread.run(Thread.java:619)
>
> I loaded the Clown sample and started the plugin (by Compile
> & Run...ing
> it in Fiji, which does it slightly differently from ImageJ, but that
> should not matter here), and I cannot reproduce. Does the
> line 79 in your
> Color_Space_Converter.java also read
>
> if (white.equalsIgnoreCase("d50")) {

That is indeed line 79 in the file I have here. One slight oddity
which may or may not provide a clue is that two class files are
produced by "Compile and Run...":

Color_Space_Converter.class    as expected, and
Color_Space_Converter$ColorSpaceConverter.class .

> > (And is this the appropriate place to bring up problems like this?)
>
> Yep, absolutely.

Good to know, thanks. (I'm sure I asked this before - it's just that
I would hate to spam the list unwittingly.)

Francis
Reply | Threaded
Open this post in threaded view
|

Re: Damaged area measurement

dscho
In reply to this post by dscho
Hi,

On Wed, 9 Feb 2011, Francis Burton wrote:

> > On Wed, 9 Feb 2011, Francis Burton wrote:
> >
> > > I have just downloaded 'Color Space Converter'. When I tried to
> > > "Compile and Run..." it in ImageJ (1.45a, java.version: 1.6.0_21), I
> > > got the following:
> > >
> > > java.lang.NullPointerException
> > > at Color_Space_Converter$ColorSpaceConverter.<init>(Color_Space_Converter.java:79)
> > > at Color_Space_Converter.setup(Color_Space_Converter.java:751)
> > > at ij.plugin.filter.PlugInFilterRunner.<init>(PlugInFilterRunner.java:46)
> > > at ij.IJ.runUserPlugIn(IJ.java:185)
> > > at ij.ImageJ.runUserPlugIn(ImageJ.java:264)
> > > at ij.plugin.PlugInExecuter.run(Compiler.java:264)
> > > at java.lang.Thread.run(Thread.java:619)
> >
> > I loaded the Clown sample and started the plugin (by Compile &
> > Run...ing it in Fiji, which does it slightly differently from ImageJ,
> > but that should not matter here), and I cannot reproduce. Does the
> > line 79 in your Color_Space_Converter.java also read
> >
> > if (white.equalsIgnoreCase("d50")) {
>
> That is indeed line 79 in the file I have here. One slight oddity
> which may or may not provide a clue is that two class files are
> produced by "Compile and Run...":
>
> Color_Space_Converter.class    as expected, and
> Color_Space_Converter$ColorSpaceConverter.class .

That is expected. ColorSpaceConverter is a so-called "inner class".

Is it possible that you run this plugin without any opened image at all?
That would explain the exception (although I agree it is not a nice way to
interact with users :-).

Ciao,
Johannes
Reply | Threaded
Open this post in threaded view
|

Re: Damaged area measurement

Francis Burton-3
Hi Johannes,

> -----Original Message-----
> From: Johannes Schindelin [mailto:[hidden email]]
> Sent: 09 February 2011 20:57
> To: Francis Burton
> Cc: ImageJ Group Interest
> Subject: RE: Damaged area measurement
>[...]
> > That is indeed line 79 in the file I have here. One slight oddity
> > which may or may not provide a clue is that two class files are
> > produced by "Compile and Run...":
> >
> > Color_Space_Converter.class    as expected, and
> > Color_Space_Converter$ColorSpaceConverter.class .
>
> That is expected. ColorSpaceConverter is a so-called "inner class".

Ah yes, I do remember seeing that behaviour before.

> Is it possible that you run this plugin without any opened
> image at all?

Correct, duh! My "Compile and Run..." was to simply to compile and
not run, because I wanted to try out Peter Haub's macro code (which
opens the example image itself). I guess I was expecting to see a
dialog appear and so the exception message threw me. I probably would
have twigged what had happened if I hadn't erroneously assumed the
message was an indication of something more mysterious. Thanks for
providing enlightenment.

> That would explain the exception (although I agree it is not
> a nice way to
> interact with users :-).

Agreed!

Francis
Reply | Threaded
Open this post in threaded view
|

Re: Damaged area measurement

concifederico@gmail.com
Hi!
I'm looking for a solution to this similar problem: I've taken scans of leaves, 5-6 of them per scan. They have complex and irregular damaged areas but easily thersholded by color. I would like to know if some plugin is capable to create a table like this by any means:
LEAF ROI ID - AREA OF LEAF ROI - SUM OF DAMAGED AREAS OF ROIs FOR (ONLY) THAT LEAF
Seems a quite simple task but I cant find the proper way to assign a damaged ROI is inside the LEAF ROI or not..
Regards,

Federico