Grounded.DensityAnalyser module

exception Grounded.DensityAnalyser.BadModuleError(module_name)[source]

Bases : Exception

class Grounded.DensityAnalyser.DensityAnalyser(sfm: SFM, detecteur_mire: DetecteurMire, point_cloud_processor: PointCloudProcessor, output_dir: str = '.', verbosity: int = 1)[source]

Bases : object

Classe permettant l’analyse de la densité apparente du sol en utilisant la photogrammétrie. Une implémentation des techniques démontrés dans ces articles:

« Joining multi-epoch archival aerial images in a single SfM block allows 3-D change detection with almost exclusively image information. » - D. Feurer, F. Vinatier

« Assessing new sensor-based volume measurement methods for high-throughput bulk density estimation in the field under various soil conditions. » - Guillaume Coulouma, Denis Feurer, Fabrice Vinatier, Olivier Huttel

analyse(photo_path_before_excavation: str, photo_path_after_excavation: str, scale_bars: list[ScaleBar], display_padding: bool = False) list[float][source]
Args:

photo_path_before_excavation (str): chemin vers le fichier avant excavation photo_path_after_excavation (str): chemin vers le fichier après excavation scale_bars (list[ScaleBar]): réglets utilisés display_padding (bool): Option d’affiche de la zone de détection sur la sortie graphique

Returns:

list[float]: volumes des trous trouvés

get_config()[source]
Grounded.DensityAnalyser.calculate_average_mire_3d(mires_3d: list[Mire3D]) list[Mire3D][source]
Grounded.DensityAnalyser.calculate_average_scale_factor(mires: list[Mire3D], scale_bars)[source]
Grounded.DensityAnalyser.calculate_standard_deviation_mire_3d(mires_3d: list[Mire3D])[source]
Grounded.DensityAnalyser.delimitate_holes(raster_resolution: float, raster_zone, tol_simplify=0.01, width_buffer=0.02, area_hole=0.008, thres_hole=0.00021, k_cox_threshold=0.35, coords_mires_in_raster=[], min_height: float = 0, max_height: float = 0, min_width: float = 0, max_width: float = 0)[source]

Identifie et délimite les trous (zones non-continues) dans un raster.

Args:

coords_mires_in_raster: raster (Raster): Dataobject Raster stockant les informations sur le fichier raster_zone (numpy.ndarray): matrice représentant la zone d’intérêt. tol_simplify (float): Tolérance de simplification des polygones. width_buffer (float): Largeur d’agrandissement des polygones. area_hole (float): Surface minimale requise pour un trou. thres_hole (float): Seuil de binarisation du raster. k_cox_threshold (float): Seuil de rondeur (Cox) pour filtrer les polygones. width_padding (float): Pourcentage de padding en largeur appliqué à la détection des trous height_padding (float): Pourcentage de padding en hauteur appliqué à la détection des trous

Returns:

list: Liste de polygones Shapely représentant les trous délimités, triés de gauche à droite.

Grounded.DensityAnalyser.distance_euclidienne(point1, point2)[source]

Calcule la distance euclidienne entre deux points dans un espace multidimensionnel.

Args:

point1 (list, tuple, numpy.ndarray): Coordonnées du premier point. point2 (list, tuple, numpy.ndarray): Coordonnées du deuxième point.

Returns:

float: La distance euclidienne entre les deux points.

Grounded.DensityAnalyser.get_coordinates_mires3d_in_raster(mires3d: list[Mire3D], raster: Raster, scale_factor: float)[source]
Grounded.DensityAnalyser.polygon_coordinate_conversion(raster: Raster, polygon: Polygon) list[tuple[float, float]][source]
Grounded.DensityAnalyser.prospect_zone(raster: Raster)[source]
Grounded.DensityAnalyser.save_plot_result(raster_array, holes_polygons, list_volumes, output_name, display_padding, mires_coords, min_height, max_height, min_width, max_width)[source]
Grounded.DensityAnalyser.scale_bars_filter_without_pair(mires: list[Mire], scale_bars: list[ScaleBar]) list[ScaleBar][source]