PaperFactory#
- class augraphy.base.paperfactory.PaperFactory(texture_path='./paper_textures', blend_texture=1, blend_method='random', p=1)[source]#
Bases:
AugmentationReplaces the starting paper image with a texture randomly chosen from a directory and resized to fit or cropped and tiled to fit.
- Parameters:
texture_path (string, optional) – Directory location to pull paper textures from.
blend_texture (int, optional) – Flag to blend multiple textures.
blend_method (string, optional) – The method to blend multiple textures.
p (float, optional) – The probability that this Augmentation will be applied.
- check_paper_edges(texture)[source]#
Crop image section with better texture.
- Parameters:
texture (numpy array) – Texture image.