440 likes | 461 Views
LUT Method For Inverse Halftone. 資工四 林丞蔚 林耿賢. Outline. Introduction Methods for Halftoning LUT Inverse Halftone Tree Structured LUT Conclusion. Introduction. halftoning. Inverse halftoning. Introduction (cont.). Traditional inverse halftoning method
E N D
LUT Method For Inverse Halftone 資工四 林丞蔚 林耿賢
Outline • Introduction • Methods for Halftoning • LUT Inverse Halftone • Tree Structured LUT • Conclusion
Introduction halftoning Inverse halftoning
Introduction (cont.) • Traditional inverse halftoning method • The contone value of a pixel is a linear combination of the surrounding halftone pixels • LUT inverse halftoning method Training data Select template Design LUT Inverse halftone
Methods for halftoning • Ordered dithering • Error diffusion • Dot diffusion
Methods for halftoning (cont.) • Ordered dithering • Pairwise comparison between gray level image and repeated dither matrix • Error diffusion • Separate the quantization error over neighboring pixels Floyd-Steinberg
Methods for halftoning (cont.) • Dot diffusion • Process the pixel according to the table
Methods for halftoning (cont.) • Dot diffusion • Just like error diffusion • But separate error to only 3 * 3 neighbors • Orthogonal: origin + 2 * e (i, j) / w • Diagonal: origin + e (i, j) / w
Methods for halftoning (cont.) • Dot diffusion • example
Methods for halftoning (cont.) • Optimized dot diffusion • Baron: a pixel has only low-class neighbor • Near baron: a pixel has one high-class neighbor • Traditional dot diffusion try to minimum the number of baron and near-baron.
Methods for halftoning (cont.) • Optimized dot diffusion • But the result is still not good enough. • Take human visual system into account. • Target function: • The average number of dark pixel should be equal to the original gray level. • The dark pixel are spatially distributed with the same average frequency.
Methods for halftoning (cont.) • Pairwise exchange algorithm • Randomly order the class matrix • List all possible exchange • If exchange reduce the value of target function exchange it and restart • Repeat above steps a fixed time
Methods for halftoning (cont.) • Optimized dot diffusion • Optimized class matrix
Methods for halftoning (cont.) • Pros and Cons • Ordered dithering • Advantage: Parallel method, only comparisons • Disadvantage: Resulting halftones suffer from periodicity
Methods for halftoning (cont.) • Pros and Cons • Error diffusion • Advantage: Do not suffer from periodic patterns • Disadvantage: Waste Time
Methods for halftoning (cont.) • Pros and Cons • Dot diffusion • Advantage: Parallel method • Disadvantage: Periodic structures in the halftones
LUT Inverse Halftone • A novel method for inverse halftone • LUT method is extremely fast and do not need any computation • LUT is obtained from histogram gather from a few sample images
LUT Inverse Halftone (cont.) • LUT method can be applied to any halftoning method • Image quality achieved is comparable to best methods
LUT Inverse Halftone (cont.) • Training set • Use some images with its halftoning and original image for the base to build the LUT • A good training set should have enough images representing both smooth and nonsmooth images
LUT Inverse Halftone (cont.) • Algorithm • Predict the continuous tone value of a pixel from its surrounding neighborhoods (“19pels” TEMPLATE) (“Rect” TEMPLATE)
LUT Inverse Halftone (cont.) • Take N pixels (including the pixel being estimated) in the neighborhood • P0,P1,……,PN-1 • There are 2N different pattern
LUT Inverse Halftone (cont.) • Target function T should return a value for each pattern: • : the number of occurrences of pattern • Corresponding continuous tone values:
LUT Inverse Halftone (cont.) • LUT value for the pattern will be the weight mean of the corresponding continuous tone values:
LUT Inverse Halftone (cont.) • Problems of nonexistent pattern • Some rows of LUT may not be used • Memory waste • Some patterns may not exists in the training set • Has no corresponding continuous tone value
LUT Inverse Halftone (cont.) • Solutions of nonexistent pattern problem • 1. Low pass filtering: the missing pattern is obtained as a linear combination of the binary pixels Pi
LUT Inverse Halftone (cont.) • Solutions of nonexistent pattern problem • 2. Hamming distance: Examples: The Hamming distance between 1011101 and 1001001 is 2. The Hamming distance between 2143896 and 2233796 is 3. The Hamming distance between "toned" and "roses" is 3.
LUT Inverse Halftone (cont.) • Solutions of nonexistent pattern problem • 3. Best linear estimator:
LUT Inverse Halftone (cont.) • Solutions of nonexistent pattern problem • 3. Best linear estimator: For each nonexistent pattern (p0,p1……pN-1), we obtain the continuous tone value, T(p0,……,pN-1), as follows: Define y = [p0,p1……,pN-1]x. Then,
LUT Inverse Halftone (cont.) • The PSNR values of these three solutions: • Low pass filtering: 29.79dB • Hamming distance: 28.91dB • Best linear estimator: 29.92 dB
LUT Inverse Halftone (cont.) • Template selection • Assume we have P images, both continuous tone images Dl(n1,n2) and halftone images Hl(n1,n2) for l = 1,2,3,……,P. • Define the mean square error between two image sets:
LUT Inverse Halftone (cont.) • Template selection algorithm:
LUT Inverse Halftone (cont.) • The PSNR values of these templates: (“x opt” TEMPLATE) (“Rect” TEMPLATE) (“19pels” TEMPLATE)
LUT Inverse Halftone (cont.) • The PSNR values of these templates:
LUT Inverse Halftone (cont.) • The PSNR values of LUT and tradition IH: Halftone by error diffusion
LUT Inverse Halftone (cont.) • Result comparison (high frequency): (fast inverse halftone) (LUT inverse halftone)
LUT Inverse Halftone (cont.) • Result comparison (low frequency): (fast inverse halftone) (LUT inverse halftone)
Tree Structured LUT • Reduce storage requirements of LUT • Can be thought as ‘comparison’ of LUT
Tree Structured LUT • Roots contain their patterns • (i ,j) stand for the template position of the additional pixel. • Halftone value = 0(1), go to left (right).
Tree Structured LUT • 1. Denote the size of template a. • 2. Define 2a binary tree corresponding to different patterns. 2a Contone value. If it’s root, included its pattern
Tree Structured LUT • 3. for each leaf t, find a pixel p that MSE is minimum. • 4. split leaf t, and add p to the tree 2a (-3, 0)
Tree Structured LUT • Compute the new contone value: • Average the actual value form current tree. 2a (-3, 0) (2, -1)
Tree Structured LUT • Improve method for tree structured LUT: • Directly build from LUT • Built only one binary tree • Start from pixel 0 as the root • … (pixel 0) (pixel 1) (pixel 2) ……… (“x opt” TEMPLATE)
Conclusion • LUT based method can be improved by • Better halftone method • The way predict the contone value in LUT • More efficiency tree structure • Tree structured LUT inverse halftone could be applied to color halftone of RGB
Conclusion (cont.) • LUT inverse halftone is extremely fast • Image quality achieved the best methods known for inverse haltoning • Requires much less storage than LUT halftoning