Graphics Reference
In-Depth Information
Image Edge Detection
Another useful image shader in data visualization is the edge
detection Sobel filter. As seen in Figure 15.2, the Sobel filter
emphasizes the parts of the image where shading is changing
quickly, usually the sharp edges. In this figure, the edges have
been colored and superimposed on the original image, but it
is sometimes also useful just to display the edges alone, as we
did in Chapter 11.
Both the image negative and edge detection examples
were implemented by looking at a static image, but in fact
they can also become a post-process to any dynamic 3D ren-
dering. To do this, use the OpenGL render-to-texture capabil-
ity described in Chapter 9 to produce a texture image of the
3D scene, and then render a quadrilateral with this texture on
it, using one of the image shaders.
Toon Rendering
Toon rendering, covered in Chapter 11, starts with edge detec-
tion and adds color quantization. It is sometimes an excellent
way to perform architectural visualization, because it strongly
brings out a building's key edges, while retaining the col-
ors but de-emphasizing them. This is shown in Figure 15.3,
which shows the Smithsonian Castle in Washington, DC both
without (left) and with (right) toon shading.
Figure 15.2. Edge detection
emphasizes certain features.
Figure 15.3. Toon rendering for architectural visualization.
Search WWH ::




Custom Search