Browse Prior Art Database

Logarithmic Approach to Scale-to-Gray Bi-Level Images from Runends

IP.com Disclosure Number: IPCOM000119017D
Original Publication Date: 1997-Oct-01
Included in the Prior Art Database: 2005-Apr-01
Document File: 4 page(s) / 115K

Publishing Venue

IBM

Related People

Wendt, DM: AUTHOR

Abstract

Disclosed is a method of decompressing, scaling, and anti-aliasing bi-level images from runends. The anti-aliasing (graying) is performed using a logarithmic method. The algorithm assumes the image data is already in runend format.

This text was extracted from an ASCII text file.
This is the abbreviated version, containing approximately 45% of the total text.

Logarithmic Approach to Scale-to-Gray Bi-Level Images from Runends

      Disclosed is a method of decompressing, scaling, and
anti-aliasing bi-level images from runends.  The anti-aliasing
(graying) is performed using a logarithmic method.  The algorithm
assumes the image data is already in runend format.

      Bi-level images in this publication are one bit-per-pixel,
black and white images where the black image is on a white
background.  Runends are a form of compression where each line is
defined by sequential increasing numbers identifying where black and
white pixel runs begin.  For example, a runend line where the black
pixels are at positions 5-10, 20, 30-33 would be represented by the
following sequence of numbers:
         22  0  0  0  0  5 11 20 21 30 34
               B  W  B  W  B  W  B  W

      The first number is the length of the runend line in bytes
(all values are 16-bit numbers).  The next two numbers are always
zero followed by the black and white runend values which alternate
starting with black.  The first value indicates there are 0 black
pixels.  The next white value indicates white pixels start at
position 0.  The next  value, 5, starts black pixels at position
5--so white stops at 4 giving  white pixels in positions 0-4.  White
pixels then continue at position  11 resulting in black pixels in
positions 5-10.  A single black pixel is at position 20 and white
continues from 21-29.  One last set of black  pixels start at
position 30 and end at position 33.  White pixels then  start at
position 34 and continue to the end of the line.

      The advantage of this format is that the compact form allows
direct scaling without first decompressing.  Vertical scaling can be
performed by adding or removing lines.  Horizontal scaling can be
performed on the runend values themselves.  For example, the above
runend line could be scaled up by a factor of two by doubling the
runend values:
         22  0  0  0  0 10 22 40 42 60 68
  or scaled down by a factor of two by halving the runend values:
         22  0  0  0  0  2  5 10 10 15 17

Notice that special logic would be needed to help preserve the lone
black pixel at original position 20.

      Lines are appropriately scaled--lines are repeated (scale up)
or removed (scale down) and fed to the algorithm disclosed here.
This scaling requires adjacent paired lines to be selected giving the
algorithm twice as many lines as the required output resolution.
Fig. 1 shows an example of scaling down (vertically) a runend format
image where each row represents a runend line.  Note that this is
vertical scaling only.  The horizontal scaling will be handled inside
the algorithm.

      The algorithm processes pairs of runend lines by scaling,
decompressing, and graying the image to an 8 bit-per-pixel image at
the required resolution.  The algorithm essentially converts a 2x2
bi-level...