Ruff – Clustering image textures
September 12, 2018
Solve Geosolutions is releasing another free web app that aims to help geoscientists (and others!) get the most out of their data.
Ruff is an app that takes your images and returns the same image split into groups that have similar textural characteristics. To do this it uses the GLCM algorithm to find a bunch of numbers that describe the texture around each pixel in the image.
For most of the demonstration of the app in this post, we’ll use the following seismic reflection image from here.
Let’s look at some of the textural components that are calculated using Ruff. Each parameter helps define things like roughness, slope, etc.
After we have our textures and applying some scaling, we can then group the pixels based on how similar their textural parameters are. In Ruff, this is done using k-means clustering, with the number of clusters determined by the user. Below, we see the result of using a 5 x 5 GLCM window and 6 clusters on the seismic reflection data.
It looks good! Nothing too out of place and you can see that adding colours to the image really does help distinguish areas with different textures.
What if we increased our window size? In the image below, the window size changes from 5 x 5 to 7 x 7, then 11 x 11. You will notice the clusters get coarser, as expected.
Another example, this time using an airborne magnetics image. The same principle was applied, resulting in another layer of data to interpret.
OK, last example, this time with SRTM elevation data from the Pilbara, Western Australia. Here, we’ve applied the same methodology and identified the clusters that appear to correlate well with interesting topographic features. We can isolate these clusters and see if they also occur in previously underappreciated areas.
In summary, Ruff provides the means to analyse the textural characteristics of images and provide you with an understanding of where similar textures appear in the image. Due to the computational requirements, Ruff will accept images less than 1MB in size. It’s not hard to imagine how this process can be applied to a wide range of other data applications!
We haven’t really discussed the nuts-and-bolts of the GLCM algorithm that Ruff uses, but it is generally considered to be a good first step at textural characterisation. Additionally, k-means clustering is also an OK first step, but results could be improved with more involved clustering routines.
For more advanced analysis, Solve Geosolutions offers a host of more robust, neural-network based services that we would be happy to discuss with you!