got colors - PowerPoint PPT Presentation

1 / 22
About This Presentation
Title:

got colors

Description:

How accurate' is the resulting image? ... Subjectivity of image quality. Different Color Spaces. Don't use ImageMagick. 22. Any Questions? ... – PowerPoint PPT presentation

Number of Views:29
Avg rating:3.0/5.0
Slides: 23
Provided by: joohyu
Category:
Tags: colors

less

Transcript and Presenter's Notes

Title: got colors


1
got colors?
  • Color Quantization Techniques
  • Joo Hyun Song

2
Outline
  • Overview
  • Implementation
  • Results and Discussion
  • Concluding Remarks

3
Overview
  • What is color quantization?
  • Color quantization is applied when the color
    information of an image is to be reduced. 1
  • The most common case is when a 24-bit color
    image is transformed into an 8-bit color image.
    1
  • Used when high-depth color is not supported or
    necessary.
  • 1 http//www.dai.ed.ac.uk/HIPR2/quantize.htm

4
Overview (contd)
  • Main issues concerning color quantization
  • What are the criteria for colors that are
    retained in the resulting image?(How are the
    important colors selected?)
  • How accurate is the resulting image?(How well
    are the important features of the image preserved
    in the resulting image?)
  • How fast is the quantization process?

5
Implementation
  • Diversity Algorithm 2
  • Color quantization algorithm devised by John
    Bradley, the creator of the popular UNIX-based
    imaging software xv.
  • The algorithm starts by picking the most populous
    color (the overall color) of the original image.
  • Then the most distant colors from the colors in
    the new color table are picked until the new
    color table is filled.
  • Results in the most diverse selection of colors
    surrounding the overall color.
  • 2 http//www.trilon.com/xv/manual/xv-3.10a/diversi
    ty-algorithm.html

6
Implementation (contd)
  • Modified Diversity Algorithm 2
  • Improvement over the original Diversity Algorithm
    suggested by Tom Lane of the Independent JPEG
    Group.
  • The modification aims to better balance the
    allocation between diverse colors and populous
    colors.
  • The alternation strategy is subjective some
    strategy works better in certain images while not
    as good in other.
  • Examples in this presentation use the
    10-div-pop/div rule. ?

7
Implementation (contd)
  • ImageMagickTM 3 libraries and tools
  • Provides readily available libraries and tools
    for reading, manipulating and writing most of the
    popular image formats.
  • Programming Language of choice C
  • C has stdvector and stdmap datatypes that
    made the histogram and colorMap implementation
    simpler.
  • C has a built-in optimized sort() function that
    can be used for sorting elements in stdvector
    datatypes.
  • Not Java. -)
  • 3 http//www.imagemagick.org/

8
Test Images
9
Results
  • Tested Algorithms
  • Diversity Algorithm
  • Modified Diversity Algorithm
  • Tested Color Spaces
  • RGB
  • YUV
  • YIQ
  • XYZ
  • UVW

(not really)
10
Original Diversity vs. Modified Diversity
Original Diversity Algorithm (RGB)
Modified Diversity Algorithm (RGB)
11
Original Diversity vs. Modified Diversity (contd)
Original Diversity Algorithm (RGB)
Modified Diversity Algorithm (RGB)
12
Original Diversity vs. Modified Diversity (contd)
Original Diversity Algorithm (RGB)
Modified Diversity Algorithm (RGB)
13
Color Space Comparisons
Original
RGB
YUV
XYZ
14
Color Space Comparisons
Original
RGB
YUV
XYZ
15
Color Space Comparisons
Original
RGB
YUV
XYZ
16
Weird
UVW (supposedly)
17
My UVW Implementation
  • double DecodeUVW(const unsigned int color, const
    char opt)
  • double X DecodeXYZ(color, 'x')
  • double Y DecodeXYZ(color, 'y')
  • double Z DecodeXYZ(color, 'z')
  • double x X/(XYZ)
  • double y Y/(XYZ)
  • double u 4x/(-2x12y3)
  • double v 6y/(-2x12y3)
  • double W 25pow(100Y, 1/3)-17
  • // Get reference white
  • X DecodeXYZ(0xFFFFFF, 'x')
  • Y DecodeXYZ(0xFFFFFF, 'y')
  • Z DecodeXYZ(0xFFFFFF, 'z')
  • x X/(XYZ)

18
Future Interest
  • Investigate more advanced color spaces (such as
    Luv or IHS).
  • Investigate other color metrics (e.g. Riemannian
    color space).
  • Investigate more advanced color quantization
    algorithms (such as the Neural Networks color
    quantization algorithm).

19
Performance of other programs
  • ImageMagicks built-in quantizeColors() algorithm

20
Performance of other programs (contd)
  • Gimp

21
What I Have Learned
  • Start EARLY ?
  • Subjectivity of image quality.
  • Different Color Spaces.
  • Dont use ImageMagick

22
Any Questions?
Write a Comment
User Comments (0)
About PowerShow.com