boilercv_pipeline.images#

Images.

Module Contents#

Functions#

prepare_dataset

Prepare a dataset from a CINE.

assign_length_dims

Assign length scales to “x” and “y” coordinates.

get_length_dims

Get a length scale.

get_image_boundaries

Get the boundaries of an image.

bounded_ax

Show only the region bounding nonzero elements of the image.

plot_composite_da

Compose a video-like data array and highlight the first frame.

crop_image

Crop an image to the specified boundaries.

API#

boilercv_pipeline.images.prepare_dataset(
cine_source: pathlib.Path,
num_frames: int | None = None,
start_frame: int = 0,
crop: boilercv_pipeline.types.Slicer2D | None = None,
) boilercv.types.DS#

Prepare a dataset from a CINE.

boilercv_pipeline.images.assign_length_dims(
dataset: boilercv.types.DS,
roi: boilercv.types.ArrInt,
) boilercv.types.DS#

Assign length scales to “x” and “y” coordinates.

boilercv_pipeline.images.get_length_dims(
parent_dim_units: str,
dim: str,
long_name: str,
scale: float,
images: boilercv.types.DA,
) boilercv.data.models.Dimension#

Get a length scale.

boilercv_pipeline.images.get_image_boundaries(
img,
) tuple[tuple[int, int], tuple[int, int]]#

Get the boundaries of an image.

boilercv_pipeline.images.bounded_ax(
img: boilercv.types.Img,
ax: matplotlib.axes.Axes | None = None,
) collections.abc.Iterator[matplotlib.axes.Axes]#

Show only the region bounding nonzero elements of the image.

boilercv_pipeline.images.plot_composite_da(
video: boilercv.types.DA,
ax: matplotlib.axes.Axes | None = None,
) matplotlib.axes.Axes#

Compose a video-like data array and highlight the first frame.

boilercv_pipeline.images.crop_image(
img,
ylim,
xlim,
)#

Crop an image to the specified boundaries.