camera matrics and camera normals
Browse files- README.md +16 -3
- raw_data/camera_matrices.tar.gz +3 -0
README.md
CHANGED
|
@@ -148,6 +148,22 @@ depth_dpt edges_dexined opticalflow_rife semantic_mas
|
|
| 148 |
depth_sfm_manual202204 normals_sfm_manual202204 rgb semantic_segprop8
|
| 149 |
```
|
| 150 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 151 |
</details>
|
| 152 |
|
| 153 |
## 2. Using the data
|
|
@@ -270,6 +286,3 @@ scene
|
|
| 270 |
all 60.456 73.261
|
| 271 |
```
|
| 272 |
</details>
|
| 273 |
-
|
| 274 |
-
## TODOs
|
| 275 |
-
- convert camera normals to world normals
|
|
|
|
| 148 |
depth_sfm_manual202204 normals_sfm_manual202204 rgb semantic_segprop8
|
| 149 |
```
|
| 150 |
|
| 151 |
+
### 1.2.7 Convert Camera Normals to World Normals
|
| 152 |
+
|
| 153 |
+
This is an optional step, but for some use cases, it may be better to use world normals instead of camera normals, which
|
| 154 |
+
are provided by default in `normals_sfm_manual202204`. To convert, we provide camera rotation matrices in
|
| 155 |
+
`raw_data/camera_matrics.tar.gz` for all 8 scenes that also have SfM.
|
| 156 |
+
|
| 157 |
+
In order to convert, use this function (for each npz file):
|
| 158 |
+
|
| 159 |
+
```
|
| 160 |
+
def convert_camera_to_world(normals: np.ndarray, rotation_matrix: np.ndarray) -> np.ndarray:
|
| 161 |
+
normals = (normals.copy() - 0.5) * 2 # [-1:1] -> [0:1]
|
| 162 |
+
camera_normals = camera_normals @ np.linalg.inv(rotation_matrix)
|
| 163 |
+
camera_normals = (camera_normals / 2) + 0.5 # [0:1] => [-1:1]
|
| 164 |
+
return np.clip(camera_normals, 0.0, 1.0)
|
| 165 |
+
```
|
| 166 |
+
|
| 167 |
</details>
|
| 168 |
|
| 169 |
## 2. Using the data
|
|
|
|
| 286 |
all 60.456 73.261
|
| 287 |
```
|
| 288 |
</details>
|
|
|
|
|
|
|
|
|
raw_data/camera_matrices.tar.gz
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:cb31fa506b9c0050d1befb66d30799bc3d7db754803515f63743ce7edf988e87
|
| 3 |
+
size 6499973
|