Black/Yellow Ratio Analysis

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

Black/Yellow Ratio Analysis

Margaret Grace James
Good afternoon,


I am an Ecology undergraduate and for my dissertation I need to analyse around 800 separate images of hoverfly specimens. I wanted to ask what is the most accurate and time efficient way to be able to measure the amount of black and yellow in a section? I am investigating the different ratios of black to yellow in hoverfly abdomens.


I have previously drawn a freestyle shape around first the black 'stripe' and hit Ctrl+M, then repeat for the yellow, then entered the figures into a spreadsheet I have set up to calculate the ratio. With a very large sample size I wanted to ask if there is a better way of doing this, I am very new to ImageJ and find most of its functions are way over my head!


I would genuinely appreciate any and all advice you have.


Many thanks,


Meg


--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: Black/Yellow Ratio Analysis

Herbie
Good day Meg,

I assume that you have RGB-images and as the name implies, they don't
show an explicit yellow channel...

To extract the yellow areas you may have a look at
"Image > Adjust > Color Threshold"
or at the plugin "color deconvolution" of Gabriel Landini
<http://www.mecourse.com/landinig/software/software.html>

There are other approaches/plugins as well.

The greater problem appear to be the "black" area. For the purpose of
the black area extraction it would be helpful to see a typical image.

Best

Herbie

::::::::::::::::::::::::::::::::::::::::::::::::::
Am 30.09.16 um 15:54 schrieb Margaret Grace James:

> Good afternoon,
>
>
> I am an Ecology undergraduate and for my dissertation I need to
> analyse around 800 separate images of hoverfly specimens. I wanted to
> ask what is the most accurate and time efficient way to be able to
> measure the amount of black and yellow in a section? I am
> investigating the different ratios of black to yellow in hoverfly
> abdomens.
>
>
> I have previously drawn a freestyle shape around first the black
> 'stripe' and hit Ctrl+M, then repeat for the yellow, then entered the
> figures into a spreadsheet I have set up to calculate the ratio. With
> a very large sample size I wanted to ask if there is a better way of
> doing this, I am very new to ImageJ and find most of its functions
> are way over my head!
>
>
> I would genuinely appreciate any and all advice you have.
>
>
> Many thanks,
>
>
> Meg
>
>
> -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: Black/Yellow Ratio Analysis

Margaret Grace James
In reply to this post by Margaret Grace James
Hello Herbie,

Thank you for your reply. I have attached a sample image taken of a wasp with my mobile phone camera, I will be using it to photograph the hoverflies this week. I will research how to use Colour Thresholds, thank you for the advice.

Best wishes,

Meg

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html

17.jpg (1M) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Black/Yellow Ratio Analysis

Herbie
good day Meg,

just for the record:

"mobile phone camera"

If it's for serious science, don't use that "camera"!
If it's for a student project, you may perhaps...

For serious science you need a camera that provides raw images with
defined gamma, at best gamma = 1. Furthermore, you need defined
illumination and a color reference chart for later color correction.

JPEG-compressed image are a bad idea for serious science. JPEG is a
lossy compression that introduces artifacts. It is not made for machine
analysis...

I'll have a look at the provided image.

best

Herbie

::::::::::::::::::::::::::::::::::::::
Am 02.10.16 um 15:16 schrieb Meg James:

> Hello Herbie,
>
> Thank you for your reply. I have attached a sample image taken of a
> wasp with my mobile phone camera, I will be using it to photograph
> the hoverflies this week. I will research how to use Colour
> Thresholds, thank you for the advice.
>
> Best wishes,
>
> Meg
>
> -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: Black/Yellow Ratio Analysis

Margaret Grace James
In reply to this post by Margaret Grace James
Hi Herbert,

Thank you for the advice, I wouldn't dream of using a phone for serious analyses! I am doing my undergraduate dissertation andone can only use the equipment available to me, I have no access to better photography equipment. I appreciate you taking the time to help me.

Many thanks,
Meg

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: Black/Yellow Ratio Analysis

Herbie
Dear Meg,

attached please find a possible segmentation result based on color.

Here are the processing steps:

1.
Remove the background by using an appropriate "Color Threshold".

2.
Select the isolated object (insect).
 > 17_whole
Measure the area (number of selected pixels)
in my case > 2 178 330

3.
Select what you judge being yellowish by using an appropriate "Color
Threshold".
 > 17_yellowish
Measure the area (number of selected pixels).
in my case > 957 892

4.
Subtract the yellowish area from the total area which gives you the
grayish area.
in my case > 1 220 438

Evidently there is little chance for "Color Threshold"-parameters that
are universally applicable. In short, you will have to individually
determine adequate settings... Hence, be prepared that several hundreds
of objects may take some days to analyze.

HTH

Herbie
(Sorry, but my actual name is not Herbert.)

::::::::::::::::::::::::::::::::::::::
Am 02.10.16 um 17:05 schrieb Meg James:

> Hi Herbert,
>
> Thank you for the advice, I wouldn't dream of using a phone for
> serious analyses! I am doing my undergraduate dissertation andone can
> only use the equipment available to me, I have no access to better
> photography equipment. I appreciate you taking the time to help me.
>
> Many thanks, Meg
>
> -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html

17_whole.png (254K) Download Attachment
17_yellowish.png (257K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Black/Yellow Ratio Analysis

Margaret Grace James
In reply to this post by Margaret Grace James
Dear Herbie,

I apologise for writing Herbert, auto correct! I sincerely appreciate the trouble you have gone to, to help me make my dissertation as successful as possible. Thank you very much.

All the best,
Meg

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html