This invention relates generally to image processing, and more particularly to a hardware system and method for rotating an image.
Computer systems store images in a bitmap format. Bitmaps are organized so that a display controller can read a sequence of bits corresponding to a picture element (pixel) and transfer the sequence to a display for pixel rendition. The display controller repeats this process for successive pixels until an entire image is displayed.
Organization of a bitmap defines image dimensions and image orientation, i.e., portrait or landscape. An image is portrait-oriented if its height is greater than its width, and landscape-oriented if its width is greater than its height.
To maximize the duty cycle of the display, i.e. to minimize the period of time between successive refresh cycles of a given scan line, display devices such as Cathode Ray Tubes (CRTs) or Liquid Crystal Displays (LCDs) are typically landscape-configured. That is, display devices have physical address schemes which cause pixels to be refreshed in a landscape-oriented pattern. As can be seen by the arrows in
For some computer systems or applications, it is desirable to have a portrait-oriented display. In such a system, the CRT or LCD would be physically rotated ninety degrees. The arrows in
The software addressing pattern depicted in
Existing display systems rotate an image ninety degrees by using a program or a special driver to translate software addresses to physical addresses. When the typical rotation program is instructed to draw a bitmap sequence, the program first performs software translation operations to determine new pixel coordinates when rotated 90°, and then performs the drawing operation using those translated coordinates. In some particular drawing operations, additional software may be necessary to treat the rotated drawing as a “special case.” For example, to draw text characters in a rotated graphics display would require retrieving the bitmapped font pixels from font storage in a rotated orientation rather than the normal byte-wise unrotated orientation in which the font data is stored. This may require several additional memory cycles to retrieve this rotated bitmapped font data for just a single line of a given character. In general, the large number of additional read and translation operations for any drawing operation to rotate an image consumes substantial computer processing resources and time. These problems are compounded when larger or more-complex images are rotated.
Additional complexity can arise when the input signal has come to represent a mirrored version of the intended image. This can occur in the situations in which, say, a video camera in a videoconferencing environment is oriented in a normal, horizontal orientation to view human participants but is also provided with a mirror to deflect the field of view downward onto a document. Some systems deal with this reversal by employing video cameras that can reverse their scans. However, this option imposes a significant cost penalty.
We have developed a way to provide a low-cost way of dealing with the mirror-image problem while at the same time increasing flexibility in portrait-to-landscape conversions. The parent patent application mentioned above addresses the problem of converting between portrait and landscape orientations by performing a conversion of the input address values used to designate the picture locations of picture elements represented by accompanying pixel data. The conversion transforms a pixel's location in a portrait-oriented image into the address of a refresh-memory location that holds data for the corresponding position on a landscape-refreshed display device. Consequently, generating refresh data for the display by scanning the refresh memory in the order corresponding to the display device's scan organization results in the intended appearance if the display device, although being scanned in a landscape manner, is disposed in the correct portrait orientation.
We have recognized that the usefulness of this orientation adjustment can be extended by including a provision for reversing the progression of refresh addresses applied to the refresh memory when the memory's contents are being fetched for application to the display. Specifically, we provide two row-addressing modes and two-column-addressing modes. In one of the column-addressing modes, the progression of column addresses within a row results in increasing column addresses, while it decreases in the other column-addressing mode. Similarly, the row addresses increase as the corresponding display device advances from row to row along its screen if the refresh-address generator is in its row-forward mode, but they decrease if it is in its row-reverse mode.
By thus selectively reversing refresh-address generation, the display system can compensate for mirrored camera images both when the camera is in a portrait orientation and when it is in a landscape orientation. Additionally, by reversing both the refresh-address generation's row scanning and its column scanning, a 90° transformation in one direction performed by refresh-address transformation circuitry to convert from portrait to one landscape orientation can be transformed to the opposite 90° to convert to the other landscape orientation. So providing a simple reversal of column and row scans in refresh-address generation can greatly increase the flexibility afforded by an update-address-transformation circuit that performs a 90° rotation in a fixed direction. Also, both reversals can be used without the 90′-rotation circuitry and thereby afford the effect provided by, for example, certain existing camcorders, of rotating the image by 180° to facilitate view finding from otherwise awkward positions.
Other objects and attainments together with a fuller understanding of the invention will become apparent and appreciated by referring to the following description and claims taken in conjunction with the accompanying drawings.
The invention description below refers to the accompanying drawings, of which:
a) is a block diagram illustrating a landscape-oriented software addressing pattern;
b) is a block diagram illustrating a landscape-oriented and landscape-configured display address scheme;
a) is a block diagram illustrating a portrait-oriented software addressing pattern;
b) is a block diagram illustrating a portrait-oriented yet landscape-configured display address scheme;
a) is a table illustrating a landscape-oriented four by eight software address matrix;
b) is a table illustrating the physical address matrix when the display device is rotated counter-clockwise ninety degrees;
c) is a table illustrating the binary equivalent of the
d) is a table illustrating a portrait-oriented software addressing matrix;
e) is a table for comparing the physical binary addresses of
In
Memory 330 comprises Random Access Memory (RAM), Read-Only Memory (ROM), and secondary disk memory. It typically stores miscellaneous data, an operating system and other programs for execution by CPU 310, and intermediate results of executing programs. Peripherals 340 may include a printer, a floppy disk drive, a keyboard and the like. Display device 360, for example a CRT or an LCD, is typically landscape-configured and displays computer-generated information to a user. The invention can also be used with other types of scanning output devices, such as laser printers. A landscape-configured display device is refreshed in a landscape pattern as in
Graphics system 370 controls screen-refreshing and image-rendering routines for display device 360. When instructed, graphics system 370 translates portrait-oriented software addresses to physical addresses for portrait-oriented yet landscape-configured display device 360. Although display device 360 is described as landscape-configured, display device 360 can alternatively be portrait configured and the translation function reversed. In accordance with the present invention, system 370 also sequences physical-address generation in such a manner as to reverse the image virtually and/or horizontally.
A software address specifies a location on an image intended for display on display device 360. It can be generated by any software application program such as Microsoft Word by Microsoft Corporation or SuperPaint by Aldus Corporation. The software address scheme depends on the orientation of display device 360. That is, if display device 360 is intended for use in landscape orientation, the software address scheme follows the pattern illustrated in
In accordance with the present invention, moreover, the image may additionally be flipped to produce on the display the mirror image of the buffer-memory contents. The circuitry for accomplishing such a transformation will be described after the orientation-change circuitry is discussed.
Image buffer memory 410 stores a bitmap matrix which defines an image to be presented on display device 360. The bitmap matrix includes sequences of pixel values. Based on the organization of the bitmap matrix, an image can be arranged for landscape or portrait-oriented display. Although image buffer memory 410 is illustrated as a separate memory block from memory 330, system 300 can be implemented using a unified memory architecture.
Image buffer memory 410 receives pixel data on a data line 440 of bus 320 from CPU 310 and a memory address on an address line 470 from graphics controller 430. The received memory address specifies the location in image buffer memory 410 to which the data on line 440 are written or from which the data on line 440 are to be read. Image buffer memory 410 is preferably a static RAM (SRAM) device, since an SRAM is accessed by a unified address and therefore avoids potential page-break inefficiencies as found when using a fast-page (FP) Dynamic RAM (DRAM). However, as long as the DRAM page breaks are managed, an FP-type or other similar type DRAM can alternatively be used.
Address translation system 420 receives an address (generated by the software application program) on an address line 450 of bus 320 from CPU 310 for performing a read or write operation. When performing a write operation, based on the orientation of display device 360, address translation system 420 either passes the received address “as is” to correspond to a landscape-oriented display device 360, or passes the address as translated to correspond to a pixel position on a portrait-oriented display device 360. The address is sent on line 460 to graphics controller 430. This address is referred to as a “logical” address, and specifies an image buffer memory 410 location for storing the pixel data being driven on data line 440.
Graphics controller 430 controls image buffer memory 410 and display device 360. More particularly, graphics controller 430 receives the logical address on line 460 from address translation system 420 and sends the logical address on line 470 to image buffer memory 410. Upon receipt of the address for a write operation, image buffer memory 410 stores the data being sent on line 440 from CPU 310 to the location specified by the received logical address. Upon receipt of the address for a read operation, image buffer memory 410 drives data out on line 440 to CPU 310.
Since the address translation is performed before the image information or data is stored in image buffer memory 410, the image buffer memory 410 bitmap matrix defines the orientation of the image as it will be displayed on display device 360 (subject to reversals to be described below). If the data were stored to image buffer memory 410 without translation, landscape-oriented display device 360 will display a landscape-oriented image. However, if the data were stored to image buffer memory 410 using a translated address, portrait-oriented yet landscape-configured display device 360 will display a portrait-oriented image.
Graphics controller 430 also generates the addresses that it applies to memory 410 when it fetches data from it to refresh the display device 360 refresh address generation, which may be implemented conventionally. Graphics controller 430 sends the refresh address on line 470 to image buffer memory 410 to retrieve the corresponding pixel information on line 480, and passes the refresh address and pixel information on a signal bus 490 to display device 360. Accordingly, display device 360 refreshes the display. As will be explained below, the graphics controller can use the present invention's teachings to generate those addresses in such a manner that the displayed image is a reversed version of the stored image.
Configuration registers 530 store display device 360 configuration information such as screen dimensions and the display orientation. The screen dimensions specify the display width (WD) and the display height (HD), both in pixels. The display orientation specifies whether display device 360 is positioned in landscape orientation as illustrated by
For example, display device 360 may be configured to present 320 pixels per row by 240 pixels per column, and intended to be positioned in portrait orientation. This information may be stored in conventional DIP switches on display device 360. Thus, CPU 310 retrieves the information from the DIP switches and stores the dimensions indicating 320 pixels per row by 240 pixels per column, and a signal indicating portrait orientation, in configuration registers 530.
Address translation circuit 520 converts a portrait-oriented software address to a physical address for a portrait-oriented yet landscape-configured display device 360. That is, address translation circuit 520 receives a software address on line 450 from CPU 310 and reorders the address bits to specify a new pixel address for a pixel location on portrait-oriented display device 360 when rotated counter-clockwise ninety degrees. Although display device 360 can be rotated clockwise ninety degrees and a complementary address translation function implemented, counter-clockwise rotation provides an easier general case translation function.
The translation from portrait-oriented software address space to portrait-oriented, yet landscape-configured, display device 360 address space is based on the function:
2L=HD
or
L=ln(HD)/ln2,
where HD is the height in pixels of landscape-oriented display device 360 as illustrated in
The translation is based also on the function:
2M=WD,
or
M=ln(WD)/ln2,
wherein WD is the width in pixels of landscape-oriented display device 360. M represents the number of most significant software address bits to re-order and invert (complement) as least significant physical address bits. M+L is the total number of address bits specifying both the software and physical addresses.
Address translation circuit 520 passes the new translated address on line 540 to one input of MUX 510, and the software address on line 450 from CPU 310 is received at the second input of MUX 510. Based on the control signal received on line 550 specifying the orientation of display device 360 from configuration registers 530, multiplexer 510 selects one of its two input addresses and passes it as a logical address on address line 460 to graphics controller 430 (
Based on a control signal received from memory address arbitrator 630, MUX 610 selects either the refresh signal from line 640 or the logical address from line 460 and transfers it on line 470 to image buffer memory 410. Arbitrator 630 uses priority and time management schemes to determine which control signal to send. For example, arbitrator 630 may give priority to refresh addresses and enable pipelined refresh addresses for multiple pixel refreshes. When a logical address is selected and sent as the memory address on line 470 to image buffer memory 410 (
Thus, CPU 310 writes pixel information or data to and reads information from image buffer memory 410 in the same manner regardless of the orientation of display device 360. No software translation program is needed.
a)-7(e) illustrate the portrait-oriented software address to portrait-oriented physical address translation function. More particularly,
However, if display device 360 is rotated ninety degrees counter-clockwise and the appropriate configuration information is stored in configuration registers 530 (
Since physical display device 360 has been rotated ninety degrees counter-clockwise, CPU 310 uses a new software address matrix which specifies a portrait-oriented address scheme as illustrated in
e) is a table for comparing the portrait-oriented software address matrix of
When a dimension of display device 360 is not on the order of 2N pixels, then, since display device 360 would not have corresponding locations for all memory spaces addressable by M+L address lines, system 300 implements offsets. To ensure that all logical addresses generated can be mapped to locations on display device 360, offsets may be handled by software or drivers in a conventional manner. These offsets may be stored in configuration registers 530 (
For example, a typical landscape-oriented display device is configured to render 320 pixels per row by 240 pixels per column. Neither 320 nor 240 equals two raised to an integer power. Offsets are therefore needed. First, address translation circuit 520 is designed based on the closest larger address space using dimensions on the order of two raised to an integer power, namely, 512 by 256. Offsets are determined based on this next-larger address space. That is, the 192 rightmost landscape-oriented columns and the 16 bottommost landscape-oriented rows of the available memory space cannot be mapped to locations on display device 360. These offsets are stored and used to prohibit mapping logical addresses to these areas. When display device 360 is rotated 90 degrees counter-clockwise to portrait orientation, the now topmost 192 rows and rightmost 16 columns of available memory space are not mappable.
To avoid offset calculations, display device 360 may be designed to have pixel dimensions equal to two raised to an integer power.
In step 930, CPU 310 puts the pixel data on data bus 440 and the software address on address bus 450. The software address is received by address translation system 420, which in step 940 determines whether address translation is necessary. If the configuration information indicates that display device 360 is landscape oriented, no address translation is needed. Otherwise, address translation is needed, in which case the address is translated according to the function described above with reference to
In step 940, the logical address is sent on line 460 to graphics controller 430, which in step 950 passes the logical address as a memory address on line 470 to image buffer memory 410. Upon receipt of the memory address, in step 960 image buffer memory 410 stores the pixel data on data line 440 at the specified memory location. Method 900 then ends.
To appreciate the manner in which refresh addresses are generated in step 1010, consider
To display FIG. 11's contents without reversal, the start address applied to multiplexer 1204 by the configuration registers 1202 and forwarded as just described to the image-buffer memory 410 as its first address is the value zero, since that is the address at which memory scanning is to begin. After this first value in the current line is loaded, multiplexer 1208 switches state so that it selects as latch 1210's input the output of a next-column multiplexer 1212. The configuration registers 1202 cause multiplexer 1212 to select as multiplexer 1208's input the output of an incrementing circuit 1214. This circuit's output is a value one greater than multiplexer 1210's output, i.e., than the address currently being applied to the image-buffer memory as the location from which the display is being refreshed. So latch 1210's output increases by one when the clock circuit 1207 pulses it. Successive clock signals result in further incrementation, so the image memory is scanned in the direction represented as horizontal in
After latch 1206 loads in the frame start address at the beginning of a frame, the selection input to multiplexer 1204 changes to the state in which that multiplexer selects as its output the input from a next-row multiplexer 1216. When the display is simply to portray the image-buffer memory 410's contents without reversal, the configuration registers 1202 operate multiplexer 1216 to the state in which it applies to multiplexer 1204's input port the output of an addition circuit 1218. Addition circuit 1218 adds to latch 1206's output a line-offset value that the configuration registers have received from the CPU as part of the configuration information. If the system is employing an image-buffer memory of the dimensions depicted in
This operation continues, with latch 1206 being strobed and multiplexer 1208 changing state for one pixel time at the beginning of each row to load in the new first-column address, until the display has been completely refreshed. At that point, multiplexer 1204 is again momentarily operated to select the configuration registers' start-address output, and the address sequence repeats.
In accordance with the present invention, the refresh logic 620 can also assume a column-reverse mode, in which the image is horizontally reversed to generate the display that
The refresh logic 620 can also adopt a row-reverse mode, in which it causes the image-buffer memory's contents to be displayed upside down, as
The display that
As was mentioned above, address-translation circuitry 520 performs a counterclockwise rotation because a rotation in that direction is convenient to implement. Still, there may be situations in which a clockwise rotation is preferred. Such a rotation can be achieved without changing counterclockwise-rotation circuitry if FIG. 12's refresh address generator operates in the row-reverse and column-reverse modes together. This result can be achieved by employing a start-address value of sixty-seven, causing multiplexer 1216 to forward its subtracted input, and causing multiplexer 1212 to forward its decremented input.
It is apparent that the present invention's teachings yield display systems a considerable degree of flexibility. It therefore constitutes a significant advance in the art.
While the invention has been described in conjunction with several specific embodiments, it is evident to those skilled in the art that many further alternatives, modifications and variations will be apparent in light of the foregoing description. Thus, the invention described herein is intended to embrace all such alternatives, modifications, applications and variations as may fall within the spirit and scope of the appended claims.
The present application is a continuation of U.S. patent application Ser. No. 09/733,732, filed Dec. 7, 2000 now U.S. Pat. No. 6,765,581, which is a continuation of U.S. patent application Ser. No. 09/153,167, filed on Sep. 15, 1998, issued as U.S. Pat. No. 6,226,016, which is a continuation-in-part of U.S. patent application Ser. No. 09/036,482, filed on Mar. 6, 1998, issued as U.S. Pat. No. 5,956,049, which is a continuation of U.S. patent application Ser. No. 08/596,953, which was filed on Feb. 5, 1996, issued as U.S. Pat. No. 5,734,875, which are hereby incorporated in their entirety by reference.
Number | Name | Date | Kind |
---|---|---|---|
4375638 | O'Keefe et al. | Mar 1983 | A |
4467448 | Regehr et al. | Aug 1984 | A |
4704697 | Kiremidjian et al. | Nov 1987 | A |
4716533 | Ohmori | Dec 1987 | A |
4736442 | Kornfeld | Apr 1988 | A |
4776026 | Ueyama | Oct 1988 | A |
4931960 | Morikawa | Jun 1990 | A |
4952920 | Hayashi | Aug 1990 | A |
5047958 | Comins et al. | Sep 1991 | A |
5063526 | Kagawa et al. | Nov 1991 | A |
5068904 | Yamazaki | Nov 1991 | A |
5095422 | Horiguchi | Mar 1992 | A |
5133076 | Hawkins et al. | Jul 1992 | A |
5146592 | Pfeiffer et al. | Sep 1992 | A |
5199101 | Cusick et al. | Mar 1993 | A |
5384645 | Hasegawa et al. | Jan 1995 | A |
5432720 | Lucente et al. | Jul 1995 | A |
5450542 | Lehman et al. | Sep 1995 | A |
5530822 | Beavers et al. | Jun 1996 | A |
5563625 | Scott | Oct 1996 | A |
5566098 | Lucente et al. | Oct 1996 | A |
5577182 | Hayashi | Nov 1996 | A |
5598181 | Kermisch | Jan 1997 | A |
5600813 | Nakagawa et al. | Feb 1997 | A |
5606348 | Chiu | Feb 1997 | A |
5613018 | Eldridge | Mar 1997 | A |
5634088 | Banton | May 1997 | A |
5668980 | Schieve | Sep 1997 | A |
5670982 | Zhao | Sep 1997 | A |
5692210 | Mita et al. | Nov 1997 | A |
5712714 | Sasahara | Jan 1998 | A |
5715385 | Stearns et al. | Feb 1998 | A |
5734875 | Cheng | Mar 1998 | A |
5956049 | Cheng | Sep 1999 | A |
6226016 | Chee et al. | May 2001 | B1 |
6298429 | Scott et al. | Oct 2001 | B1 |
6765581 | Cheng | Jul 2004 | B2 |
Number | Date | Country |
---|---|---|
0431581 | Jun 1991 | EP |
0 582 824 | Feb 1994 | EP |
57130144 | Aug 1982 | JP |
63115189 | Jul 1988 | JP |
4145493 | May 1992 | JP |
04326397 | Nov 1992 | JP |
05342339 | Dec 1993 | JP |
06295335 | Oct 1994 | JP |
07152905 | Jun 1995 | JP |
07244474 | Sep 1995 | JP |
07325753 | Dec 1995 | JP |
10124036 | May 1998 | JP |
WO 9100586 | Jan 1991 | WO |
WO 9728516 | Aug 1997 | WO |
Number | Date | Country | |
---|---|---|---|
20040183809 A1 | Sep 2004 | US |
Number | Date | Country | |
---|---|---|---|
Parent | 09733732 | Dec 2000 | US |
Child | 10765230 | US | |
Parent | 09153167 | Sep 1998 | US |
Child | 09733732 | US | |
Parent | 08596953 | Feb 1996 | US |
Child | 09036482 | US |
Number | Date | Country | |
---|---|---|---|
Parent | 09036482 | Mar 1998 | US |
Child | 09153167 | US |