Computer Graphics Exercise 1 Halftoning and Color Transfer
- Slides: 21
Computer Graphics Exercise 1 Halftoning and Color Transfer Due date: 24. 03. 05
Part 1 Halftoning
General Description The purpose of this part of the exercise is to generate half tone images with two techniques: i. Ordered Dithering. ii. Error Distribution.
Original Image
Ordered Dithering
Error Diffusion Propagate the error to the Four surrounding neighbours
Program Usage The program should be named “halftoning. exe”. The programs gets from the command line TWO parameters: 1. Option –d or –e 2. Input filename
Program Usage The program generates one output image • dither_<input_name> (-d option) • errdiff_<input_name> (-e option)
Part 2 Color Transfer
General Description Ø The purpose of this part is to implement a simple algorithm that transfers the colors of one image onto another image.
Example Colors Result:
The algorithm Ø You will find an affine mapping (Matrix + translation) between the color spaces of the two images. For every pixel i of the first image, you take its color pi = (ri, gi, bi), and apply the mapping M. Ø You obtain the new color for pixel i: Ø
In detail B B How to find a good mapping? G R
Mapping by PCA B B G G R R Find the axes by PCA Ø Compute the oriented bounding boxes Ø Define M as the affine mapping between those boxes! Ø
Program Usage The program should be named “Color. Transfer. exe”. The programs gets from the command line TWO parameters: 1. First input filename (the one to map the colors onto) 2. Second input filename (the one to take the colors from)
Program Usage The program generates one output image res_<input_name_1>
General Guidelines
Important Remarks Ø You should write the programs in C or C++. Ø Document your program thoroughly. Ø In this assignment there is no need to open a window or use Open. GL in any way.
Important Remarks Ø The work can be done in pairs. Ø Submit your work on diskettes (or CD’s). Hardcopy of the documentation. Ø Points will be rewarded for nice and original images.
More Important Remarks Ø Don't forget to check the number of parameters that your program receives. Ø Don't forget to check memory allocations, if they succeeded or failed. Ø Pay attention to the difference between bytes, int’s and float’s (Rounding error). Ø Pay attention to the borders of the image.
A Little Help Ø Irfan. View – An image viewer, editor. Ø Free. Image – A open source library for working with images. Ø New. Mat 10 – matrix and linear algebra library Ø See the links on the exercise webpage
- Halftoning in computer graphics
- Digital halftoning
- Digital halftoning
- Hand held computer
- Computer graphics introduction ppt
- Rgb color model in computer graphics
- Energy transfer during exercise
- Two dimensional viewing
- Line drawing in computer graphics
- Bresenham line drawing algorithm example ppt
- What is window and viewport in computer graphics
- Reflection and shearing in computer graphics
- Mathematical foundations of computer graphics and vision
- Polygon clipping in computer graphics ppt
- Region filling and clipping in computer graphics
- Computer graphics hardware and software
- Midpoint ellipse algorithm in computer graphics
- Scan conversion of ellipse in computer graphics
- Bitmap and pixmap in computer graphics
- In random scan display, the frame buffer holds
- Circle and ellipse drawing algorithm in computer graphics
- Computer graphics