color matching for pattern


Re: color matching for pattern
#9
It might be possible to make your quantizer antialiasing-resistant, but I'm not sure how well it will work. The basic idea would be like so:
  1. First Pass: find all the pixels whose color is "close enough" to one of the output colors, and flag them as "good", while assigning them to the appropriate output color. This should handle all the filled in areas as long as your output colors are acceptable.
  2. Second Pass: for all pixels that didn't get set above, look at all their adjoining pixels that were given a value step one. Then, set their color to the color from that set that most closely matches.
  3. Repeat until done? Note: if you use a pass number for your "good" flag, you can avoid having pixels that are set during pass 2 being considered pre-good in pass 2.

Like I say, I'm not sure how well it will work, but it seems like it should get rid of the problem where black lines get blue and yellow pixels due to the original antialiasing.
Reply
« Next Oldest | Next Newest »



Messages In This Thread
Re: color matching for pattern - by Tim Gould - 2014-01-01, 21:25
Re: color matching for pattern - by Tim Gould - 2014-01-01, 22:32
Re: color matching for pattern - by Tim Gould - 2014-01-02, 21:43
Re: color matching for pattern - by Travis Cobbs - 2014-01-02, 22:06

Forum Jump:


Users browsing this thread: 2 Guest(s)