Optimized Belief Propagation (CPU and GPU)
BpEvaluationStereoSets.h
Go to the documentation of this file.
1 /*
2 Copyright (C) 2024 Scott Grauer-Gray
3 
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or
7 (at your option) any later version.
8 
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
13 
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 */
18 
29 #ifndef BP_EVALUATION_STEREO_SETS_H_
30 #define BP_EVALUATION_STEREO_SETS_H_
31 
32 #include <string_view>
33 #include <array>
36 
37 namespace beliefprop
38 {
39  //headers for image width, height, and stereo set name
40  constexpr std::string_view kImageWidthHeader{"Image Width"};
41  constexpr std::string_view kImageHeightHeader{"Image Height"};
42  constexpr std::string_view kStereoSetHeader{"Stereo Set"};
43 
46  constexpr std::string_view kNumEvalRuns{"Number of evaluation runs"};
47 
52  struct BpStereoSet {
53  const std::string_view name;
54  const unsigned int num_disp_vals;
55  const unsigned int scale_factor;
56  };
57 
60  constexpr std::array<BpStereoSet, 8> kStereoSetsToProcess{
61  BpStereoSet{"tsukubaSetHalfSize", 8, 32},
62  BpStereoSet{"tsukubaSet", 16, 16},
63  BpStereoSet{"venus", 21, 8},
64  BpStereoSet{"barn1", 32, 8},
65  BpStereoSet{"conesQuarterSize", 64, 4},
66  BpStereoSet{"conesHalfSize", 128, 2},
67  BpStereoSet{"conesFullSizeCropped", 256, 1},
68  BpStereoSet{"conesFullSize", 256, 1}
69  };
70 
74  const std::vector<std::pair<std::string, std::vector<InputSignature>>> kEvalDataSubsets{
75  {"smallest 3 stereo sets",
76  {InputSignature({}, 0, {}), InputSignature({}, 1, {}), InputSignature({}, 2, {})}},
77  {"largest 3 stereo sets",
78  {InputSignature({}, 4, {}), InputSignature({}, 5, {}), InputSignature({}, 6, {})}},
79  {"smallest 3 stereo sets (disparity count templated only)",
80  {InputSignature({}, 0, true), InputSignature({}, 1, true), InputSignature({}, 2, true)}},
81  {"largest 3 stereo sets (disparity count templated only)",
82  {InputSignature({}, 4, true), InputSignature({}, 5, true), InputSignature({}, 6, true)}},
83  {"smallest 3 stereo sets (disparity count not templated only)",
84  {InputSignature({}, 0, false), InputSignature({}, 1, false), InputSignature({}, 2, false)}},
85  {"largest 3 stereo sets (disparity count not templated only)",
86  {InputSignature({}, 4, false), InputSignature({}, 5, false), InputSignature({}, 6, false)}},
87  {"runs w/ disparity count templated",
88  {InputSignature({}, {}, true)}},
89  {"runs w/ disparity count not templated",
90  {InputSignature({}, {}, false)}}};
91 };
92 
93 #endif /* BP_EVALUATION_STEREO_SETS_H_ */
Declares structure to store the belief propagation settings including the number of levels and iterat...
Declares class for defining input signature for evaluation run that consists of evaluation set number...
Class defines input signature for evaluation run that contains evaluation set number,...
Namespace for enums, constants, structures, and functions specific to belief propagation processing.
constexpr std::string_view kStereoSetHeader
constexpr std::string_view kNumEvalRuns
Header for number of evaluation runs (can differ across stereo sets)
constexpr std::string_view kImageWidthHeader
const std::vector< std::pair< std::string, std::vector< InputSignature > > > kEvalDataSubsets
Define subsets for evaluating run results on specified inputs The first three stereo sets are labele...
constexpr std::array< BpStereoSet, 8 > kStereoSetsToProcess
Declare stereo sets to process with name, num disparity values, and scale factor currently conesFullS...
constexpr std::string_view kImageHeightHeader
Structure with stereo set name, disparity count, and scale factor for output disparity map.
const unsigned int num_disp_vals
const unsigned int scale_factor
const std::string_view name