Optimized Belief Propagation (CPU and GPU)
|
This file defines the methods to perform belief propagation for disparity map estimation from stereo images on CUDA. More...
#include "BpSharedFuncts/SharedBpProcessingFuncts.h"
Go to the source code of this file.
Namespaces | |
beliefprop_cuda | |
Namespace to define global kernel functions for parallel belief propagation processing using CUDA. | |
Functions | |
template<RunData_t T, unsigned int DISP_VALS> | |
__global__ void | beliefprop_cuda::InitializeBottomLevelData (beliefprop::BpLevelProperties current_bp_level, float *image_1_pixels_device, 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). The image data is stored in the image_1_pixels_device and image_2_pixels_device arrays. More... | |
template<RunData_t T, unsigned int DISP_VALS> | |
__global__ void | beliefprop_cuda::InitializeCurrentLevelData (beliefprop::CheckerboardPart checkerboard_part, beliefprop::BpLevelProperties current_bp_level, beliefprop::BpLevelProperties prev_bp_level, T *data_cost_checkerboard_0, 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> | |
__global__ void | beliefprop_cuda::InitializeMessageValsToDefaultKernel (beliefprop::BpLevelProperties current_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, unsigned int DISP_VALS> | |
__global__ void | beliefprop_cuda::RunBPIterationUsingCheckerboardUpdates (beliefprop::CheckerboardPart checkerboard_to_update, beliefprop::BpLevelProperties current_bp_level, T *data_cost_checkerboard_0, 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, 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, unsigned int DISP_VALS> | |
__global__ void | beliefprop_cuda::RunBPIterationUsingCheckerboardUpdates (beliefprop::CheckerboardPart checkerboard_to_update, beliefprop::BpLevelProperties current_bp_level, T *data_cost_checkerboard_0, 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, bool data_aligned, unsigned int bp_settings_disp_vals, void *dst_processing) |
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. Function differs from counterpart overloaded function with same name in that it takes in allocated memory to use in processing. More... | |
template<RunData_t T, unsigned int DISP_VALS> | |
__global__ void | beliefprop_cuda::CopyMsgDataToNextLevel (beliefprop::CheckerboardPart checkerboard_part, beliefprop::BpLevelProperties current_bp_level, beliefprop::BpLevelProperties next_bp_level, T *message_u_prev_checkerboard_0, T *message_d_prev_checkerboard_0, T *message_l_prev_checkerboard_0, T *message_r_prev_checkerboard_0, T *message_u_prev_checkerboard_1, T *message_d_prev_checkerboard_1, T *message_l_prev_checkerboard_1, 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 current level that is being copied to four corresponding pixels in the next level. More... | |
template<RunData_t T, unsigned int DISP_VALS> | |
__global__ void | beliefprop_cuda::RetrieveOutputDisparity (beliefprop::BpLevelProperties current_bp_level, T *data_cost_checkerboard_0, 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 *disparity_between_images_device, unsigned int bp_settings_disp_vals) |
Retrieve the best disparity estimate from image 1 to image 2 for each pixel in parallel. More... | |
This file defines the methods to perform belief propagation for disparity map estimation from stereo images on CUDA.
Definition in file KernelBpStereo.cu.