Commit 8f0c777c authored by ashawkey's avatar ashawkey
Browse files

fix readme

parent 9bb0634a
...@@ -67,6 +67,11 @@ distances, face_id, uvw = BVH.signed_distance(points, return_uvw=True, mode='ray ...@@ -67,6 +67,11 @@ distances, face_id, uvw = BVH.signed_distance(points, return_uvw=True, mode='ray
UDF + flood-fill for possibly non-watertight/single-layer meshes: UDF + flood-fill for possibly non-watertight/single-layer meshes:
```python ```python
import torch
import cubvh
import numpy as np
from skimage import morphology
resolution = 512 resolution = 512
device = torch.device('cuda') device = torch.device('cuda')
...@@ -88,7 +93,7 @@ occ = udf < 2 / resolution # tolerance 2 voxels ...@@ -88,7 +93,7 @@ occ = udf < 2 / resolution # tolerance 2 voxels
empty_mask = morphology.flood(occ, (0, 0, 0), connectivity=1) # flood from the corner, which is for sure empty empty_mask = morphology.flood(occ, (0, 0, 0), connectivity=1) # flood from the corner, which is for sure empty
occ = ~empty_mask occ = ~empty_mask
``` ```
Check [`test/robust_occupancy.py`](test/robust_occupancy.py) for more details. Check [`test/extract_mesh_occupancy.py`](test/extract_mesh_occupancy.py) for more details.
**Renderer:** **Renderer:**
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment