コード例 #1
0
    def execute(self, context):
        path = os.path.join(self.directory, self.filepath)
        self.report({'INFO'}, 'path: ' + str(path))

        points = PLYFileHandler.parse_ply_file(path)
        self.report({'INFO'}, 'Number points: ' + str(len(points)))

        reconstruction_collection = add_collection('Reconstruction Collection')
        self.import_photogrammetry_points(points, reconstruction_collection)

        return {'FINISHED'}
コード例 #2
0
    def execute(self, context):

        path = os.path.join(self.directory, self.filepath)
        self.report({'INFO'}, 'path: ' + str(path))

        self.path_to_images = get_default_image_path(
            path, self.path_to_images)
        self.report({'INFO'}, 'path_to_images: ' + str(self.path_to_images))

        cameras, points = NVMFileHandler.parse_nvm_file(path, self)
        self.report({'INFO'}, 'Number cameras: ' + str(len(cameras)))
        self.report({'INFO'}, 'Number points: ' + str(len(points)))
        
        reconstruction_collection = add_collection('Reconstruction Collection')
        self.import_photogrammetry_cameras(cameras, reconstruction_collection)
        self.import_photogrammetry_points(points, reconstruction_collection)

        return {'FINISHED'}
コード例 #3
0
    def execute(self, context):

        path = os.path.join(self.directory, self.filepath)
        self.report({'INFO'}, 'path: ' + str(path))
    
        # by default search for the images in the nvm directory
        if self.path_to_images == '':
            self.path_to_images = os.path.dirname(path)
        
        cameras, points = MeshroomJSONFileHandler.parse_meshroom_file(
            path, self.path_to_images, self)
        
        self.report({'INFO'}, 'Number cameras: ' + str(len(cameras)))
        self.report({'INFO'}, 'Number points: ' + str(len(points)))
        
        reconstruction_collection = add_collection('Reconstruction Collection')
        self.import_photogrammetry_cameras(cameras, reconstruction_collection)
        self.import_photogrammetry_points(points, reconstruction_collection)

        return {'FINISHED'}
コード例 #4
0
    def execute(self, context):

        path = self.directory
        # Remove trailing slash
        path = os.path.dirname(path)
        self.report({'INFO'}, 'path: ' + str(path))

        self.path_to_images = get_default_image_path(
            path, self.path_to_images)
        self.report({'INFO'}, 'path_to_images: ' + str(self.path_to_images))
        
        cameras, points = ColmapFileHandler.parse_colmap_model_folder(path, self)

        self.report({'INFO'}, 'Number cameras: ' + str(len(cameras)))
        self.report({'INFO'}, 'Number points: ' + str(len(points)))

        reconstruction_collection = add_collection('Reconstruction Collection')
        self.import_photogrammetry_cameras(cameras,reconstruction_collection)
        self.import_photogrammetry_points(points, reconstruction_collection)

        self.report({'INFO'}, 'Parse Colmap model folder: Done')

        return {'FINISHED'}