mask = maskable_imageĪll this is copied and interpreted from this link, so check it if you find my attempted explanation unclear, as I just provided solution but don't understand that much about color arrays of image and its transformation. Then you can use this array for your mask. Maskable_image = list(map(transform_zeros, mask)) Transformation: for i in range(len(mask)): Creating the same shaped np.array: maskable_image = np.ndarray((mask.shape,mask.shape), np.int32)Ģ-3. is a free online word cloud generator and tag cloud creator. Create function for transforming (here our value = 0) def transform_zeros(val):Ģ-2. But if it is 0 or probably other value, we have to change this to 255.Ģ.In the case of other values, the code for changing the values:Ģ-1. If the output values for white np.array is 255, then it is okay. Mask = np.array(Image.open("filepath/picture.png")) To solve this, following can be done:ġ.Creating mask object: (Please try with your own image as I couldn't upload:) import numpy as np The reason is that the color's np.array somewhat mismatches. The problem is that some of images are not suitable for masking. Save your result, print the word cloud or show it on your screen. The application is capable of making really huge word clouds, up to twice the size of A0. It allows you to have full freedom to tune your word cloud to any size, colour, font and shape. Note only white point values for image is mask_out (other values are mask_in). Wordaizer creates word clouds like Wordle does. Some images should be adjusted for the process.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |