|
RSLightFields
Disparity map estimator from 3D light fields
|
Implement low-level depth computation functions. More...
#include <chrono>#include <omp.h>#include <opencv2/imgproc/imgproc.hpp>#include <rslf_interpolation.hpp>#include <rslf_kernels.hpp>

Go to the source code of this file.
Classes | |
| struct | rslf::Depth1DParameters< DataType > |
| Impelment a structure containing all the algorithm parameters. More... | |
| struct | rslf::BufferDepth1D< DataType > |
| Implement a buffer containing re-usable temporary variables in order to avoid multiple unnecessary allocations. More... | |
Functions | |
| template<typename DataType > | |
| void | rslf::compute_1D_edge_confidence (const Mat &a_epi, int a_s, Mat &a_edge_confidence_u, Mat &a_edge_confidence_mask_u, const Depth1DParameters< DataType > &a_parameters, BufferDepth1D< DataType > &a_buffer) |
| Compute the edge confidence score for a single line along the dimension u. | |
| template<typename DataType > | |
| void | rslf::compute_1D_depth_epi (const Mat &a_epi, const Mat &a_dmin_u, const Mat &a_dmax_u, int a_dim_d, int a_s_hat, const Mat &a_edge_confidence_u, const Mat &a_edge_confidence_mask_u, Mat &a_disp_confidence_u, Mat &a_best_depth_u, Mat &a_rbar_u, const Depth1DParameters< DataType > &a_parameters, BufferDepth1D< DataType > &a_buffer, Mat &a_mask_u) |
| Given a single EPI along dimensions (s, u) (v is fixed), compute the slopes only looking at a single line (given by s_hat). | |
| template<typename DataType > | |
| void | rslf::compute_1D_edge_confidence_pile (const Vec< Mat > &a_epis, int a_s, Mat &a_edge_confidence_v_u, Mat &a_edge_confidence_mask_v_u, const Depth1DParameters< DataType > &a_parameters, Vec< BufferDepth1D< DataType > * > &a_buffers) |
| Given a vector of EPIs, compute the edge confidence along the line of given index s along the dimension u. | |
| template<typename DataType > | |
| void | rslf::compute_1D_depth_epi_pile (const Vec< Mat > &a_epis, const Mat &a_dmin_v_u, const Mat &a_dmax_v_u, int a_dim_d, int a_s_hat, const Mat &a_edge_confidence_v_u, const Mat &a_edge_confidence_mask_v_u, Mat &a_disp_confidence_v_u, Mat &a_best_depth_v_u, Mat &a_rbar_v_u, const Depth1DParameters< DataType > &a_parameters, Vec< BufferDepth1D< DataType > * > &a_buffers, Mat &a_mask_v_u, bool a_verbose=true) |
| For every EPI in the given vector (i.e. for all v), compute the slopes only looking at a single line (given by s_hat). | |
| template<typename DataType > | |
| void | rslf::compute_2D_edge_confidence (const Vec< Mat > &a_epis, Vec< Mat > &a_edge_confidence_s_v_u, Vec< Mat > &a_edge_confidence_mask_s_v_u, const Depth1DParameters< DataType > &a_parameters, Vec< BufferDepth1D< DataType > * > &a_buffers) |
| Given a vector of EPIs, compute the edge confidence on all lines for all EPIs (so that an edge confidence value is given for all (s, v, u)). | |
| template<typename DataType > | |
| void | rslf::compute_2D_depth_epi (const Vec< Mat > &a_epis, const Vec< Mat > &a_dmin_s_v_u, const Vec< Mat > &a_dmax_s_v_u, int a_dim_d, const Vec< Mat > &a_edge_confidence_s_v_u, const Vec< Mat > &a_edge_confidence_mask_s_v_u, Vec< Mat > &a_disp_confidence_s_v_u, Vec< Mat > &a_best_depth_s_v_u, Vec< Mat > &a_rbar_s_v_u, const Depth1DParameters< DataType > &a_parameters, Vec< BufferDepth1D< DataType > * > &a_buffers, bool a_verbose=true) |
| Given a vector of EPIs, compute the disparities for all points (s, v, u) using the propagation process along the temporal axis s. | |
| template<typename DataType > | |
| void | rslf::selective_median_filter (const Mat &a_src, Mat &a_dst, const Vec< Mat > &a_epis, int a_s_hat, int a_size, const Mat &a_mask_v_u, float a_epsilon) |
| Filter the given spatial image of dimensions (v, u) using a selective median filter (only points with high edge confidence and similar color are taken into account). | |
| template<typename DataType > | |
| void | rslf::_square_sum_channels_into (const Mat &src, Mat &dst, Mat &buffer) |
| Sum the squares of the values across channels of the input matrix. More... | |
| template<typename DataType > | |
| void | rslf::_multiply_multi_channel (const Mat &line_mat, const Mat &vec_mat, Mat &res_mat, Mat &buffer) |
| Multiply a vec matrix by a line matrix elementwise broadcasting the line matrix over channels of the vec matrix. More... | |
| template<typename DataType > | |
| void | rslf::_divide_multi_channel (const Mat &line_mat, const Mat &vec_mat, Mat &res_mat, Mat &buffer) |
| Divide a vec matrix by a line matrix elementwise broadcasting the line matrix over channels of the vec matrix. More... | |
Implement low-level depth computation functions.
| void rslf::_divide_multi_channel | ( | const Mat & | line_mat, |
| const Mat & | vec_mat, | ||
| Mat & | res_mat, | ||
| Mat & | buffer | ||
| ) |
Divide a vec matrix by a line matrix elementwise broadcasting the line matrix over channels of the vec matrix.
| line_mat | Input |
| vec_mat | Input |
| res_mat | Output |
| buffer | Buffer matrix (CV_32FC3) |
| void rslf::_multiply_multi_channel | ( | const Mat & | line_mat, |
| const Mat & | vec_mat, | ||
| Mat & | res_mat, | ||
| Mat & | buffer | ||
| ) |
Multiply a vec matrix by a line matrix elementwise broadcasting the line matrix over channels of the vec matrix.
| line_mat | Input |
| vec_mat | Input |
| res_mat | Output |
| buffer | Buffer matrix (CV_32FC3) |
1.8.13