kopia lustrzana https://github.com/OpenDroneMap/ODM
Adjust decimation step for cropping, catch edge case where convex hull is obliterated
rodzic
9b57a23e4d
commit
3f133309aa
|
@ -189,8 +189,14 @@ class Cropper:
|
|||
BUFFER_SMOOTH_DISTANCE = 3
|
||||
|
||||
if buffer_distance > 0:
|
||||
convexhull = convexhull.Buffer(-(buffer_distance + BUFFER_SMOOTH_DISTANCE))
|
||||
convexhull = convexhull.Buffer(BUFFER_SMOOTH_DISTANCE)
|
||||
# For small areas, check that buffering doesn't obliterate
|
||||
# our hull
|
||||
tmp = convexhull.Buffer(-(buffer_distance + BUFFER_SMOOTH_DISTANCE))
|
||||
tmp = tmp.Buffer(BUFFER_SMOOTH_DISTANCE)
|
||||
if tmp.Area() > 0:
|
||||
convexhull = tmp
|
||||
else:
|
||||
log.ODM_WARNING("Very small crop area detected, we will not smooth it.")
|
||||
|
||||
# Save to a new file
|
||||
bounds_geojson_path = self.path('bounds.geojson')
|
||||
|
|
|
@ -120,7 +120,12 @@ class ODMGeoreferencingStage(types.ODM_Stage):
|
|||
log.ODM_INFO("Calculating cropping area and generating bounds shapefile from point cloud")
|
||||
cropper = Cropper(tree.odm_georeferencing, 'odm_georeferenced_model')
|
||||
|
||||
decimation_step = 40 if args.fast_orthophoto or args.use_opensfm_dense else 90
|
||||
if args.fast_orthophoto:
|
||||
decimation_step = 10
|
||||
elif args.use_opensfm_dense:
|
||||
decimation_step = 40
|
||||
else:
|
||||
decimation_step = 90
|
||||
|
||||
# More aggressive decimation for large datasets
|
||||
if not args.fast_orthophoto:
|
||||
|
|
Ładowanie…
Reference in New Issue