corrected harmless gcc warnings
This commit is contained in:
parent
59ca545056
commit
5dbe87d368
|
@ -85,7 +85,7 @@ static bool ReadHeader(FILE *fp,unsigned int &num_cams, unsigned int &num_points
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool ReadHeader(const char * filename,unsigned int &num_cams, unsigned int &num_points){
|
static bool ReadHeader(const char * filename,unsigned int &/*num_cams*/, unsigned int &/*num_points*/){
|
||||||
FILE *fp = fopen(filename, "r");
|
FILE *fp = fopen(filename, "r");
|
||||||
if(!fp) return false;
|
if(!fp) return false;
|
||||||
ReadHeader(fp);
|
ReadHeader(fp);
|
||||||
|
@ -104,11 +104,12 @@ static int Open( OpenMeshType &m, std::vector<Shot<ScalarType> > & shots,
|
||||||
if(!fp) return false;
|
if(!fp) return false;
|
||||||
ReadHeader(fp, num_cams, num_points);
|
ReadHeader(fp, num_cams, num_points);
|
||||||
char line[100];
|
char line[100];
|
||||||
|
if(cb) cb(0,"Reading images");
|
||||||
ReadImagesFilenames(filename_images, image_filenames);
|
ReadImagesFilenames(filename_images, image_filenames);
|
||||||
|
|
||||||
|
if(cb) cb(50,"Reading cameras");
|
||||||
shots.resize(num_cams);
|
shots.resize(num_cams);
|
||||||
for(int i = 0; i < num_cams;++i)
|
for(uint i = 0; i < num_cams;++i)
|
||||||
{
|
{
|
||||||
float f, k1, k2;
|
float f, k1, k2;
|
||||||
float R[16]={0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,1};
|
float R[16]={0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,1};
|
||||||
|
@ -145,7 +146,7 @@ static int Open( OpenMeshType &m, std::vector<Shot<ScalarType> > & shots,
|
||||||
ch = vcg::tri::Allocator<OpenMeshType>::template AddPerVertexAttribute<CorrVec>(m,"correspondences");
|
ch = vcg::tri::Allocator<OpenMeshType>::template AddPerVertexAttribute<CorrVec>(m,"correspondences");
|
||||||
|
|
||||||
typename OpenMeshType::VertexIterator vi = vcg::tri::Allocator<OpenMeshType>::AddVertices(m,num_points);
|
typename OpenMeshType::VertexIterator vi = vcg::tri::Allocator<OpenMeshType>::AddVertices(m,num_points);
|
||||||
for(int i = 0; i < num_points;++i,++vi){
|
for(uint i = 0; i < num_points;++i,++vi){
|
||||||
float x,y,z;
|
float x,y,z;
|
||||||
unsigned int r,g,b,i_cam, key_sift,n_corr;
|
unsigned int r,g,b,i_cam, key_sift,n_corr;
|
||||||
fscanf(fp,"%f %f %f ",&x,&y,&z);
|
fscanf(fp,"%f %f %f ",&x,&y,&z);
|
||||||
|
@ -154,7 +155,7 @@ static int Open( OpenMeshType &m, std::vector<Shot<ScalarType> > & shots,
|
||||||
(*vi).C() = vcg::Color4b(r,g,b,255);
|
(*vi).C() = vcg::Color4b(r,g,b,255);
|
||||||
|
|
||||||
fscanf(fp,"%d ",&n_corr);
|
fscanf(fp,"%d ",&n_corr);
|
||||||
for(int j = 0; j < n_corr; ++j){
|
for(uint j = 0; j < n_corr; ++j){
|
||||||
fscanf(fp,"%d %d %f %f ",&i_cam,&key_sift,&x,&y);
|
fscanf(fp,"%d %d %f %f ",&i_cam,&key_sift,&x,&y);
|
||||||
Correspondence corr(i_cam,key_sift,x,y);
|
Correspondence corr(i_cam,key_sift,x,y);
|
||||||
ch[i].push_back(corr);
|
ch[i].push_back(corr);
|
||||||
|
@ -192,7 +193,7 @@ static bool AddIntrinsics(vcg::Shotf &shot, const char * image_file)
|
||||||
FILE * pFile = fopen(image_file, "rb");
|
FILE * pFile = fopen(image_file, "rb");
|
||||||
int ret = ::ReadJpegSections (pFile, READ_METADATA);
|
int ret = ::ReadJpegSections (pFile, READ_METADATA);
|
||||||
fclose(pFile);
|
fclose(pFile);
|
||||||
|
if(ret==0) return false;
|
||||||
shot.Intrinsics.ViewportPx = vcg::Point2i(ImageInfo.Width, ImageInfo.Height);
|
shot.Intrinsics.ViewportPx = vcg::Point2i(ImageInfo.Width, ImageInfo.Height);
|
||||||
shot.Intrinsics.CenterPx = vcg::Point2f(float(ImageInfo.Width/2.0), float(ImageInfo.Height/2.0));
|
shot.Intrinsics.CenterPx = vcg::Point2f(float(ImageInfo.Width/2.0), float(ImageInfo.Height/2.0));
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue