Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
FLASH
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Labooratory AI
FLASH
Commits
443dcd21
Commit
443dcd21
authored
2 years ago
by
Nassim Bouteldja
Browse files
Options
Downloads
Patches
Plain Diff
Update computeFeatures.py
parent
baeccb64
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
computeFeatures.py
+10
-2
10 additions, 2 deletions
computeFeatures.py
with
10 additions
and
2 deletions
computeFeatures.py
+
10
−
2
View file @
443dcd21
...
@@ -35,7 +35,15 @@ import scipy.ndimage
...
@@ -35,7 +35,15 @@ import scipy.ndimage
import
scipy
as
sp
import
scipy
as
sp
from
skimage.morphology
import
remove_small_objects
from
skimage.morphology
import
remove_small_objects
from
utils
import
getBoundingBox
# Takes a binary mask image and outputs its bounding box
def
getBoundingBox
(
img
):
rows
=
np
.
any
(
img
,
axis
=
1
)
cols
=
np
.
any
(
img
,
axis
=
0
)
rmin
,
rmax
=
np
.
where
(
rows
)[
0
][[
0
,
-
1
]]
cmin
,
cmax
=
np
.
where
(
cols
)[
0
][[
0
,
-
1
]]
return
rmin
,
rmax
,
cmin
,
cmax
# Computes sizes, diameters, and distance_to_closest_glom features for each glom
# Computes sizes, diameters, and distance_to_closest_glom features for each glom
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment