dlpy.images.ImageTable.as_random_patches

ImageTable.as_random_patches(random_ratio=0.5, x=0, y=0, width=None, height=None, step_size=None, output_width=None, output_height=None, inplace=True)

Generate random patches from the images in the ImageTable

Parameters
random_ratiodouble, optional

Specifies the proportion of the generated patches to output.

xint, optional

Specifies the x location of the top-left corner of the first patches.

yint, optional

Specifies the y location of the top-left corner of the first patches.

widthint, optional

Specifies the width of the patches.

heightint, optional

Specifies the width of the patches. If not specified, height will be set to be equal to width.

step_sizeint, optional

Specifies the step size of the moving windows for extracting the patches. If not specified, it will be set to be equal to width.

output_widthint, optional

Specifies the output width of the patches. If not specified, it will be set to be equal to width.

output_heightint, optional

Specifies the output height of the patches. If not specified, it will be set to be equal to height.

inplacebool, optional

Specifies whether to update the original table, or create a new one.

Returns
ImageTable

If inplace=True

None

If inplace=False