Skip to content

Commit

Permalink
Fix feature dim bug (#8)
Browse files Browse the repository at this point in the history
Co-authored-by: Yu Hailin <yuhailin@.sensetime.com>
  • Loading branch information
HailinYu0414 and Yu Hailin authored Nov 3, 2022
1 parent f8aa535 commit 2263679
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/utility/io_ecim.cc
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ void ReadImagesBinaryForTriangulation(const std::string &path,
std::ifstream file(path, std::ios::binary);
CHECK(file.is_open()) << path;
const uint64_t num_frame = read_data2<uint64_t>(file);

const uint32_t feature_dim = read_data2<uint32_t>(file);
for (uint64_t i = 0; i < num_frame; ++i) {
Frame frame;
frame.id = read_data2<uint32_t>(file);
Expand All @@ -110,8 +110,9 @@ void ReadImagesBinaryForTriangulation(const std::string &path,
pt.y = read_data2<double>(file);
}
for (size_t i = 0; i < num_p2d; ++i) {
Eigen::Vector<float, 256> desc;
read_data_vec(file, desc.data(), 256);
// Eigen::Vector<float, 256> desc;
std::vector<float> desc(feature_dim);
read_data_vec(file, desc.data(), feature_dim);
}
frames[frame.id] = frame;
// std::cout<<frame.id<<" "<<frame.name<<"
Expand Down

0 comments on commit 2263679

Please sign in to comment.