-
Notifications
You must be signed in to change notification settings - Fork 0
Home
The function create_mosaic takes 6 arguments:
img: The Image you want to convert as a numpy array
images_tuple: A tuple created by giving the create_img_array function the filepath of your (cat) images and the size you want them to be
resolution: How much the input image gets pixelated (Higher values result in a lower quality)
cat_size: How big one (cat) image should be (Should be the same as in the create_img_array function for best results)
accuracy: Determines how random the images are (When set to 1 or lower gives an error for some reason) (Set to 2 for the most accurate image)
saveto: The filepath you want to save the result to
`import cv2 import cat_image_mosaic
cats_filepath = "./cat_images"
cat_images = cat_image_mosaic.create_img_array(images_filepath=cats_filepath, img_size=25) im = cv2.imread("input6.png")
cat_image_mosaic.create_mosaic(img=im, images_tuple=cat_images, resolution=75, cat_size=25, accuracy=5, logs=True) ` Input Image:

Output Image:
