Skip to content
Snippets Groups Projects
Commit 3d09f4d4 authored by simon.fanetti's avatar simon.fanetti
Browse files

add comment

parent 1904bb0d
No related branches found
No related tags found
No related merge requests found
......@@ -172,6 +172,8 @@ void Projection::buildFrame(cv::Mat_<float> &depth, cv::Mat_<cv::Point2i> &frame
/*
fill with value of the 1st non null neighbour
Fixe only the holes formed by the deprojection round up coordinates (because deproject goes from 3D floats values to 2D uint),
not the big deprojection (like a hand moving above the sand).
*/
void Projection::holeFilling(cv::Mat_<cv::Vec3b> &dst, cv::Mat_<cv::Point2i> &frameMap){
......@@ -183,8 +185,8 @@ void Projection::holeFilling(cv::Mat_<cv::Vec3b> &dst, cv::Mat_<cv::Point2i> &fr
cv::Vec3b color;
bool found = false;
for(int d_y = -1; d_y <= 1 && !found; d_y++){
for(int d_x = -1; d_x <= 1 && !found; d_x++){
for(int d_y = -1; d_y <= 1; d_y++){
for(int d_x = -1; d_x <= 1; d_x++){
if(!(d_x == 0 && d_y == 0)){
......@@ -193,9 +195,12 @@ void Projection::holeFilling(cv::Mat_<cv::Vec3b> &dst, cv::Mat_<cv::Point2i> &fr
if( ((0 <= x && x < dst.cols) && (0 <= y && y < dst.rows)) && (frameMap.at<cv::Point2i>(y,x) != cv::Point2i(-1,-1)) ){
color = dst.at<cv::Vec3b>(y,x);
found = true;
break;
}
}
}
if(found)
break;
}
if(found){
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment