Computer Graphics and Image Processing Guide
Computer Graphics and Image Processing Guide
RGB (Red, Green, Blue) is additive and used in digital displays like monitors. CMY (Cyan, Magenta, Yellow) is subtractive, suitable for color printing. HSV (Hue, Saturation, Value) is used in design and art as it represents colors similarly to how humans perceive them, allowing intuitive color modifications .
The scan-line algorithm processes one row of pixels at a time, determining visible surfaces based on depth and coverage. Ray tracing, in contrast, traces rays from the eye through each pixel to determine visible surfaces along their path, allowing for complex effects like reflections and refractions but at a higher computational cost .
Histogram equalization enhances image contrast by redistributing intensity values, resulting in a uniform histogram. This expands the range of visible details, beneficial in medical imaging to highlight features or in surveillance to improve visibility under various lighting conditions .
Bresenham's Line drawing algorithm is generally more efficient and accurate compared to the Digital Differential Analyzer (DDA). Bresenham's algorithm uses only integer addition, subtraction, and bit shifting, hence it is faster and less prone to rounding errors. DDA, on the other hand, uses floating-point arithmetic, which can lead to cumulative rounding errors and is computationally more intensive .
Image sampling involves selecting representative pixels from the continuous image, while quantization maps these samples to a finite set of values. High sampling rates and quantization levels result in better image quality by preserving more detail and reducing aliasing artifacts. Conversely, inadequate sampling and coarse quantization degrade image quality .
Lossy compression, which reduces file size by discarding some image data, is preferable when storage size is a constraint and perfect fidelity isn't crucial, like in web images. Lossless compression retains all original data, maintaining fidelity, and is used where data integrity is vital, such as in medical imaging or archival storage .
Edge detection techniques are crucial for image segmentation as they identify boundaries within images. Sobel and Prewitt are simple and quick, suitable for basic applications but sensitive to noise. Canny provides higher accuracy and noise resilience but is computationally intensive, making it ideal for complex analyses in medical imaging and computer vision .
2D transformations involve equations for translation (T = [x, y] + [tx, ty]), scaling (S = [sx*x, sy*y]), rotation (R = [x*cos(θ) - y*sin(θ), x*sin(θ) + y*cos(θ)]), and shearing (Sh = [x + shx*y, y + shy*x]). These transformations alter the position, size, and orientation of graphical objects, affecting how they appear on the screen .
Gouraud shading enhances 3D realism by averaging vertex colors and interpolating them across the surface of polygons, giving a smooth appearance. However, it cannot handle specular highlights effectively, sometimes resulting in them being missed entirely or appearing overly diffused .
Window-to-viewport transformation is crucial in computer graphics as it maps a portion of a scene (window) to the display area (viewport). This transformation involves scaling and translation to adjust the coordinates from world space to screen space. It is used, for example, in displaying graphics on varied screen sizes ensuring consistency of image proportion and alignment .