SLIP
1.4
|
Provides some algorithms to compare ranges. More...
#include <algorithm>
#include <numeric>
#include <cassert>
#include <cmath>
#include <functional>
#include "Array.hpp"
#include "Array2d.hpp"
#include "Vector.hpp"
#include "stl_algo_ext.hpp"
#include "statistics.hpp"
Go to the source code of this file.
Classes | |
struct | slip::L1_dist< _Rp, _Tp > |
Computes the L1 distance between two values x and y: ![]() | |
struct | slip::L2_dist< _Rp, _Tp > |
Computes the L2 distance between two values x and y: ![]() | |
struct | slip::L22_dist< _Rp, _Tp > |
Computes the L22 distance between two values x and y: ![]() | |
struct | slip::Relative_error_L1< _Rp, _Tp > |
Computes the L1 relative error between two values x and y: ![]() | |
struct | slip::Relative_error_L2< _Rp, _Tp > |
Computes the L2 relative error between two values x and y: ![]() | |
struct | slip::Relative_error_L22< _Rp, _Tp > |
Computes the Relative L22 error between two values x and y: ![]() | |
struct | slip::L1_dist_vect< Vector > |
Computes the L1 distance between two Vectors x and y: ![]() | |
struct | slip::L2_dist_vect< Vector > |
Computes the L2 distance between two Vectors x and y: ![]() | |
struct | slip::L22_dist_vect< Vector > |
Computes the L22 distance between two Vectors x and y: ![]() | |
Namespaces | |
slip | |
This namespace corresponds to the kernel of the Simple Library on Image Processing (SLIP). That is to say that it contains the data structures and the algorithms needed by these data strucutres. | |
Functions | |
Generic distance algorithms | |
template<typename Real , typename InputIterator1 , typename InputIterator2 , typename BinaryFunctor > | |
Real | slip::distance (InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, BinaryFunctor distance) |
Computes the sum of the pointwise distances of two ranges: ![]() | |
template<typename Real , typename InputIterator1 , typename InputIterator2 , typename BinaryFunctor , typename MaskIterator > | |
Real | slip::distance_mask (InputIterator1 first1, InputIterator1 last1, MaskIterator mask_first, InputIterator2 first2, BinaryFunctor distance, typename std::iterator_traits< MaskIterator >::value_type value=typename std::iterator_traits< MaskIterator >::value_type(1)) |
Computes the sum of the pointwise distances of two ranges: ![]() | |
template<typename Real , typename InputIterator1 , typename InputIterator2 , typename BinaryFunctor , typename Predicate > | |
Real | slip::distance_if (InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, BinaryFunctor distance, Predicate pred) |
Computes the sum of the pointwise distances of two ranges: ![]() | |
Generic distance map algorithms | |
template<typename InputIterator1 , typename InputIterator2 , typename OutputIterator , typename BinaryFunctor > | |
void | slip::distance (InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, OutputIterator result, BinaryFunctor distance) |
Computes the pointwise distances of two ranges: ![]() | |
template<typename InputIterator1 , typename InputIterator2 , typename MaskIterator , typename OutputIterator , typename BinaryFunctor > | |
void | slip::distance_mask (InputIterator1 first1, InputIterator1 last1, MaskIterator mask_first, InputIterator2 first2, OutputIterator result, BinaryFunctor distance, typename std::iterator_traits< MaskIterator >::value_type value=typename std::iterator_traits< MaskIterator >::value_type(1)) |
Computes the pointwise distances of two ranges: ![]() | |
template<typename _InputIterator1 , typename _InputIterator2 , typename _OutputIterator , typename _BinaryOperation , typename _Predicate > | |
void | slip::distance_if (_InputIterator1 first1, _InputIterator1 last1, _InputIterator2 first2, _OutputIterator result, _BinaryOperation distance, _Predicate pred) |
Computes the pointwise distances of two ranges: ![]() | |
Specific distance algorithms | |
template<typename Value_T , typename InputIterator1 , typename InputIterator2 > | |
Value_T | slip::mean_square_diff (InputIterator1 first1, InputIterator1 last1, InputIterator2 first2) |
Computes the mean square of the pointwise difference of two ranges of size N: ![]() | |
template<typename Real , typename InputIterator1 , typename InputIterator2 , typename MaskIterator > | |
Real | slip::mean_square_diff_mask (InputIterator1 first1, InputIterator1 last1, MaskIterator mask_first, InputIterator2 first2, typename std::iterator_traits< MaskIterator >::value_type value=typename std::iterator_traits< MaskIterator >::value_type(1)) |
Computes the mean square of the pointwise difference of two ranges of size N according to a mask sequence : ![]() | |
template<typename Real , typename InputIterator1 , typename InputIterator2 , typename Predicate > | |
Real | slip::mean_square_diff_if (InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, Predicate pred) |
Computes the mean square of the pointwise difference of two ranges according to a Predicate : ![]() | |
template<typename Value_T , typename InputIterator1 , typename InputIterator2 > | |
Value_T | slip::mean_abs_diff (InputIterator1 first1, InputIterator1 last1, InputIterator2 first2) |
Computes the mean absolute difference of two range of size N: ![]() | |
template<typename Value_T , typename InputIterator1 , typename InputIterator2 , typename MaskIterator > | |
Value_T | slip::mean_abs_diff_mask (InputIterator1 first1, InputIterator1 last1, MaskIterator mask_first, InputIterator2 first2, typename std::iterator_traits< MaskIterator >::value_type value=typename std::iterator_traits< MaskIterator >::value_type(1)) |
Computes the mean absolute difference of two ranges of size N according to a mask sequence : ![]() | |
template<typename Real , typename InputIterator1 , typename InputIterator2 , typename Predicate > | |
Real | slip::mean_abs_diff_if (InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, Predicate pred) |
Computes the mean absolute difference of two ranges according to a Predicate. More... | |
template<typename Real , typename InputIterator1 , typename InputIterator2 > | |
Real | slip::snr (InputIterator1 first1, InputIterator1 last1, InputIterator2 first2) |
Computes the signal to noise ration (snr) of two ranges : ![]() | |
template<typename Real , typename InputIterator1 , typename InputIterator2 , typename MaskIterator > | |
Real | slip::snr_mask (InputIterator1 first1, InputIterator1 last1, MaskIterator mask_first, InputIterator2 first2, typename std::iterator_traits< MaskIterator >::value_type value=typename std::iterator_traits< MaskIterator >::value_type(1)) |
Computes the signal to noise ration (snr) of two ranges according to a mask sequence : ![]() | |
template<typename Real , typename InputIterator1 , typename InputIterator2 , typename Predicate > | |
Real | slip::snr_if (InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, Predicate pred) |
Computes the signal to noise ration (snr) of two ranges according to a Predicate. More... | |
template<typename Real , typename InputIterator1 , typename InputIterator2 > | |
Real | slip::snr_dB (InputIterator1 first1, InputIterator1 last1, InputIterator2 first2) |
Computes the decibel signal to noise ration (snr) of two ranges : ![]() | |
template<typename Real , typename InputIterator1 , typename InputIterator2 , typename MaskIterator > | |
Real | slip::snr_dB_mask (InputIterator1 first1, InputIterator1 last1, MaskIterator mask_first, InputIterator2 first2, typename std::iterator_traits< MaskIterator >::value_type value=typename std::iterator_traits< MaskIterator >::value_type(1)) |
Computes the decibel signal to noise ration (snr) of two ranges according to a mask sequence : ![]() | |
template<typename Real , typename InputIterator1 , typename InputIterator2 , typename Predicate > | |
Real | slip::snr_dB_if (InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, Predicate pred) |
Computes the decibel signal to noise ration (snr) of two ranges according to a predicate: ![]() | |
template<typename Real , typename InputIterator1 , typename InputIterator2 > | |
Real | slip::L22_distance (InputIterator1 first1, InputIterator1 last1, InputIterator2 first2) |
Computes the square euclidian distance of two ranges: ![]() | |
template<typename Real , typename InputIterator1 , typename InputIterator2 , typename MaskIterator > | |
Real | slip::L22_distance_mask (InputIterator1 first1, InputIterator1 last1, MaskIterator mask_first, InputIterator2 first2, typename std::iterator_traits< MaskIterator >::value_type value=typename std::iterator_traits< MaskIterator >::value_type(1)) |
Computes the square eucludian distance of two ranges according to a mask sequence : ![]() | |
template<typename Real , typename InputIterator1 , typename InputIterator2 , typename Predicate > | |
Real | slip::L22_distance_if (InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, Predicate pred) |
Computes the square eucludian distance of two ranges according to a Predicate. More... | |
template<typename Real , typename InputIterator1 , typename InputIterator2 > | |
Real | slip::L2_distance (InputIterator1 first1, InputIterator1 last1, InputIterator2 first2) |
Computes the Euclidian distance of two ranges : ![]() | |
template<typename Real , typename InputIterator1 , typename InputIterator2 , typename MaskIterator > | |
Real | slip::L2_distance_mask (InputIterator1 first1, InputIterator1 last1, MaskIterator mask_first, InputIterator2 first2, typename std::iterator_traits< MaskIterator >::value_type value=typename std::iterator_traits< MaskIterator >::value_type(1)) |
Computes the eucludian distance of two ranges according to a mask sequence : ![]() | |
template<typename Real , typename InputIterator1 , typename InputIterator2 , typename Predicate > | |
Real | slip::L2_distance_if (InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, Predicate pred) |
Computes the eucludian distance of two ranges according to a Predicate. More... | |
template<typename Real , typename InputIterator1 , typename InputIterator2 > | |
Real | slip::L1_distance (InputIterator1 first1, InputIterator1 last1, InputIterator2 first2) |
Computes the L1 distance of two ranges : ![]() | |
template<typename Real , typename InputIterator1 , typename InputIterator2 , typename MaskIterator > | |
Real | slip::L1_distance_mask (InputIterator1 first1, InputIterator1 last1, MaskIterator mask_first, InputIterator2 first2, typename std::iterator_traits< MaskIterator >::value_type value=typename std::iterator_traits< MaskIterator >::value_type(1)) |
Computes the L1 distance of two ranges according to a mask sequence : ![]() | |
template<typename Real , typename InputIterator1 , typename InputIterator2 , typename Predicate > | |
Real | slip::L1_distance_if (InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, Predicate pred) |
Computes the L1 distance of two ranges according to a Predicate. More... | |
template<typename Real , typename InputIterator1 , typename InputIterator2 > | |
Real | slip::Minkowski_distance (const std::size_t n, InputIterator1 first1, InputIterator1 last1, InputIterator2 first2) |
Computes the Minkowski order n distance of two ranges : ![]() | |
template<typename Real , typename InputIterator1 , typename InputIterator2 , typename MaskIterator > | |
Real | slip::Minkowski_distance_mask (const std::size_t n, InputIterator1 first1, InputIterator1 last1, MaskIterator mask_first, InputIterator2 first2, typename std::iterator_traits< MaskIterator >::value_type value=typename std::iterator_traits< MaskIterator >::value_type(1)) |
Computes the Minkowski order n distance of two ranges according to a mask sequence : ![]() | |
template<typename Real , typename InputIterator1 , typename InputIterator2 , typename Predicate > | |
Real | slip::Minkowski_distance_if (const std::size_t n, InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, Predicate pred) |
Computes the Minkowski order n distance of two ranges according to a Predicate. More... | |
template<typename Real , typename InputIterator1 , typename InputIterator2 > | |
Real | slip::Linf_distance (InputIterator1 first1, InputIterator1 last1, InputIterator2 first2) |
Computes the Linfinite distance of two ranges : ![]() | |
template<typename Real , typename InputIterator1 , typename InputIterator2 , typename MaskIterator > | |
Real | slip::Linf_distance_mask (InputIterator1 first1, InputIterator1 last1, MaskIterator mask_first, InputIterator2 first2, typename std::iterator_traits< MaskIterator >::value_type value=typename std::iterator_traits< MaskIterator >::value_type(1)) |
Computes the Linfinite distance of two ranges according to a mask sequence : ![]() | |
template<typename Real , typename InputIterator1 , typename InputIterator2 , typename Predicate > | |
Real | slip::Linf_distance_if (InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, Predicate pred) |
Computes the Linfinite distance of two ranges according to a Predicate. More... | |
template<typename Real , typename InputIterator1 , typename InputIterator2 > | |
Real | slip::KullbackLeibler_distance (InputIterator1 first1, InputIterator1 last1, InputIterator2 first2) |
Computes the Kullback-Leibler "distance" of two ranges : ![]() | |
template<typename Real , typename InputIterator1 , typename InputIterator2 , typename MaskIterator > | |
Real | slip::KullbackLeibler_distance_mask (InputIterator1 first1, InputIterator1 last1, MaskIterator mask_first, InputIterator2 first2, typename std::iterator_traits< MaskIterator >::value_type value=typename std::iterator_traits< MaskIterator >::value_type(1)) |
Computes the Kullback-Leibler "distance" of two ranges according to a mask sequence : ![]() | |
template<typename Real , typename InputIterator1 , typename InputIterator2 , typename Predicate > | |
Real | slip::KullbackLeibler_distance_if (InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, Predicate pred) |
Computes the Kullback-Leibler "distance" of two ranges according to a Predicate. More... | |
template<typename Real , typename InputIterator1 , typename InputIterator2 > | |
Real | slip::Chi2_distance (InputIterator1 first1, InputIterator1 last1, InputIterator2 first2) |
Computes the Chi2 "distance" of two ranges : ![]() | |
template<typename Real , typename InputIterator1 , typename InputIterator2 , typename MaskIterator > | |
Real | slip::Chi2_distance_mask (InputIterator1 first1, InputIterator1 last1, MaskIterator mask_first, InputIterator2 first2, typename std::iterator_traits< MaskIterator >::value_type value=typename std::iterator_traits< MaskIterator >::value_type(1)) |
Computes the Chi2 "distance" of two ranges according to a mask sequence : ![]() | |
template<typename Real , typename InputIterator1 , typename InputIterator2 , typename Predicate > | |
Real | slip::Chi2_distance_if (InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, Predicate pred) |
Computes the Chi2 "distance" of two ranges according to a Predicate. More... | |
template<typename Value_T , typename InputIterator1 , typename InputIterator2 > | |
Value_T | slip::psnr (InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, Value_T d=static_cast< Value_T >(255)) |
template<typename Value_T , typename InputIterator1 , typename InputIterator2 , typename MaskIterator > | |
Value_T | slip::psnr_mask (InputIterator1 first1, InputIterator1 last1, MaskIterator mask1, InputIterator2 first2, typename std::iterator_traits< MaskIterator >::value_type value=typename std::iterator_traits< MaskIterator >::value_type(1), Value_T d=static_cast< Value_T >(255)) |
template<typename Value_T , typename InputIterator1 , typename InputIterator2 , typename Predicate > | |
Value_T | slip::psnr_if (InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, Predicate pred, Value_T d=static_cast< Value_T >(255)) |
template<typename Real , typename InputIterator1 , typename InputIterator2 > | |
Real | slip::SSIM (InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, Real d=static_cast< Real >(255)) |
Computes the Structural SIMilarity (SSIM) beetween two data ranges
where. More... | |
template<typename Real , typename InputIterator1 , typename InputIterator2 , typename MaskIterator > | |
Real | slip::SSIM_mask (InputIterator1 first1, InputIterator1 last1, MaskIterator maskFirst, InputIterator2 first2, typename std::iterator_traits< MaskIterator >::value_type value=typename std::iterator_traits< MaskIterator >::value_type(1), Real d=static_cast< Real >(255)) |
Computes the structural similarity beetween two data ranges according to a mask range
where. More... | |
template<typename Real , typename InputIterator1 , typename InputIterator2 , typename Predicate > | |
Real | slip::SSIM_if (InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, Predicate pred, Real d=255) |
Computes the Sructural SIMilarity (SSIM) beetween two data ranges according to a predicate
where. More... | |
Provides some algorithms to compare ranges.
Definition in file compare.hpp.