diff --git a/odm_preprocess.py b/odm_preprocess.py index 9309093..112ccd9 100644 --- a/odm_preprocess.py +++ b/odm_preprocess.py @@ -82,7 +82,7 @@ class ImagePreprocessor: os.makedirs(self.config.output_dir) # 创建过滤图像保存目录 - os.makedirs(os.path.join(self.config.output_dir, 'filter_imgs')) + os.makedirs(os.path.join(self.config.output_dir, 'filter_imgs_visual')) # 创建日志目录 os.makedirs(os.path.join(self.config.output_dir, 'logs')) diff --git a/utils/grid_divider.py b/utils/grid_divider.py index f4fd251..cfbac05 100644 --- a/utils/grid_divider.py +++ b/utils/grid_divider.py @@ -129,7 +129,7 @@ class GridDivider: # 如果提供了输出目录,保存图像 if self.output_dir: save_path = os.path.join( - self.output_dir, 'filter_imgs', 'grid_division.png') + self.output_dir, 'filter_imgs_visual', 'grid_division.png') plt.savefig(save_path, dpi=300, bbox_inches='tight') self.logger.info(f"网格划分可视化图已保存至: {save_path}") diff --git a/utils/odm_monitor.py b/utils/odm_monitor.py index 6fd8a82..95ed247 100644 --- a/utils/odm_monitor.py +++ b/utils/odm_monitor.py @@ -13,12 +13,12 @@ class ODMProcessMonitor: self.logger = logging.getLogger('UAV_Preprocess.ODMMonitor') self.fast_mode = fast_mode - def _check_success(self, grid_dir: str) -> bool: + def _check_success(self, project_dir: str) -> bool: """检查ODM是否执行成功""" success_markers = ['odm_orthophoto', 'odm_georeferencing'] if not self.fast_mode: success_markers.append('odm_texturing') - return all(os.path.exists(os.path.join(grid_dir, 'project', marker)) for marker in success_markers) + return all(os.path.exists(os.path.join(project_dir, 'project', marker)) for marker in success_markers) def run_odm_with_monitor(self, project_dir: str, fast_mode: bool = True) -> Tuple[bool, str]: """运行ODM命令""" @@ -51,7 +51,7 @@ class ODMProcessMonitor: self.logger.info(f"==========stdout==========: {stdout}") self.logger.error(f"==========stderr==========: {stderr}") # 检查执行结果 - if self._check_success(image_dir): + if self._check_success(project_dir): self.logger.info(f"处理成功") else: self.logger.error(f"处理失败")