Back to Parent

import math 
import numpy as np
import cv2

img = cv2.imread('depthmap.jpg', 0)

img = np.array(img, dtype  = np.float64) / 255.0 

width,height = img.shape

x,y = np.meshgrid(range(height), range(width)) 

F = np.cos(12.0 * x / float(width)) + np.sin(12.0 * y / float(height))

F = (F * .25) + 0.5 

image = (img + F) / 2.0 

cv2.imwrite('newtexture.png', image * 255.0)
Click to Expand

Content Rating

Is this a good/useful/informative piece of content to include in the project? Have your say!

0