Remove all references to resizing from odm_georef

pull/702/head
Dakota Benjamin 2017-10-26 15:40:50 -04:00
rodzic 52bf29219b
commit eae87a1053
4 zmienionych plików z 9 dodań i 13 usunięć

Wyświetl plik

@ -272,7 +272,7 @@ void Georef::parseArguments(int argc, char *argv[])
bool imageListSpecified = false; bool imageListSpecified = false;
bool gcpFileSpecified = false; bool gcpFileSpecified = false;
bool imageLocation = false; bool imageLocation = false;
bool bundleResized = false; // bool bundleResized = false;
bool outputCoordSpecified = false; bool outputCoordSpecified = false;
bool inputCoordSpecified = false; bool inputCoordSpecified = false;
@ -435,7 +435,7 @@ void Georef::parseArguments(int argc, char *argv[])
log_ << "Georef file output path is set to: " << georefFilename_ << "\n"; log_ << "Georef file output path is set to: " << georefFilename_ << "\n";
exportGeorefSystem_ = true; exportGeorefSystem_ = true;
} }
else if(argument == "-bundleResizedTo" && argIndex < argc) /*else if(argument == "-bundleResizedTo" && argIndex < argc)
{ {
argIndex++; argIndex++;
if (argIndex >= argc) if (argIndex >= argc)
@ -450,7 +450,7 @@ void Georef::parseArguments(int argc, char *argv[])
} }
log_ << "Bundle resize value is set to: " << bundleResizedTo_ << "\n"; log_ << "Bundle resize value is set to: " << bundleResizedTo_ << "\n";
bundleResized = true; bundleResized = true;
} }*/
else if(argument == "-outputFile" && argIndex < argc) else if(argument == "-outputFile" && argIndex < argc)
{ {
argIndex++; argIndex++;
@ -485,7 +485,7 @@ void Georef::parseArguments(int argc, char *argv[])
throw GeorefException("Both output and input coordfile specified, only one of those are accepted."); throw GeorefException("Both output and input coordfile specified, only one of those are accepted.");
} }
if (imageListSpecified && gcpFileSpecified && imageLocation && bundleResized) if (imageListSpecified && gcpFileSpecified && imageLocation ) // && bundleResized)
{ {
useGCP_ = true; useGCP_ = true;
} }
@ -550,8 +550,8 @@ void Georef::printHelp()
log_ << "\"-imagesPath <path>\" (mandatory if using ground control points)\n"; log_ << "\"-imagesPath <path>\" (mandatory if using ground control points)\n";
log_ << "Path to the folder containing full resolution images.\n\n"; log_ << "Path to the folder containing full resolution images.\n\n";
log_ << "\"-bundleResizedTo <integer>\" (mandatory if using ground control points)\n"; // log_ << "\"-bundleResizedTo <integer>\" (mandatory if using ground control points)\n";
log_ << "The resized resolution used in bundler.\n\n"; // log_ << "The resized resolution used in bundler.\n\n";
log_ << "\"-outputFile <path>\" (optional, default <inputFile>_geo)" << "\n"; log_ << "\"-outputFile <path>\" (optional, default <inputFile>_geo)" << "\n";
log_ << "\"Output obj file that will contain the georeferenced texture mesh.\n\n"; log_ << "\"Output obj file that will contain the georeferenced texture mesh.\n\n";
@ -797,7 +797,6 @@ void Georef::performGeoreferencingWithGCP()
cv::Mat image = cv::imread(cam.texture_file); cv::Mat image = cv::imread(cam.texture_file);
cam.height = static_cast<double>(image.rows); cam.height = static_cast<double>(image.rows);
cam.width = static_cast<double>(image.cols); cam.width = static_cast<double>(image.cols);
cam.focal_length *= static_cast<double>(cam.width)/bundleResizedTo_;
// The pixel position for the GCP in pcl-format in order to use pcl-functions // The pixel position for the GCP in pcl-format in order to use pcl-functions
pcl::PointXY gcpPos; pcl::PointXY gcpPos;

Wyświetl plik

@ -271,7 +271,7 @@ private:
bool exportCoordinateFile_; bool exportCoordinateFile_;
bool exportGeorefSystem_; bool exportGeorefSystem_;
bool useGCP_; /**< Check if GCP-file is present and use this to georeference the model. **/ bool useGCP_; /**< Check if GCP-file is present and use this to georeference the model. **/
double bundleResizedTo_; /**< The size used in the previous steps to calculate the camera focal_length. */ // double bundleResizedTo_; /**< The size used in the previous steps to calculate the camera focal_length. */
std::vector<GeorefCamera> cameras_; /**< A vector of all cameras. **/ std::vector<GeorefCamera> cameras_; /**< A vector of all cameras. **/
std::vector<GeorefGCP> gcps_; /**< A vector of all GCPs. **/ std::vector<GeorefGCP> gcps_; /**< A vector of all GCPs. **/

Wyświetl plik

@ -69,8 +69,7 @@ class ODMApp(ecto.BlackBox):
skip_hole_fill=p.args.texturing_skip_hole_filling, skip_hole_fill=p.args.texturing_skip_hole_filling,
keep_unseen_faces=p.args.texturing_keep_unseen_faces, keep_unseen_faces=p.args.texturing_keep_unseen_faces,
tone_mapping=p.args.texturing_tone_mapping), tone_mapping=p.args.texturing_tone_mapping),
'georeferencing': ODMGeoreferencingCell(img_size=p.args.resize_to, 'georeferencing': ODMGeoreferencingCell(gcp_file=p.args.gcp,
gcp_file=p.args.gcp,
use_exif=p.args.use_exif, use_exif=p.args.use_exif,
verbose=p.args.verbose), verbose=p.args.verbose),
'dem': ODMDEMCell(verbose=p.args.verbose), 'dem': ODMDEMCell(verbose=p.args.verbose),

Wyświetl plik

@ -15,7 +15,6 @@ class ODMGeoreferencingCell(ecto.Cell):
'points used for georeferencing.The file needs to ' 'points used for georeferencing.The file needs to '
'be on the following line format: \neasting ' 'be on the following line format: \neasting '
'northing height pixelrow pixelcol imagename', 'gcp_list.txt') 'northing height pixelrow pixelcol imagename', 'gcp_list.txt')
params.declare("img_size", 'image size used in calibration', 2400)
params.declare("use_exif", 'use exif', False) params.declare("use_exif", 'use exif', False)
params.declare("verbose", 'print additional messages to console', False) params.declare("verbose", 'print additional messages to console', False)
@ -122,7 +121,6 @@ class ODMGeoreferencingCell(ecto.Cell):
'pc_geo': odm_georeferencing_model_ply_geo, 'pc_geo': odm_georeferencing_model_ply_geo,
'geo_sys': os.path.join(r['georeferencing_dir'], tree.odm_georeferencing_model_txt_geo), 'geo_sys': os.path.join(r['georeferencing_dir'], tree.odm_georeferencing_model_txt_geo),
'model_geo': odm_georeferencing_model_obj_geo, 'model_geo': odm_georeferencing_model_obj_geo,
'size': self.params.img_size,
'gcp': gcpfile, 'gcp': gcpfile,
'verbose': verbose 'verbose': verbose
@ -138,7 +136,7 @@ class ODMGeoreferencingCell(ecto.Cell):
log.ODM_INFO('Found %s' % gcpfile) log.ODM_INFO('Found %s' % gcpfile)
try: try:
system.run('{bin}/odm_georef -bundleFile {bundle} -imagesPath {imgs} -imagesListPath {imgs_list} ' system.run('{bin}/odm_georef -bundleFile {bundle} -imagesPath {imgs} -imagesListPath {imgs_list} '
'-bundleResizedTo {size} -inputFile {model} -outputFile {model_geo} ' '-inputFile {model} -outputFile {model_geo} '
'-inputPointCloudFile {pc} -outputPointCloudFile {pc_geo} {verbose} ' '-inputPointCloudFile {pc} -outputPointCloudFile {pc_geo} {verbose} '
'-logFile {log} -outputTransformFile {transform_file} -georefFileOutputPath {geo_sys} -gcpFile {gcp} ' '-logFile {log} -outputTransformFile {transform_file} -georefFileOutputPath {geo_sys} -gcpFile {gcp} '
'-outputCoordFile {coords}'.format(**kwargs)) '-outputCoordFile {coords}'.format(**kwargs))