|
|
/*cv::Mat depth_input_host;
|
|
|
depth_input_host.create(depth.rows(), depth.cols(), CV_32FC1);
|
|
|
depth.download(depth_input_host.ptr<void>(), depth_input_host.step);
|
|
|
std::string depth_input_n = std::string("E:/GitCodes/Data/KinfuTest/depth_input.txt");
|
|
|
//std::ofstream myfile_depth_filter;
|
|
|
//myfile_depth_filter.open(depth_filter_n.c_str());
|
|
|
//myfile_depth_filter << cv::format(depth_filter_host, cv::Formatter::FMT_CSV) << std::endl;
|
|
|
std::ofstream myfile_depth_raw(depth_input_n, ios::out);
|
|
|
for (int i = 0; i < depth.rows(); i++) {
|
|
|
for (int j = 0; j < depth.cols(); j++) {
|
|
|
myfile_depth_raw << depth_input_host.at<float>(i, j) << std::endl;
|
|
|
}
|
|
|
}
|
|
|
myfile_depth_raw.close();*/
|
|
|
|
|
|
//lph,debug,检查距离计算
|
|
|
/*cv::Mat dist_host;
|
|
|
dist_host.create(dists_.rows(), dists_.cols(), CV_32FC1);
|
|
|
dists_.download(dist_host.ptr<void>(), dist_host.step);
|
|
|
std::string fn_dist = std::string("E:/GitCodes/Data/KinfuTest/dist.csv");
|
|
|
std::ofstream myfile_dist;
|
|
|
myfile_dist.open(fn_dist.c_str());
|
|
|
myfile_dist << cv::format(dist_host, cv::Formatter::FMT_CSV) << std::endl;
|
|
|
myfile_dist.close();*/
|
|
|
|
|
|
/*cv::Mat depth_filter_host;
|
|
|
depth_filter_host.create(curr_.depth_pyr[0].rows(), curr_.depth_pyr[0].cols(), CV_32FC1);
|
|
|
curr_.depth_pyr[0].download(depth_filter_host.ptr<void>(), depth_filter_host.step);
|
|
|
std::string depth_filter_n = std::string("E:/GitCodes/Data/KinfuTest/depth_filter.txt");
|
|
|
//std::ofstream myfile_depth_filter;
|
|
|
//myfile_depth_filter.open(depth_filter_n.c_str());
|
|
|
//myfile_depth_filter << cv::format(depth_filter_host, cv::Formatter::FMT_CSV) << std::endl;
|
|
|
std::ofstream myfile_depth_filter(depth_filter_n, ios::out);
|
|
|
for (int i=0; i< curr_.depth_pyr[0].rows(); i++){
|
|
|
for (int j = 0; j < curr_.depth_pyr[0].cols(); j++) {
|
|
|
myfile_depth_filter << depth_filter_host.at<float>(i, j) << std::endl;
|
|
|
}
|
|
|
}
|
|
|
myfile_depth_filter.close(); */
|
|
|
|
|
|
/*
|
|
|
if (global_counter == 0) {
|
|
|
cv::Mat points_host;
|
|
|
points_host.create(prev_.points_pyr[0].rows(), prev_.points_pyr[0].cols(), CV_32FC4);
|
|
|
prev_.points_pyr[0].download(points_host.ptr<void>(), points_host.step);
|
|
|
std::string fn1 = std::string("E:/GitCodes/Data/KinfuTest/prev_cloud.asc");
|
|
|
std::ofstream myfile1(fn1, ios::out);
|
|
|
for (int i = 0; i < prev_.points_pyr[0].rows(); i++) {
|
|
|
for (int j = 0; j < prev_.points_pyr[0].cols(); j++) {
|
|
|
myfile1 << points_host.at<cv::Vec3f>(i, j)[0] << " ";
|
|
|
myfile1 << points_host.at<cv::Vec3f>(i, j)[1] << " ";
|
|
|
myfile1 << points_host.at<cv::Vec3f>(i, j)[2] << " ";
|
|
|
myfile1 << std::endl;
|
|
|
}
|
|
|
}
|
|
|
printf("%s", "end of file\n");
|
|
|
myfile1.close();
|
|
|
} */ |