Skip to content

Instantly share code, notes, and snippets.

@Daiver
Created April 10, 2013 15:44
Show Gist options
  • Save Daiver/5355777 to your computer and use it in GitHub Desktop.
Save Daiver/5355777 to your computer and use it in GitHub Desktop.
cv::Mat res = cv::Mat::zeros(depth_map.rows, depth_map.cols, depth_map.type());
for(int i = 0; i < depth_map.rows; i++)
{
for(int j = 0; j < depth_map.cols; j++)
{
res.at<uchar>(i, j) = depth_map.at<uchar>(i, j);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment