Function lib3d::computeDepthDifference(const cv::Mat&, const cv::Mat&, float&, float&, float&, float&, float&, float&, float&, cv::Mat&, const cv::Mat&)
Defined in File evaluation.hpp
Function Documentation
-
void lib3d::computeDepthDifference(const cv::Mat &iComputedDepthmap, const cv::Mat &iGroundtruthDepthmap, float &oAbsAvgDifference, float &oAbsStdDev, float &oAvgDifference, float &oStdDev, float &oL1Rel, float &oComputedDensity, float &oGroundtruthDensity, cv::Mat &oDiffImage, const cv::Mat &iRoiMask = cv::Mat())
Method to compute difference of a depth map with respect to a given ground truth.
Only pixels for which a predicted estimate and a ground truth is given, are evaluated.
- Deprecated:
Note
Input depthmaps have to be of same size and type.
- Parameters:
iGroundtruthDepthmap – [in] Ground truth depth map given as .
oAbsAvgDifference – [out] Average absolute difference between the predicted depth map and its ground truth. This can also be considered as the absolute \(\text{L1}\) error:
\[\text{L1-abs} = \frac{1}{m}\sum_{m}\left|d-\hat{d}\right|\]With \(d\) and \(\hat{d}\) being the predicted depth and the ground truth depth value, and \(m\) being the pixels for which both \(d\) and \(\hat{d}\) exist.oAbsStdDev – [out] Standard deviation of pixel-wise absolute difference between the two depth maps.
oAvgDifference – [out] Average difference between the predicted depth map and its ground truth.
oStdDev – [out] Standard deviation of pixel-wise absolute difference between the two depth maps.
oL1Rel – [out] Relative \(\text{L1}\) error:
\[\text{L1-rel} = \frac{1}{m}\sum_{m}\frac{\left|d-\hat{d}\right|}{\hat{d}}\]With \(d\) and \(\hat{d}\) being the predicted depth and the ground truth depth value, and \(m\) being the pixels for which both \(d\) and \(\hat{d}\) exist.oComputedDensity – [out] Density of predicted depth map.
oGroundtruthDensity – [out] Density of ground truth depth map.
oDiffImage – [out] Difference image
iRoiMask – [in] Binary mask indicating region of interest. If provided the error is only calculated for the pixels for wich iRoiMask = 1.
- Returns:
Difference image. Negative values suggest that the computed depth is samler than the groundtruth.