Python notebook that uses skimage packages to segment an image. Can be used as a subsitute to Avizo. The paper associated with this work is: https://doi.org/10.31223/X58D69
Recommended steps for running the notebook.
- Download and install vscode: https://code.visualstudio.com/
- Download and install python: https://www.python.org/downloads/ (download version 3.10.11)
- Install the python extension in vscode. In vscode, click the extensions icon in the sidebar and search for "python"
- Open a new folder (link it the folder containing the contents of this repository, wherever that is on your computer)
- Create a virtual enviornment. In vscode click View>Terminal and enter the code below:
python -m venv myenv
Then for Mac enter: source myenv/bin/activate
or for Windows: myenv\Scripts\activate - Install the necessary packages by typing this in the terminal: pip install -r requirements.txt NB must be in the folder where the requirements.txt file is. Alternatively, you can install the packages individually e.g. pip install numpy. Now open the notebook (wavelet_plotting_GRL_paper.ipynb) and begin!
This is done with image_segmentation_3D.ipynb. Here we segement the pore space using watershed segmentation.
The pore space is loaded and cropped to remove everything that isn't the core (i.e. no sleeve or core holder in the images):
The data is filtered using a non-local means filter:
Then the image is segmented using a watershed segmentation. Values for this are chosen by the user:
This is done with flow_segmentation_3D.ipynb. Here we segment the gas in the images using differential imaging and a simple threshold. This requires an image with only brine in the pore space prior to the injeciton of the gas (or oil).
The wet image is cropped and registered to the dry scan.
The flow image is cropped and registered to the dry scan.
The images are filtered using the non-local means filter:
We subtract the wet image from the flow image to get the location of the gas:
The segmented dry scan can get the location of the water in the final segmentation of the images.