Segmentation of Thin Section TIFF - similar colour issues

Hi everyone, I am new to ImageJ so sorry if this is a silly question. I am just struggling carrying out segmentation on my tiff thin section image and wondering if anybody had any advice. My main issue is isolating the quartz from the pore spaces as they are such similar colours. Sorry if image isn’t too clear - just a screenshot from my tiff to show as an example. This was the section that showed it best but it is like this all over the image. I tried using colour threshold but would not pick it up. Is there a way on ImageJ that I could isolate the quartz? Looking to get an area% of the pore space. Any help is appreciated!

1 Like

Hello Lisa Mclean,
How familiar are you with ImageJ. There are a huge amount of different ways to do what you wish so I suggest that you indicate what you do and do not want. Like draw a outline on the parts which show the main difference you want to segment. I am including a sample of your image to show just a simple way this can be done. Also do you have many images to do this too?

Again, this is fast and simple but it can be done on a single pixel range.
Bob

Hello Bob,
Thank you so much for your response and help. I am not particularly familiar with ImageJ - I have been watching online tutorials and going through the help on the website but looking to use it for my dissertation so keen to learn more about it. I will attach the image I sent prior with the quartz outlined (the light coloured parts not outlined would be the pore space).

I will attach two other images too (outline image: blue = pore / purple = quartz) that might show it better as the first image was at the edge.

I have tried colour supervised classification on other applications but the pore space and quartz kept getting classified wrong because they are so similar. I have about 8 other images I am looking to do the same thing too. Any further help would be extremely appreciated!
Thank you,
Lisa

1 Like

Hello Ms. Mclean,
I suggest that first you use Image > Color > Split Channels, this will give you the Red-Blue-and Green channels. Then Image > Adjust > Brightness/Contrast > Auto on each channel separately. Then back to Image > Color > Merge Channels. This will make a more distinct image. Then go to Plugins > K-Means Cluster set as included image, obtain the Cluster centroid values image and convert to 8 bit using Image > Type and click 8 bit. Then use any LUT you wish,to define the clusters. When you use the Adjust > Threshold (normal) the different colors will show on the chart and are simple to use from there.
Advice, you may not need to use 8 clusters, you may be able to get by with less. The choice is yours. You will most likely be doing this again at some point in your career so play with this a bit to get a feel for it.
Any other questions, feel free to ask. Good Luck,
BobK-Means

Hi Bob,
Just trying this out. Thanks so much for your help. I am having issues getting to the K-means Cluster. I downloaded the ij-plugins which was on the website but still don’t see it listed in Plugins, can you help with this? Can see color clustering but unsure how to access the K-means configuration (in your image). Sorry if I am being silly!
Thank you,
Lisa

Hello Ms. Mclean,

It has been quite a while since I obtained this plugin, however it shows up in the segmentation section on my plugins list Plugins > Segmentation > k-means clustering. I have only done a quick check so here is the only information I have at this instant. I will continue to attempt to see why you may be having problems with this particular plugin however there are several clustering plugins available and they all work the same way.

25E473BC25844178A5108F8D80DCD56B.jpg

I will continue to search for the place I actually obtained it from. So try the Segmentation section and here is the only reference I have.

http://homepages.inf.ed.ac.uk/rbf/BOOKS/JAIN/Clustering_Jain_Dubes.pdf

I will get back in touch as soon as I find out what is going on.

Bob

Hi Bob,
Apologies, it was more an issue on my end. I am using Fiji through remote access and it was firewall issues rather that the software itself. Hope I haven’t wasted too much of your time, thank you so much for trying to help!

One more thing if you don’t mind! I have been trying this method and still can’t get it to work the way I’m wanting it to. I will attach an image to show the slight issue I am having. Cluster centroid values|536x500

The speckled white bits (outlined) I need to be green also. I have tired increasing the cluster centroid values but still can’t get it quite right. Do you know anything else I could try?
Thank you,
Lisa

1 Like

Hello Again Lisa McLane,
As you can see by the image that the measurment results show a minimum of 78.Everything below that level are useless to you, so I used Process > Math > Subtract—78 which left a minimum of 0 with a maximum of 143.Now we will stretch out the image by using Process > Math > Macro—setting it at v=v/143*255.This gave you the full range of 0 to 255.I then applied the Physics LUT from the LUT menu and moved on to Image > Adjust > Threshold (note do not use Color Threshold). Set the adjustments as shown by the red square in the image and apply. I think this is the range you wanted. If not then you can use more clusters when you cluster then use the ones you need. After that then just Analyze > Analyze Particles which should give you the details of what you accomplished.
I am still here if you have more questions or need more assistance.
Bob