Quantizing a continuous topological space corresponds to partitioning it and assigning labels to each partition. The straightforward standard approach for this scenario (quantizing normals) is as follows.
- Choose your favorite uniform polyhedron:
- http://en.wikipedia.org/wiki/Tetrahedron (4 faces)
- http://en.wikipedia.org/wiki/Cube (6 faces)
- http://en.wikipedia.org/wiki/Octahedron (8 faces)
- http://en.wikipedia.org/wiki/Dodecahedron (12 faces)
- http://en.wikipedia.org/wiki/Icosahedron (20 faces)
- In general: http://en.wikipedia.org/wiki/Schl%C3%A4fli_symbol
- Develop a mapping function from a normal on the unit sphere to the face of your chosen polyhedron that the normal intersects.
- I would advise doing an argmax across polyhedron faces, taking the dot product of your normal and each polyhedron face normal. The one that gives the highest dot product is the face your normal should be binned into.
- Use the face normal for each polyhedron face as the label for that face.
Prefer this approach to the approach suggested by others of mapping to spherical coordinates and then binning those. That approach suffers from too much sensitivity near the poles of the sphere.
Edit
In the paper you added to your question, the same idea is being used. There, however, the normals are restricted to a hemisphere - the only surfaces directly visible in an image have surface normals no more than 90 degrees away from the vector from the surface to the viewpoint.
The paper wants to quantize these surface normals into 8 values, represented by 8-bit integers with exactly one bit set to 1 and the rest set to 0. The 8 precomputed normals are computed as:
ntx = cos(a)*cos(t)
nty = cos(a)*sin(t)
ntz = sin(a)
where a = pi/4 and t = 0, pi/4, 2*pi/4, 3*pi/4, ..., 7*pi/4.
Notice
[cos(a)*cos(t)]2 + [cos(a)*sin(t)]2 + [sin(a)]2 = cos2(a)[cos2(t) + sin2(t)] + sin2(a) = cos2(a) + sin2(a) = 1