vspline 1.1.0
Generic C++11 Code for Uniform B-Splines
|
benchmarking and testing code for various vspline capabilities More...
#include <iostream>
#include <vspline/vspline.h>
#include <vigra/stdimage.hxx>
#include <vigra/imageinfo.hxx>
#include <vigra/impex.hxx>
#include <vigra/accumulator.hxx>
#include <vigra/multi_math.hxx>
#include <ctime>
#include <chrono>
Go to the source code of this file.
Macros | |
#define | PRINT_ELAPSED |
Functions | |
template<class view_type > | |
long double | check_diff (const view_type &a, const view_type &b) |
check for differences between two arrays More... | |
template<class view_type , typename real_type , typename rc_type , int specialize> | |
long double | run_test (view_type &data, vspline::bc_code bc, int DEGREE, int TIMES=32) |
template<class real_type , class rc_type > | |
long double | process_image (char *name) |
int | main (int argc, char *argv[]) |
benchmarking and testing code for various vspline capabilities
load an image, create a b-spline from it, and restore the original data, both by normal evaluation and by convolution with the reconstruction kernel. all of this is done several times each with different boundary conditions, spline degrees and in float and double arithmetic, the processing times and differences between input and restored signal are printed to cout.
obviously, this is not a useful program, it's to make sure the engine functions as intended and all combinations of float and double as values and coordinates compile and function as intended, also giving an impression of the speed of processing.
compile: clang++ -std=c++11 -march=native -o roundtrip -O3 -pthread -DUSE_VC roundtrip.cc -lvigraimpex -lVc or: clang++ -std=c++11 -march=native -o roundtrip -O3 -pthread roundtrip.cc -lvigraimpex
invoke: roundtrip <image file>
there is no image output.
Definition in file roundtrip.cc.
#define PRINT_ELAPSED |
Definition at line 64 of file roundtrip.cc.
long double check_diff | ( | const view_type & | a, |
const view_type & | b | ||
) |
check for differences between two arrays
Definition at line 78 of file roundtrip.cc.
int main | ( | int | argc, |
char * | argv[] | ||
) |
Definition at line 545 of file roundtrip.cc.
long double process_image | ( | char * | name | ) |
Definition at line 428 of file roundtrip.cc.
long double run_test | ( | view_type & | data, |
vspline::bc_code | bc, | ||
int | DEGREE, | ||
int | TIMES = 32 |
||
) |
Definition at line 119 of file roundtrip.cc.