[gs-devel] How to tell when DCTEncode is OK? (re #450663)
ray at artifex.com
Wed Apr 10 18:26:34 PDT 2002
I suggest applying a gamma function BEFORE doing the delta so that
white to near-white end up with bigger deltas than near-solid to
solid. Even light gray shadows in areas that are supposed to be
white will be very evident.
This still doesn't address degradation of synthetic images such
as ray-trace or Gouraud shaded images, or graphics with shaded
areas, that have sharply defined boundaries. Most of the image
will be smoothly varying, so the histogram will be clustered
around zero, but even a relatively few pixels (not counting
very much in the histogram) with large, abrupt deltas will
not be handled well by DCT lossy coding.
Also when doing the histogram, you need to make sure to take
column major as well as row major deltas into account since
DCT is a 2-D transform and sensitive to edges in both.
I do have a 2-D high pass filter algorithm around. I suggest that
the output of this can be used by rejecting any images with
high frequencies above some threshold amplitude.
I'll dig up the 2-D high pass digital filter and send it along.
"L. Peter Deutsch" wrote:
> > My first thought would be to make a histogram of delta-pixels. A natural
> > image will generally have a smooth distribution, fairly closely clustered
> > around 0. Black-and-white images will have a bimodal distribution, and
> > vector images in general will have a very "bumpy" histogram.
> That sounds simple and easy. I'll try that first. Thanks.
> L. Peter Deutsch | Aladdin Enterprises | 203 Santa Margarita Ave.
> ghost at aladdin.com | http://www.aladdin.com | Menlo Park, CA 94025
> No government censorship of software! Oppose the CBDTPA! www.eff.org
> gs-devel mailing list
> gs-devel at ghostscript.com
More information about the gs-devel