U.S. patent application number 09/159533 was filed with the patent office on 2001-12-06 for apparatus and method for efficient implementation of 2-dimensional pixel window averaging.
This patent application is currently assigned to Xerox Corporation. Invention is credited to CARNEY, MICHAEL K., COOK, WILLIAM A., FRUMUSA, ANTHONY M., NACMAN, ARON, NAGARAJAN, RAMESH.
Application Number | 20010048772 09/159533 |
Document ID | / |
Family ID | 22572957 |
Filed Date | 2001-12-06 |
United States Patent
Application |
20010048772 |
Kind Code |
A1 |
CARNEY, MICHAEL K. ; et
al. |
December 6, 2001 |
APPARATUS AND METHOD FOR EFFICIENT IMPLEMENTATION OF 2-DIMENSIONAL
PIXEL WINDOW AVERAGING
Abstract
A system and method for reducing an image by receiving a scaling
factor which defines a window. Input pixel intensities of the image
are summed in real time as they are input and stored until all
pixels within the window have been received. The sum is then
divided by the number of pixels within the window which produces an
average intensity. A pixel having the average intensity is
output.
Inventors: |
CARNEY, MICHAEL K.;
(FAIRPORT, NY) ; NAGARAJAN, RAMESH; (FAIRPORT,
NY) ; FRUMUSA, ANTHONY M.; (PENFIELD, NY) ;
COOK, WILLIAM A.; (PITTSFORD, NY) ; NACMAN, ARON;
(PENFIELD, NY) |
Correspondence
Address: |
John P. Cornely
FAY, SHARPE, FAGAN, MINNICH & McKEE, LLP
1100 Superior Avenue, 7th Floor
Cleveland
OH
44114
US
|
Assignee: |
Xerox Corporation
|
Family ID: |
22572957 |
Appl. No.: |
09/159533 |
Filed: |
September 23, 1998 |
Current U.S.
Class: |
382/298 ;
358/451 |
Current CPC
Class: |
G06T 3/4007
20130101 |
Class at
Publication: |
382/298 ;
358/451 |
International
Class: |
G06T 003/40; H04N
001/393 |
Claims
Having thus described our invention, we now claim:
1. An image processing system for reducing an image by a desired
scaling factor, the image comprising a plurality of video signals
each having a magnitude, so as to represent the image with a number
of output video signals, the system including: averaging means for
determining an average magnitude associated with a defined set of
input video signals, where the set is defined by the scaling
factor; and video signal output means for outputting the output
video signal comprising the average magnitude.
2. The image processing system as set forth in claim 1 where the
scaling factor comprises: a fast scan component being inversely
proportional to a fast scan seed factor; and a slow scan component
being inversely proportional to a slow scan seed factor.
3. The image processing system as set forth in claim 2 where the
defined set of input video signals comprises: a number of whole and
partial input video signals in a fast scan direction comprising the
fast scan seed factor; and a number of whole and partial input
video signals in a slow scan direction comprising the slow scan
seed factor.
4. The image processing system as set forth in claim 3 where the
averaging means comprise: an adder for summing a plurality of the
video signal magnitudes and for providing a partial sum of the
magnitudes; a memory device for temporarily storing the partial
sum.
5. The image processing system as set forth in claim 4 further
comprising: a multiplier for producing the average magnitude by
determining a product of a total sum of the magnitudes of the set,
and the inverse of the product of the fast scan seed factor and the
slow scan seed factor.
6. The image processing system as set forth in claim 5 wherein a
number of required memory locations in the memory device is
determined by comparing a leading edge of the input image to the
fast scan seed factor.
7. The image processing system as set forth in claim 1 including
means for outputting the output video signal having the average
magnitude in real time.
8. A method for reducing an image in accordance with a scaling
factor where the image is represented by a plurality of video
signals each having a magnitude, the method comprising: (a)
receiving the scaling factor defining a set of input video signals;
(b) summing the magnitudes of the set of input video signals; (c)
averaging the magnitudes of the input video signals within the set;
and (d) outputting an output video signal having an average
magnitude for each set.
9. The method for reducing an electronic image as set forth in
claim 8 where the defining comprises: (a1) deriving a seed factor
in a fast scan axis from the scaling factor; and (a2) deriving a
seed factor in a slow scan axis from the scaling factor.
10. The method for reducing an electronic image as set forth in
claim 9 where step (a1) comprises: taking the inverse of a fast
scan component of the scaling factor.
11. The method for reducing an electronic image as set forth in
claim 10 where step (a2) comprises: taking the inverse of a slow
scan component of the scaling factor.
12. The method as set forth in claim 11 where, for a number of slow
scan lines corresponding to the seed factor in the slow scan axis,
the summing comprises: (b1) summing the magnitude of a number of
fast scan input signals equal to the seed factor in the fast scan
axis; and (b2) temporarily storing the result from the summing step
until a total magnitude of the input video signals within a set is
summed.
13. The method of claim 12 where step (c) comprises: dividing the
total magnitude of the input video signals within a set by the
product of the seed factor in the fast scan axis and the seed
factor in the slow scan axis.
14. The method of claim 13 implemented in an electrical
circuit.
15. The method of claim 13 implemented in computer readable code
stored on and executable by a computing device.
16. An imaging device capable of scanning an image and producing a
stream of input video signals representative of the image, wherein
the signals are eligible for reduction in accordance with a scaling
factor and reproduction, including: averaging means for determining
an average magnitude of a set of the input video signals, where the
set is defined by the scaling factor.
Description
BACKGROUND OF THE INVENTION
[0001] 1. Field of the Invention
[0002] The invention pertains to the art of image processing and,
more particularly, to image reduction.
[0003] 2. Description of Related Art
[0004] The following description includes references to slow-scan
and fast-scan digital image data when discussing the orientation of
selected window coordinates and sampled image data signals used by
control circuitry. For purposes of clarification, data collected
along a fast scan direction is intended to refer to individual
pixels located in succession along a raster of image information.
On the other hand, data collected in the slow-scan direction refers
to data derived from a common raster position across multiple
rasters of image information. As an example, fast-scan data would
refer to the sequential signals collected along the length of the
linear photosensitive array during a single exposure period, and is
commonly referred to as a raster of data. Slow-scan data would be
used to describe signals captured from a plurality of elements
along a linear photosensitive array, as the array was moved
relative to a document. Analogously, your eyes move in the
fast-scan direction relative to this page as you read along each
line; when your eyes move to the next line down, they have moved in
the slow-scan direction.
[0005] Various digital image processing techniques are known for
manipulating static images which are later output onto such media
as the screen of a personal computer or onto printed paper. One of
these processes is reducing the size of an image. Van Nostrand, in
U.S. Pat. No. 5,008,752, discloses a method to reduce an image by
providing interpolated data in two dimensions. The process includes
row and column interpolators operating to generate signals
indicating when the next element, row or pixel is to be retrieved.
The interpolators also produce a displacement address, which is
used to retrieve an interpolation coefficient from a look-up table,
the interpolation coefficient being used subsequently to produce
the interpolated output. Unfortunately, the look-up tables require
extensive use of costly memory devices.
[0006] Another method is disclosed by Calarco et al. in U.S. Pat.
No. 5,237,432 to obtain two successive input pixel values, P.sub.n
and P.sub.n+1. At the same general time, an arithmetic accumulation
of the sum of a seed value, a previously accumulated sum, and a
supplemental value is calculated. Typically, this accumulated sum
has both integer and fractional portions. Once determined, the
integer portion of the accumulated sum is used to determine whether
the first and second input pixel values are to be used to produce
an output pixel value. If so, the accumulated sum is used to
generate a scale or interpolation factor, .alpha., based upon the
fractional portion of the accumulated sum, which, in turn is used
to interpolate between the first and the second pixel values to
produce an output pixel value where: P.sub.new=P.sub.n+1+.alpha-
.(P.sub.n-P.sub.n+1). The process is continued until all input
pixels have been processed.
[0007] However, the integer portion of this process eliminates
pixels according to a sequence that corresponds to the desired
scaling. For example, if an image is to be reduced by 50%, every
other pixel is discarded, if the desired reduction is 33%, every
third pixel is discarded. In fact, regardless of the scale factor
desired, an output pixel created from the linear interpolation
technique of Calarco et al., will only take into account the four
nearest neighbor pixels. Thus, the output image can have uneven
shading and other image degradations.
[0008] The present invention contemplates a new, efficient
reduction technique, which overcomes the above-referenced problems
and others and provides a more accurate implementation of pixel
window averaging.
BRIEF SUMMARY OF THE INVENTION
[0009] In accordance with the present invention, there is provided
an image processing system for reducing an image by a desired
scaling factor. The image comprises a plurality of video signals
each having a magnitude, so that the system can represent the image
with a number of output video signals. The system includes
averaging means for determining an average magnitude associated
with a defined set of input video signals where the set is defined
by the scaling factor. Video signal output means are also provided
for outputting the output video signal comprising the average
magnitude.
[0010] In accordance with another aspect of the present invention,
the scaling factor includes a fast scan component which is
inversely proportional to a fast-scan seed factor and a slow scan
component which is inversely proportional to a slow-scan seed
factor.
[0011] In accordance with another aspect of the present invention,
the defined set of input video signals includes a number of whole
and partial input video signals in both the slow scan direction and
in the fast scan direction.
[0012] In accordance with another aspect of the present invention,
the averaging means is an electrical circuit including an adder for
summing a plurality of the video signal magnitudes. The adder also
provides a partial sum of the magnitudes which is temporarily
stored in a memory device.
[0013] In accordance with another aspect of the present invention,
a multiplier is provided for producing the average magnitude by
determining the product of a total sum of the magnitudes in the set
multiplied by the inverse of a product of the fast scan seed factor
and the slow scan seed factor.
[0014] In accordance with another aspect of the present invention,
a number of memory locations are determined for the memory device
by comparing a leading edge of the input video image with the fast
scan seed factor.
[0015] In accordance with another aspect of the present invention,
the output video signal having the average magnitude of the set is
output in real time.
[0016] In accordance with another embodiment of the present
invention, a method is disclosed for reducing an image in
accordance with a scaling factor. The scaling factor is received
defining a set of input video signals. The magnitudes of the set of
are summed together and averaged. An output video signal having the
average magnitude is output for each set.
[0017] In accordance with another aspect of the present invention,
for a number of slow scan lines corresponding to a seed factor in a
slow scan axis, the summing includes summing the magnitude of a
number of fast scan input signals corresponding to a seed factor in
a fast scan axis. The result from the summing step is temporarily
stored until a total magnitude of the input video signals within a
set is summed.
[0018] In accordance with another embodiment of the present
invention, an imaging device capable of scanning an image thus
producing a stream of input video signals eligible for reduction in
accordance with a scaling factor is provided. The imaging device
includes means for determining an average magnitude of a set of the
input video signals where the set is determined by the scaling
factor.
[0019] One benefit obtained by use of the present invention is that
the reduced output image will more faithfully represent the input
image.
[0020] Another benefit obtained from the present invention is
real-time processing.
[0021] Yet another benefit obtained from the present invention is
reduced memory requirements.
[0022] Other benefits and advantages of the subject new method and
apparatus will become apparent to those skilled in the art upon a
reading and understanding of this specification.
BRIEF DESCRIPTION OF THE DRAWINGS
[0023] The invention may take physical form in certain parts and
steps and arrangements of parts and steps, the preferred
embodiments of which will be described in detail in the
specification and illustrated in the accompanying drawings which
form a part hereof and wherein:
[0024] FIG. 1 is a flow-chart of the method in accordance with the
present invention;
[0025] FIG. 2 an illustration of the method over a sample input
pixel set; and
[0026] FIG. 3 is a diagram of an electrical circuit configured to
practice the present invention.
DETAILED DESCRIPTION OF THE INVENTION
[0027] Turning now to the drawings, wherein the showings are for
purposes of illustrating the preferred embodiments of the
invention, and not for purposes of limiting same, FIG. 1 shows a
flow chart of the method of the invention. A scaling factor 10 is
set for reducing an input image. The scaling factor is input into
the seed factor generator 12. The scaling factor 10 is the desired
reduction percentage of the input image, and may be one number
indicating the operator desired overall reduction (e.g. reduce the
entire image uniformly by 50%), or individual axis reductions (e.g.
reduce 27% along the fast scan axis and 43% along the slow scan
axis). In seed factor generator 12, the seed factors (also referred
to herein as `window dimensions`) are determined. The `window` is a
useful analogy to define a set of adjacent input video signals or
pixels. The set or `window` is defined by the seed factors which in
turn are derived from the scaling factor. Seed factors comprise the
number of input signals to be averaged in the fast-scan and
slow-scan directions. In the presently preferred embodiment, the
seed factors are determined by taking the reciprocal of the scale
factor along each dimension line. In equation form:
seed_factor.sub.fast-scan=(scale_factor.sub.fast-scan).sup.-1,
[0028] and
seed_factor.sub.slow-scan=(scale_factor.sub.slow-scan).sup.-1.
[0029] Again, the seed factors can be imagined as a defining a
window, sized by the number of input signals (or pixels) in both
the fast and slow scan directions. Importantly, the window size is
not required to be a whole number. That is, the window size also
includes any fractional part of an input signal. Out of seed factor
generator 12 the seed_factor.sub.fast-scan (or window
dimension.sub.fast-scan) 14a and seed_factors.sub.slow-scan (or
window dimension.sub.slow-scan) 14b are sent to the summing section
16.
[0030] An operator will initiate the stream of pixels by powering a
scanner, copier, software application, or other device capable of
providing input signal data in successive fast scan rasters. The
input video signals 18, each defining a magnitude, proceed into the
summing section 16. Summing section 16 uses the seed factors 14 to
define the edges of the `windows.` This allows for the calculation
of a total magnitude of the input signals within each window. Once
the total magnitude of the set of input signals defined by the seed
values is obtained, the sum 20 moves into the averager 22 to be
divided by the number of input signals to produce an average
magnitude. It is to be appreciated that the number of input signals
within a set or window is equivalent to the product of the seed
factor in the fast scan direction 14a multiplied by the seed factor
in the slow scan direction 14b. Output device 24 produces and
outputs an output signal 26 having the average intensity.
[0031] Referring to FIG. 2 a sample 12.times.8 video signal input
array 40 is shown with each signal being designated as
40(row,column). For example, the signal in the lower left corner is
40(8,1). Each signal contains a hexadecimal intensity or magnitude
value 42. Thus, the magnitude of the same example signal, 40(8,1),
is 90h (where `h` indicates the numeral is in hexadecimal). The
scale factor is typically provided by an operator, and for
illustration purposes, an operator is assumed to have provided a
scale factor of 27% in the fast scan direction and 43% in the slow
scan direction. Thus the respective seed factors are:
seed_factor.sub.fast-scan=(scale_factor.sub.fast-scan).sup.-1
seed_factor.sub.fast-scan=(0.27).sup.-1
seed_factor.sub.fast-scan=3.7;
[0032] and
seed_factors.sub.slow-scan=(scale_factor.sub.slow-scan).sup.-1
seed_factor.sub.slow-scan=(0.43).sup.-1
seed_factor.sub.slow-scan=2.3.
[0033] Applying these seed factors according to the window analogy
discussed above yields window 44. The intensities of the pixels or
video inputs 40, including any fractional portion, in the window 44
are totaled and averaged. The output pixel (analogous to window 44)
is assigned the average value that is graphically illustrated as 46
i.e. 78 h.
[0034] Now referring to FIG. 3, a circuit 50 suitable for
practicing the invention can best be envisioned as comprising three
main parts, namely a fast scan pixel summer section `A,` a slow
scan pixel memory section `B` and an averaging/output section
`C.`
[0035] Starting in section A and tracing the hypothetical values
from FIG. 2, an intensity datum arrives at the reducing circuit at
the data input 52, and proceeds to a multiplier 54. Also arriving
at the multiplier 54 is a value representing the percentage of the
pixel inside the right edge of the window. In the case of the first
pixel 40(1,1) in FIG. 2, this value is 0 Ah (0 Ah multiplied by
1.0). Next, the result proceeds to the adder 56. Since no other
inputs are yet present, nothing is added and the value proceeds to
a decision device 58.
[0036] The decision device 58 determines if the pixel is on a
window edge. If the pixel is not on a window edge, the decision
device 58 feeds back the value into the adder 56 (the condition if
the pixel is on a window edge will be discussed below). The fed
back value is added to the next pixel intensity datum--3Bh still
using the hypothetical values from FIG. 2. Again, since the second
pixel is also not on a window edge, the value feeds back into the
adder 56, and is added to the next pixel, E9h.
[0037] The next datum, 73h is on a window edge, so it must be
handled differently. It arrives conventionally, at the data input
52, and proceeds to the multiplier 54. However the other value
arriving at the multiplier 54, is a value representing the
percentage of the pixel inside the side edge of the window (70% in
this case). Recall that our example seed_factor.sub.fast-scan is
3.7. The window edge is detected by decrementing the whole number
component by one for each input signal. So, by the time the present
datum, 73h, is input, only the percentage portion (i.e. 0.7)
remains. Thus the value reaching the adder 56 is 50h (73 hex=115
dec; 0.7.times.115=80.5 dec; 80.5 dec=50h). The other value going
into the adder 56 (on the `so_far` line) is the sum of the previous
three input signals or 12Eh. Therefore, the sum out of adder 56 is
12Eh+50h or 17Eh.
[0038] Since an edge was encountered
(seed_factor.sub.fast-scan<1), the decision device 58 directs
the result into section B of the circuit 50. Nevertheless, before
leaving section A, recall that the last whole cell (whose intensity
was 73h from FIG. 2) was not accounted for in the first window.
Properly only the portion in the window (50h) was included in the
value for the first window. The remaining 23h becomes the first
part of the second window. This is evident by recalling that as the
magnitude datum arrives at the data input 52, one lead proceeds to
the multiplier 54 and another proceeds to an adder 55. One
component into the adder 55 is the whole intensity value (73h)
while the other is the portion contained in the first window (50h).
The adder 55 negatively sums these two and the difference, 23h,
going to adder 56 is delayed to arrive coincident with the next
whole pixel magnitude (F9h).
[0039] Now following the previous result into section B at the
decision device 58, the result is split and passed to an adder 60
and a multiplier 62. In addition, at the multiplier 62 is a factor
representing how much of the pixels are beyond a bottom edge of a
window. Since all the cells are within the window the result is
zero. This result is added negatively to (i.e. subtracted from) the
whole row at adder 60. Coming out of adder 60 then is the sum of
all the intensities on the first row of pixels within the first
window, 17Eh. This value is stored in FIFO 64.
[0040] The FIFO 64 is programmed by scanning the leading edge of
the document to establish memory locations for one row, or raster
of fast scan seed factors. Thus in our example, the FIFO 64 has
three memory locations available for this set of sample data.
Further, the value of the sum of the first set of sample data,
17Eh, occupies the first of these three memories. The other two
memories are filled in the same way as the first. Scanned intensity
or magnitude values are summed in section A and then stored in
section B when the scanner reaches a side edge.
[0041] When the scan begins on the second row of pixels, the
process continues substantially as above, with one exception.
Section A works as before but when a side edge is detected the FIFO
64 outputs the value in its first memory slot to the adder 56. Said
another way, when an edge is encountered, the oldest item in the
FIFO 64 is output and routed to the adder 56 to arrive coincident
with the fractional cell value. In our example, recall the value of
the first row of cells in the first window was 17Eh. Also, recall
it was the first value in the adder, so it will be the first value
out. Thus, when the fractional part of the next edge cell (with
intensity 80h in our example) arrives at the adder 56 on the
`new_value` line, 17Eh will arrive on the `store_ss` line, and the
sum of the first three pixels 1E8h (90h+9Bh+BDh) will arrive on the
`so_far` line. The result is 59h+17Eh+1E8h=3BFh.
[0042] Still referring to FIG. 3, a window bottom edge lies over
the next row of cells (the row starting at 40(3,1) having intensity
93h). At the moment this row starts to scan, the FIFO 64 is loaded
with three sets of sums corresponding to the summed magnitude
values of the first two rows for each of the three sets or windows.
Section A works conventionally except that now, because a bottom
edge is detected, the FIFO 64 output does not return to the adder
56 when the side edge is reached. Instead, the FIFO 64 output
proceeds to section C to be output. This will be discussed more
below. Thus, in our example, only the sum of the third row of cells
inside the side edge is sent to the decision device 58. As before,
the result is split and passed to the adder 60 and the multiplier
62. However, this time the multiplier 62 contains a fraction
representing the percentage of the pixels inside the window (by
decrementing seed_factor.sub.slow-scan). This value is subtracted
from the row total in the adder 60, which saves the portion of the
cells outside the first window into the FIFO 64, while the portion
inside the first window proceeds to section C. It should now be
apparent that the total sum of the intensities within the present
window has been obtained. Additionally, the portion of the raster
outside the present window is saved in the FIFO 64 and will be
added to the corresponding set in the next row down in the
conventional manner, i.e. when the next side edge is
encountered.
[0043] The following paragraph illustrates the bottom edge
procedure discussed above using numbers from FIG. 2. Starting in
section A, an intensity datum 93h arrives at the reducing circuit
at the data input 52, and proceeds to the multiplier 54. Also
arriving at the multiplier 54 is a value representing the
percentage of the pixel inside the right edge of the window or 1.0
in this case. Thus 93h proceeds to the adder 56, and since no other
inputs are yet present, nothing is added and the value proceeds to
the decision device 58. The decision device 58 determines that the
pixel is not on a side window edge, and feeds back the value, 93h,
into the adder 56. There the value is added to the next pixel
intensity datum, 07h. Again, since the second pixel is also not on
a window edge, the value feeds back into the adder 56, and is added
to the next pixel, 2Dh. The next datum, 3Bh (on a side window edge,
in other words seed_value.sub.fast-scan<1) arrives at the data
input 52, and proceeds to the multiplier 54. However also arriving
at the multiplier 54 is a value representing the percentage of the
pixel inside the side edge of the window (still 70%, i.e. the
decimal portion of seed_value.sub.fast-scan). Thus, after the
multiplier 54 the value reaching the adder 56 is 29h (3Bhex=59dec;
(0.7)(59)=41.3 dec; 41.3 dec=29h). The other line going into the
adder 56 (on the `so_far` line) is now zero because of decision
device 70 which will be discussed more infra. Therefore, the value
F0h (93h+07h+2Dh+29h) proceeds from the adder 56 to the decision
device 58. This value is split and passed to the adder 60 and the
multiplier 62. Also, at the multiplier 62 is a percentage
representing how much of the pixels are within the bottom edge of
the window or 30% in our example (the decimal portion of
seed_value.sub.slow-scan). After the multiplier 62, the value 48h
(output of adder 56=F0hex=240 dec; (0.3) (240)=72 dec; 72 dec =48
hex) proceeds to the adder 60 and into section C. This is the
magnitude of the pixels within the present set. At the adder 60 48h
is subtracted from the row total which was F0h. F0h-48h=A8h. This,
A8h, is the intensity of pixels belonging to the next window in the
slow scan direction, designated by reference numeral 45 in FIG. 2.
It is stored in FIFO 64 and will be added when the side edge is
reached on the next scan line. In other words, when pixel 40(4,4)
with intensity 4Dh arrives at the adder 56.
[0044] The last portion of FIG. 3 is average/output section C.
Recall from above when the last row within a window is scanned the
cumulative pixel sum of that window is directed to section C, not
back into the adder 56, when the side edge is encountered. Further,
recall the value out of the FIFO 64 for our example was 3BFh which
proceeds to an adder 66. Also into the adder 66 is the portion of
the bottom cells inside the window from section B. This value was
48h. Thus, out of the adder 66 the result 407h proceeds to the
multiplier 68. The inverse of the product of the two seed values
also enters the multiplier 68 (1/(SS_SEED*FS_SEED)=1/(2.3*3.7)=0.1-
17508813 which is rounded by a 9-bit representation of decimal
places in the preferred embodiment to 0.1171875). This result acts
to divide the sum of the pixel intensities by the number of pixels
(407h*0.1171875=1031d*0.1171875=120d=78h). This, of course,
represents the average pixel magnitude, which is then output.
[0045] The invention has been described with reference to the
preferred embodiments. Potential modifications and alterations will
occur to others upon a reading and understanding of the
specification. For example, this reduction technique can be used to
scale an image by 100% essentially allowing a "pass-thru" mode
without requiring a separate module to reproduce non-scaled images.
It is our intention to include all such modifications and
alterations insofar as they come within the scope of the appended
claims, or the equivalents thereof.
* * * * *