BWTO2D is a MATLAB-based graphical user interface (GUI) that provides an unsupervised framework for the automated extraction and characterization of curvilinear geological lineaments from potential field data. The application integrates a sophisticated workflow that combines the 2D Continuous Wavelet Transform (CWT) with a novel Bayesian Topology Optimization (BTO) engine, allowing for both semi-automatic and fully automated, unsupervised detection of lineaments.
-
Advanced Wavelet Analysis: Utilizes specialized mother wavelets, including Derivatives of Poisson, to analyze data at multiple scales and orientations.
-
Intelligent Feature Selection: Employs an algorithm based on localized feature saliency and global weighted dissimilarity to select the most informative CWT-derived features.
-
Bayesian Topology Optimization (BTO): Automatically finds the optimal set of hyperparameters for lineament extraction in an unsupervised manner by maximizing a Graph Representativeness Metric (GRM).
-
Comprehensive Visualization and Export: Allows for viewing results at every stage and exporting them to common GIS formats including CSV, GeoTIFF, and Shapefiles.
The framework is designed for applications in mineral exploration, geophysical data analysis, and geological mapping.
Abbassi, B., & Cheng, L.Z. (2025). Bayesian Wavelet Topology Optimization for Curvilinear Pattern Recognition in Potential Field Data. Computers & Geosciences.
This program is designed to run on any Windows-based personal computer.
- Memory (RAM): A minimum of 8 GB of RAM is required. More RAM is recommended as it allows for processing larger images.
- Storage: A solid-state drive (SSD) with a non-volatile memory express (NVMe) interface is recommended due to the large matrix operations performed by the program.
- MATLAB Version: BWTO2D requires MATLAB R2024b.
Setup:
To use the program, locate the M-Files in the current folder of MATLAB and then type BWTO2D in the MATLAB Command Window.
- Image Processing Toolbox
- Mapping Toolbox
- Statistics and Machine Learning Toolbox
- Signal Processing Toolbox
- Wavelet Toolbox
The BWTO2D interface is organized into four main tabs:
- Data Sets
- Spectral
- Lineaments
- Export
This is the starting point for defining the study area and loading data.
- Coord Method: Define the geographic extent of your project.
- Rectangular coordinates: Uses a
.txtfile with four values (Min Lon, Max Lon, Min Lat, Max Lat) to define the boundaries. - Automatic polygonization: Automatically calculates the bounding box from a
.csvor.xyzfile containing data points.
- Rectangular coordinates: Uses a
- Polygonize: Click this button after selecting a method to load the coordinates.
- Spacing (Arc-Seconds): Determines the resolution of the analysis grid.
- Data Filter: Applies a Gaussian smoothing filter to the data for visualization.
- Point Data: Click to load scattered point data from a
.csvor.xyzfile. - Interpolation Method: Choose between Regular Interp (Nearest Neighbor) and Scattered Interp (Natural Neighbor) for gridding the data.
- Xn / Yn: Displays the resulting grid dimensions after polygonization.
This tab is for feature extraction using the Continuous Wavelet Transform (CWT).
- Point Data: Check this box to include the loaded dataset for CWT analysis.
- Merge: Combines the selected datasets into a single input matrix for the CWT.
- Mother Wavelet: Select the wavelet for the analysis. Options include Derivatives of Gaussian and Derivatives of Poisson.
Note: The Merge button must be clicked again after changing the mother wavelet. - CWT Parameters: Configure the transform with Number of Scales (Na), Scale Dilation Factor (δ), Wavelet Smoothness Filter Ratio (σ), Number of CWT Angles (Nθ), Derivatives Orders (n and m), and Poisson Upward Continuation (Z).
- CWT Button: Executes the CWT process.
This panel reduces the number of CWT feature maps to an informative, non-redundant subset.
- Parameters: Set the Feature selection dimension (d), Dissimilarity (γ), and Feature Saliency Percentage (λ).
- Feature Selection Button: Runs the selection algorithm.
This section uses the extracted spectral features to detect and map lineaments via semi-automatic or fully automatic workflows.
- Load pre-existing, known lineaments from an image or point data file for calculating the F-beta score to validate automatic results.
- Merge Inputs: Select the features to use (P for Point Data, CWT Selected for spectral features) and click Merge.
- Set Parameters: Manually control Resolution Factor (R), Image Filter Ratio (σI), Step Filtering Width (w), Variability of Step Filtering Width (υ), Number of Step Filtering Angles (Nϕ), and Lineament confidence threshold (ξ).
- Lineament Extraction Button: Runs the detection process with the specified manual parameters.
This is a fully automatic workflow that optimizes all critical hyperparameters. Using the Spectral tab beforehand is not required.
- Merge Inputs: Select the P (Point Data) checkbox and click Merge.
- Select Mother Wavelet: Choose the wavelet for the internal CWT calculation.
- BTO Max Iterations: Set the number of iterations for the optimizer.
- Lineament Extraction (BTO) Button: Starts the automated optimization and extraction process. The optimal hyperparameters found will populate the fields marked with an asterisk (*).
Visualize all results, including target data, manual and automatic lineaments, rose diagrams, and BTO diagnostic plots like BHO Performance and Hyperparameter Importance.
Save raw data, feature maps, and final lineament products.
- Data Selection: Use the radio buttons to choose the dataset to export (e.g., P Data, CWT (Manual), All Lines (Auto)).
- Export to CSV: Saves gridded data as a three-column (X, Y, Value) text file, or lineaments as vertex coordinates.
- Export to GeoTIFF / Shapefile:
- If a gridded dataset is selected (e.g., CWT maps, Densities), it saves as a GeoTIFF (.tif) file with spatial referencing.
- If a lineament dataset is selected (e.g., All Lines, Deep Lines), it saves the vector data as an Esri Shapefile (.shp).
- Point Data:
.csvor Geosoft.xyzfiles containing three columns: Longitude, Latitude, and Value. - Coordinate Definition:
.txtfile containing four lines for minimum longitude, maximum longitude, minimum latitude, and maximum latitude..csvor.xyzfile with point data for automatic boundary detection.
- Target Lineaments (for validation):
- Image files (
.jpg,.png,.bmp) accompanied by a.txtfile of the same name containing georeferencing coordinates. - Point data files (
.csv,.xyz) representing known lineaments.
- Image files (
- GIS Formats:
- GeoTIFF (.tif): For all gridded raster data, such as CWT feature maps and lineament density maps. This format preserves georeferencing information.
- Esri Shapefile (.shp): For all vector lineament data (All, Deep, and Shallow Lines). This is the industry-standard format for vector GIS data.
- Text Format:
- CSV (.csv): For exporting gridded data (X, Y, Value) or the vertex coordinates of vector lineaments.
- MATLAB Figures:
- All plots generated within the application can be saved from their respective figure windows in standard MATLAB formats (
.fig) or other image formats (.png,.jpg).
- All plots generated within the application can be saved from their respective figure windows in standard MATLAB formats (
Bahman Abbassi
Université du Québec en Abitibi-Témiscamingue
Email: bahman.abbassi@uqat.ca
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see https://www.gnu.org/licenses/.