2 Summary of lectureHow to produce illusion of the original tonal quality of a image by judicious placements of dots.How to generate an image with fewer amplitude levels but perceptually similar to the original.High frequency patterns are perceived as their macroscopic averages.Halftoning techniquesDitheringDisperse dotCluster dotError DiffusionFloyd SteinbergDithering mask Ξ screen
3 Dispersed masksPrint single ink dots; ability to deal with individual pixels of the image. Individual pixels are addressed.M(i,j) is threshold maskThe numbers in the mask are so dispersed, that the black dots in the output are also well dispersed for each graylevel.ProblemsStacking constraint – no solution
4 Periods of n& m can sometimes be detected Solution: make nxm >> no. of distinct threshold elements, useful in blue noisemasks (low frequency attenuated)Large nxm ; poor spatial resolutionbigger mask: more gray levels.i.e Better gray/ dynamic range /colour resolutionLarge masks are obtained using 2 smaller masks based on Thue-Morse sequence.Clustered masksThey average over a neighborhood & replace by cluster of dots. Pixels in clustered dot are nucleated in groups in regular intervals.Tradeoff between no.of gray levels to be rendered and size of cluster
5 Bigger cluster – more levels the mask can render – but more noticeable cluster in dither output A methodStart with a larger mask consisting of several copies of a small mask with 256 levels (0-1)For 0.5 gray level – checker board is idealGet versions of this checker board by a process of interpolation for intermediate gray levelsTrial & error & by judging output qualityA versatile method
6 Calibration of dither masks : In constructing dither masks, we assume that the no.of black pixels in a hlaftone pattern proportional to gray levelsWe call such - linear dither masksWill not work if there is dot overlap or dot gainAnother point: Non linearity effect when a quantity called lightness is used to measure graylevelsLightness – perceived as log of luminance (how bright we see luminance)To compensate for this , apply a tone reproduction curve (TRC) to the input data & then use a linear dither mask.
8 Colour:Use 4 different masks (screens) one for each color + black. using the same mask 4 times is usually avoided by the screens set at different angles.Registration problem (moire pattren)
9 Error Diffusion:Running errorWhere at pixel location K, r(k) is a gray value number between 0 (w) – 1 (B)ρ( k) = 0 for white= 1 for blackThe running error satisfies the recursion
10 Simple error diffusion: is defined by taking ρ(n+1) to satisfy the greedy algorithm.i.e. ρ(n+1) takes the value 0 or 1 which ever minimizes Є (n+1), with a tie breaking rule (when error is exactly 0.5).It can be shown that Є (n) lies in the interval [-1/2, 1/2] for any choice of the sequenceThus Є(n) is bounded and
24 What is digital halftoning? Digital halftoning is the process of rendering a continuous-tone image with a device that is capable of generating only two or a few levels of gray at each point on the device output surface.The perception of additional levels of gray depends on a local average of the binary or multilevel texture.
25 The Two Fundamental Goals of Digital Halftoning Representation of Tonesmooth, homogeneous texture.free from visible structure or contouring.Diamond dot screenBayer screenError diffusion
28 Discrete Fourier Transform A tool for measuring the frequency spectrum of signals.For discrete time signals xn n=0,1, …, N-1. The Discrete Fourier transform (DFT) can be calculated by The inverse Fourier transform calculates the time sequence from the frequency components:Both the time sequence and the frequency components are complex numbers in general. The power spectral density of the time sequence x is
29 Application to ImagesWe need to define the concept of spatial frequency. This is the number of cycles measured per unit distance.low frequencyhigh frequency
30 Fundamental frequency Basis SetSinusoid is the basis for measuring spectral characteristics in the Fourier transform. Note thatThe Fourier transform represents each signal sample as weighted average of sinusoidsDC termFundamental frequencySecond harmonic
31 Two Dimensional DFT Straightforward extension of the 1-D DFT. Equivalent totaken 1-D DFT row by rowthen take 1-D DFT of the result column by columncolumn bycolumn DFTrow by rowDFT
32 Human Visual ResponseThe human perception system do not have equal response to all spatial frequencies.As the spatial frequencies become higher and higher, our ability to perceive the pattern will be lower and lower.It turns out that our ability to perceive very low frequency patterns also decreases as the frequency decreases.These characteristics can be captured using a contrast sensitivity function.
33 Contrast Sensitivity Function [Mannos and Sakrison, 1974]frSpatial frequency (cycles per degree perceived by the eyes)
34 Screening or Dithering Outline 1. Screening as a threshold process2. Macroscreens3. Spectral characteristics of screens
35 Screening is a Thresholding Process Simple point-to-point transformation of each pixel in the continuous-tone image to a binary value.Process requires no memory or neighborhood information.Threshold
36 Why Not Use a Single Threshold? A single threshold yields only a silhouette representation of the image.No gray levels intermediate to white or black are rendered.To generate additional gray levels, the threshold must be dithered, i.e. perturbed about the constant value.Continuous-tone original imageResult of applying a fixed threshold at midtone
37 Basic Structure of Screening Algorithm The threshold matrix is periodically tiled over the entire continuous-tone image.
38 Terminology The screening process is also called dithering. However, the term dithering is sometimes applied to any digital halftoning process, not just that consisting of a pixel-to-pixel comparision with thresholds in a matrix.The following are equivalent terms for the threshold matrix:screendither matrixmask
39 How Tone is RenderedIf we threshold the screen against a constant gray value, we obtain the binary texture used to represent that constant level of absorptance.
40 Dot Profile FunctionThe family of binary textures used to render each level of constant tone is called the dot profile function.There is a one-to-one relationship between the dot profile and the screen.
41 Selection of Threshold Values For an MxN halftone cell,can print 0, 1, 2, …, MN dots, yielding average absorbances (occupancy ratio) 0, 1/MN, 2/MN, …, 1, respectively.As the input gray level increases, each time a threshold is exceeded, we add a new dot, thereby increasing the rendered absorbance by 1/MN.It follows that the threshold levels should be uniformly spaced over the range of gray values of the input image.
60 Floyd-Steinberg Error Diffusion [Floyd and Steinberg 1975]The filter coefficients for Floyd-Steinberg error diffusion areThere are two different but equivalent implementations.Q(.)xm,nbm,n+hk,l-um,nem,n3/165/167/161/16*current pixel location
62 Other Error Diffusion Filters Jarvis, Judice and Ninke3/485/487/48*current pixel location1/48Stucki2/424/428/42*current pixel location1/42
63 Implementation 2 (Filtering Approach) Q(.)xm,nbm,n+hk,l-um,nem,nAt each pixel location, compute um,n.Threshold um,n to give the output bm,n.Calculate and store the quantizer error em,n.(3/16)* em-1,n+1(5/16)* em-1,n(7/16)* em,n-1(1/16)* em-1,n-1*
65 Spectral Characteristics of Error Diffusion Noise energy mostly in the high frequency region.No obvious spikes in the error diffusion spectrum. Hence, there is no obvious periodicity.Some “cut-off” frequency below which there is very little noise energy.Ulichney showed empirically that this is roughly the principal frequency.Usually called the blue noise characteristics.The noise spectrum is skewed, that is, not circularly symmetric with respect to the two dimensional frequency plane. Empirical results show that this is due to the asymmetry in the error diffusion filter.
66 Improvements to Error Diffusion Error diffusion suffer from some patterning and worm artifacts. There have been a great deal of work to improve the quality of error diffusion. Here are some general areas that people have worked on:alternative scanning strategiesrandomize the quantizer thresholdrandomize the filter coefficientsoptimize the error diffusion filteradaptive error diffusiondesign multiple error diffusion filters and switch among them depending on image characteristics
67 ColorPrinters render color by placing dots of 3 or more subtractive colorants on the paper.3 color printer: cyan, magenta, yellow (CMY)4 color printer: CMY plus black (K)>4 color printer: additional primaries are used to yield a larger gamut, and reduce visibility of halftone textureColor images to be printed come from additive color systemsImage capture devices (camera or scanner): red, green, blue (RGB)Display devices (CRT or LCD): RGB
68 Additive vs. Subtractive Color M = W--G C = W-R Y = W-B
69 Two Fundamental Problems of Color Printing Conversion from RGB to CMYK.Determination of what dots to print and where for a given CMYK amount.The color as expressed in a device-independent color space, such as CIE L*a*b*, that results for a given CMYK amount depends on bothprint mechanism and colorants,halftoning algorithm.Ideally, the halftoning algorithm and RGB to CMYK conversion should be designed together.In practice, halftoning algorithm is developed first to render a given amount of CMYK.Then, RGB to CMYK conversion is developed by treating printer and halftoning algorithm together as a black box.
70 CMYK Halftoning: Periodic, Clustered Dot Screens These algorithms emulate well-established techniques developed for conventional offset and lithographic printing.The screens are rotated relative to each other to minimize formation of rosettes:darkest two colors (M and K) are separated by 45 degrees,next lighter color (C) is separated from these two by 22 degrees,lightest color (Y) is not rotated.The finite addressability of the printer necessitates careful design of the screens which is usually done by hand.CMYK halftones can each be generated independently.Typically used in laser EP printers.
71 CMYK Halftoning: Dispersed Dot, Aperiodic Algorithms Since the halftone textures have no periodic structure, rosettes cannot occur.However, interference between colorant planes is still possible, and results in graininess or mottle.Can use either:blue noise mask,error diffusion.Halftone patterns can either be dot-on-dot or dot-off-dot.Typically used in IJ printers.
72 Dot-on-Dot Halftoning Eliminates possibility of interference between colorant planes.Requires better control of dot placement between colorant planes.Restricts gamut.Results in more visible dots in highlights.CMYK halftones can be generated independently.
73 Dot-off-Dot Halftoning Registration of colorant planes not critical.Less visible dots in highlight areas.Enforcement of dot-off-dot behavior must be an explicit part of the halftoning algorithm.CMYK halftones must be generated jointly.
74 Conversion to Printer CMYK Convert input RGB image to a device-independent color space, such as CIE L*a*b*.Characterize color printer/halftoning algorithm combination.Develop mapping from CIE L*a*b* to printer CMYK:interpolation for 3-D transformation between L*a*b* and CMYK,account for gamut limitations,undercolor removal, e.g. replace some part of equal amounts of CMY by an equivalent amount of K.