Extracting geological layers/grids and their correspoding values from an image

4 views (last 30 days)
This image is a cross section of a geological structure. The colors represent a certain rock property:
I am building a geological model to be used in a simulator. The model should eventually look something like this (this picture is related to a completely different structure):
The black lines show the grids boundaries and the grids are color-coded representing the corresponding value of a certain rock property: What I want to do is to extract grids and their corresponding values (similar to what we have in second figure) from the first figure. The grid sizes should not be too small but small enough to represent the structure. I don't know where to start from and which one of MATLAB image processing tools/functions is appropriate for this work. Please let me know if the question is not clear and I will update it.

Answers (1)

Image Analyst
Image Analyst on 2 Nov 2015
First manually prepare the image, like deleting the numbers, getting rid of the vertical bars sticking out the top, somehow fixing the missing hump at the top, and cropping off the right part of the image where you've lost the bottom part of the slab. Now you're ready to begin. So you can then just use threshold and find() to find out, for each column, where the starting and stopping row is.
binaryImage = grayImage < 255; % or whatever.
[rows, columns] = size(binaryImage);
for col = 1 : columns
topRows(col) = find(binaryImage, 1, 'first');
bottomRows(col) = find(binaryImage, 1, 'last');
end
Now you know the first and last row and you can then find the intermediate rows by dividing that distance up into however many layers you need to.
  2 Comments
Ali Jamali
Ali Jamali on 2 Nov 2015
Edited: Ali Jamali on 2 Nov 2015
Thank you for the response. I found the first and last row in each column. One problem is that the structure of the layers are slightly changing from one layer to another. Also, how should I find the correct grid size and location, and find an average value for the rock property based on the grid color? How can I choose the best layer thickness based on their color variation?
Image Analyst
Image Analyst on 3 Nov 2015
You might take a vertical column and see how often the intensity changes by some threshold amount. Find the width of the shortest/narrowest layer, for example 5 pixels, and then just assume everything else is a multiple of that, for example layers occur at 5,10,15,20,25, etc. Of course sometimes a layer might have a width of 2 or 3 times the thinnest layer.

Sign in to comment.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!