This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"pipeline": [ | |
{ | |
"type": "readers.ept", | |
"filename": "https://pixel8austin.storage.googleapis.com/lidar/ept.json", | |
"bounds": "([621208.2565613358, 621408.2565613358], [3347979.1272665653, 3348179.1272665653])" | |
}, | |
{ | |
"type":"filters.normal", | |
"knn":8 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from numba import cuda | |
@cuda.jit(device=True) | |
def _gpu_average(arr): | |
out = 0.0 | |
for i in range(arr.shape[0]): | |
for j in range(arr.shape[1]): | |
out = out + arr[i,j] | |
return out / arr.size |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
import numba | |
@numba.stencil(neighborhood=((-1, 1), (-1, 1))) | |
def _average(arr): | |
return np.mean(arr[-1:2, -1:2]) | |
@numba.jit(nopython=True, parallel=True) | |
def averaging_filter(arr): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def reconstruct(pyr): | |
img = pyr[-1] | |
for resid in reversed(pyr[:-1]): | |
up = np.stack([cv2.pyrUp(layer) for layer in img]) | |
nr, nc = resid.shape[1:] | |
img = up[:,:nr,:nc] + resid | |
return img |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
import cv2 | |
def next_pyramid_layer(img): | |
down = np.stack([cv2.pyrDown(layer) for layer in img]) | |
up = np.stack([cv2.pyrUp(layer) for layer in down]) | |
nr, nc = img.shape[1:] | |
resid = img - up[:,:nr,:nc] | |
return img - up[:,:nr,:nc], down |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
NewerOlder