AliceVision
Photogrammetric Computer Vision Framework
src
aliceVision
numeric
Accumulator.hpp
1
// This file is part of the AliceVision project.
2
// Copyright (c) 2016 AliceVision contributors.
3
// Copyright (c) 2012 openMVG contributors.
4
// This Source Code Form is subject to the terms of the Mozilla Public License,
5
// v. 2.0. If a copy of the MPL was not distributed with this file,
6
// You can obtain one at https://mozilla.org/MPL/2.0/.
7
8
#pragma once
9
10
// Accumulator trait to perform safe summation over a specified type
11
namespace
aliceVision
{
12
13
template
<
typename
T>
14
struct
Accumulator
15
{
16
typedef
T Type;
17
};
18
template
<>
19
struct
Accumulator
<unsigned char>
20
{
21
typedef
float
Type;
22
};
23
template
<>
24
struct
Accumulator
<unsigned short>
25
{
26
typedef
float
Type;
27
};
28
template
<>
29
struct
Accumulator
<unsigned int>
30
{
31
typedef
float
Type;
32
};
33
template
<>
34
struct
Accumulator
<char>
35
{
36
typedef
float
Type;
37
};
38
template
<>
39
struct
Accumulator
<short>
40
{
41
typedef
float
Type;
42
};
43
template
<>
44
struct
Accumulator
<int>
45
{
46
typedef
float
Type;
47
};
48
template
<>
49
struct
Accumulator
<bool>
50
{
51
typedef
unsigned
int
Type;
52
};
53
54
}
// namespace aliceVision
aliceVision
Definition:
checkerDetector.cpp:32
aliceVision::Accumulator
Definition:
Accumulator.hpp:14
Generated on Tue Jun 2 2026 15:05:44 for AliceVision by
1.8.17