Beispiel #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
Beispiel #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
Beispiel #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(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': ODMTexturingCell(resize=p.args.resize_to,
                                               resolution=p.args.odm_texturing_textureResolution,
                                               size=p.args.odm_texturing_textureWithSize),
                 '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