Ejemplo n.º 1
0
    def declare_cells(p):
        """
        Implement the virtual function from the base class
        Only cells from which something is forwarded have to be declared
        """
        cells = {
            'args':
            ecto.Constant(value=p.args),
            'dataset':
            ODMLoadDatasetCell(force_focal=p.args.force_focal,
                               force_ccd=p.args.force_ccd),
            'resize':
            ODMResizeCell(resize_to=p.args.resize_to),
            'opensfm':
            ODMOpenSfMCell(use_exif_size=False,
                           feature_process_size=p.args.resize_to,
                           feature_min_frames=p.args.min_num_features,
                           processes=p.args.opensfm_processes,
                           matching_gps_neighbors=p.args.matcher_neighbors,
                           matching_gps_distance=p.args.matcher_distance),
            'slam':
            ODMSlamCell(),
            'cmvs':
            ODMCmvsCell(max_images=p.args.cmvs_maxImages),
            'pmvs':
            ODMPmvsCell(level=p.args.pmvs_level,
                        csize=p.args.pmvs_csize,
                        thresh=p.args.pmvs_threshold,
                        wsize=p.args.pmvs_wsize,
                        min_imgs=p.args.pmvs_min_images,
                        cores=p.args.pmvs_num_cores),
            'meshing':
            ODMeshingCell(max_vertex=p.args.mesh_size,
                          oct_tree=p.args.mesh_octree_depth,
                          samples=p.args.mesh_samples,
                          solver=p.args.mesh_solver_divide,
                          verbose=p.args.verbose),
            'texturing':
            ODMMvsTexCell(
                data_term=p.args.texturing_data_term,
                outlier_rem_type=p.args.texturing_outlier_removal_type,
                skip_vis_test=p.args.texturing_skip_visibility_test,
                skip_glob_seam_leveling=p.args.
                texturing_skip_global_seam_leveling,
                skip_loc_seam_leveling=p.args.
                texturing_skip_local_seam_leveling,
                skip_hole_fill=p.args.texturing_skip_hole_filling,
                keep_unseen_faces=p.args.texturing_keep_unseen_faces,
                tone_mapping=p.args.texturing_tone_mapping),
            'georeferencing':
            ODMGeoreferencingCell(img_size=p.args.resize_to,
                                  gcp_file=p.args.gcp,
                                  use_exif=p.args.use_exif,
                                  verbose=p.args.verbose),
            'orthophoto':
            ODMOrthoPhotoCell(resolution=p.args.orthophoto_resolution,
                              verbose=p.args.verbose)
        }

        return cells
Ejemplo n.º 2
0
    def declare_cells(p):
        """
        Implement the virtual function from the base class
        Only cells from which something is forwarded have to be declared
        """
        cells = {
            'args':
            ecto.Constant(value=p.args),
            'dataset':
            ODMLoadDatasetCell(force_focal=p.args.force_focal,
                               force_ccd=p.args.force_ccd),
            'resize':
            ODMResizeCell(resize_to=p.args.resize_to),
            'opensfm':
            ODMOpenSfMCell(use_exif_size=False,
                           feature_process_size=p.args.resize_to,
                           feature_min_frames=p.args.min_num_features,
                           processes=context.num_cores,
                           matching_gps_neighbors=p.args.matcher_neighbors,
                           matching_gps_distance=p.args.matcher_distance),
            'cmvs':
            ODMCmvsCell(max_images=p.args.cmvs_maxImages),
            'pmvs':
            ODMPmvsCell(level=p.args.pmvs_level,
                        csize=p.args.pmvs_csize,
                        thresh=p.args.pmvs_threshold,
                        wsize=p.args.pmvs_wsize,
                        min_imgs=p.args.pmvs_minImageNum,
                        cores=p.args.pmvs_num_cores),
            'meshing':
            ODMeshingCell(max_vertex=p.args.odm_meshing_maxVertexCount,
                          oct_tree=p.args.odm_meshing_octreeDepth,
                          samples=p.args.odm_meshing_samplesPerNode,
                          solver=p.args.odm_meshing_solverDivide),
            'texturing':
            ODMMvsTexCell(
                data_term=p.args.mvs_texturing_dataTerm,
                outlier_rem_type=p.args.mvs_texturing_outlierRemovalType,
                skip_vis_test=p.args.mvs_texturing_skipGeometricVisibilityTest,
                skip_glob_seam_leveling=p.args.
                mvs_texturing_skipGlobalSeamLeveling,
                skip_loc_seam_leveling=p.args.
                mvs_texturing_skipLocalSeamLeveling,
                skip_hole_fill=p.args.mvs_texturing_skipHoleFilling,
                keep_unseen_faces=p.args.mvs_texturing_keepUnseenFaces),
            # Old odm_texturing
            #                 'texturing': ODMTexturingCell(resize=p.args['resize_to'],
            #                                               resolution=p.args['odm_texturing_textureResolution'],
            'georeferencing':
            ODMGeoreferencingCell(img_size=p.args.resize_to,
                                  gcp_file=p.args.odm_georeferencing_gcpFile,
                                  use_gcp=p.args.odm_georeferencing_useGcp),
            'orthophoto':
            ODMOrthoPhotoCell(resolution=p.args.odm_orthophoto_resolution)
        }

        return cells
Ejemplo n.º 3
0
    def declare_cells(p):
        """
        Implement the virtual function from the base class
        Only cells from which something is forwarded have to be declared
        """
        cells = {'args': ecto.Constant(value=p.args),
                 'dataset': ODMLoadDatasetCell(verbose=p.args.verbose,
                                               proj=p.args.proj),
                 'opensfm': ODMOpenSfMCell(use_exif_size=False,
                                           feature_process_size=p.args.resize_to,
                                           feature_min_frames=p.args.min_num_features,
                                           processes=p.args.max_concurrency,
                                           matching_gps_neighbors=p.args.matcher_neighbors,
                                           matching_gps_distance=p.args.matcher_distance,
                                           fixed_camera_params=p.args.use_fixed_camera_params,
                                           hybrid_bundle_adjustment=p.args.use_hybrid_bundle_adjustment),
                 'slam': ODMSlamCell(),
                 'smvs': ODMSmvsCell(alpha=p.args.smvs_alpha,
                                     max_pixels=p.args.depthmap_resolution*p.args.depthmap_resolution,
                                     threads=p.args.max_concurrency,
                                     output_scale=p.args.smvs_output_scale,
                                     shading=p.args.smvs_enable_shading,
                                     gamma_srgb=p.args.smvs_gamma_srgb,
                                     verbose=p.args.verbose),
                 'meshing': ODMeshingCell(max_vertex=p.args.mesh_size,
                                          oct_tree=p.args.mesh_octree_depth,
                                          samples=p.args.mesh_samples,
                                          point_weight=p.args.mesh_point_weight,
                                          max_concurrency=p.args.max_concurrency,
                                          verbose=p.args.verbose),
                 'texturing': ODMMvsTexCell(data_term=p.args.texturing_data_term,
                                            outlier_rem_type=p.args.texturing_outlier_removal_type,
                                            skip_vis_test=p.args.texturing_skip_visibility_test,
                                            skip_glob_seam_leveling=p.args.texturing_skip_global_seam_leveling,
                                            skip_loc_seam_leveling=p.args.texturing_skip_local_seam_leveling,
                                            skip_hole_fill=p.args.texturing_skip_hole_filling,
                                            keep_unseen_faces=p.args.texturing_keep_unseen_faces,
                                            tone_mapping=p.args.texturing_tone_mapping),
                 'georeferencing': ODMGeoreferencingCell(gcp_file=p.args.gcp,
                                                         use_exif=p.args.use_exif,
                                                         verbose=p.args.verbose),
                 'dem': ODMDEMCell(max_concurrency=p.args.max_concurrency,
                                   verbose=p.args.verbose),
                 'orthophoto': ODMOrthoPhotoCell(resolution=p.args.orthophoto_resolution,
                                                 no_tiled=p.args.orthophoto_no_tiled,
                                                 compress=p.args.orthophoto_compression,
                                                 bigtiff=p.args.orthophoto_bigtiff,
                                                 build_overviews=p.args.build_overviews,
                                                 max_concurrency=p.args.max_concurrency,
                                                 verbose=p.args.verbose)
                 }

        return cells