Finding tire rubber in low quality images

I am looking to count tire rubber particles in jpeg images. I have FTIR images of the same scene (different image registration) and will want to analyze those with ImageJ later, also, and then compare the results (not just as comparison, but also as a kind of quality check). Alright, let’s talk about those jpegs. I made a clipping for illustration.

This image is of a filter with filter cake containing “stuff” and tire rubber, which is black or recognizable as black to a human eye in context.

All these blackish dots down to a few pixels are the particles I would like to count and know their particle size distribution and overall area. If I could get them all into a multi-selection in ImageJ, by now, I have figured out that I can just hit m and the magic happens. Unfortunately, I don’t know how to get to that multi-selection I so long for.

In GIMP (I first tried in ImageJ, but alas with little success), I tried adjusting the curves to really emphasize the black and gray particles, like so:

and this gave me the following

The problem with this is that small particles don’t turn black, since, to a computer, they are not nearly black enough. The other problem is visible in the right part of the image, where a big blob is now black that should not be black at all. Unfortunately, it is so dark that it is caught by the curve manipulation. I told myself I need a function that will tell the machine vision to look for context, but I have no clue how to do this. I was setting my hopes on “Subtract Background…”

What I tried in ImageJ with the following TIF

tire_particle_search_example.tif (798.6 KB)

is this

run("Set Scale...", "distance=111 known=1 pixel=1 unit=mm global");
run("Enhance Contrast", "saturated=0.35");
setMinAndMax(25, 230);
run("Subtract Background...", "rolling=50 light");

but then I don’t know how to proceed. I tried color threshold, decomposing the image to R, G, and B channels and working on those individually, but I am loosing myself in functions over functions at it all just gets very complicated, inefficient and distorted.

Them daaamn particles, I see them, they’re right there, but how do I count them?

Heh, I’m starting to feel like a one note poster, but have you considered:

As I think you already suggested, JPG files are going to be really bad for what you are trying to do. Any object that is ~ the 8x8 pixel range is going to be severely impacted by the compression (being halfway between two 8x8 blocks can have weird effects), making it very difficult for the training process. If you could avoid the images passing through a JPEG compression step, your chances of getting accurate counts would go up.

  • There are a lot of other posts with more information on problems other people using Weka have either solved or run into, so it’s worth search the forums for other examples.

Thanks, I have not, but I will now. Have you considered the new exclusive keyboard released by stackexchange? I has been designed with one note posters in mind :wink:

Alright, off I go to study this Weka Segmentation.

1 Like

Freakin’ machine learning did it again! I don’t know how it works, but I wanna marry it!

Here be results that can show themselves

The training set above (part of it) and the same extent with overlay toggled below

Now… don’t believe everything you see on TV. I am not showing you all the truth, since those are the screenshots I will use to illustrate the method “works” and I didn’t bother making other screenshots for this forum :wink: . There are some particles with drawbacks outside the limits of this extent, but it’s much better than anything I have tried (so far, but very probably also until the end of times).

So, anyways, thanks, I’m not gonna go to sleep tonight!