The book “Python Recipes for Earth Sciences” (Springer 2022) is ranked 7th (Winter 2023/2024) in the Top 100 out of more than 4,600 books in Earth Sciences & Environment of Springer. The book “MATLAB Recipes for Earth Sciences” (Springer 2021) is ranked 24th. Thanks to all readers for buying the books!
Interpolating Unevenly Spaced Data With MATLAB
Most methods of time series analysis require evenly spaced time axes, which is why we have to convert unevenly spaced time series into a time series with an evenly spaced time axis using interpolation. Continue reading “Interpolating Unevenly Spaced Data With MATLAB”
Digitizing from the Screen – the Python Version
On-screen digitizing is a widely-used image processing technique. While practical digitizer tablets exist in all formats and sizes, most people prefer digitizing vector data from the screen. Examples of this type of application include the digitizing of river networks and catchment areas on topographic maps, of the outlines of lithologic units on geological maps, of landslide distributions on satellite images, and of mineral grain distributions in microscopic images. This chapter was not included in the first edition of PRES because of problems developing cross-platform Python code for digitizing images. These problems seem to be solved now, so a Python variant of minput can be presented here.
Continue reading “Digitizing from the Screen – the Python Version”
Digitizing from the Screen – the MATLAB Version
On-screen digitizing is a widely-used image processing technique. While practical digitizer tablets exist in all formats and sizes, most people prefer digitizing vector data from the screen. Examples of this type of application include the digitizing of river networks and catchment areas on topographic maps, of the outlines of lithologic units on geological maps, of landslide distributions on satellite images, and of mineral grain distributions in microscopic images. The chapter on digitization is Section 8.7 in the MRES book. Here is an updated version of the section for use with MATLAB.
Continue reading “Digitizing from the Screen – the MATLAB Version”
Calling Python from MATLAB
Now that the recipe book is available for both MATLAB and Python, many Python users will also look into the MATLAB version and discover the beauty of the older sister of Python. There is hope for these people, especially if they want to switch: you can call Python in MATLAB! Here is how.
Creating Apps with the MATLAB App Designer
Creating functions with a graphical user interface (GUI), previously know as tools, now called apps (for applications), with MATLAB is easy thanks to the AppDesigner. Here is an update of an demonstration published in Section 2.12 of the MRES book. Continue reading “Creating Apps with the MATLAB App Designer”
Removing Periodic Noise from Images with MATLAB
It can happen that an electromagnetic field disturbs the images of cameras on microscopes with a periodic noise. While the specialists are looking for the source of the interference, I quickly wrote a MATLAB script to filter the noisy image.
Continue reading “Removing Periodic Noise from Images with MATLAB”
Quantifying Charcoal in Microscope Images Using MATLAB, Part 2
Quantifying the composition of substances in geosciences, such as the mineral composition of a rock in thin sections, or the amount of charcoal in sieved sediment samples, is facilitated by the use of image processing methods. Thresholding provides a simple solution to segmenting objects within an image that have different coloration or grayscale values. As an example we use thresholding to separate the dark charcoal particles and count the pixels of these particles after segmentation. Continue reading “Quantifying Charcoal in Microscope Images Using MATLAB, Part 2”