|
52 | 52 |
|
53 | 53 | print("Loading image ../images/bigBunny_1080.png") |
54 | 54 | img = cv2.imread('../images/bigBunny_1080.png') |
55 | | -imgY = cv2.cvtColor(img,cv2.COLOR_BGR2GRAY) |
| 55 | +imgYtmp = cv2.cvtColor(img,cv2.COLOR_BGR2GRAY) |
56 | 56 |
|
| 57 | +# downscale before pyrUp |
| 58 | +height, width, channels = img.shape |
| 59 | +imgY = cv2.resize(imgYtmp, (width//2,height//2)) |
| 60 | + |
| 61 | +height, width = imgY.shape |
57 | 62 | print("Size of imgY is ",imgY.shape); |
58 | | -height, width, channels = img.shape |
59 | 63 |
|
60 | 64 | numberOfIterations=10 |
61 | 65 | print("Number of loop iterations: "+str(numberOfIterations)) |
62 | 66 |
|
63 | | -height_2 = (height*2) |
64 | | -width_2 = (width*2) |
65 | | - |
66 | | -dstSW = np.ones((height_2,width_2),np.uint8); |
| 67 | +dstSW = np.ones((height*2,width*2),np.uint8); |
67 | 68 |
|
68 | 69 | xFimgY = mem_manager.cma_array((height,width),np.uint8) #allocated physically contiguous numpy array |
69 | 70 | xFimgY[:] = imgY[:] # copy source data |
70 | 71 |
|
71 | | -xFdst = mem_manager.cma_array((height_2,width_2),np.uint8) #allocated physically contiguous numpy array |
| 72 | +xFdst = mem_manager.cma_array((height*2,width*2),np.uint8) #allocated physically contiguous numpy array |
72 | 73 |
|
73 | 74 | print("Start SW loop") |
74 | 75 | startSW=time.time() |
|
0 commit comments