Eggshell pigmentation analysis

hi everyone,

as part of my phd, I decided to analyze differences in bird eggshell color patterns and so I took some photos (.RAW) of these.
Firstly, I tried to isolate the pigmented part (‘spots’) from the background of the eggshell but I found some problems. I created a ROI to isolate the egg from the total image, then I converted the obtained picture to 16bit in order to apply the threshold (I tried to used ‘Autothreshold’ plugin). I chose the Shanbhag method that is the most represented for the initial spot pattern image. On this image I used the tool ‘Analyze particles’ (size pixel = 0-infinity) to automatically mark the spots. By this way, I thought that I was able to compare the pigmented area on the total area (px unit). However, this method was not able to mark all the pigmented area but only a part of these.
Please, could you suggest me another method because I’m not sure that ‘my method’ is not the best one?

Furthermore, in order to avoid any aberrant parts on the image of the eggshell surface caused by the curvature of the eggs (e.g. shaded parts), I would like to know if there is a way to reduced my egg ROI of a standardized way, could someone help me?
I attached my photo as example (sorry, here my photo is in jpeg).

Thanks to all in advanced.

Hi @stefanopodo

Welcome to the Forum!

So… I just want to be sure that I understand what you need from these images. It was not clear to me in your post.

You want to:

  1. isolate the ‘spots’ on the egg
    a. As small, individual ROIs - one for each spot? OR
    b. As a single, combined area covering all the spots as a single ROI?
  2. isolate the total area of the egg
  3. calculate the difference in area of steps 1 and 2 above

If 3 is the ultimate goal, then I would advise to do step 1.b. - keep the spots combined as a single ROI all together.

For thresholding, you can also look into the Color Threshold tool in ImageJ. That might help you with your eggs/spots.

You can look at this other recent post that might have the answer you need.

I hope this at least helps get you started…


Hi @etadobson, Thank you for your reply!

You are right, I would like to isolate two different ROIs (one for the eggshell and one for the spots) and then calculate the number of pixels for each ROI.

Your idea is very good and your link was very useful. Reading the forum I also found this plugIn: Trainable Weka Segmetation which let me to isolate each part of the egg selecting different color classes according to our criteria. Using Color Threshold after I could isolate the ROIs created and so I could measure the number of pixel composing them.

Thank you for your help and willingness,


1 Like