-
Notifications
You must be signed in to change notification settings - Fork 21
Open
Description
I see two piece of code to read depth_map data in the code base:
One in the readme
FILE* ground_truth_depth_file = fopen(ground_truth_depth_file_path.c_str(), "rb");
fread(gt_depth_map.data, sizeof(float), gt_depth_map.rows * gt_depth_map.cols, ground_truth_depth_file);
fclose(ground_truth_depth_file);
and one in the code
if (fread(depth_image.data, 1, depth_image.step * depth_image.rows, file) != depth_image.step * depth_image.rows) {
std::cout << "Error: Depth file " << face.depth_map_filename << " has unexpected size." << std::endl;
return EXIT_FAILURE;
}
I tried those code on the courtyard dataset and I can't seems to load correctly the depth map
From the file cameras.txt the image size are specified and I tried to use those to load the depth map but I ending up having only a noise pattern in the DEPTH.
I also tried to check how long the file is using this
fseek(file, 0, SEEK_END);
int fileSize = ftell(file);
rewind(file);
std::cout << fileSize<<std::endl;
and curiously fileSize is not matching any multiple of the image size of the dataset...
Am I doing something completely wrong?
Metadata
Metadata
Assignees
Labels
No labels