Abstract:
In order to perform printing by using a minimum of band buffer and correcting bending/inclination in a sub-scanning direction without making optical adjustments and using special hardware, 1-band image data are stored in the band buffer, images stored in the band buffer are corrected, images lying outside a band area are stored in an intermediate buffer, and images including images stored in the intermediate buffer and corrected images of a next band that lie inside the band area are output.

Description:
CROSS REFERENCE TO RELATED APPLICATIONS 
       [0001]    The present application is a Continuation of U.S. patent application Ser. No. 11/549,526 filed Oct. 13, 2006, which claims priority from Japanese Patent Application No. 2005-314706 filed Oct. 28, 2005, the entire contents of each of which are hereby incorporated by reference. 
     
    
     BACKGROUND OF THE INVENTION 
       [0002]    1. Field of the Invention 
         [0003]    The present invention relates to a print control apparatus, a print control method, a program, and a storage medium that perform printing by correcting a color deviation in a printer engine. 
         [0004]    2. Description of the Related Art 
         [0005]    A color deviation occurs in a tandem type color printer because a different photoreceptor is used for each color. Conventionally, optical methods such as mirror adjustments have been used for color deviation correction and particularly, for bending/inclination correction in a sub-scanning direction. 
         [0006]    Japanese Patent Application Laid-Open No. 10-243248 proposes a method of correcting a color deviation by controlling transmission timing of an image. However, according to this method, an amount of correction cannot be changed with respect to a main scanning position and thus bending/inclination in the sub-scanning direction cannot be corrected. 
         [0007]    Also, Japanese Patent Application Laid-Open No. 2001-38964 proposes a method of correcting bending/inclination in the sub-scanning direction by changing a readout position using three or more band buffers. However, according to this method, three or more band buffers are required and complex hardware is necessary that changes the readout position according to the amount of correction which varies in accordance with the main scanning position. 
       SUMMARY OF THE INVENTION 
       [0008]    The present invention is directed to printing with a minimum of band buffers and correcting bending/inclination in a sub-scanning direction without making optical adjustments or using special hardware. 
         [0009]    According to an aspect of the present invention, a print control apparatus includes: a band buffer for storing a 1-band image; an image correcting unit for correcting images stored in the band buffer; an intermediate buffer for storing images corrected by the image correcting unit that lie outside a band area; and an image output unit for outputting images including images stored in the intermediate buffer and image of a next band corrected by the image correcting unit that lie inside the band area. 
         [0010]    According to another aspect of the present invention, a print control method includes: storing a 1-band image in a band buffer; correcting images stored in the band buffer; storing images that are corrected that lie outside a band area in an intermediate buffer; and outputting images including images stored in the intermediate buffer and images of a next band that are corrected b that lie inside the band area. 
         [0011]    Further features of the present invention will become apparent from the following detailed description of exemplary embodiments with reference to the attached drawings. 
     
    
     
       BRIEF DESCRIPTION OF THE DRAWINGS 
         [0012]    The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate embodiments of the invention and, together with the description, serve to explain the principles of the invention. 
           [0013]      FIG. 1  is a block diagram showing an exemplary functional configuration of a print control apparatus according to an embodiment of the present invention. 
           [0014]      FIG. 2  is a block diagram showing details of an exemplary configuration of a printer according to an embodiment of the present invention. 
           [0015]      FIG. 3  is a flowchart showing exemplary processing for a printer driver according to an embodiment of the present invention. 
           [0016]      FIG. 4  is an illustration showing exemplary mapping of a main scanning position in color deviation correction in an embodiment of the present invention. 
           [0017]      FIG. 5  is a flowchart showing exemplary processing for color deviation correction in an embodiment of the present invention. 
           [0018]      FIG. 6  is an illustration showing an exemplary flow of data for color deviation correction in an embodiment of the present invention. 
           [0019]      FIG. 7  is a block diagram showing exemplary hardware of a computer according to an embodiment of the present invention. 
       
    
    
     DETAILED DESCRIPTION OF THE EMBODIMENTS 
       [0020]    Embodiments of the invention will be described in detail below with reference to the drawings. 
       First Exemplary Embodiment 
       [0021]      FIG. 1  is a block diagram showing a functional configuration of a print control apparatus according to an exemplary embodiment of the present invention. A computer  1  includes hardware such as a central processing unit (CPU), memory, a hard disk, a compact disk read-only memory (CDROM) drive, a keyboard, a mouse, a monitor, and a network interface.  FIG. 7  is a block diagram showing exemplary hardware of the computer  1 . 
         [0022]    In  FIG. 7 , the computer  1  includes an input control unit  700 , a display unit  701 , a network interface unit  702 , a CPU  703 , ROM  704 , random access memory (RAM)  705 , a hard disk drive (HDD)  706 , and an input/output interface  707 . 
         [0023]    Each of the above components is connected via the input/output interface  707 . The input control unit  700  controls the keyboard/mouse that receive input from a user. The display unit  701  provides an output screen (monitor) to the user. The network interface unit  702  communicates with an external device via a network  101 . The CPU  703  controls each component of the computer  1 . If the computer  1  is a server computer, processing of the computer  1  is performed based on a control program stored in one of the ROM  704  and the HDD  706  shown in  FIGS. 3 and 5 . The ROM  704  stores the control program and data. The RAM  705  is used as a temporary storage area and a work area. The HDD  706  includes a large-capacity storage area and stores the control program and various data. 
         [0024]    In  FIG. 1 , an operating system  2  manages hardware provided in the computer  1 , and software such as an application  3 , a printer driver  4 , a language monitor  5 , and a network port driver  6 . 
         [0025]    The application  3  is application software such as a word processor and carries out creation/printing of a document according to instructions of an operator. 
         [0026]    The printer driver  4  receives a print instruction issued by the application  3  via the operating system  2  and converts the print instruction into a printer command that can be interpreted by the language monitor  5  and a printer  7 . 
         [0027]    The language monitor  5  receives the printer command issued by the printer driver  4  and transmits the printer command to the printer  7  via the network port driver  6 . The language monitor  5  also notifies the printer driver  4  of density correction information and color deviation correction information received from the printer  7  via the network port driver  6 . 
         [0028]    The network port driver  6  transmits the printer command issued by the language monitor  5  to the printer  7  via the network interface. If the density correction information and color deviation correction information are received from the printer  7 , the network port driver  6  outputs the density correction information and color deviation correction information to the language monitor  5 . 
         [0029]    The printer  7  performs printing according to the printer command received from the network port driver  6 . 
         [0030]      FIG. 2  is a block diagram showing an exemplary configuration of the printer  7 . A network interface  21  receives a printer command from the computer  1 . A FIFO (first in, first out) memory  22  stores image data of each color received from the network interface  21 . A decoding circuit  23  decodes image data of each color stored in the FIFO memory  22  and outputs the image data to a printer engine  24 . The printer engine  24  is, for example, a laser beam printer engine and performs printing according to instructions of a control circuit  25  based on image data output from the decoding circuit  23 . The control circuit  25  includes, for example, a 1-chip CPU, and controls the network interface  21 , the FIFO memory  22 , the decoding circuit  23 , and the printer engine  24 . 
         [0031]    An exemplary printing operation is described below. 
         [0032]    When an operator gives a print instruction operating the application  3  on the computer  1 , a print directive is delivered from the application  3  to the printer driver  4  via the operating system  2 . The printer driver  4  converts the print directive issued by the application  3  into image data, compresses the image data, and outputs the compressed image data together with a page start command specifying a paper size, a left margin, an upper margin, and a line length and the number of lines of bitmap data and the like, and a page end command indicating an end of a page. 
         [0033]    When a printer command is output, the operating system  2  notifies the language monitor  5  of job start and then delivers the output printer command to the language monitor  5  one by one. When a job is started, the language monitor  5  transmits an occupancy request command to the printer  7 . 
         [0034]    If the printer  7  is successfully occupied, the language monitor  5  transmits the received printer commands to the printer  7  one by one. Before transmitting an image data command to the printer  7 , the language monitor  5  transmits a status request command to acquire a status of the printer  7  and confirms that the printer  7  is ready to receive image data commands. When the image data command is received, a control circuit  25  stores the image data in the FIFO memory  22 . When transmission of the printer command for one page is completed, the language monitor  5  transmits a print request command. When the print request command is received, the control circuit  25  directs the printer engine  24  to start printing. 
         [0035]    When a print start is directed, the printer engine  24  feeds a sheet of paper and, when the sheet reaches a predetermined location, requests output of image data. When the output of image data is requested, the decoding circuit  23  reads a compressed image from the FIFO memory  22  and outputs decoded original image data to the printer engine  24 . At this time, the image data read from the FIFO memory  22  is eliminated from the FIFO memory  22 . 
         [0036]    When printer commands for all pages of the job are transferred, the language monitor  5  transmits an occupancy release command without waiting until the sheet is ejected. Even after transmitting the occupancy release command, the language monitor  5  continues to acquire the status of the printer  7 . The language monitor  5  frees up relevant page memory if the acquired printer status indicates that page printing is normally terminated. If an error is detected, the language monitor  5  retransmits an occupancy request command to try to restore an error page. 
         [0037]    Next, details of processing of the printer driver  4  operating on a host are described with reference to  FIG. 3 . Before the processing is executed, the printer driver  4  acquires correction amount information of each color in the sub-scanning direction stored in non-volatile memory of the printer  7  at the time of starting each printing job. First, in step S 1 , the printer driver  4  outputs, in accordance with instructions of the application  3 , the page start command that specifies the paper size, the left margin, the upper margin, the line length and the number of lines of bitmap data. At this time, as described below, the upper margin and the number of lines of bitmap data are corrected. Next, in step S 11 , the printer driver  4  outputs as a command, a sub-scanning correction amount at each main scanning position, as described below. Though this command is not required for printing, reference is made to the command if a sub-scanning correction is canceled later or a re-correction is made according to a correction amount of another engine. 
         [0038]    Next, in step S 2 , the printer driver  4  creates a 1-band image data consisting of eight bits for each color of red, green, and blue in accordance with a drawing instruction of the application  3 . Next, in step S 3 , the printer driver  4  converts each pixel consisting of eight bits for each color of red, green, and blue into image data consisting of eight bits for each color of yellow, magenta, cyan, and black. At this time, density is corrected by referring to density correction information acquired in advance when a job is started. Next, in step S 4 , the printer driver  4  performs dither processing to image data consisting of eight bits for each color of yellow, magenta, cyan, and black to convert the data into image data consisting of two bits for each color of yellow, magenta, cyan, and black. Next, in step S 5 , the printer driver  4  corrects color deviation in the sub-scanning direction in accordance with a color deviation correction procedure described below. At this time, since some images lie outside a band buffer, as described below, the printer driver  4  holds such images in an intermediate buffer. Next, in step S 6 , the printer driver  4  compresses and outputs each color of a 1-band image data. Next, in step S 7 , the printer driver  4  determines whether processing of all bands in the page has been completed. If processing of all bands in the page has not been completed, the printer driver  4  returns to step S 2  to perform processing of the next band. 
         [0039]    If, in step S 7 , it is determined that processing of all bands in the page has been completed, the printer driver  4 , in step S 8 , compresses and outputs the data held in the intermediate buffer, that is, the image data that lay outside the band processed last. Next, in step S 9 , the printer driver  4  outputs a page end command. Next, in step S 10 , the printer driver  4  determines whether processing of all pages has been completed. If processing of all pages has not been completed, the printer driver  4  returns to step S 1  to perform processing of the next page. If processing of all pages has been completed, the printer driver  4  terminates the processing. 
         [0040]    Next, how to determine a correction amount in the sub-scanning direction is described. Before shipping from a factory, the correction amount of each color in the sub-scanning direction is measured. The measured correction amount of each color at a left end, in the center, and at aright end of maximum paper is stored in advance in non-volatile memory incorporated into the control circuit  25  of the printer  7 . The printer driver  4  acquires this value from the printer  7  before starting a printing job and first approximates it using a quadratic function. 
         [0041]    More specifically, assume that the correction amount in the sub-scanning direction at the left end, in the center, and at the right end of maximum paper be L, M, and R respectively. Then, the correction amount Z=AX 2 +BX+C can be calculated as shown below, where X is a position in the main scanning direction with an origin point in the center. X coordinates at the left end, in the center, and at the right end of maximum paper are −W/2, 0, and W/2 respectively, where W is a width of the maximum paper. 
         [0000]        R=A ( W/ 2) 2   +B ( W/ 2)+ C    
         [0000]      M=C 
         [0000]        L=A (− W/ 2) 2   +B (− W/ 2)+ C  
 
         [0000]    From the above equations, the following solutions are yielded: 
         [0000]        A =2( R+L− 2 M )/ W   2    
         [0000]        B =( R−L )/ W    
         [0000]      C=M 
         [0000]    Therefore, the correction amount in the sub-scanning direction Z can be calculated according to the following formula: 
         [0000]        Z= 2( R+L− 2 M )( X/W ) 2 +( R−L )( X/W )+ M    
         [0000]    Next, based on this formula, the correction amount in the sub-scanning direction will be calculated for all pixel positions in the main scanning direction. Since, at this time, correction in the sub-scanning direction is made by a line, the correction amount is rounded off to a nearest integer on a line basis. 
         [0042]    Next, it is described how to determine the correction amount in the sub-scanning direction from coordinates on a band buffer with reference to  FIG. 4 . If the paper size is smaller than the maximum size, the paper is generally positioned in the center. Thus, paper positioning is considered when correction is made. In  FIG. 4 , an upper horizontal line indicates the X axis and the center thereof is the origin point. A rectangle drawn by a broken line indicates a sheet of paper, the width thereof is w, and the center of the paper agrees with the origin of the X coordinate. A rectangle drawn by a solid line indicates an area in which the printer driver  4  creates an image in step S 2  in  FIG. 3 , and the origin of the x and y coordinates thereof is in an upper left corner. The origin of the x coordinate is positioned a left margin LM apart from the left end of the paper. Since the origin of the X coordinate is represented by w/2−LM as the x coordinate, as shown in  FIG. 4 , the X coordinate will be calculated as shown below. 
         [0000]        X=x+LM−w/ 2 
         [0000]    The X coordinate value thus determined is used to calculate the correction amount Z in the sub-scanning direction from the x coordinate by the formula as described above. 
         [0043]    Since the paper width w changes depending on the paper size and a different X corresponds to the same x, the correction amount for the same x changes depending on the paper size. 
         [0044]    Next, details of color deviation correction processing in step S 5  in  FIG. 3  are described with reference to  FIG. 5 . In the present exemplary embodiment, one pixel includes two bits for each color and one byte contains four pixels of a specific color. Accordingly, processing is performed in a two-bit unit to change a correction amount for each pixel, which increases time required for processing. To avoid this problem, the same correction amount is applied to four pixels contained in one byte so that processing can be performed in a one-byte unit, which shortens time required for processing. 
         [0045]    First, in step S 21 , the printer driver  4  sets a current color to a first color, for example, to cyan. Next, in step S 22 , the printer driver  4  sets a current column to a head, that is, the left end of the band buffer of the current color. Here, the column has the width of one byte. Next, in step S 23 , the printer driver  4  calculates the correction amount of a leftmost pixel of the current column as described above. At this time, the printer driver  4  makes reference to the color deviation correction information acquired in advance when starting a job so as to calculate the correction amount. Since, in the present embodiment, one pixel includes two bits for each color, one byte contains four pixels of specific colors. However, the correction amount of the leftmost pixel in one byte is similarly applied to four pixels in one byte so that processing can be performed in a one-byte unit, as described above. Next, in step S 24 , the printer driver  4  adds a maximum correction amount to the correction amount to obtain a positive value or 0. For example, if the correction amount is between −20 lines to 20 lines, the maximum correction amount of 20 lines is added to obtain 0 line and 40 lines. This processing enables avoiding a case in which processing cannot be performed. Otherwise, when the correction amount becomes a negative value as a result of correcting data in the current band, the data moves to the position of a previous band in which processing is completed. 
         [0046]    Next, in step S 25 , the printer driver  4  sets the current byte to the end of the current column, that is, to the current column in the last line of the band buffer. Next, in step S 26 , the printer driver  4  calculates a correction position of the current byte to determine whether the correction position is within the band buffer. More specifically, the printer driver  4  determines whether the position of the current byte below the correction number of lines calculated in step S 24  is within the band buffer. If the correction position of the current byte is within the band buffer, in step S 27 , the printer driver  4  copies the current byte to the correction position calculated in step S 26  and then proceeds to step S 28 . If the correction position of the current byte is not within the band buffer, in step S 36 , the printer driver  4  copies the current byte to a position according to the number of lines lying outside the band buffer in a second intermediate buffer, and then proceeds to step S 28 . 
         [0047]    In step S 28 , the printer driver  4  moves up the current byte position by one line. Next, in step S 29 , the printer driver  4  determines whether processing of one column is completed, that is, whether the current byte position is outside a head position of the band buffer. If processing of one column is not completed, the printer driver  4  returns to step S 26  to continue processing of the current column. If processing of one column is completed, in step S 30 , the printer driver  4  copies data by the number of correction lines calculated in step S 24 , from the head line of the current column, from a first intermediate buffer to the band buffer. The first intermediate buffer is assumed to be filled in advance with blank pixels. Next, in step S 31 , the printer driver  4  moves the current column rightward by one byte. Next, in step S 32 , the printer driver  4  determines whether processing of all columns is completed. If processing of all columns is not completed, the printer driver  4  returns to step S 23  to start processing of the next column. 
         [0048]    If processing of all columns is completed, in step S 33 , the printer driver  4  copies content of the second intermediate buffer to the first intermediate buffer of the current color. Next, in step S 34 , the printer driver  4  sets the current color to the next color. Next, in step S 35 , the printer driver  4  determines whether processing of all colors is completed. If processing of all colors is not completed, the printer driver  4  returns to step S 22  to start processing of the next color. If processing of all colors is completed, the printer driver  4  terminates color deviation correction processing. The number of lines in the upper margin performed in step S 1  shown in  FIG. 3  is corrected by subtracting a value to be added to the correction amount (i.e., the maximum correction amount) in step S 24 . By performing this processing, increase of the upper margin caused by addition of a correction amount in step S 24  can be canceled. The number of lines in bitmap data performed in step S 1  shown in  FIG. 3  is corrected by adding the number of lines in the intermediate buffer. Since the number of lines in the intermediate buffer is twice the maximum amount, that value is added. 
         [0049]    Next, processing in  FIG. 5  is described by taking horizontal bands (lateral direction: main scanning direction), as shown in  FIG. 6 , as an example. First, image data in a byte unit at a lower left of a band is written in one of the band buffer and the intermediate buffer in accordance with the correction amount. Next, image data in a byte unit immediately above (longitudinal direction: sub-scanning direction) is written in one of the band buffer and the intermediate buffer in accordance with the correction amount. Image data in a byte unit immediately above is processed sequentially until processing of image data for the band in the longitudinal direction is completed. Then, image data in a byte unit immediately to the right of the image data in a byte unit at the lower left is written in one of the band buffer and the intermediate buffer in accordance with the correction amount. Then, image data in a byte unit immediately above is sequentially processed. 
         [0050]    In the above example, processing in the longitudinal direction (sub-scanning direction) has been described, however, a system in which processing is performed in the lateral direction (main scanning direction) can also be realized. More specifically, image data in a byte unit at a lower left of a band is written in one of the band buffer and the intermediate buffer in accordance with the correction amount. Next, image data in a byte unit immediately to the right (lateral direction: main scanning direction) is written in one of the band buffer and the intermediate buffer in accordance with the correction amount. Image data in a byte unit immediately to the right is processed sequentially until processing of image data for the band in the lateral direction is completed. Then, image data in a byte unit immediately above the image data in a byte unit at the lower left is written in one of the band buffer and the intermediate buffer in accordance with the correction amount. Then, image data in a byte unit immediately to the right is processed sequentially. 
         [0051]    Next, a flow of data caused by color deviation correction processing will be described with reference to  FIG. 6 . First, image data  601  in a first band is formed in the band buffer. When color deviation correction processing is invoked, a correction is made in accordance with the correction amount in the sub-scanning direction. The image data  601  is divided into data  602  that remains in the band buffer, and data  603  that lies outside the band buffer and is stored in the second intermediate buffer. The data  603  stored in the second intermediate buffer is copied to the first intermediate buffer as image data  604  when processing of the first band is completed. Next, image band  605  in a second band is formed in the band buffer. When color deviation correction processing is invoked, the image data  605  is divided into data  606  that remains in the band buffer, and data  607  that lies outside the band buffer and is stored in the second intermediate buffer. Further, the data  604  held in the first intermediate buffer that lay outside the first band is stored in the band buffer as image data  609 . 
         [0052]    Correction processing is performed sequentially in this manner. After processing of the last band is performed, data  610  that lay outside the last band is held in the first intermediate buffer. The data  610  is output by processing in step S 8  shown in  FIG. 3 . 
       Second Exemplary Embodiment 
       [0053]    A second exemplary embodiment of the present invention is described next. In the second exemplary embodiment, color deviation correction processing is performed before dither processing. More specifically, dither processing in step S 4  and color deviation correction processing in step S 5  shown in  FIG. 3  are interchanged. Since an image before dither processing includes eight bits for each color, a correction amount for each pixel is calculated in color deviation correction processing without applying the same correction amount to four pixels. 
       Third Exemplary Embodiment 
       [0054]    A third exemplary embodiment of the present invention is described next. In the third exemplary embodiment, the printer engine  24  has a two-sided printing mechanism. In the case of two-sided printing, while printing on a first side is generally center-aligned like single-sided printing, printing on a second side can be left-aligned. In such a case, the correction amount calculated in step S 23  shown in  FIG. 5  is calculated using center alignment for the first side of two-sided printing, similar to the first embodiment and using left alignment for the second side of two-sided printing. More specifically, instead of X=x+LM−w/2 described above, the same formula as the maximum paper, that is, X=x+LM−W/2 can be used for calculation regardless of the paper width. 
         [0055]    When the two-sided printing is performed, depending on a combination of a paper transfer direction (longitudinal feed and transverse feed) and a binding direction (longer side binding and shorter side binding), an image on the first side must be rotated by 180°, but this processing can be performed by creating a rotated image in advance in step S 2  shown in  FIG. 3 . 
       Other Embodiments 
       [0056]    In the above-described exemplary embodiments, image creation and color deviation corrections are performed by a host computer, but instead other methods can also be used. For example, the printer driver  4  can output a page description language without performing image creation and color deviation corrections so that the printer  7  can perform, based on the received page description language, image creation and color deviation corrections. 
         [0057]    As described above, by using the band buffer with a set of four colors, the first intermediate buffer with a set of four colors, and the temporary intermediate buffer with a set of one color, color deviation corrections in the sub-scanning direction can be performed, and printing can be executed without preparing special hardware. 
         [0058]    While the present invention has been described with reference to exemplary embodiments, it is to be understood that the invention is not limited to the disclosed exemplary embodiments. The scope of the following claims is to be accorded the broadest interpretation so as to encompass all modifications, equivalent structures and functions.