Namespace for enums, constants, structures, and functions specific to belief propagation processing.
More...
|
unsigned int | NumBpStereoRuns (unsigned int disparity_vals) |
| Get number of stereo runs when evaluating implementation Perform less stereo runs if greater number of disparity values since implementation takes longer in those case, so there is likely less variance between runs and therefore less need to have as many runs. More...
|
|
RunData | RunSettings () |
| Retrieve run settings as a RunData object for output. More...
|
|
template<RunData_t T> |
bool | MemoryAlignedAtDataStart (unsigned int x_val_data_start, unsigned int simd_data_size, unsigned int data_bytes_align_width, unsigned int padded_width_data) |
| Inline function to check if data is aligned at x_val_data_start for SIMD loads/stores that require alignment. More...
|
|
template<RunData_t T, unsigned int DISP_VALS> |
ARCHITECTURE_ADDITION void | DtStereo (T f[DISP_VALS]) |
| function retrieve the minimum value at each 1-d disparity value in O(n) time using Felzenszwalb's method (see "Efficient Belief Propagation for Early Vision") More...
|
|
template<RunData_t T> |
ARCHITECTURE_ADDITION void | DtStereo (T *f, unsigned int bp_settings_disp_vals) |
|
template<RunData_t T> |
ARCHITECTURE_ADDITION void | DtStereo (T *f, unsigned int bp_settings_disp_vals, unsigned int x_val, unsigned int y_val, const beliefprop::BpLevelProperties ¤t_bp_level) |
|
template<RunData_t T, RunData_t U, unsigned int DISP_VALS> |
ARCHITECTURE_ADDITION void | MsgStereo (unsigned int x_val, unsigned int y_val, const beliefprop::BpLevelProperties ¤t_bp_level, const U messages_neighbor_1[DISP_VALS], const U messages_neighbor_2[DISP_VALS], const U messages_neighbor_3[DISP_VALS], const U data_costs[DISP_VALS], T *dst_message_array, U disc_k_bp, bool data_aligned) |
|
template<RunData_t T, RunData_t U> |
ARCHITECTURE_ADDITION void | MsgStereo (unsigned int x_val, unsigned int y_val, const beliefprop::BpLevelProperties ¤t_bp_level, const U *messages_neighbor_1, const U *messages_neighbor_2, const U *messages_neighbor_3, const U *data_costs, T *dst_message_array, U disc_k_bp, bool data_aligned, unsigned int bp_settings_disp_vals) |
|
template<RunData_t T, RunData_t U, beliefprop::MessageComp M> |
ARCHITECTURE_ADDITION void | SetInitDstProcessing (unsigned int x_val, unsigned int y_val, const beliefprop::BpLevelProperties ¤t_bp_level, const T *prev_u_message_array, const T *prev_d_message_array, const T *prev_l_message_array, const T *prev_r_message_array, const T *data_message_array, T *dst_message_array, U disc_k_bp, bool data_aligned, unsigned int bp_settings_disp_vals, U *dst_processing, unsigned int checkerboard_adjustment, unsigned int offset_data, unsigned int current_disparity, unsigned int proc_array_idx) |
|
template<RunData_t T, RunData_t U, beliefprop::MessageComp M> |
ARCHITECTURE_ADDITION void | MsgStereo (unsigned int x_val, unsigned int y_val, const beliefprop::BpLevelProperties ¤t_bp_level, const T *prev_u_message_array, const T *prev_d_message_array, const T *prev_l_message_array, const T *prev_r_message_array, const T *data_message_array, T *dst_message_array, U disc_k_bp, bool data_aligned, unsigned int bp_settings_disp_vals, U *dst_processing, unsigned int checkerboard_adjustment, unsigned int offset_data) |
|
template<RunData_t T, unsigned int DISP_VALS> |
ARCHITECTURE_ADDITION void | InitializeBottomLevelDataPixel (unsigned int x_val, unsigned int y_val, const beliefprop::BpLevelProperties ¤t_bp_level, const float *image_1_pixels_device, const float *image_2_pixels_device, T *data_cost_stereo_checkerboard_0, T *data_cost_stereo_checkerboard_1, float lambda_bp, float data_k_bp, unsigned int bp_settings_disp_vals) |
| Initialize the "data cost" for each possible disparity between the two full-sized input images ("bottom" of the image pyramid). Image data is stored in the image_1_pixels_device and image_2_pixels_device arrays. More...
|
|
template<RunData_t T, RunData_t U, unsigned int DISP_VALS> |
ARCHITECTURE_ADDITION void | InitializeCurrentLevelDataPixel (unsigned int x_val, unsigned int y_val, beliefprop::CheckerboardPart checkerboard_part, const beliefprop::BpLevelProperties ¤t_bp_level, const beliefprop::BpLevelProperties &prev_bp_level, const T *data_cost_checkerboard_0, const T *data_cost_checkerboard_1, T *data_cost_current_level, unsigned int offset_num, unsigned int bp_settings_disp_vals) |
| Initialize the data costs at the "next" level up in the pyramid given that the data at the lower has been set. More...
|
|
template<RunData_t T, unsigned int DISP_VALS> |
ARCHITECTURE_ADDITION void | InitializeMessageValsToDefaultKernelPixel (unsigned int x_val_in_checkerboard, unsigned int y_val, const beliefprop::BpLevelProperties ¤t_bp_level, T *message_u_checkerboard_0, T *message_d_checkerboard_0, T *message_l_checkerboard_0, T *message_r_checkerboard_0, T *message_u_checkerboard_1, T *message_d_checkerboard_1, T *message_l_checkerboard_1, T *message_r_checkerboard_1, unsigned int bp_settings_disp_vals) |
| Initialize the message values at each pixel of the current level to the default value. More...
|
|
template<RunData_t T, RunData_t U, unsigned int DISP_VALS> |
ARCHITECTURE_ADDITION void | RunBPIterationUpdateMsgVals (unsigned int x_val, unsigned int y_val, const beliefprop::BpLevelProperties ¤t_bp_level, const U prev_u_message[DISP_VALS], const U prev_d_message[DISP_VALS], const U prev_l_message[DISP_VALS], const U prev_r_message[DISP_VALS], const U data_message[DISP_VALS], T *current_u_message, T *current_d_message, T *current_l_message, T *current_r_message, const U disc_k_bp, bool data_aligned) |
| Kernel function to run the current iteration of belief propagation where the input messages and data costs come in as array and the output message values are stored in array. More...
|
|
template<RunData_t T, RunData_t U> |
ARCHITECTURE_ADDITION void | RunBPIterationUpdateMsgVals (unsigned int x_val, unsigned int y_val, const beliefprop::BpLevelProperties ¤t_bp_level, const U *prev_u_message, const U *prev_d_message, const U *prev_l_message, const U *prev_r_message, const U *data_message, T *current_u_message, T *current_d_message, T *current_l_message, T *current_r_message, const U disc_k_bp, bool data_aligned, unsigned int bp_settings_disp_vals) |
|
template<RunData_t T, RunData_t U> |
ARCHITECTURE_ADDITION void | RunBPIterationUpdateMsgVals (unsigned int x_val, unsigned int y_val, const beliefprop::BpLevelProperties ¤t_bp_level, const T *prev_u_message_array, const T *prev_d_message_array, const T *prev_l_message_array, const T *prev_r_message_array, const T *data_message_array, T *current_u_message, T *current_d_message, T *current_l_message, T *current_r_message, const U disc_k_bp, bool data_aligned, unsigned int bp_settings_disp_vals, U *dst_processing, unsigned int checkerboard_adjustment, unsigned int offset_data) |
|
template<RunData_t T, RunData_t U, unsigned int DISP_VALS> |
ARCHITECTURE_ADDITION void | RunBPIterationUsingCheckerboardUpdatesKernel (unsigned int x_val, unsigned int y_val, beliefprop::CheckerboardPart checkerboard_to_update, const beliefprop::BpLevelProperties ¤t_bp_level, const T *data_cost_checkerboard_0, const T *data_cost_checkerboard_1, T *message_u_checkerboard_0, T *message_d_checkerboard_0, T *message_l_checkerboard_0, T *message_r_checkerboard_0, T *message_u_checkerboard_1, T *message_d_checkerboard_1, T *message_l_checkerboard_1, T *message_r_checkerboard_1, float disc_k_bp, unsigned int offset_data, bool data_aligned, unsigned int bp_settings_disp_vals) |
| Kernel function to run the current iteration of belief propagation in parallel using the checkerboard update method where half the pixels in the "checkerboard" scheme retrieve messages from each 4-connected neighbor and then update their message based on the retrieved messages and the data cost. More...
|
|
template<RunData_t T, RunData_t U, unsigned int DISP_VALS> |
ARCHITECTURE_ADDITION void | RunBPIterationUsingCheckerboardUpdatesKernel (unsigned int x_val, unsigned int y_val, beliefprop::CheckerboardPart checkerboard_to_update, const beliefprop::BpLevelProperties ¤t_bp_level, const T *data_cost_checkerboard_0, const T *data_cost_checkerboard_1, T *message_u_checkerboard_0, T *message_d_checkerboard_0, T *message_l_checkerboard_0, T *message_r_checkerboard_0, T *message_u_checkerboard_1, T *message_d_checkerboard_1, T *message_l_checkerboard_1, T *message_r_checkerboard_1, float disc_k_bp, unsigned int offset_data, bool data_aligned, unsigned int bp_settings_disp_vals, void *dst_processing) |
|
template<RunData_t T, unsigned int DISP_VALS> |
ARCHITECTURE_ADDITION void | CopyMsgDataToNextLevelPixel (unsigned int x_val, unsigned int y_val, beliefprop::CheckerboardPart checkerboard_part, const beliefprop::BpLevelProperties ¤t_bp_level, const beliefprop::BpLevelProperties &next_bp_level, const T *message_u_prev_checkerboard_0, const T *message_d_prev_checkerboard_0, const T *message_l_prev_checkerboard_0, const T *message_r_prev_checkerboard_0, const T *message_u_prev_checkerboard_1, const T *message_d_prev_checkerboard_1, const T *message_l_prev_checkerboard_1, const T *message_r_prev_checkerboard_1, T *message_u_checkerboard_0, T *message_d_checkerboard_0, T *message_l_checkerboard_0, T *message_r_checkerboard_0, T *message_u_checkerboard_1, T *message_d_checkerboard_1, T *message_l_checkerboard_1, T *message_r_checkerboard_1, unsigned int bp_settings_disp_vals) |
| Kernel to copy the computed BP message values at the current level to the corresponding locations at the "next" level down the kernel works from the point of view of the pixel at the prev level that is being copied to four different places. More...
|
|
template<RunData_t T, RunData_t U, unsigned int DISP_VALS> |
ARCHITECTURE_ADDITION void | RetrieveOutputDisparityPixel (unsigned int x_val, unsigned int y_val, const beliefprop::BpLevelProperties ¤t_bp_level, const T *data_cost_checkerboard_0, const T *data_cost_checkerboard_1, const T *message_u_checkerboard_0, const T *message_d_checkerboard_0, const T *message_l_checkerboard_0, const T *message_r_checkerboard_0, const T *message_u_checkerboard_1, const T *message_d_checkerboard_1, const T *message_l_checkerboard_1, const T *message_r_checkerboard_1, float *disparity_between_images_device, unsigned int bp_settings_disp_vals) |
|
template<RunData_t T, unsigned int DISP_VALS> |
ARCHITECTURE_ADDITION void | PrintDataAndMessageValsAtPointKernel (unsigned int x_val, unsigned int y_val, const beliefprop::BpLevelProperties ¤t_bp_level, const T *data_cost_checkerboard_0, const T *data_cost_checkerboard_1, const T *message_u_checkerboard_0, const T *message_d_checkerboard_0, const T *message_l_checkerboard_0, const T *message_r_checkerboard_0, const T *message_u_checkerboard_1, const T *message_d_checkerboard_1, const T *message_l_checkerboard_1, const T *message_r_checkerboard_1, unsigned int bp_settings_disp_vals=0) |
|
template<RunData_t T, unsigned int DISP_VALS> |
ARCHITECTURE_ADDITION void | PrintDataAndMessageValsToPointKernel (unsigned int x_val, unsigned int y_val, const beliefprop::BpLevelProperties ¤t_bp_level, const T *data_cost_checkerboard_0, const T *data_cost_checkerboard_1, const T *message_u_checkerboard_0, const T *message_d_checkerboard_0, const T *message_l_checkerboard_0, const T *message_r_checkerboard_0, const T *message_u_checkerboard_1, const T *message_d_checkerboard_1, const T *message_l_checkerboard_1, const T *message_r_checkerboard_1, unsigned int bp_settings_disp_vals=0) |
|
ARCHITECTURE_ADDITION bool | WithinImageBounds (unsigned int x_val, unsigned int y_val, unsigned int width, unsigned int height) |
| Checks if the current point is within the image bounds Assumed that input x/y vals are above zero since their unsigned int so no need for >= 0 check. More...
|
|
ARCHITECTURE_ADDITION unsigned int | RetrieveIndexInDataAndMessage (unsigned int x_val, unsigned int y_val, unsigned int width, unsigned int height, unsigned int current_disparity, unsigned int total_num_disp_vals, unsigned int offset_data=0u) |
| Retrieve the current 1-D index value of the given point at the given disparity in the data cost and message data. More...
|
|
template<BpImData_t T> |
ARCHITECTURE_ADDITION void | FilterImageAcrossProcessPixel (unsigned int x_val, unsigned int y_val, const T *image_to_filter, float *filtered_image, unsigned int width_images, unsigned int height_images, const float *image_filter, unsigned int size_filter) |
| kernel to apply a horizontal filter on each pixel of the image in parallel the input image is stored as unsigned ints in the texture the output filtered image is returned as an array of floats More...
|
|
template<BpImData_t T> |
ARCHITECTURE_ADDITION void | FilterImageVerticalProcessPixel (unsigned int x_val, unsigned int y_val, const T *image_to_filter, float *filtered_image, unsigned int width_images, unsigned int height_images, const float *image_filter, unsigned int size_filter) |
| kernel to apply a vertical filter on each pixel of the image in parallel the input image is stored as unsigned ints in the texture uint_image_pixelsTexture the output filtered image is returned as an array of floats More...
|
|
|
constexpr std::string_view | kRefImageName = "refImage" |
|
constexpr std::string_view | kTestImageName = "testImage" |
|
constexpr std::string_view | kInImagePossExtensions [] = {"pgm", "ppm"} |
|
constexpr std::string_view | kGroundTruthDispFile = "groundTruthDisparity.pgm" |
|
constexpr std::string_view | kOutDispImageNameBase = "computedDisparity" |
|
constexpr std::string_view | kBeliefPropDirectoryName = "BeliefProp" |
|
constexpr std::string_view | kStereoSetsDirectoryName = "BpStereoSets" |
|
constexpr std::string_view | kBaselineRunDataPath |
|
constexpr std::string_view | kBaselineRunDesc {"AMD Rome (48 Cores)"} |
|
constexpr bool | kUseWeightedRGBToGrayscaleConversion {true} |
|
constexpr std::string_view | kPGMExt {"pgm"} |
|
constexpr std::string_view | kPPMExt {"ppm"} |
|
constexpr std::string_view | kBpOptimizeCPUDesc {"Optimized CPU"} |
|
constexpr std::string_view | kNumParallelCPUThreadsHeader {"Number of parallel CPU threads in run"} |
|
constexpr std::string_view | kCPUVectorizationHeader {"Vectorization"} |
|
constexpr std::string_view | kImageWidthHeader {"Image Width"} |
|
constexpr std::string_view | kImageHeightHeader {"Image Height"} |
|
constexpr std::string_view | kStereoSetHeader {"Stereo Set"} |
|
constexpr std::string_view | kNumEvalRuns {"Number of evaluation runs"} |
| Header for number of evaluation runs (can differ across stereo sets) More...
|
|
constexpr std::array< BpStereoSet, 8 > | kStereoSetsToProcess |
| Declare stereo sets to process with name, num disparity values, and scale factor currently conesFullSize is not used. More...
|
|
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 labeled as "smallest 3 stereo sets"
The last three stereo sets (excluding "conesFullSized") are labeled as "largest 3 stereo sets". More...
|
|
constexpr std::array< std::array< std::string_view, 3 >, 10 > | kLevelDCostBpTimeCTimeNames |
| Constant consisting of arrays of string views for headers corresponding to timing of computation of data costs, bp runtime, and copy data runtime of each level. More...
|
|
const std::unordered_map< Runtime_Type, std::string_view > | kTimingNames |
| Mapping of runtime segment enum to header describing timing of the segment. More...
|
|
constexpr std::string_view | kAvgRMSErrorHeader {"Average RMS error"} |
| Constant string view for header of average RMS error in evaluation. More...
|
|
constexpr std::array< float, 4 > | kDisparityDiffThresholds |
| Difference thresholds in output disparity for a computed disparity at a pixel to be considered a "bad pixel" when compared to the ground truth in the evaluation. More...
|
|
constexpr float | kMaxDiffCap |
| Max difference in disparity for evaluation where disparity difference for each pixel is capped to minimize influence of outliers in the average difference across all pixels. More...
|
|
constexpr unsigned int | kNumCheckerboardParts {2} |
| Number of checkerboard parts for processing. More...
|
|
constexpr unsigned int | kNumMessageArrays {4} |
| Number of message arrays in each checkerboard part. More...
|
|
constexpr unsigned int | kNumKernels {6} |
|
template<typename T > |
const T | kHighValBp {std::numeric_limits<T>::max()} |
| High value for type to use if initializing to "high" value. More...
|
|
constexpr float | kHighValBpKernel {32000.0f} |
| High value as used in kernel currently hard-coded to be below maximum short value of 32767. More...
|
|
constexpr bool | kUseOptMemManagement {true} |
|
constexpr bool | kOptimizedIndexingSetting {true} |
|
constexpr bool | kAllocateFreeBpMemoryOutsideRuns {true} |
|
constexpr std::string_view | kMemAllocOptHeader {"Memory allocation of all BP data run at or before start of run"} |
|
constexpr std::string_view | kMemoryCoalescedBpDataHeader {"BP data arranged for memory coalescence"} |
|
constexpr std::string_view | kAllocateFreeMemOutsideRunsHeader {"Memory for BP allocated/freed outside of runs"} |
|
constexpr std::string_view | kNumDispValsHeader {"Num Possible Disparity Values"} |
|
constexpr std::string_view | kNumBpLevelsHeader {"Num BP Levels",} |
|
constexpr std::string_view | kNumBpItersHeader {"Num BP Iterations"} |
|
constexpr std::string_view | kDiscCostCapHeader {"DISC_K_BP"} |
|
constexpr std::string_view | kDataCostCapHeader {"DataKBp"} |
|
constexpr std::string_view | kBpSettingsLambdaHeader {"LambdaBp"} |
|
constexpr std::string_view | kBpSettingsSigmaHeader {"SigmaBp"} |
|
constexpr unsigned int | kDefaultLevelsBp {5} |
| Default values for BP settings. Number of scales/levels in the pyramid to run BP. More...
|
|
constexpr unsigned int | kDefaultItersBp {7} |
| Default number of BP iterations at each scale/level. More...
|
|
constexpr float | kDefaultSigmaBp {0.0} |
| Default sigma value for smoothing input images. More...
|
|
constexpr float | kDefaultLambdaBp {0.1} |
| Default weighing of data cost. More...
|
|
constexpr float | kDefaultDataKBp {15.0} |
| Default truncation of data cost. More...
|
|
constexpr std::string_view | kBlurImagesPDimsHeader {"Blur Images Parallel Dimensions"} |
|
constexpr std::string_view | kInitMValsPDimsHeader {"Init Message Values Parallel Dimensions"} |
|
constexpr std::string_view | kDataCostsPDimsHeader {"Data Costs Parallel Dimensions"} |
|
constexpr std::string_view | kBpItersPDimsHeader {"BP Thread Parallel Dimensions"} |
|
constexpr std::string_view | kCopyToNextLevelPDimsHeader {"Copy Thread Parallel Dimensions"} |
|
constexpr std::string_view | kCompOutputDispPDimsHeader {"Get Output Disparity Parallel Dimensions"} |
|
constexpr std::string_view | kLevelText {"Level"} |
|