MCPcopy Create free account
hub / github.com/Robotics-STAR-Lab/H2-Mapping / padding_points

Function padding_points

mapping/src/functions/voxel_helpers.py:444–455  ·  view source on GitHub ↗
(xs, pad)

Source from the content-addressed store, hash-verified

442 sampled_idx, sampled_depth, sampled_dists = outputs
443
444 def padding_points(xs, pad):
445 if len(xs) == 1:
446 return xs[0]
447
448 maxlen = max([x.size(1) for x in xs])
449 full_size = sum([x.size(0) for x in xs])
450 xt = xs[0].new_ones(full_size, maxlen).fill_(pad)
451 st = 0
452 for i in range(len(xs)):
453 xt[st: st + xs[i].size(0), : xs[i].size(1)] = xs[i]
454 st += xs[i].size(0)
455 return xt
456
457 sampled_idx = padding_points(sampled_idx, -1)
458 sampled_depth = padding_points(sampled_depth, MAX_DEPTH)

Callers 1

parallel_ray_samplingFunction · 0.85

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected