MCPcopy Create free account
hub / github.com/computational-imaging/bacon / normalize

Method normalize

dataio.py:659–665  ·  view source on GitHub ↗
(self, coords)

Source from the content-addressed store, hash-verified

657 print('loaded pc')
658
659 def normalize(self, coords):
660 coords -= np.mean(coords, axis=0, keepdims=True)
661 coord_max = np.amax(coords)
662 coord_min = np.amin(coords)
663 coords = (coords - coord_min) / (coord_max - coord_min) * 0.9
664 coords -= 0.45
665 return coords
666
667 def sample_surface(self):
668 idx = np.random.randint(0, self.v.shape[0], self.num_samples)

Callers 1

load_meshMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected