Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Anti aliasing
1. Siwan Lama
M.Sc. IV Semester
Dept. of Computer & System
Science
Visva-Bharati University
India
2014
2. The process of removing one or more of the
unwanted artifact is called anti-aliasing or
smoothing.
In particular, anti-aliasing has played a critical role
in the quality of the quality of the texture mapped
and ray traced image.
3. //The geometric transformation of digital images is
inherently a sampling process.
Anti-aliasing occurs when the input signal is under
sampled. There are two solutions to this problem:-
i) it requires a display resolution which is costly or
unavailable.
ii) the second solution forces the signal to conform to the
low sampling rate by attenuating the high frequency
components that give rise to the aliasing artifact.
HERE, I WOULD LARGELY CONCENTRATE TO COUNTER
THE ALIASING ARTIFACT IN A LIMITED MANNER AND
USING THE OpenGL
4. The effect created when rasterization is performed
over a discrete series of pixels.
In particular, when lines or edges do not necessarily
align directly with a row or column of pixels, that line
may appear unsmooth and have a stair-step edge
appearance.
Anti aliasing utilizes blending techniques to blur the
edges of the lines and provide the viewer with the
illusion of a smoother line.
Points, lines or polygons can be anti aliased.
5. Anti-Aliasing
• Two general approaches: Area sampling and super-
sampling
• Area sampling approaches sample primitives with a
box (or Gaussian, or whatever) rather than spikes
1. Requires primitives that have area (lines with
width)
2. Sometimes referred to as pre-filtering
•Super-sampling samples at higher resolution, then
filters down the resulting image
i. Sometimes called post-filtering
ii. The prevalent form of anti-aliasing in hardware
6. Area Sampling
• shade pixels according to the area covered by
thickened line
• this is un-weighted area sampling
• a rough approximation formulated by dividing each pixel
into a finer grid of pixels
7. Super-sampling
•Sample at a higher
resolution than required for
display, and filter image down
•Issues of which samples to
take, and how to average
them
•4 to 16 samples per pixel is
typical
•Samples might be on a
uniform grid, or randomly
positioned, or other variants
•Number of samples can be
8. •OpenGL calculates a coverage value for each
fragment based on the fraction of the pixel
square on the screen that it would cover.
•In RGBA mode, OpenGL multiplies the fragment’s
alpha value by its coverage.
•Resulting alpha value is used to blend the fragment
with the corresponding pixel already in the frame
buffer.
9. Hints
•With OpenGL, you can control the behavior of anti-aliasing effects
by using the glHint() function:
void glHint(GLenum target, GLenum hint);
•target: parameter indicates which behavior is to be controlled.
Specifies the desired sampling quality of points, lines or polygons
during antialiasing operations
•target parameter can be
GL_POINT_SMOOTH_HINT
GL_LINE_SMOOTH_HINT
GL_POLYGON_SMOOTH_HINT
GL_FOG_HINT
GL_PERSPECTIVE_CORRECTION_HINT
10. glHint(target, hint)
• hint: parameter specifies the approach
• hint parameter can be
GL_FASTEST (the most efficient
option)
GL_NICEST (the highest-quality
option)
GL_DONT_CARE (no preference)
11. Enabling Anti-aliasing
• Anti aliasing is enabled using the glEnable() command,
We can enable GL_POINT_SMOOTH or
GL_LINE_SMOOTH modes.
• With RGBA mode, you must also enable blending to
utilize GL_SRC_ALPHA as the source factor and
GL_ONE_MINUS_SRC_ALPHA as the destination factor.
•Using a destination factor of GL_ONE will make
intersection points a little brighter.