asp_plot.scenes#

Attributes#

Classes#

PairSceneFiles

The left/right sub-sampled scenes of one multi-view pair.

SceneFiles

Discover the left/right sub-sampled scene files for a stereo directory.

ScenePlotter

Plot raw or map-projected images from ASP stereo processing.

Module Contents#

class asp_plot.scenes.PairSceneFiles#

The left/right sub-sampled scenes of one multi-view pair.

One entry per <prefix>-pairN/ subdirectory of an ASP multi-view stereo run (see asp_plot.utils.find_pair_directories()).

directory: str#
label: str#
left_scene_sub_fn: str | None#
number: int#
right_scene_sub_fn: str | None#
class asp_plot.scenes.SceneFiles(directory, stereo_directory)#

Discover the left/right sub-sampled scene files for a stereo directory.

Isolates file discovery from the plotting in ScenePlotter, mirroring the StereoFiles / StereoPlotter split. Resolved paths and flags are exposed as plain attributes for ScenePlotter to consume.

directory#

Root directory of ASP processing.

Type:

str

stereo_directory#

Subdirectory containing stereo outputs.

Type:

str

full_stereo_directory#

Full path to the stereo directory.

Type:

str

attribution#

Rights-holder of the source imagery (“Vantor”, “Airbus DS”, …); gates the copyright overlay on scene panels.

Type:

str or None

left_scene_sub_fn, right_scene_sub_fn

Paths to the left/right sub-sampled scene files.

Type:

str or None

pairs#

Per-pair scene files of a multi-view run, resolved from the <prefix>-pairN/ subdirectories when present; empty for a standard stereo run.

Type:

list of PairSceneFiles

attribution = None#
directory#
full_stereo_directory#
left_scene_sub_fn#
pairs#
right_scene_sub_fn#
stereo_directory#
class asp_plot.scenes.ScenePlotter(directory, stereo_directory, **kwargs)#

Bases: asp_plot.utils.Plotter

Plot raw or map-projected images from ASP stereo processing.

This class extends the base Plotter class to provide visualization of raw or map-projected images created during ASP stereo processing. It locates and plots the left and right scenes from a stereo pair.

directory#

Root directory of ASP processing

Type:

str

stereo_directory#

Subdirectory containing stereo outputs

Type:

str

full_stereo_directory#

Full path to stereo directory

Type:

str

left_scene_sub_fn#

Path to the left subsampled file

Type:

str or None

right_scene_sub_fn#

Path to the right subsampled file

Type:

str or None

title#

Plot title, inherited from Plotter class

Type:

str

Examples

>>> scene_plotter = ScenePlotter('/path/to/asp', 'stereo', title="Stereo Images")
>>> scene_plotter.plot_scenes(save_dir='/path/to/output', fig_fn='stereo_images.png')
plot_scenes(save_dir=None, fig_fn=None)#

Plot the left and right images side by side.

Creates a figure with two subplots showing the left and right images from the stereo pair. Map-projection is not assumed. Each image is displayed with its filename above it.

For a multi-view run (per-pair products in <prefix>-pairN/ subdirectories), one figure per pair is created instead, named <stem>_pairN.png. The reference (left) image is the same for every pair.

Parameters:
  • save_dir (str or None, optional) – Directory to save the figure(s), default is None (don’t save)

  • fig_fn (str or None, optional) – Filename for the saved figure, default is None. For a multi-view run this is the stem the per-pair filenames are derived from.

Returns:

The filename(s) saved (empty if save_dir/fig_fn were not provided).

Return type:

list of str

Notes

If either image file is missing, the corresponding subplot will display a message indicating that required files are missing.

property directory#
files#
property full_stereo_directory#
property left_scene_sub_fn#
property pairs#
property right_scene_sub_fn#
property stereo_directory#
asp_plot.scenes.logger#