cars.pipelines.analysis.report_tools

CARS analysis pipeline report tools module

Functions

make_paths_relative(html_content, output_file_path)

Transform absolute paths in the HTML content.

merge_reports(reports_html_files, report_file_html, ...)

Merge the reports pdfs into one report pdf

generate_report_cars_output(report_file, output_dir, ...)

Generate a report PDF using HTML and WeasyPrint.

safe_list_return(func)

Wrapper to ensure that the decorated function returns a

normalize_image(img)

Normalize image for better visualization

generate_epipolar_images(output_dir, used_resolution, ...)

Generate the epipolar images overview

generate_envelope_images(output_dir, used_resolution, ...)

Generate the envelope interpretation image

generate_dsm_overview(output_dir, images_dir)

Generate the dsm overview image

save_robust_overview(input_path, output_png, title[, cmap])

Convert to overview

generate_hillshade(dsm_path, output_path[, azimuth, ...])

Generates a hillshade from a Digital Surface Model (DSM).

generate_satellite_plot_mpl(sat_positions, output_png)

Generate a satellite position plot using Matplotlib.

generate_satelite_position_report(sat_positions, ...)

Geneate a report with the satellite positions and infos

Module Contents

cars.pipelines.analysis.report_tools.make_paths_relative(html_content, output_file_path)[source]

Transform absolute paths in the HTML content.

Parameters:
  • html_content – html content

  • output_file_path

Returns:

htm content with relative paths

cars.pipelines.analysis.report_tools.merge_reports(reports_html_files, report_file_html, report_file_pdf)[source]

Merge the reports pdfs into one report pdf

Parameters:
  • reports_html_files (list of str) – list of paths to the reports htmls to merge

  • report_file_html (str) – path to the merged report html

  • report_file_pdf (str) – path to the merged report pdf

cars.pipelines.analysis.report_tools.generate_report_cars_output(report_file, output_dir, log_error, used_conf)[source]

Generate a report PDF using HTML and WeasyPrint.

Parameters:
  • report_file – path to the report pdf to generate

  • output_dir – cars output directory

  • log_error – error log string or status

  • used_conf – configuration dictionary

cars.pipelines.analysis.report_tools.safe_list_return(func)[source]

Wrapper to ensure that the decorated function returns a list even in case of exceptions. :param func: :return:

cars.pipelines.analysis.report_tools.normalize_image(img)[source]

Normalize image for better visualization :param img: input image :return: clipped and normalized image

cars.pipelines.analysis.report_tools.generate_epipolar_images(output_dir, used_resolution, images_dir)[source]

Generate the epipolar images overview

Parameters:
  • output_dir (str) – cars output directory

  • used_resolution (float) – used resolution for the report

  • images_dir (str) – path to the directory to save the generated image

:return path to the generated image :rtype: str

cars.pipelines.analysis.report_tools.generate_envelope_images(output_dir, used_resolution, images_dir)[source]

Generate the envelope interpretation image

Parameters:
  • output_dir (str) – cars output directory

  • used_resolution (float) – used resolution for the report

  • images_dir (str) – path to the directory to save the generated image

:return path to the generated image :rtype: str

cars.pipelines.analysis.report_tools.generate_dsm_overview(output_dir, images_dir)[source]

Generate the dsm overview image

Parameters:
  • output_dir (str) – cars output directory

  • images_dir (str) – path to the directory to save the generated image

:return path to the generated image :rtype: str

cars.pipelines.analysis.report_tools.save_robust_overview(input_path, output_png, title, cmap=None)[source]

Convert to overview :param input_path: :param output_png: :param title: :param cmap: :return:

cars.pipelines.analysis.report_tools.generate_hillshade(dsm_path, output_path, azimuth=315, altitude=45)[source]

Generates a hillshade from a Digital Surface Model (DSM).

Parameters: - dsm_path: Path to the input .tif file - output_path: Path to save the generated hillshade - azimuth: Direction of the light source (0-360, 315 is North-West) - altitude: Solar elevation angle (0-90)

cars.pipelines.analysis.report_tools.generate_satellite_plot_mpl(sat_positions, output_png)[source]

Generate a satellite position plot using Matplotlib. :param sat_positions: list of satelite positions :param output_png: path to save the generated image :return:

cars.pipelines.analysis.report_tools.generate_satelite_position_report(sat_positions, sat_infos, output_dir)[source]

Geneate a report with the satellite positions and infos :param sat_positions: :param sat_infos: :param output_dir: :return: