In the Visualization 2 - Lab Course the aim was to implement a scientific paper in the field of visualization. We took the perceptually based depth-ordering enhancement for direct volume rendering from Zheng et al. [1]. In this paper a method is presented to increase the perceived depth ordering of semi-transparent objects by adjusting the opacities and luminaces.
The paper was implemented in the Visualization program we created during the Visualization - Lab Course in winter term 2010 - 2011 (see here for more information and documentation).
Basically the program can compute an energy value that is based on the humans perception. This energy value is called depth ordering. A high depth ordering means that the shown objects are not perceived in correct order. The smaller the value is the better the depth perception of semi-transparent objects appears.
Some new functions have been implemented to show the computation of this depth ordering. It is possible to show the canny edges, the Junctions as well as the X-junctions. By pressing the "Calculate depth energy" button, the depth ordering is computed and (if checked) all the edge and junction information is rendered.
The results show two cases: On the left image, object A seems to be behind object B, which is wrong. On the right image, the transparancies have been adjusted and now object A seems to be in front of object B. This is correct. The depth ordering value for the left object is 0.472766, whereas it is 0.455895 for the right image. As expected, the depth ordering value for the right image is smaller than the depth ordering value for the left.
Download the source code. You need to install Qt 5.1.0 with OpenGL 3.2 core profile enabled.
Source code documentation.
[1] Zheng L., Wu Y, and Ma K.-L. (2012). Perceptually based depth-ordering enhancement for direct volume rendering. IEEE Transactions on Visualization and Computer Graphics.