Hugin trunk 0.1
Loading...
Searching...
No Matches
hugin_math.cpp
Go to the documentation of this file.
1// -*- c-basic-offset: 4 -*-
23#include "hugin_math.h"
24#include "hugin_utils/utils.h"
25
27namespace hugin_utils
28{
29 int _gcd(int a, int b)
30 {
31 // calculate greated common divisor using Euclidean algorithm
32 return b == 0 ? a : _gcd(b, a % b);
33 }
34
35 int gcd(int a, int b)
36 {
37 // enforce that both arguments are positive
38 return _gcd(abs(a), abs(b));
39 }
40
41} // namespace
misc math function & classes used by other parts of the program
namespace for various utils
int _gcd(int a, int b)
int gcd(int a, int b)
function to calculate greated common divisor using Euclidean algorithm both arguments should be >=0
std::vector< deghosting::BImagePtr > threshold(const std::vector< deghosting::FImagePtr > &inputImages, const double threshold, const uint16_t flags)
Threshold function used for creating alpha masks for images.
Definition threshold.h:41