Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
ghalmets committed Oct 9, 2017
1 parent dd10b00 commit ae75301
Showing 1 changed file with 4 additions and 18 deletions.
22 changes: 4 additions & 18 deletions src/openMVG/sfm/sfm_data_io_bal.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,6 @@ class generateBALObservations{
std::fstream write;
double num_observations_;

time_t rawtime;
struct tm * timeinfo;
char buffer[80];
time (&rawtime);
timeinfo = localtime(&rawtime);
strftime(buffer,80,"%Y%m%d%__H%M%S",timeinfo);
std::string time(buffer);

write.open(path+"/bal.data", std::fstream::out);

num_observations_= double(observations.size()) ;
Expand All @@ -72,9 +64,9 @@ class generateBALObservations{
write << camera_poses[i][4] << "\n" ;
write << camera_poses[i][5] << "\n" ;

write << 0.0 << "\n" ; //f
write << 0.0 << "\n" ; //k1
write << 0.0 << "\n" ; //k2
write << 0.0 << "\n" ; //f, not exported
write << 0.0 << "\n" ; //k1, not exported
write << 0.0 << "\n" ; //k2, not exported
}
for(size_t i=0; i<num_keypoints; i++){
for(size_t j=0; j<3; j++){
Expand Down Expand Up @@ -253,7 +245,6 @@ inline bool Save_BAL(

std::vector <std::vector <double> >keypoints(num_landmarks, std::vector<double>(3));


//Export Features
unsigned int i=0;
for (const auto & iterLandmarks : landmarks )
Expand Down Expand Up @@ -284,7 +275,6 @@ inline bool Save_BAL(
uv[1]= iterOb.second.x(1);

observations.addObservation(view_key, i, uv);

}
i++;

Expand Down Expand Up @@ -315,7 +305,7 @@ inline bool Save_BAL(
stream.close();
}

// Export depth data filenames & ids as an imgList.txt file
//Export Images
{

const char* path = filename.c_str();
Expand Down Expand Up @@ -378,8 +368,4 @@ inline bool Save_BAL(
} // namespace openMVG



// This algorithm comes from "Quaternion Calculus and Fast Animation",
// Ken Shoemake, 1987 SIGGRAPH course notes

#endif // OPENMVG_SFM_SFM_DATA_IO_BAL_HPP

0 comments on commit ae75301

Please sign in to comment.