pyorc.Frames#
- class pyorc.Frames(xarray_obj)[source]#
Frames functionalities that can be applied on xr.DataArray.
Initialize a frames xr.DataArray.
- Parameters:
xarray_obj (xr.DataArray) – frames data fields (from pyorc.Video.get_frames)
- __init__(xarray_obj)[source]#
Initialize a frames xr.DataArray.
- Parameters:
xarray_obj (xr.DataArray) – frames data fields (from pyorc.Video.get_frames)
Methods
__init__
(xarray_obj)Initialize a frames xr.DataArray.
add_xy_coords
(xy_coord_data, coords, attrs_dict)Add coordinate variables with x and y dimensions (2d) to existing xr.Dataset.
edge_detect
([wdw_1, wdw_2])Highlight edges of frame intensities, using a band convolution filter.
get_piv
([window_size, overlap, engine])Perform PIV computation on projected frames.
get_piv_coords
(window_size, ...)Get Particle Image Velocimetry (PIV) coordinates and mesh grid projections.
landmask
([dilate_iter, samples])Attempt to mask out land from water.
minmax
([min, max])Minimum / maximum intensity filter.
normalize
([samples])Remove the temporal mean of sampled frames.
plot
([ax, mode])Create QuadMesh plot from a RGB or grayscale frame on a new or existing (if ax is not None) axes.
project
([method, resolution, reducer])Project frames into a projected frames object, with information from the camera_config attr.
reduce_rolling
([samples])Remove a rolling mean from the frames.
smooth
([wdw])Smooth each frame with a Gaussian kernel.
time_diff
([thres, abs])Apply a difference over time.
to_ani
(fn[, figure_kwargs, video_kwargs, ...])Store an animation of the frames in the object.
to_video
(fn[, video_format, fps])Write frames to a video file without any layout.
Attributes
Camera configuration belonging to the processed video.
Shape of the original camera objective of the processed video (e.g.
Actual water level belonging to the processed video.