Segmentation Settings

Aggregate Pixel - On setting the size of the aggregate pixel

Color Sweeping - On setting the color sweep algorithm

Compatible Colors - On setting the compatible colors allowances

Extra Color Elimination - How to limit the number of colors

Orphan Pixel Elimination - On setting which orphan pixels to eliminate

Tier One - On setting the tier one transitions

Tier Two - On setting the tier two transitions

Transitional Blob Elimination - On setting the transitional blob elimination election


Settings:

Like actors in a play, images
have a variety of moods. The
Pac-n-Zoom[TM] user will want to
change the settings to produce
the correct effect. For the most
part, the settings allow the
number of colors to be used. For
example, the setting for an ever
generous rose would allow for
many more colors than the
setting for hard and cold prose.

There are three ways to set the
settings. The first method is
through the GUI (Graphical User
Interface - the normal program
interface) and the pull down
menus. The second method uses
macros through the CLI (Command
Line Interface - such as a DOS
prompt). The CLI allows the
settings to be changed when
running the in the batch mode.
The third method is to edit the
"Pac-n-Zoom.cfg" with a text
editor. When Pac-n-Zoom is not
running, the settings are stored
in "Pac-n-Zoom.cfg" under the
segment name of "VIDEO FILTER
PARAMETERS". A typical segment
of data might look like the
following.

# VIDEO FILTER PARAMETERS
75  ; Tier one setting
75  ; Tier two setting
0   ; Aggegate pixel size
1   ; Color sweep setting
150 ; Orphan pixel merging color
1   ; Eliminate transitional blobs
75  ; Near color elimination
7   ; Number of colors allowed
*

These settings are typical
settings for a 7 color (in other
words 7 original and final
colors - the number of scanned
colors could be many thousand)
document.

The following settings are
listed in their order of
importance. The settings at the
top of the list are the most
important.

Tier One:

The first step in extracting information from visual data is to find the borders that have the highest contrast color transitions in the picture. In Pac-n-Zoom, these are known as tier one borders. Tier one borders usually demarcate the primary artifacts of the picture. The tier one setting should be set low enough to obtain all the critical information in an image. For example, when the tier one is set too high, parts of a letter may be missing. When the tier one setting is set too low, the same letter can be set to several different shades or gradual changes can become a series of steps. Use the following steps to set the tier one level. 1. Select Option: Set the display tier one border option. 2. Reduce Level: Reduce the tier one setting to where the image is segmented into too many blobs, and note the low setting (LS). 3. Increase Level: Increase the tier one setting until important demarcations are lost, and note the high setting (HS). 4. Calculate Level: Set the tier one level with the following calculation. Tier 1 Level = (HS + LS) / 2 Click here to see some examples of correct and incorrect settings. The input device usually causes image degradation along high contrast borders. Pac-n-Zoom restores the tier one borders to closer approximation of the original image.


Aggregate Pixel:

Nearly every computer image, except the few painted ones, was captured by wave front optics focusing an image onto charge coupled semiconductors. Any number of distortions (some of them are mentioned above) append themselves to the image. In particular, a high contrast color transition will tend to scatter hundreds of orphans. The optics blur the image. The depth of focus problems are particularly destructive, but color level flutter and optical chromatic aberrations add their fair share of damage. Besides optical and transition distortions there are a range of frequency and spatial problems that include Nyquist noises and Johnson aliases. These are three areas where the image is compromised but there are at least several more. A single pixel on these captured images won't mean much, unless it constellates with its nearest neighbors. The aggregate pixel setting is an abstract setting that partially determines the number of pixels needed to make an artifact significant. Pac-n-Zoom uses aggregate pixel setting in several places, and several problems can occur if it is not set correctly. There are, however, only two aggregate pixel settings (0 and 2). 0: This setting should be used on all pictures except video. Its size is 2 by 2 pixels. 2: Should be used on video pictures. Its size is 4 pixels wide by 2 pixels high.


Tier Two:

A gradual change in color will not trigger a tier one artifact, but over a number of pixels, the color can change significantly. To insure the fidelity of the image, the color should not be allowed to change within the range of human recognition without starting a new blob. The tier two borders serve this purpose. Most humans can see the difference between 4,096 and 32,768 colors, but only about 18% of the people we tested could see the difference between 32,768 and 262,144 (6 bits for each primary color when using 3 primary colors) colors. The tier two setting does not set the amount of the actual jump (change in color) between adjacent blobs. It sets the amount the original picture is allowed to change inside what will become one blob (remember: a blob is all exactly the same color; the change inside the blob refers to the amount of change allowed in the underlying pixel that will be grouped into the exact color of the blob). For example, a tier 2 setting of 9 means that the extreme individual pixel colors inside a blob are within 9 color levels of each other. Therefore, tier 2 blobs insure the fidelity of the image. When two adjacent blobs have a visible color jump, a contour line forms (click here to see some examples of contour lines). When tier two settings are set too high, the contour lines will stand out more than desired. The following steps can be used to set the tier two settings. 1. Tier One: The tier two blobs are layed inside the tier one blobs. Therefore, the tier one setting must be set first. 2. Select Options: Set the display tier one and display tier two options. 3. Set High: Increase the tier two setting until the contour lines are too visible. 4. Decrease Level: Decrease the tier two setting by about 30% (this is an arbitrary amount). For example, if the high setting (from step 3) was 16, the nominal setting would be 11.

Compatible Colors:

The tier two sets the amount of fidelity to the original color. It does not specificallly set the amount of jump between two terraces. For example, suppose the color level on adjacent pixels were ramping as shown in the chart. If a tier two blob started at pixel number one and if the tier two blob setting was 9, a new blob would start at pixel 4 (because the 69 on pixel 2 has to be in a different tier 2 than the 79 on pixel 4).
Pixel Number 1 2 3 4 5 6
Color Level 76 69 77 79 72 74
Average Color 74 75
Therefore the color is terraced to
jump one pixel. If the compatible
color setting was set to 1 or
larger, the two blobs in the table
above would be merged together.
They will also be merged with
other colors throughout the image
that are within the tolerance set
by the setting.

Fewer colors will compress
further, but when taken too far,
the image will begin to look
coarse (like a cartoon instead of
a photograph).

From our experience, the
following are appropriate
compatible color settings in
color levels.

   1. Photographs - 9
   2. Video - 15
   3. Line Art - 150

Eliminate Transitional Blobs:

In the perfect world, if the
aggregate pixel setting is set
accurately, the color should not
be changing for more than the
aggregate pixel length. This
theoretical ideal is often
violated from various
fluctuating distortions (in
other words, the distortion in
different parts of the picture
are different) such as depth of
field issues. For example, the
depth of field can be
dramatically different between
the background and foreground of
an image. Therefore, in the real
world, the color transitions
(the amount of space it take the
color to change from one level
to the next) can exceed the
aggregate pixel length.

Whenever transitional colors
extend beyond the aggregate
pixel length, entire blobs can
be transitional.

Even when the documents are
scanned in, it may be desirable
to eliminate transitional blobs.
For example, if there are almost
any color bleedings from the
printing process, they will
result in transitional blobs.

A transitional blob is defined
as one where the maximum height
or width is either the aggregate
pixel size or smaller, and all
colors transition in reference
to the tier two setting. When we
say "references the tier two
setting," we mean the color
changes more than the tier two
settings. The three possibilities
are plateaus, ramps, and
extremities (click here to see
them).

Plateaus and ramps are
considered transitional blobs,
but if any color is an
extremity, the blob is not
considered transitional. This
logic removes the transitions
that lie between major blobs
without deleting small amounts
of data that doesn't transition.

The removal of transitional
blobs takes some of the softness
out of a picture. The
transitions will tend to be more
abrupt (higher contrast).
Greater contrast is usually
appreciated in text documents
and line art but depreciated in
photographs and video.

When transitional blobs are
removed, spacial (geometric and
statistical) compressors will
have higher compression ratios.

The eliminate transitional blob
setting has two valid values.

   0: The transitional
      blobs will not be
      eliminated.

   1: The transitional
      blobs will be eliminated.

Eliminate Extra Colors:

The Pac-n-Zoom segmenter allows the user to specify the maximum number of colors in the picture. The colors with the highest pixel count are left in the picture. A first with the most system is used to break ties (the first colors found, starting from the upper left hand corner then going right before down, are taken over later colors). The elimination of extra colors deletes color and geometric detail from a picture. Since the image restoration is not perfect, most of this detail is from sensing distortions. Users with photographs will probably want to set this setting at about 80,000 for the Internet, and at 250,000 for professional photography. As of this writing, we are not entirely certain of the effects, and settings greater than 250,000 might be desired in some cases. Video users will probably want to set the setting at about 70,000 (this is a guess). For streaming video, values of 12,000 might be in order (another guess). In document handling and line art, the number of colors is often minimal (usually between 2 and 5). Therefore the setting is obviously set to the number of shades in the picture. When extra colors are removed, spacial (geometric and statistical) compressors will have higher compression ratios.

Eliminating Orphan Pixels:

This setting determines the amount of contrast necessary to leave an orphan pixel in the image. On the extraction side, it could be argued that orphans are worthless and should always be eliminated regardless of the amount of contrast. To implement this opinion, the setting should be set at 255. For the most part, orphans don't help photographs or video and hurt line art and text documents. Orphans will lower the compression ratios of all compressors with the possible exception of transform compressors. Furthermore, orphans will prevent raster to vector conversion in Pac-n-Zoom's data-tagger. Therefore, orphans should usually be eliminated. The orphan pixel setting has the following meaning. 0 : All ophans will be accepted. 140: Orphans that have a color contrast of more than 140 on any primary color will be accepted. The number, "140," can be any number between or including 0 to 255. 255: No orphans will be allowed.

Sweeping Colors:

This setting selects the image restoration algorithm. We have tried a couple of setting, and we like the current one best. Different distortions types should theoretically use different algorithms. The current setting needs to be set to one.


Home

Table of Contents