# Patent

## Title
Automatic keystone correction system and method

## Abstract

The invention relates to an automatic keystone correction system and method. The system includes an interface to display a pattern on a projection surface and a controller to distort image data responsive to the pattern. The pattern includes a plurality of polygons, each with a predetermined shape. Each polygon corresponds to a particular system rotation angle. The controller distorts the image data responsive to the rotation angle. A user interacts with the interface to identify a particular polygon that, when projected on a projection surface, has a predetermined shape.

## Background
This application claims priority from and is a continuation-in-part of U.S. patent application Ser. No. 10/753,833, filed Jan. 5, 2004, now abandoned titled Automatic Keystone Correction System and Method, which claims priority to U.S. provisional patent application Ser. No. 60/443,422 filed Jan. 28, 2003, titled Method and Apparatus for Keystone Correction. We incorporate the '833 and '422 applications in their entirety.


FIELD OF THE INVENTION
This invention relates to a system and method capable of projecting images and, more particularly, to a system and method capable of projecting images with automatically corrected keystone distortion.
BACKGROUND OF THE INVENTION
Projection systems are widely used in training, sales, and business environments. Referring to FIG. 1, a projection system 100 includes a projector 102 positioned on a horizontal surface 104. The surface 104 is typically a desk or tabletop. An elevator 120 protrudes from the bottom sides of the projector 102 creating an angle 110 between the surface 104 and the projector 102. Only one elevator 120 is visible in FIG. 1 although a person of reasonable skill in the art should understand that a plurality of elevators 120 might be employed in the system 100. Likewise, a person of reasonable skill in the art should recognize that the projector 102 refers to any system capable of projecting any of a variety of still or moving images, e.g., projection televisions, multimedia projectors, computer displays, and the like.
The angle 110 varies depending on the position of the elevator 120. The elevator 120 tilts the projector 102's position relative to the surface 104 such that projected image 122 moves up or down on a projection surface 114, increasing or decreasing the angle 110. The projection surface 114 might be a wall, screen, or any other surface capable of displaying a projected image 122.
The projector 102 manipulates (undistorted) image data 108 it receives from a personal computer 106. A person of reasonable skill in the art should recognize that the projector 102 might receive different types of image signals, e.g., digital or analog signals, from any of a variety of input devices including the personal computer 106. The image data 108 represents still, partial, or full motion images of the type rendered by any of a variety of input devices including the personal computer 106.
The projector 102 casts the image data 108 onto the projection surface 114. The resulting projected image 122 centers about a projection axis 116. An angle 112 exists between the projection axis 116 and the projection surface 114. The angle 112 changes responsive to the angle 110 and the horizontal position of the projector 102 on the desk or tabletop 104.
The projected image 122 is substantially undistorted—e.g., substantially rectangular in appearance—if the projection axis 116 is perpendicular to the projection surface 114. That is, the image 122 is undistorted if the angle 112 is 90 degrees. The projected image 122, however, distorts if the projection axis 116 is not perpendicular to the projection surface 114. This distortion is termed keystone distortion (or keystoning) because the image will appear wider at the top than at the bottom as shown in the image 122.
There are well known ways of correcting keystone distortion. The elevator 120 might, for example, be coupled to optics encased in the projector 102 that compensate for keystone distortion. The optics, however, are costly and prone to dust collecting that results in obscured projected images.
Signal processing circuits are often used, for example, to oppositely distort the image data 108 to thereby compensate for keystone distortion prior to projecting the image 122. But these circuits require floating point processes that exceed real time system capability.
The projector 102 might include gauges 124 used to manually adjust the projected image 122 to eliminate or minimize keystone distortion. The manual adjustments tend to move the projected image 122 out of the projection surface 114. And the manual adjustments, unfortunately, are time consuming, cumbersome, and generally an unwelcome set up complication.
Accordingly, a need remains for an automatic keystone correction system and method.



BRIEF DESCRIPTION OF THE DRAWINGS
The foregoing and other objects, features, and advantages of the invention(s) will become more readily apparent from the detailed description of invention embodiments that references the following drawings.
FIG. 1 is a diagram of a projection system.
FIG. 2 is a diagram of an inventive projection system.
FIGS. 3A-D are diagrams of an inventive support.
FIG. 4 is a block diagram of the inventive projection system.
FIG. 5 is a block diagram of an inventive panel controller.
FIG. 6 is a block diagram of an inventive keystone controller.
FIGS. 7A-C are diagrams of a coordinate system used to describe keystone distortion.
FIGS. 8 and 9 are graphical representations of the operation of the keystone controller shown in FIGS. 5 and 6.
FIG. 10 is diagram of an inventive lookup table.
FIG. 11 is a geometric simplification of the relationship between projection angles.



DESCRIPTION OF THE INVENTION
FIG. 2 is a diagram of an inventive projection system 200. Referring to FIG. 2, the system 200 includes a projector 203 coupled to a support 201. The projector 203 might tilt vertically and rotate horizontally on the support 201 moving the projected image 218 on a projection surface 217. The projector 203 with its support 201 is typically positioned on a horizontal surface 205, e.g., a desk or tabletop. The support 201 might be fixedly or removably coupled to the projector 203. The support 201 is shown in more detail in FIGS. 3A-D. Referring to FIGS. 3A-D, the support 201 includes a base 227 and a platform 219. The base 227 includes a curved wall 223 that, in turn, includes at least one channel 225. It should be apparent to one of skill in the art that the base 227 might include one or a plurality of channels 225. The base 227 is movably coupled to the platform 219 such that the platform 219 rides up and down the curved wall 223 on the at least one channel 225. And the base 227 is movably coupled to the platform 219 to allow it to horizontally rotate about a center axis 229. The base 227 is coupled to the platform 219 using a variety of well-known coupling means.
The projector 203 sits on top of the platform 219 as best shown in FIGS. 3B and 3C. The projector 203 tilts or moves vertically along the base 227's curved wall 223. That is, the projector 203 moves up and down the curved wall 223 on the channel 225. In one embodiment, the curved wall 223 might include a vertical gauge 221 (FIGS. 3B and 3C) allowing the user to more accurately manually adjust and identify the vertical orientation of the projector 203. In another embodiment, the platform 219 might include a horizontal gauge 231 to more accurately manually adjust and identify the horizontal rotation of the projector 203 (FIG. 3D). The vertical and horizontal gauges 221 and 231 might be marked with degrees of rotation or general position as shown in FIGS. 3B-D. The vertical and horizontal gauges 221 and 231 might be positioned in any of a variety of appropriate locations within the support 201.
In an embodiment, the gauges 221 and 231 allow for more accurate semiautomatic keystone correction distortion since the user does not need to guess at vertical and horizontal orientation of the projector 203. To effectuate keystone correction, the user inputs the horizontal and vertical positions of the projector 203 as reflected in the gauges 221 and 231, respectively, to the projector's hardware and software using, e.g., a graphical user interface 252 (FIG. 5). The projector 203 implements keystone correction by (pre) distorting the image data 209 such the image cast on the surface 217 does not exhibit keystoning. The projector 203 (pre) distorts the image data 209 by horizontally and vertically scaling it responsive to the user's identification of the projector 203's horizontal and vertical position.
In an embodiment, the support 201 might include motors, e.g., step motors, coupled to the base 227 and the platform 219 to automatically move the projector 203 vertically and horizontally. The step motors might be actuated using a variety of well-known actuation devices, e.g., buttons 233. The projector's electronics can read the motor steps (in the case of using step motors) to discern the rotation angle and to, ultimately, more accurately semi automatically correct for keystone distortion.
It should be apparent to one of skill in the art that other supports 201 come within the scope of the present invention, including the elevators 120 shown in FIG. 1.
Returning to FIG. 2, the angle 211 varies depending on the vertical tilt βv of the projector 203 as better shown in FIG. 11. The support 201 tilts the projector 203's position relative to the surface 205 such that projected image 218 moves up or down on the projection surface 217, increasing or decreasing the angle 211. The projection surface 217 might be a wall, screen, or any other surface capable of displaying a projected image 218. And the projected image 218 moves side to side on the projection surface 217 responsive to the projector 203's horizontal rotation on the support 201.
The projector 203 manipulates (undistorted) image data 209 it receives from a variety input devices, e.g., personal computer 207. A person of reasonable skill in the art should recognize that the projector 203 might receive different types of image signals, e.g., digital or analog signals, from any of a variety of input devices including the personal computer 207. The image data 209 represent still, partial, or full motion images of the type rendered by any of a variety of input devices including the personal computer 207.
The projector 203 casts the image data 209 onto the projection surface 217 as the projected image 218. The projected image 218 centers about a projection axis 215. An angle 213 exists between the projection axis 215 and the projection surface 217. The angle 213 changes responsive to changes in the vertical tilt βv and rotation βr of the projector 203 as indicated by angle 211.
The projector 203 is coupled to an accelerometer 235. The accelerometer 235 detects the projector 203's position in at least two directions. In an embodiment, the accelerometer to 235 measures the projector's 203 vertical tilt βv and rotation βr. The accelerometer 235 provides the vertical tilt βv and rotation βr to a keystone controller 235 (FIG. 5) as we explain in more detail below.
A person of reasonable skill in the art should recognize that the accelerometer 235 is but one example of a two-dimensional position detecting means. Other such two-dimensional position detecting means come within the scope of the present invention. These might include arranging two one-dimensional accelerometers at 90 degrees from one another to simulate a single bidirectional accelerometer. Other examples include ultrasound, laser, and other like position detection means.
The accelerometer 235 might be coupled directly to the projector 203. Or it might be coupled to the support 201 in turn coupled to the projector 203. A person of reasonable skill in the art should recognize that the accelerometer 235 might be coupled to the projector 203 in a variety of ways and in a variety of locations that are well suited for it to determine the projector's 203 vertical tilt βv and rotation βr.
The accelerometer 235 is a type of inertial sensor that might measure tilt, shock, vibration, and/or inertial acceleration. The accelerometer 235 might be any of the accelerometers manufactured by e.g., Memsic, Inc., including its MXD, MXA, and MXR lines. The design of accelerometer 235 is well known to those of reasonable skill in the art and will not be discussed any further.
FIG. 4 is a block diagram of the projection system 200 shown in FIG. 2. Referring to FIGS. 2 and 4, the system 200 includes a receiver 220 for receiving an analog image data signal 210, e.g., an RGB signal, from a source 202. The receiver 220 might be an analog-to-digital converter (ADC) or the like. The source 202 might be a personal computer or the like. The receiver 220 converts the analog image data signal 210 into digital image data 209 and provides it to a panel controller 250.
Likewise, a video receiver or decoder 222 decodes an analog video signal 212 from a video source 204. The video source 204 might be a video camcorder and the like. The decoder 222 converts the analog video signal 212 into digital image data 209 and provides it to the panel controller 250.
A modem or network interface card (NIC) 224 receives digital data 214 from a global computer network 206 such as the Internet®. The modem 224 provides digital image data 209 to the panel controller 250.
A Digital Visual Interface (DVI) receiver 226 receives digital RGB signals 216 from a digital RGB source 208. The DVI receiver 226 provides digital image data 209 to the panel controller 250.
A person of reasonable skill in the art should recognize other sources and other converters come within the scope of the present invention.
A person of reasonable skill in the art should recognize that some of the blocks shown in FIG. 4 might be incorporated into the projector 203 while others might be incorporated into the computer 207. It should be apparent to one of reasonable skill in the art that the computer 207 in FIG. 2 exemplifies the analog RGB source 202, video source 204, global computer network 206, and/or digital RGB source 208. And it should be apparent to one of reasonable skill in the art that the ADC receiver 220, video decoder 222, modem/NIC card 224, and DVI receiver 226 as well as a panel controller 250, clock 244, RAM 242, ROM 240, and panel 260 might be incorporated into the projector 203.
The panel controller 250 generates (predistorted) image data 232 by manipulating the (undistorted) image data 209. The panel controller 250 provides the image data 232 to a flat panel device 260. The panel 260 is any device capable of projecting the digital image data 232. In an embodiment, the panel 260 includes a pixelated display that has a fixed pixel structure together with the optics and electronics necessary to project the digital image data 232 on a surface 114 (FIG. 1). Examples of pixelated displays are active and passive LCD displays, plasma displays (PDP), field emissive displays (FED), electro-luminescent (EL) displays, micro-mirror technology displays, low temperature polysilicon (LTPS) displays, and the like for use in television, monitor, projector, hand held, and other like applications. The optics and electronics necessary to project the image data 232 are well known to those of reasonable skill in the art.
In an embodiment, the panel controller 250 might scale the digital image data 209 for proper projection by the panel 260 using a variety of techniques including pixel replication, spatial and temporal interpolation, digital signal filtering and processing, and the like. In another embodiment, the controller 250 might additionally change the resolution of the digital image data 209, changing the frame rate and/or pixel rate encoded in the digital image data 209. Scaling, resolution, frame, and/or pixel rate conversion, and/or color manipulation are not central to this invention and are not discussed in further detail. A person of reasonable skill in the art should recognize that the controller 250 manipulates the (undistorted) image data 209 and provides (predistorted) image data 232 to a panel 260 that is capable of properly projecting a high quality image regardless of display type.
Read-only (ROM) and random access (RAM) memories 240 and 242, respectively, are coupled to the display system controller 250 and store bitmaps, FIR filter coefficients, and the like. A person of reasonable skill in the art should recognize that the ROM and RAM memories 240 and 242, respectively, might be of any type or size depending on the application, cost, and other system constraints. A person of reasonable skill in the art should recognize that the ROM and RAM memories 240 and 242, respectively, might not be included in the system 200. A person of reasonable skill in the art should recognize that the ROM and RAM memories 240 and 242, respectively, might be external or internal to the controller 250. Clock 244 controls timing associated with various operations of the controller 250. A person of reasonable skill in the art should recognize that the projector 203 might house all or part of the controller 250, clock 244, RAM 242, ROM 240, panel 260, as well as the optics and electronics necessary to project the (predistorted) image data 232.
FIG. 5 is a block diagram of an embodiment of the panel controller 250 shown in FIG. 4. Referring to FIGS. 2-5, the panel controller 250 includes a keystone controller 280 coupled to an interface 252 that interacts with a user 258 in a variety of manners. The interface 252 shows the user 258 instructions on e.g., the projection surface 217 (FIG. 2), and accepts input 251 from the user 258 using a variety of input means. The interface 252 might support such features as infrared input devices, keypads, mice, pointers, other pointing devices (e.g., trackball), graphically presented commands (e.g., icons), desktops, windows, and/or menus. The interface 252 might be a graphical user interface (GUI), e.g., an on screen display, that takes advantage of the controller 250's graphics capabilities to ease the interaction between it and the user 258.
The system 200 is capable of manual, semiautomatic, and automatic keystone correction. Where the user 258 seeks to manually keystone correct the image 218, it might position the projector 203 so as to minimize distortion on the surface 217. The user 258 might position the projector 203 by raising or lowering elevators 120 (FIG. 1) or by moving the projector vertically and horizontally on the support 201.
Where the user 258 seeks to semi automatically keystone correct the image 218, the user 258 might indicate to the interface 252 properties of the projected image 218 and/or the projection surface 217. In an embodiment, the interface 252 generates an electronic icon or other GUI that the user 258 manipulates to align a center of the projected image 218 with a center of the projection surface 217. The user 258 actuates the GUI to inform the interface 252 of the centers' alignment (and its position). It should be apparent to a person of skill in the art that the user 258 can align the center of the projected image 218 with surfaces or areas other than the projection surface 217.
In another embodiment, the user 258 might use the interface 252's GUI to select a plurality of corners of the desired (undistorted) image within the projected image 218. The plurality of corners might be, e.g., two, three, or four corners. In an embodiment, the user's selected corners lie within the projected image 218. The interface 252 transmits the user's input 251 to the keystone controller 280 as data 253.
The keystone controller 280, in turn, predistorts the image data 209 responsive to the user's input 253 (center and/or corner) as further explained in co pending patent application titled Semiautomatic Keystone Correction System And Method, filed Nov. 26, 2003, to Brian Teng and Mike Callahan.
Where the user 258 seeks to automatically keystone correct the image 218, the interface 252 projects a pattern 290 on the projection surface 217. In an embodiment, the interface 252 might project the pattern 290 at the request of the user 258.
The pattern 290 includes a plurality of polygons 291a-291g, each having a predetermined (pre-projection) shape. The (pre-projection) shape of each polygon 291a-291g prior to its projection corresponds to a particular projector 203's rotation angle, including vertical tilt and horizontal rotation βv and βh, respectively. For example, polygon 291a might correspond to a 0-degree horizontal rotation βh while polygon 291b might correspond to a 3-degree horizontal rotation βh, polygon 291c might correspond to a 6-degree horizontal rotation βh, polygon 291d might correspond to a 9-degree horizontal rotation βh, and so on. The relationship between the polygons 291a-291g and the rotation angle βh might be stored in a table (not shown) on e.g., memory 242 or 240. A person of reasonable skill in the art should understand that the pattern 290 might vary depending on a variety of circumstances including the particular application.
Upon projection, each polygon 291a-291g responds differently to keystoning such that one of the polygons 291a-291g will more closely approximate a predetermined (post-projection) shape, e.g., polygon 291a. Put differently, the polygon 291a-291g becomes a predetermined (post-projection) shape for the rotation angle it matches when projected on the surface 217. The (post-projection) shape of the polygons 291a-291h varies with each implementation but might be e.g., a rectangle or other such geometric shape.
The user 258 selects the polygon 291a-291g that most closely approximates the predetermined (post-projection) shape when projected on the surface 217. In an embodiment, the user 258 selects the polygon 291a-291g that most closely approximates a rectangle. The user 258 might select the polygon 291a-291g by, for example, clicking on it using a mouse (not shown) or other input means supported by the interface 252.
The controller 280, in turn, automatically distorts the image data 209 to generate the predistorted image data 232. The controller 280 automatically distorts the image data 209 responsive to the user 258's selection of the polygon 291a-291g that most closely matches the predetermined (post-projection) shape. Since each polygon 291a-291g is associated with a corresponding vertical tilt βv and horizontal rotation βh, the user 258's selection identifies these angles to the interface 252 that, in turn, transmits them to the controller 280 as position data 253.
FIG. 11 illustrates a geometric simplification of the vertical tilt βv and rotation βr where the projector 102 moves from position 1 to position 2.

tan βh=sin βν tan βr

The horizontal angle βh cannot be found if the rotation βv is zero. When this is the case, the user 258 might use semiautomatic or manual means of keystone correction as we explained above.
FIG. 6 is a block diagram of the keystone controller 280. Referring to FIGS. 2-6, a keystone controller 280 receives digital image data 209 from a source 207. The controller 280 additionally receives data 253 from the user 258 triggering manual, semiautomatic, or automatic keystone correction as we explained above.
FIG. 6 is a block diagram of the keystone controller 280. Referring to FIGS. 2-6, a keystone controller 280 receives digital image data 209 from a source 207. The controller 280 might additionally receive data 253 from the user 258.
The keystone controller 280 includes a vertical scalar 490 for vertically scaling the digital image data 209. And the keystone controller 280 includes a horizontal scalar 494 for horizontally scaling the image data 254 received from the vertical scalar 490.
A vertical enable register 472 enables the vertical scalar 490. The vertical scalar 490 generates the vertically scaled data 254 responsive to vertical offset registers 474 including the registers YE (column even), YO (column odd), and YI (column increment (1st order term)) where the image data 209 is an interlaced signal. And the vertical scalar 490 generates the vertically scaled data 254 responsive to the vertical registers 492 including registers VDN (line position), VDNI (increment per line (1st order term)), and VDNPI (increment per column). The vertical scalar 490 moves up one row or line responsive to the UP register 484. The microprocessor 488 scales the image date 209 responsive to the registers 472, 474, 484, and 492 and to the horizontal and vertical synchronization signals 455.
Likewise, a horizontal enable register 478 enables the horizontal scalar 494. The horizontal scalar 494 generates the horizontally and vertically scaled predistorted data 232 responsive to horizontal offset registers 480 including the registers XE (row even), XO (row odd), and XI (row increment (1st order term)) where the image data 209 is an interlaced signal. And the horizontal scalar 494 generates the horizontally and vertically scaled data 232 responsive to the horizontal registers 482 including registers HDN (row position), HDNI (increment per line (1st order term)), HDNII (increment increment per line (2nd order term)), and HDNPI (increment per column). The horizontal scalar 494 moves one column or pixel responsive to the UP register 486. The microprocessor 488 scales the image data 209 responsive to the registers 478, 480, 482, and 486 and to the horizontal and vertical synchronization signals 455.
Before turning to the operation of the keystone controller 280, we examine some keystone basics. FIGS. 7A-C are diagrams of a coordinate system used to describe keystone distortion. Referring to FIGS. 7A-C, a projected image falls on a plane 600 defined by coordinates (x, y, 0). PP defines a projection point at coordinates (0,0,d), where d is a distance from the image plane 600 to the projection point PP. NPL defines a normal projection line to the plane 600. FIGS. 7B and 7C are side and top views are the coordinate system shown in FIG. 7A where db is the difference between a horizontal projection axis and the normal projection line NPL. ΦVT and ΦVB are the vertical top and bottom angles, respectively. ΦVL, and ΦVR are the left and right angles, respectively. Hn0 is the vertical height and Wn0 is the horizontal width of the image in a nominal position.
FIGS. 8 and 9 are graphical representations of the operation of the keystone controller 280. Referring to FIG. 8, the undistorted image data 209 is represented by (xn, yn). The predistorted image data 232 is represented by (xk, yk). Formula 1 gives the function f1.

(xk,yk)=f1(xn,yn, βh, and βv)  Formula 1

where βv is the vertical tilt or angle and βh is the horizontal position or angle of the desired keystone corrected (or predistorted) image 232.
The keystone controller 280 calculates f1 as follows.



  
    
      xp
      ⁡
      
        [
        
          x
          ,
          y
        
        ]
      
    
    =
    
      
        
          
            Cos
            ⁡
            
              [
              
                β
                ⁢
                
                  
                
                ⁢
                h
              
              ]
            
          
          ×
          x
        
        -
        
          
            Sin
            ⁡
            
              [
              
                β
                ⁢
                
                  
                
                ⁢
                h
              
              ]
            
          
          ×
          
            Sin
            ⁡
            
              [
              
                β
                ⁢
                
                  
                
                ⁢
                v
              
              ]
            
          
          ×
          y
        
      
      
        1
        +
        
          
            
              
                Sin
                ⁡
                
                  [
                  
                    β
                    ⁢
                    
                      
                    
                    ⁢
                    h
                  
                  ]
                
              
              ×
              x
            
            +
            
              
                Cos
                ⁡
                
                  [
                  
                    β
                    ⁢
                    
                      
                    
                    ⁢
                    h
                  
                  ]
                
              
              ×
              
                Sin
                ⁡
                
                  [
                  
                    β
                    ⁢
                    
                      
                    
                    ⁢
                    v
                  
                  ]
                
              
              ×
              y
            
          
          d
        
      
    
  




  
    
      yp
      ⁡
      
        [
        
          x
          ,
          y
        
        ]
      
    
    =
    
      
        
          
            
              Cos
              ⁡
              
                [
                
                  β
                  ⁢
                  
                    
                  
                  ⁢
                  v
                
                ]
              
            
            ×
            y
          
          -
          
            (
            
              db
              -
              
                
                  Hn
                  ⁢
                  
                    
                  
                  ⁢
                  0
                
                2
              
            
            )
          
        
        
          1
          +
          
            
              
                
                  Sin
                  ⁡
                  
                    [
                    
                      β
                      ⁢
                      
                        
                      
                      ⁢
                      h
                    
                    ]
                  
                
                ×
                x
              
              +
              
                
                  Cos
                  ⁡
                  
                    [
                    
                      β
                      ⁢
                      
                        
                      
                      ⁢
                      h
                    
                    ]
                  
                
                ×
                
                  Sin
                  ⁡
                  
                    [
                    
                      β
                      ⁢
                      
                        
                      
                      ⁢
                      v
                    
                    ]
                  
                
                ×
                y
              
            
            d
          
        
      
      +
      
        (
        
          db
          -
          
            
              Hn
              ⁢
              
                
              
              ⁢
              0
            
            2
          
        
        )
      
    
  



Formula f1 is a complicated formula containing trigonometric functions that are computation intensive. The present invention constructs simple polynomials f2 and f3 that approximate f1 and are applied to the vertical and horizontal scalars 490 and 494, respectively. That is, the combination of f2 and f3 approximates f1. Referring to FIGS. 2-9, the image data 209 is vertically scaled by vertical scalar 490 responsive to an f2 function to produce the vertically scaled data 254. Formula 2 gives the function f2.

f2(xn,yn,vdn,vdni,vdnpi,yo,yi)  Formula 2

The vertical scalar 490 operates responsive to the register VDN and the x and y position (line and column number) of the projected image 218.
The vertical scalar 490 uses a vertical scale factor of VDN(x,y)=VDN+f(x,y).
The vertical offset registers YE and YO control the top edge of the image. The top of the image is a function of YE/YO and X. The top of the image is also a weak function of the registers VDN, VDNI, and VDNPI.
The vertical offset register 486 is related to YE (or YO)+f(x).
The vertical scalar 490 operates under the control of the microprocessor 488.
The vertically scaled data 254 is horizontally scaled by the horizontal scalar 494 responsive to an f3 function to produce the horizontally scaled data 232. Formula 3 gives the function f3.

f3(xn,yk,hdn,hdni,hdnii,hdnpi,hdnpii,xo,xi,xii)

The horizontal scalar 494 operates responsive to the register HDN and the x and y position (line and column numbers) of the projected image 218.
The horizontal scalar 494 uses a horizontal scale factor of HDN(x,y)=HDN+f(x,y).
The horizontal offset register 486 directly controls the left edge of the image.
The horizontal scalar 494 operates under the control of the microprocessor 488.
Functions f2 and f3 are as follows.




  
    f
    ⁢
    
      
    
    ⁢
    2
  
  =
  
    eqnV
    =
    
      
        
          
            ∑
            
              j
              =
              0
            
            b
          
          ⁢
          
            
          
          ⁢
          
            (
            
              
                VDN
                
                  2
                  16
                
              
              +
              
                a
                ×
                
                  VDNPI
                  
                    2
                    16
                  
                
              
              +
              
                j
                ×
                
                  VDNI
                  
                    2
                    16
                  
                
              
            
            )
          
        
        +
        
          
            
              (
              
                YO
                +
                
                  a
                  ×
                  
                    YI
                    
                      2
                      16
                    
                  
                
              
              )
            
            /
            
              

            
            ⁢
            f
          
          ⁢
          
            
          
          ⁢
          3
        
      
      =
      
        eqnH
        =
        
          
            
              ∑
              
                i
                =
                0
              
              a
            
            ⁢
            
              
            
            ⁢
            
              (
              
                
                  HDN
                  
                    2
                    16
                  
                
                +
                
                  
                    HDNPII
                    
                      2
                      ×
                      
                        2
                        26
                      
                    
                  
                  ×
                  
                    i
                    2
                  
                
                +
                
                  
                    (
                    
                      
                        HDNPI
                        
                          2
                          16
                        
                      
                      +
                      
                        HDNPII
                        
                          2
                          ×
                          
                            2
                            26
                          
                        
                      
                    
                    )
                  
                  ×
                  i
                
                +
                
                  
                    HDNII
                    
                      2
                      ×
                      
                        2
                        26
                      
                    
                  
                  ×
                  
                    b
                    2
                  
                
                +
                
                  
                    (
                    
                      
                        HDNI
                        
                          2
                          16
                        
                      
                      +
                      
                        HDNII
                        
                          2
                          ×
                          
                            2
                            26
                          
                        
                      
                    
                    )
                  
                  ×
                  b
                
              
              )
            
          
          +
          
            (
            
              XO
              +
              
                b
                ×
                
                  XI
                  
                    2
                    16
                  
                
              
              +
              
                
                  b
                  2
                
                ×
                
                  
                    XI
                    
                      2
                      19
                    
                  
                  .
                
              
            
          
        
      
    
  




The keystone controller 280 calculates the required register values for predistorting or keystone correcting the image 218. In an embodiment, the keystone controller 280 accesses a precalculated look up table comprising all of the register values for several rotation stages. Doing so speeds up execution time by allowing register value precalculation instead of having to calculate the register values on the fly.
FIG. 10 is an embodiment of a lookup table 1000. The table includes a predetermined number of combinations, e.g., 0, +/−10, and +/−20 on the x-axis and 0, +/−20, and +/−40 on the y-axis.
If a rotation angle combination falls between two points, the controller 280 interpolates between the values given by the table. The following is an exemplary bilinear interpolation formula.



  
    wx
    =
    
      
        
          β
          ⁢
          
            
          
          ⁢
          h
        
        -
        
          β
          ⁢
          
            
          
          ⁢
          
            h
            ⁡
            
              [
              p
              ]
            
          
        
      
      
        
          
            β
            ⁢
            
              
            
            ⁢
            
              h
              ⁡
              
                [
                
                  p
                  +
                  1
                
                ]
              
            
          
          -
          
            β
            ⁢
            
              
            
            ⁢
            
              h
              ⁡
              
                [
                p
                ]
              
            
          
        
        ⁢
        
          
        
      
    
  




  
    wy
    =
    
      
        
          β
          ⁢
          
            
          
          ⁢
          v
        
        -
        
          β
          ⁢
          
            
          
          ⁢
          
            v
            ⁡
            
              [
              p
              ]
            
          
        
      
      
        
          β
          ⁢
          
            
          
          ⁢
          
            v
            ⁡
            
              [
              
                q
                +
                1
              
              ]
            
          
        
        -
        
          β
          ⁢
          
            
          
          ⁢
          
            v
            ⁡
            
              [
              q
              ]
            
          
        
      
    
  




  
    
      estimate
    
    =
    
      
        
          (
          
            1
            -
            wx
          
          )
        
        ×
        
          (
          
            1
            -
            wy
          
          )
        
        ×
        
          
            Table
          
          ⁡
          
            [
            
              p
              ,
              q
            
            ]
          
        
      
      +
      
        wx
        ×
        
          (
          
            1
            -
            wy
          
          )
        
        ×
        
          
            Table
          
          ⁡
          
            [
            
              
                p
                +
                1
              
              ,
              q
            
            ]
          
        
      
      +
      
        
          (
          
            1
            -
            wx
          
          )
        
        ×
        wy
        ×
        
          
            Table
          
          ⁡
          
            [
            
              p
              ,
              
                q
                +
                1
              
            
            ]
          
        
      
      +
      
        wx
        ×
        wy
        ×
        
          
            Table
          
          ⁡
          
            [
            
              
                p
                +
                1
              
              ,
              
                q
                +
                1
              
            
            ]
          
        
      
    
  



Where the table provides the coordinates (p, q) of the nearest point and the keystone controller 280 interpolates the nearest point to the vertical and horizontal rotation angles βv and βh, respectively, of the interpolated point.
A person of reasonable skill in the art should identify several different interpolation methodologies as coming within the scope of the present invention. A person of reasonable skill in the art should realize the table could be implemented in a variety of manners using a variety of hardware, including implementing it as part of semiconductor memory 240 and/or 242 or memory embedded within the panel controller 250.
The microprocessor 488 calculates the vertical scalar 490's registers as follows.
With f1 and a set of (xn, yk), calculate (xk, yk)
Given the (xk, yk) input, the (xn, yk) output, and f2, the keystone controller 280 calculates vdn, vdni, vdnpi, yo, and yi.
The microprocessor 488 calculates the horizontal scalar 494's registers as follows.
Given the (xk, yk) output, the (x, yk) input, and f3, the keystone controller 280 calculates hdn, hdni, hdnii, xo, xi, and xii.
Having illustrated and described the principles of our invention(s), it should be readily apparent to those skilled in the art that the invention(s) can be modified in arrangement and detail without departing from such principles. We claim all modifications coming within the spirit and scope of the accompanying claims.

## Claims

1. A system, comprising:
a projector including an interface configured to:
display a pattern set on a projection surface separate from the projector, where the pattern set comprises a plurality of partially overlapping polygons and each polygon is different from the remaining polygons in one or more of shape and rotation such that each of the plurality of polygons corresponds to a different combination of horizontal rotation angle and vertical tilt angle of the projector with respect to the projection surface; and
receive a selection from a user of a selected polygon in the pattern set, where the selected polygon comprises an entire polygon and represents a minimum amount of keystone distortion as compared to the remaining polygons in the pattern set; and


a controller in the projector to distort image data dependent upon which of the plurality of polygons is selected by the user and the horizontal rotation angle and vertical tilt angle corresponding to the selected polygon, wherein the controller is configured to distort the image data by vertically scaling the image data using the function f2, where:




  
    
      f
      ⁢
      
        
      
      ⁢
      2
    
    =
    
      eqnV
      =
      
        
          
            ∑
            
              j
              =
              0
            
            b
          
          ⁢
          
            
          
          ⁢
          
            (
            
              
                VDN
                
                  2
                  16
                
              
              +
              
                a
                ×
                
                  VDNPI
                  
                    2
                    16
                  
                
              
              +
              
                j
                ×
                
                  VDNI
                  
                    2
                    16
                  
                
              
            
            )
          
        
        +
        
          
            (
            
              YO
              +
              
                a
                ×
                
                  YI
                  
                    2
                    16
                  
                
              
            
            )
          
          .
        
      
    
  
  ⁢

2. The system of claim 1 where each of the plurality of polygons has a predetermined shape corresponding to the different combination of horizontal rotation angle and vertical tilt angle of the projector with respect to the projection surface.

3. The system of claim 1 where the selected polygon has a predetermined shape as viewed by the user when projected on the projection surface.

4. The system of claim 3 where the predetermined shape comprises a rectangle with four angles of approximately 90 degrees each.

5. The system of claim 1 where the controller distorts the image data prior to its projection on the projection surface.

6. The system of claim 1 where each of the plurality of polygons has a corner and where the corner of each of the plurality of polygons has a different angle than the corners of the remaining polygons.

7. The system of claim 1 further comprising a memory to store a table comprising the correspondence of each of the plurality of polygons to the different combination of horizontal rotation angle and vertical tilt angle.

8. The system of claim 1, wherein the controller is configured to distort the image data by horizontally scaling the image data using the function f3, where:




  
    f
    ⁢
    
      
    
    ⁢
    3
  
  =
  
    
      eqn
      ⁢
      
        
      
      ⁢
      H
    
    =
    
      
        
          ∑
          
            i
            =
            0
          
          a
        
        ⁢
        
          
        
        ⁢
        
          (
          
            
              HDN
              
                2
                16
              
            
            +
            
              
                HDNPII
                
                  2
                  ×
                  
                    2
                    26
                  
                
              
              ×
              
                i
                2
              
            
            +
            
              
                (
                
                  
                    HDNPI
                    
                      2
                      16
                    
                  
                  +
                  
                    HDNPII
                    
                      2
                      ×
                      
                        2
                        26
                      
                    
                  
                
                )
              
              ×
              i
            
            +
            
              
                HDNII
                
                  2
                  ×
                  
                    2
                    26
                  
                
              
              ×
              
                b
                2
              
            
            +
            
              
                (
                
                  
                    HDNI
                    
                      2
                      16
                    
                  
                  +
                  
                    HDNII
                    
                      2
                      ×
                      
                        2
                        26
                      
                    
                  
                
                )
              
              ×
              b
            
          
          )
        
      
      +
      
        
          (
          
            XO
            +
            
              b
              ×
              
                XI
                
                  2
                  16
                
              
            
            +
            
              
                b
                2
              
              ×
              
                XII
                
                  2
                  19
                
              
            
          
          )
        
        .

9. A method for keystone correction, comprising:
receiving a request from a user to project a calibration pattern on a projection surface separate from a projector;
projecting a plurality of substantially overlapping polygons from the projector onto the projection surface, where each polygon is different from the remaining polygons in one or more of shape and rotation such that each of the plurality of polygons corresponds to a different combination of horizontal rotation angle and vertical tilt angle of the projector with respect to the projection surface;
receiving a selection from a user of one of the projected polygons, where the selected polygon comprises an entire polygon, where the selected polygon has a rectangular shape, where non-selected polygons are one or more of shapes other than a rectangle and rectangular shapes rotated with respect to the selected polygon, and where the non-selected polygons have a greater amount of keystone distortion than the selected polygon; and
distorting image data prior to its projection on the projection surface based upon which of the plurality of polygons is selected by the user and the horizontal rotation angle and vertical tilt angle corresponding to the selected polygon, wherein distorting the image data comprises:
vertically scaling the image data responsive to at least a set of vertical offset registers and a set of vertical registers, wherein the set of vertical offset registers comprises a column even register (YE), a column odd register (YO), and a column increment (1st order term) register (YI), and wherein the set of vertical registers comprises a line position register (VDN), an increment per line (1st order term) register (VDNI), and an increment per column register (VDNPI); and
horizontally scaling the vertically scaled image data responsive to at least a set of horizontal offset registers and a set of horizontal registers, wherein the set of horizontal offset registers comprises a row even register (XE), a row odd register (XO), and a row increment (1st order term) register (XI), and wherein the set of horizontal registers comprises a row position register (HDN), an increment per line (1st order term) register (HDNI), an increment per line (2nd order term) register (HDNII), an increment per column (1st order term) register (HDNPI), and an increment per column (2nd order term) register (HDNPII).

10. The method of claim 9 comprising associating each of the polygons with the corresponding combination of horizontal rotation angle and vertical tilt angle.

11. The method of claim 9 where projecting the plurality of polygons includes projecting a plurality of polygons, each having a predetermined shape corresponding to the different combination of horizontal rotation angle and vertical tilt angle of the projector with respect to the projection surface.

12. The method of claim 9 where distorting image data comprises adjusting horizontal and vertical image data to compensate for the horizontal rotation angle and vertical tilt angle corresponding to the selected polygon.

13. A keystone apparatus, comprising:
means for projecting a pattern means on a projection surface means, where the pattern means comprises a plurality of substantially overlapping polygons and each polygon is different from the remaining polygons in one or more of shape and rotation such that each of the plurality of polygons corresponds to a different combination of horizontal rotation angle and vertical tilt angle of the projector with respect to the projection surface;
means for receiving a selection of a selected one of the polygons from a user;
means for generating vertically scaled data by vertically scaling image data using a first polynomial function f2, where:





  
    
      f
      ⁢
      
        
      
      ⁢
      2
    
    =
    
      eqnV
      =
      
        
          
            ∑
            
              j
              =
              0
            
            b
          
          ⁢
          
            
          
          ⁢
          
            (
            
              
                VDN
                
                  2
                  16
                
              
              +
              
                a
                ×
                
                  VDNPI
                  
                    2
                    16
                  
                
              
              +
              
                j
                ×
                
                  VDNI
                  
                    2
                    16
                  
                
              
            
            )
          
        
        +
        
          (
          
            YO
            +
            
              a
              ×
              
                YI
                
                  2
                  16
                
              
            
          
          )
        
      
    
  
  ;



means for generating horizontally scaled data by horizontally scaling the generated vertically scaled data using a second polynomial function f3, where:





  
    
      f
      ⁢
      
        
      
      ⁢
      3
    
    =
    
      
        eqn
        ⁢
        
          
        
        ⁢
        H
      
      =
      
        
          
            ∑
            
              i
              =
              0
            
            a
          
          ⁢
          
            
          
          ⁢
          
            (
            
              
                HDN
                
                  2
                  16
                
              
              +
              
                
                  HDNPII
                  
                    2
                    ×
                    
                      2
                      26
                    
                  
                
                ×
                
                  i
                  2
                
              
              +
              
                
                  (
                  
                    
                      HDNPI
                      
                        2
                        16
                      
                    
                    +
                    
                      HDNPII
                      
                        2
                        ×
                        
                          2
                          26
                        
                      
                    
                  
                  )
                
                ×
                i
              
              +
              
                
                  HDNII
                  
                    2
                    ×
                    
                      2
                      26
                    
                  
                
                ×
                
                  b
                  2
                
              
              +
              
                
                  (
                  
                    
                      HDNI
                      
                        2
                        16
                      
                    
                    +
                    
                      HDNII
                      
                        2
                        ×
                        
                          2
                          26
                        
                      
                    
                  
                  )
                
                ×
                b
              
            
            )
          
        
        +
        
          (
          
            XO
            +
            
              b
              ×
              
                XI
                
                  2
                  16
                
              
            
            +
            
              
                b
                2
              
              ×
              
                XII
                
                  2
                  19
                
              
            
          
          )
        
      
    
  
  ;
  
    
  
  ⁢
  
    and
  



means for distorting the image data responsive to the selection and the generated horizontally scaled data, where the selected one of the polygons comprises an entire polygon, where the selected one of the polygons has a rectangular shape, where non-selected patterns in the pattern means are one or more of shapes other than a rectangle and rectangular shapes rotated with respect to the selected pattern, and where the selected one of the polygons represents a minimum amount of keystone distortion as compared to the remaining patterns in the pattern set.

14. The keystone apparatus of claim 13 where each of the plurality of polygons has a predetermined shape.

15. The keystone apparatus of claim 13 where each of the plurality of polygons projects on a projection surface having a predetermined shape.

16. The keystone apparatus of claim 15 where the predetermined shape is rectangular.

17. The keystone apparatus of claim 13 where the controller means distorts the image data prior to its projection on the projection surface means.