Michael Lee Posted August 27, 2021 Share Posted August 27, 2021 I was experimenting with Perlin-like (I call it Perloid) noise when I realized I could threshold a little bit harder than usual. The first few images are "regular" sort of Perlin-like, but as you get 5-9, the thresholding is increase for each color channel and resolution channel. It ends producing almost natural-like features. It is it ITC, mathematics in action, or both? Code: #--------------------------------- # Original author: Michael S. Lee # Date: 8/27/2021 #--------------------------------- import numpy as np import matplotlib.pyplot as plt import cv2 N = 1024 # Image size noise = np.random.rand(N,N,3) # White noise in RGB channels noise2 = np.copy(noise) # setup output array image = noise2 blur = np.copy(image) sum1 = np.zeros_like(image) for j,i in enumerate([512,256,128,64,32,16,8,4,2]): image = cv2.resize(noise2,(i,i),interpolation=cv2.INTER_LANCZOS4) blur2 = blur blur = cv2.resize(image,(N,N)) diff = blur - blur2 min1 = diff.mean() - 1.0*diff.std() max1 = diff.mean() + 1.0*diff.std() diff = np.clip((diff - min1)/(max1-min1),0,1) sum1 = sum1 + (j+1)*diff min1 = sum1.mean() - 2.0*sum1.std() max1 = sum1.mean() + 2.0*sum1.std() sum1 = np.clip((sum1 - min1) / (max1-min1),0,1) plt.imshow(sum1) plt.show() 2 Quote Link to comment Share on other sites More sharing options...
Michael Lee Posted August 27, 2021 Author Share Posted August 27, 2021 a few more pictures 2 Quote Link to comment Share on other sites More sharing options...
Administrators Andres Ramos Posted August 28, 2021 Administrators Share Posted August 28, 2021 Wow! At least you found a way to create impressionist art with a mouseclick. Relly fascinating!. Picture 7 in your first posting is my favorite one, there are clearl shapes showing up -a bit like cubism. But also the last two images are wonderful! I saw similar patterns in reflections in water from trees with leafs in summer. Could you explain your program in more detail please, specially what parameter defines the threshold? 0 Quote Link to comment Share on other sites More sharing options...
Michael Lee Posted August 28, 2021 Author Share Posted August 28, 2021 In my new version below, thresholding is controlled by "gamma" within the "shrink" function. Mandatory face pictures Same person with circular black sunglasses? Code version 2 (for record keeping, and others to experiment with): #--------------------------------- # Original author: Michael S. Lee # Date: 8/27/2021 #--------------------------------- import numpy as np import imageio import cv2 def shrink(x, gamma = 30): beta = gamma / (x.std()) y = 1.0 / (1.0 + np.exp(-beta*(x-x.mean()))) return(y) N = 1024 # Image size noise = np.random.rand(N,N,3) # White noise in RGB channels noise2 = np.copy(noise) # setup output array image = noise2 blur = np.copy(image) sum1 = np.zeros_like(image) thresh = 0.375#375 for j,i in enumerate([512,256,128,64,32,16,8,4]): image = cv2.resize(noise2,(i,i),interpolation=cv2.INTER_LANCZOS4) blur2 = blur blur = cv2.resize(image,(N,N)) diff = blur - blur2 diff = shrink(diff, gamma = 10) sum1 = sum1 + (j+1)*(j+1)*diff #sum1 = sum1 + (j+1)*diff min1 = sum1.mean() - 2*sum1.std() max1 = sum1.mean() + 2*sum1.std() sum1 = shrink(sum1, gamma=1) # Save on disk index = np.random.randint(0,262144) # Random filename imageio.imsave('temp.'+str(index)+'.png',sum1) 2 Quote Link to comment Share on other sites More sharing options...
Michael Lee Posted September 10, 2021 Author Share Posted September 10, 2021 I added a little bit of darkening in my algorithm to make it a little more like itc-station's Perlin images. Also, I used my microphone to generate 20 seconds of ambient noise and reshape it into a 1024x1024x3 image. This is the 3rd attempt using ambient noise (192 kHz for 20 seconds): 96 kHz for 40s: 3 Quote Link to comment Share on other sites More sharing options...
Administrators Andres Ramos Posted September 10, 2021 Administrators Share Posted September 10, 2021 Wow this is so cool Michael! You are really creating art out of sound. This is just beautiful and reminds me of hereafter descriptions I read from! I identified a small face in your previous picture. 1 Quote Link to comment Share on other sites More sharing options...
Administrators Karyn Posted September 10, 2021 Administrators Share Posted September 10, 2021 Neat! You have a new art form that pretty well shows the world in chaos. 0 Quote Link to comment Share on other sites More sharing options...
Administrators Andres Ramos Posted September 10, 2021 Administrators Share Posted September 10, 2021 17 minutes ago, Michael Lee said: I added a little bit of darkening in my algorithm to make it a little more like itc-station's Perlin images. Also, I used my microphone to generate 20 seconds of ambient noise and reshape it into a 1024x1024x3 image. This is the 3rd attempt using ambient noise (192 kHz for 20 seconds): 96 kHz for 40s: Your last picture is just amazing! It is somehow organic like plants or weed. 1 Quote Link to comment Share on other sites More sharing options...
Administrators Andres Ramos Posted September 10, 2021 Administrators Share Posted September 10, 2021 This looks like the outline of a being interwoven with the organic structure. You can see the head, hair and outlines of a right arm. From watching this I get the impression of the "green man", a mythological creature still known in the Irish culture, a humanoid being that is a plant. 2 Quote Link to comment Share on other sites More sharing options...
Administrators Andres Ramos Posted September 10, 2021 Administrators Share Posted September 10, 2021 And the holy grail is also there So theoretically, following the Arthurian legend, this could be the image of the Fisher King Anforthas. 2 Quote Link to comment Share on other sites More sharing options...
Michael Lee Posted September 12, 2021 Author Share Posted September 12, 2021 If you load in a WAV file of ambient noise at say 192 KHz for about 20 seconds, this will be approximately 3 million samples. Then reshape the array to be a 1024x1024x3 image using numpy.reshape() 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.