Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Quantum Tinkerer
plotocop
Commits
93138970
Commit
93138970
authored
Jul 07, 2021
by
Anton Akhmerov
Browse files
update the pillow array API
parent
288febc6
Pipeline
#117690
failed with stage
in 5 minutes and 47 seconds
Changes
1
Pipelines
377
Hide whitespace changes
Inline
Side-by-side
jet_detection.py
View file @
93138970
...
...
@@ -203,7 +203,7 @@ JET_TREE = cKDTree(jet_pts)
def
points_near_jet
(
img
,
r
=
0.2
,
plot
=
False
):
# Represent image as float so we can perform division
img
=
np
.
array
(
img
,
d
type
=
"
float
"
).
reshape
(
-
1
,
3
)
img
=
np
.
array
(
img
).
as
type
(
float
).
reshape
(
-
1
,
3
)
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
,
r
)
for
res
in
neighs
]
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment