The Geospatial Polynomial Transformation Toolbox provides a robust framework for geospatial image transformation, resampling, and interpolation using polynomial regression. This toolbox enables users to perform coordinate transformations, pointwise corrections, resampling, and piecewise regression to improve georeferencing accuracy.
To ensure all required submodules (including the Genetic Algorithm (GA) regression module) are included, clone the repository recursively:
git clone --recursive https://github.com/HesamTaherzadeh/GeometricRegressor.git
cd GeometricRegressor
Ensure that the required Python packages are installed:
pip install numpy matplotlib PySide6
The Genetic Algorithm (GA) module is located in thirdparty/GA
. Navigate to the submodule and follow the build instructions:
cd thirdparty/GA
mkdir build && cd build
cmake ..
make
After building, you can run the GA binary as follows:
./genetic_algorithm ../config/cfg.yaml
To run tests for GA:
./runTests
To use the Python bindings for the Genetic Algorithm, follow these steps:
cd ..
python3 -m pip install pybind11 numpy
python3 setup.py build
python3 setup.py install --user
To verify the installation:
import genetic_algorithm as ga
print("Python bindings successfully imported!")
- Polynomial Regression for forward and backward coordinate transformation.
- Pointwise Interpolation using Multiquadratic (MQ) and Local Distance Weighted (LDW) methods.
- Resampling with bilinear interpolation and multithreading for efficient processing.
- Piecewise Regression, enabling adaptive transformations for different spatial regions.
- Graphical User Interface (GUI) for interactive visualization of transformation results.
Each algorithm is documented in its respective file:
-
- Implements forward and backward transformations using polynomial equations.
- Forms the basis for all other modules.
-
- Computes localized displacement corrections using MQ and LDW interpolation.
- Enhances ICP coordinate accuracy.
-
- Performs image resampling with polynomial transformations.
- Uses multithreading for optimal performance.
-
- Allows dataset splitting into multiple regions based on user-defined lines.
- Conducts localized polynomial regression for improved accuracy.
-
- Chooses the Best terms to avoid overparameterization error
- Performs two meta-heuristical search for terms for both backward and foreward
-
[Project management]
- Defined a project class that saves all of the neccessary information processed into a
.kntu
file, named after KNTU university - This utility allows users to save the project and their terms.
- Defined a project class that saves all of the neccessary information processed into a
-
- A set of GIFs to showcase the power of the code
- Load an Image and Ground Control Points (GCPs).
- Perform Polynomial Regression to compute transformations.
- Apply Pointwise Correction to refine the transformation accuracy.
- Resample the Image to generate a transformed grid.
- Use Piecewise Regression to analyze spatial variations.
- Visualize results interactively with quiver plots.