dcsimg
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: Color quantization

  1. #1
    Join Date
    Jun 2014
    Posts
    21

    Color quantization

    Which algorithm is best, which is fastest? Especially I think about Java implementation.

  2. #2
    Join Date
    Apr 2000
    Location
    Belgium (Europe)
    Posts
    4,626

    Re: Color quantization

    Fastest is a simple RGB bit reduction, effectively resulting in a match to a premade (non-optimized) palette.

    best... depends on your definition of "best". Whatever system you pick it will be a tradeoff between speed, memory and resulting image quality.
    which color space you use will also affect resulting quality, but maybe you can't afford to use a color space other than RGB.

    color is a weird thing because the human eye does not percieve color in the same way as we encode RGB, the eye is more sensitive to changes in bright colors than in dark colors, it's also more sensitive to green than to blue. A good quantizer will account for that meaning that while the values of the R G B components may seem linear, they don't appear linear to the eye and thus the quantizer needs to use an exponential (or if you want an actual match, it's even more complex than a simple exponential) for determining the optimal palette AND then also use it for the colormatching.
    most quantizers simply assume linear values and prefer speed over quality.

    Then there's the matter of... do you only care about quantizing ? or do you want to account for dithering as well (which is a whole field of graphics on it's own) ?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Windows Mobile Development Center


Click Here to Expand Forum to Full Width




On-Demand Webinars (sponsored)