vspline 1.1.0
Generic C++11 Code for Uniform B-Splines
Typedefs | Functions
gsm.cc File Reference

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.

Typedefs

typedef vigra::RGBValue< float, 0, 1, 2 > pixel_type
 
typedef vigra::TinyVector< float, 2 > coordinate_type
 
typedef vigra::MultiArray< 2, pixel_typetarget_type
 
typedef vspline::evaluator< coordinate_type, pixel_typeev_type
 

Functions

int main (int argc, char *argv[])
 

Detailed Description

calculating the gradient squared magnitude, derivatives

implementation of gsm.cc, performing the calculation of the gradient squared magnitude in a loop using two evaluators for the two derivatives, adding the squared magnitudes and writing the result to an image file

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 a colour image file. the result will be written to 'gsm.tif'

Definition in file gsm.cc.

Typedef Documentation

◆ coordinate_type

typedef vigra::TinyVector< float , 2 > coordinate_type

Definition at line 61 of file gsm.cc.

◆ ev_type

Definition at line 69 of file gsm.cc.

◆ pixel_type

typedef vigra::RGBValue<float,0,1,2> pixel_type

Definition at line 58 of file gsm.cc.

◆ target_type

typedef vigra::MultiArray< 2 , pixel_type > target_type

Definition at line 64 of file gsm.cc.

Function Documentation

◆ main()

int main ( int  argc,
char *  argv[] 
)

Definition at line 71 of file gsm.cc.