Verified Commit 2dcd91b5 authored by Anton Akhmerov's avatar Anton Akhmerov
Browse files

bugfixes

parent 4e211e07
......@@ -135,12 +135,12 @@ jet_pts = np.array(jet_pts)[:, :3]
JET_TREE = cKDTree(jet_pts)
def points_near_jet(img, r, plot=False):
def points_near_jet(img, r=0.2, plot=False):
# Represent image as float so we can perform division
img = np.array(img, dtype='float').reshape(-1, 3)
img /= np.max(img)
img /= 255 # Map colors into a unit cube.
img_tree = cKDTree(img, balanced_tree=False, compact_nodes=False)
pts = [res for neighs in JET_TREE.query_ball_tree(img_tree, 0.2) for res in neighs]
pts = [res for neighs in JET_TREE.query_ball_tree(img_tree, r) for res in neighs]
pts = np.unique(pts)
if plot:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment