Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
Autocnet
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
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
aflab
astrogeology
Autocnet
Commits
ddcca3ce
Unverified
Commit
ddcca3ce
authored
Dec 9, 2021
by
gsn9
Committed by
GitHub
Dec 9, 2021
Browse files
Options
Downloads
Plain Diff
Merge pull request #621 from gsn9/loggingForSpatial
converted spatial module to use logging
parents
43c29389
5b48e70c
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
autocnet/spatial/overlap.py
+7
-4
7 additions, 4 deletions
autocnet/spatial/overlap.py
with
7 additions
and
4 deletions
autocnet/spatial/overlap.py
+
7
−
4
View file @
ddcca3ce
import
time
import
warn
ing
s
import
logg
ing
import
json
from
subprocess
import
CalledProcessError
...
...
@@ -42,6 +42,9 @@ INSERT INTO overlay(intersections, geom) SELECT row.intersections, row.geom FROM
FROM iid GROUP BY iid.geom) AS row WHERE array_length(intersections, 1) > 1;
"""
# set up the logger file
log
=
logging
.
getLogger
(
__name__
)
def
place_points_in_overlaps
(
size_threshold
=
0.0007
,
distribute_points_kwargs
=
{},
cam_type
=
'
csm
'
,
...
...
@@ -164,7 +167,7 @@ def place_points_in_overlap(overlap,
geom
=
overlap
.
geom
valid
=
compgeom
.
distribute_points_in_geom
(
geom
,
**
distribute_points_kwargs
,
**
kwargs
)
if
not
valid
.
any
():
warning
s
.
warn
(
'
Failed to distribute points in overlap
'
)
log
.
warning
(
'
Failed to distribute points in overlap
'
)
return
[]
print
(
f
'
Have
{
len
(
valid
)
}
potential points to place.
'
)
...
...
@@ -211,7 +214,7 @@ def place_points_in_overlap(overlap,
# Extract ORB features in a sub-image around the desired point
image_roi
=
roi
.
Roi
(
node
.
geodata
,
sample
,
line
,
size_x
=
size
,
size_y
=
size
)
if
image_roi
.
variance
==
0
:
warning
s
.
warn
(
f
'
Failed to find interesting features in image
{
node
.
image_name
}
.
'
)
log
.
warning
(
f
'
Failed to find interesting features in image
{
node
.
image_name
}
.
'
)
continue
image
=
image_roi
.
clip
()
...
...
@@ -222,7 +225,7 @@ def place_points_in_overlap(overlap,
break
if
interesting
is
None
:
warning
s
.
warn
(
'
Unable to find an interesting point, falling back to the a priori pointing
'
)
log
.
warning
(
'
Unable to find an interesting point, falling back to the a priori pointing
'
)
newsample
=
sample
newline
=
line
else
:
...
...
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