My question is can these filters be re-written in terms of Core
Image? The reason I ask is that the simple examples I've seen so far
are of the 'Apply this algorithm to each pixel in the image'
variety. I want something a bit different: an ordered dither for
example. To do an ordered dither I need to divide the image into
squares (4x4 say); count how many pixels in a square are above a
threshold; set pixels within the square depending on how many were
above the threshold.
In general, you cannot pass any information from one pixel to
another. So the usual algorithm for, say, a Floyd-Stienberg dither
can't be done in Core Image.
There may be some way to work around the limitation, though. For
example, for each pixel in the output, sample the surrounding input
pixels that would normally be 0 in the Floyd-Stienberg kernel, dither
each one to figure out the error propogated from each one, add those
values together, add them to the current pixel, and round it off as
appropriate. It means you'll be sampling a bunch of times more than
you would with the traditional algorithm, so it might not be very
fast. And I can't verify that my method will give identical results.
:-) But it's worth a try.
Darrin
--
Darrin Cardani - email@hidden
President, Buena Software, Inc.
<http://www.buena.com/>
Video, Image and Audio Processing Development
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Quartz-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/quartz-dev/email@hidden