vspline 1.1.0
Generic C++11 Code for Uniform B-Splines
|
calculating the gradient squared magnitude, derivatives More...
#include <iostream>
#include <vspline/vspline.h>
#include <vigra/stdimage.hxx>
#include <vigra/imageinfo.hxx>
#include <vigra/impex.hxx>
Go to the source code of this file.
Classes | |
struct | ev_gsm |
we build a vspline::unary_functor which calculates the sum of gradient squared magnitudes. Note how the 'compound evaluator' we construct follows a pattern of More... | |
Typedefs | |
typedef vigra::RGBValue< float, 0, 1, 2 > | pixel_type |
typedef vigra::TinyVector< float, 2 > | coordinate_type |
typedef vspline::bspline< pixel_type, 2 > | spline_type |
typedef vigra::MultiArray< 2, pixel_type > | target_type |
typedef vspline::evaluator< coordinate_type, pixel_type > | ev_type |
Functions | |
int | main (int argc, char *argv[]) |
calculating the gradient squared magnitude, derivatives
alternative implementation of gsm.cc, performing the calculation of the gradient squared magnitude with a functor and transform(), which is faster since the whole operation is multithreaded and potentially vectorized.
compile with: clang++ -std=c++11 -march=native -o gsm -O3 -pthread -DUSE_VC gsm.cc -lvigraimpex -lVc or clang++ -std=c++11 -march=native -o gsm -O3 -pthread gsm.cc -lvigraimpex (with Vc; use -DUSE_HWY and -lhwy for highway, or -std=c++17 and -DUSE_STDSIMD for the std::simd backend)
invoke passing an image file. the result will be written to 'gsm2.tif'
Definition in file gsm2.cc.
typedef vigra::TinyVector< float , 2 > coordinate_type |
typedef vspline::evaluator< coordinate_type , pixel_type > ev_type |
typedef vigra::RGBValue<float,0,1,2> pixel_type |
typedef vspline::bspline< pixel_type , 2 > spline_type |
typedef vigra::MultiArray< 2 , pixel_type > target_type |