How to use the pyntcloud.learn.transforms.flip_axis function in pyntcloud

To help you get started, we’ve selected a few pyntcloud examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github daavoo / pyntcloud / pyntcloud / learn / generator.py View on Github external
if self.y_shift_voxel_range is not None:
            ty = np.random.uniform(-self.y_shift_voxel_range, self.y_shift_voxel_range)
        
        if self.z_shift_voxel_range is not None:
            tz =  np.random.uniform(-self.z_shift_voxel_range, self.z_shift_voxel_range)
        
        transforms.append(shift_voxels(tx, ty, tz))
        
        final_transform = apply_offset(combine_transforms(transforms), x, y, z)
        
        voxelgrid = apply_transform(voxelgrid, final_transform, channel_axis, fill_mode=self.fill_mode, cval=self.cval)
        
        if self.x_flip:
            if np.random.random() < 0.5:
                voxelgrid = flip_axis(voxelgrid, x_axis)

        if self.y_flip:
            if np.random.random() < 0.5:
                voxelgrid = flip_axis(voxelgrid, y_axis)
                
        if self.z_flip:
            if np.random.random() < 0.5:
                voxelgrid = flip_axis(voxelgrid, z_axis)

        return voxelgrid
github daavoo / pyntcloud / pyntcloud / learn / generator.py View on Github external
final_transform = apply_offset(combine_transforms(transforms), x, y, z)
        
        voxelgrid = apply_transform(voxelgrid, final_transform, channel_axis, fill_mode=self.fill_mode, cval=self.cval)
        
        if self.x_flip:
            if np.random.random() < 0.5:
                voxelgrid = flip_axis(voxelgrid, x_axis)

        if self.y_flip:
            if np.random.random() < 0.5:
                voxelgrid = flip_axis(voxelgrid, y_axis)
                
        if self.z_flip:
            if np.random.random() < 0.5:
                voxelgrid = flip_axis(voxelgrid, z_axis)

        return voxelgrid
github daavoo / pyntcloud / pyntcloud / learn / generator.py View on Github external
if self.z_shift_voxel_range is not None:
            tz =  np.random.uniform(-self.z_shift_voxel_range, self.z_shift_voxel_range)
        
        transforms.append(shift_voxels(tx, ty, tz))
        
        final_transform = apply_offset(combine_transforms(transforms), x, y, z)
        
        voxelgrid = apply_transform(voxelgrid, final_transform, channel_axis, fill_mode=self.fill_mode, cval=self.cval)
        
        if self.x_flip:
            if np.random.random() < 0.5:
                voxelgrid = flip_axis(voxelgrid, x_axis)

        if self.y_flip:
            if np.random.random() < 0.5:
                voxelgrid = flip_axis(voxelgrid, y_axis)
                
        if self.z_flip:
            if np.random.random() < 0.5:
                voxelgrid = flip_axis(voxelgrid, z_axis)

        return voxelgrid