You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+2-1Lines changed: 2 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -71,7 +71,7 @@ pip install torchhull
71
71
torchhull gets as input mask images with camera information:
72
72
73
73
-`masks`: Single-channel images `M` with binary values {0, 1}.
74
-
-`transforms`: Fused extrinsic and intrinsic matrix `K * T`, i.e. transformation from world coordinates to OpenGL clip space (right before perspective division).
74
+
-`transforms`: Fused extrinsic and intrinsic matrix `K * T`, i.e. from world coordinates to image coordinates (right before perspective division), either in OpenGL or OpenCV convention.
75
75
76
76
The visual hull is then evaluated inside a cube with bottom-front-left corner `cube_corner_bfl` and extent `cube_length` at extracted at octree level `level`. The remaining flags control how the output mesh `(verts, faces)` should look like.
Copy file name to clipboardExpand all lines: src/torchhull/_C/python/bindings.cpp
+12-3Lines changed: 12 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -17,6 +17,7 @@ PYBIND11_MODULE(TORCH_EXTENSION_NAME, m)
17
17
"cube_corner_bfl"_a,
18
18
"cube_length"_a,
19
19
"masks_partial"_a,
20
+
"transforms_convention"_a,
20
21
"unique_verts"_a = true,
21
22
R"(
22
23
Compute the visual hull of the given masks in terms of a mesh.
@@ -34,7 +35,7 @@ PYBIND11_MODULE(TORCH_EXTENSION_NAME, m)
34
35
masks
35
36
Single-channel mask images with binary values {0, 1}. B x H x W x 1.
36
37
transforms
37
-
The combined transformationsfrom world coordinates to OpenGL clip space (right before perspective division). B x 4 x 4.
38
+
The combined transformations, i.e. intrinsics * extrinsics, from world coordinates to image coordinates (right before perspective division). B x 4 x 4.
38
39
level
39
40
The hierarchy level to compute the visual hull at.
40
41
cube_corner_bfl
@@ -43,6 +44,8 @@ PYBIND11_MODULE(TORCH_EXTENSION_NAME, m)
43
44
The length of the cube in world space.
44
45
masks_partial
45
46
Whether some masks may only contain the object partially.
47
+
transforms_convention
48
+
Convention used to specify the transformations. Options: `opengl`, `opencv`.
46
49
unique_verts
47
50
Whether a compact mesh without duplicate vertices (\|F\| approx. 2 * \|V\|) if true, or a triangle soup
48
51
(\|F\| = (1/3) * \|V\|) if false should be returned.
@@ -61,6 +64,7 @@ PYBIND11_MODULE(TORCH_EXTENSION_NAME, m)
61
64
"cube_corner_bfl"_a,
62
65
"cube_length"_a,
63
66
"masks_partial"_a,
67
+
"transforms_convention"_a,
64
68
"unique_verts"_a = true,
65
69
R"(
66
70
Compute the visual hull of the given masks in terms of a mesh.
@@ -78,7 +82,7 @@ PYBIND11_MODULE(TORCH_EXTENSION_NAME, m)
78
82
masks
79
83
Single-channel mask images with binary values {0, 1}. B x H x W x 1.
80
84
transforms
81
-
The combined transformationsfrom world coordinates to OpenGL clip space (right before perspective division). B x 4 x 4.
85
+
The combined transformations, i.e. intrinsics * extrinsics, from world coordinates to image coordinates (right before perspective division). B x 4 x 4.
82
86
level
83
87
The hierarchy level to compute the visual hull at.
84
88
cube_corner_bfl
@@ -87,6 +91,8 @@ PYBIND11_MODULE(TORCH_EXTENSION_NAME, m)
87
91
The length of the cube in world space.
88
92
masks_partial
89
93
Whether some masks may only contain the object partially.
94
+
transforms_convention
95
+
Convention used to specify the transformations. Options: `opengl`, `opencv`.
90
96
unique_verts
91
97
Whether a compact mesh without duplicate vertices (\|F\| approx. 2 * \|V\|) if true, or a triangle soup
92
98
(\|F\| = (1/3) * \|V\|) if false should be returned.
@@ -136,6 +142,7 @@ PYBIND11_MODULE(TORCH_EXTENSION_NAME, m)
136
142
"cube_corner_bfl"_a,
137
143
"cube_length"_a,
138
144
"masks_partial"_a,
145
+
"transforms_convention"_a,
139
146
R"(
140
147
Compute a sparse scalar field of the sum of projected foreground pixels per detected candidate voxel. In this
141
148
field, the visual hull is located at isolevel \|M\| - 0.5.
@@ -153,7 +160,7 @@ PYBIND11_MODULE(TORCH_EXTENSION_NAME, m)
153
160
masks
154
161
Single-channel mask images with binary values {0, 1}. B x H x W x 1.
155
162
transforms
156
-
The combined transformationsfrom world coordinates to OpenGL clip space (right before perspective division). B x 4 x 4.
163
+
The combined transformations, i.e. intrinsics * extrinsics, from world coordinates to image coordinates (right before perspective division). B x 4 x 4.
157
164
level
158
165
The hierarchy level to compute the counts at.
159
166
cube_corner_bfl
@@ -162,6 +169,8 @@ PYBIND11_MODULE(TORCH_EXTENSION_NAME, m)
162
169
The length of the cube in world space.
163
170
masks_partial
164
171
Whether some masks may only contain the object partially.
172
+
transforms_convention
173
+
Convention used to specify the transformations. Options: `opengl`, `opencv`.
0 commit comments