image_analysis.decode.extract_patches.
extract_patches
(mpeg_path, patch_dims, save_dir, *, n_frames=None, batch_size=250000)[source]¶save_dir: | directory to save extracted patches |
---|---|
mpeg_path: | file name for an mpeg video with one color channel |
patch_dims: | size of patches to extract |
n_frames: | number of frames to extract |
batch_size: | size limit for each batch |
image_analysis.decode.video_decoder.
decode_mpeg
(v_path, batch_size=1, stride=1, start_idx=0, end_idx=-1, pad=True)[source]¶v_path: | Path to MPEG video (i.e. include the video’s name & extension) |
---|---|
batch_size: | Number of frames in each batch |
stride: | Stride indicates beginning of batches, i.e. every stride’th frame (integer > 1) |
start_idx: | Index of first frame for first batch (integer >= 0) |
end_idx: | Index of last frame in the range of interest (integer >= 0) |
pad: | Boolean value indicating whether the last batch should be padded if it is not full after decoding the mpeg |
image_analysis.decode.video_decoder.
pad_batch
(batch, batch_size, frame, pad=True)[source]¶frame: | a numpy array extracted from an MPEG (length x width x channel) |
---|---|
batch: | list of frames |
batch_size: | number of frames per batch (integer >= 1) |