1. Technical Field
The present invention relates to an image processing apparatus, a copier, and image processing method and program.
2. Related Art
In the past, a serial printer such as an ink jet printer, a dot impact printer, and a thermal printer was known. Such a type of serial printer performs a printing operation on a paper sheet by a series of operations in which ink is ejected on the paper sheet while a printing head is moved in a main scanning direction (for example, right and left directions), and then the paper sheet is transported in a sub-scanning direction (for example, front and rear directions) by a transport roller. Moreover, as a method of moving the printing head, such a type of serial printer uses a method called a logical seek. The logical seek refers to a method of minimizing movement of the printing head before the next time movement of the printing head. For example, when first to third character string existence areas A1 to A3 extended in right and left directions of a paper sheet P are arranged sequentially from the front of the paper sheet P, as shown in
However, the printing period of time may not be shortened in a case where image data obtained by scanning an image by a scanner is printed by the serial printer using this logical seek. That is, in a case where the obtained image data have isolated points caused by dust and the like in areas other than the first to third character string existence areas A1 to A3 which are originally printed areas, an advantage of the logical seek may not be obtained. That is because the movement period of time of the printing head PH becomes longer, as shown in
An advantage of some aspects of the invention is that it provides an image processing apparatus, a copier, image processing method and program designed to shorten a printing period of time in a case where a serial printer uses a logical seek function even though an isolated point is included in read image data. Moreover, another advantage of some aspects of the invention is that it provides the image processing apparatus, the copier, the image processing method and program designed not to process the upper portion or the lower portion of a character to be printed as the isolated point.
The invention uses the following aspects in order to achieve at least one of the mentioned advantages.
According to an aspect of the invention, there is provided an image processing apparatus which generates printing data used in a serial printer having a logical seek function including: a scanner mechanism that reads an image of a document to set the read image as image data; a printing-pixel number distribution grasping member that sets a band constituted by a predetermined number of sequentially accumulated lines in the image data as one unit, and grasps distribution of the number of printing pixels in a main scanning direction of the serial printer in every band; a processing-band setting member that sequentially sets each band as a processing band; a reference position setting member that sets an analyzing band including the set processing band, that obtains a cumulative value by cumulating the number of printing pixels of the analyzing band sequentially from one end to the other end of the analyzing band, and sets a position in the main scanning direction at the time when the cumulative value exceeds a predetermined range as a print start reference position, and that obtains a cumulative value by cumulating the number of printing pixels of the analyzing band sequentially from the other end to the one end of the processing band and sets a position in the main scanning direction at the time when the cumulative value exceeds the predetermined range as a print end reference position; and a printing-data generating member that generates printing data by setting a printing area on the basis of the print start reference position and the print end reference position.
In the image processing apparatus, the analyzing band including the set processing band is set, the cumulative value is obtained by cumulating the number of printing pixels of the analyzing band sequentially from the one end to the other end. In addition, the position in the main scanning direction at the time when the cumulative value exceeds a predetermined range is set as a print start reference position. The cumulative value is obtained by cumulating the number of printing pixels of the analyzing band sequentially from the other end to the one end of the processing band and a position in the main scanning direction at the time when the cumulative value exceeds the predetermined range is set as a print end reference position. In addition, the printing data is generated on the basis of the print start reference position and the print end reference position. In a case where the printing area is present in a certain band, the cumulative value obtained by cumulating the number of printing pixels generated due to the isolated points does not exceed the normal predetermined range even though the isolated points are present between the one end of the band to the printing area or between the other end and the printing area. On the other hand, after reaching the printing area, the number of printing pixels is abruptly increased, and thus the cumulative value exceeds the predetermined range. Consequently, a position in the main scanning direction at the time when the cumulative value obtained by cumulating the number of printing pixels from the one end of the band to the other end thereof exceeds the predetermined range is set as the print start reference position and a position in the main scanning direction at the time when the cumulative value obtained by cumulating the number of printing pixels from the other end of the band to the one end thereof exceeds the predetermined range is set as the print end reference position. In addition, the printing data is generated by setting the printing area on the basis of the print start reference position and the print end reference position. In this way, it is possible to grasp the isolated points present between the one end of the band to the printing area or between the other end thereof to the printing area. Consequently, a serial printer can remove such isolated points and can use the logical seek function to perform printing. In this way, even when the isolated points are included in the read image data, it is possible to provide the printing data designed to sufficiently shorten the printing period of time when the serial printer uses the logical seek function.
In this case, the “predetermined range” is experientially set as a range which is not exceeded even when the number of printing pixels of the isolated points is cumulated and can be exceeded when the number of printing pixels of characters or the like is cumulated. That is, it is known from experience that the cumulative value of the number of printing pixels is abruptly increased in a position in which characters, figures, signs, or the like are present, comparing with a position in which the isolated points are present. It is desirable that an upper limit value of the predetermined range is set so as to be increased as a resolution of the scanner mechanism is larger.
In the image processing apparatus having the above-described configuration, the reference position setting member may set the processing band and one or more bands each present above and below the processing band as the analyzing band in setting the analyzing band. In this way, the processing band at the time when the cumulative value of the number of printing pixels is obtained and one or more bands each present above and below the processing band are set as the analyzing band. Consequently, it is unlikely that the upper portions or the lower portions of characters or the like (character, figures, signs, etc.) to be printed are processed as the isolated points, comparing with a case where only the processing band is set as the analyzing band.
In the image processing apparatus having the above-described configuration, in setting the analyzing band, the reference position setting member may set the total three bands of the processing band and two bands each present above and below the processing band, the reference position setting member may prepare a virtual band of which all pixels are white above the uppermost band and prepares the virtual band below the lowermost band, and when the uppermost band or the lowermost band may be set as the processing band, the reference position setting member adds the virtual band as one of the three bands. In this way, a processing period of time of the reference position setting member can be shortened, comparing with a case where four or more bands are set as the analyzing band. Moreover, even when the processing band is the uppermost band or the lowermost band, the three bands can be processed as the analyzing band. Such a virtual band may not be prepared. As for the uppermost band, the total two bands of the uppermost band and the band below the uppermost band may be set as the analyzing band. In addition, as for the lowermost band, the total two bands of the lowermost band and the band above the lowermost band may be set as the analyzing band.
In the image processing apparatus having the above-described configuration, in setting the printing area, the printing-data generating member may set a position returned from the print start reference position to the one end by a predetermined margin as the print start position of the printing area, and also may set a position advanced from the print end reference position to the other end by the predetermined margin as the print end position. Consequently, the print start position or the print end position may not be set in the inside of the area in which characters or the like extended in the main scanning direction. For example, even when one isolated point is not present, the print start position or the print end position may intrude into the area in which the characters or the like are present. However, since the print start position and the print end position are set so as to contain the area from the print start reference position to the print end reference position, the print start position or the print end position may not be set in the inside of the area in which characters or the like extended in the main scanning direction.
The image processing apparatus having the above-described configuration may further include a printing-area setting member that sets the pixel number of an upper limit value of the predetermined range as the margin value. For example, suppose that a rule line having one pixel length extended in the main scanning direction is present in the processing band of the analyzing band, but the printing pixels are not present except for the rule line. At this time, the cumulated pixels are all pixels to be printed. Consequently, when the cumulative value exceeds the predetermined range, the cumulative pixels can be treated as the pixels to be printed by setting the pixel number of the upper limit value of the predetermined range as a martin value and restoring the pixel number by the margin value. The number exceeding the pixel number of the upper limit value of the predetermined range may be set as the margin value. However, since the isolated points which are not required to be printed may be printed in an original printing operation in this case, it is desirable that the pixel number of the upper limit value is set as the margin value.
In the image processing apparatus having the above-described configuration, the printing-data generating member may generate printing data by changing pixels present in an area other than the printing area into a white color in the image data. In this way, the serial printer which has acquired the printing data can perform a printing operation by using the normal logical seek in order to sufficiently shorten the printing period of time.
In the image processing apparatus having the above-described configuration, the printing-data generating member may generate printing data by adding information about the printing area to the image data. In this way, the serial printer which has acquired the printing data can perform a printing operation only on the printing area by grasping the printing area through the information about the printing area. Consequently, in the image processing apparatus, it is not necessary to change the pixels present in an area other than the printing area into the white color. As a result, a period of time necessary to generate the printing data can be shortened.
In the image processing apparatus having the above-described configuration, in cumulating the number of printing pixels of the analyzing band, the printing-pixel number distribution grasping member may divide a width direction of the analyzing band into a block unit containing a predetermined plurality of pixels and cumulates the number of printing pixels of every block. For this reason, a capacity of a storage area for storing the cumulative value can be small, comparing with a case where the number of printing pixels is cumulated in every pixel.
In the image processing apparatus having the above-described configuration, the reference position setting member may obtain a cumulative value by cumulating the number of printing pixels of the analyzing band sequentially from the one end to the other end, and when the cumulative value does not exceed a predetermined range at the other end, the reference position setting member may not cumulate the number of printing pixels of the analyzing band sequentially from the other end to the one end, and it is considered that the printing area of the processing band is not present. In this way, the cumulative value is obtained by cumulating the number of printing pixels of the analyzing band sequentially from the one end to the other end, and when the cumulative value does not exceed the predetermined range at the other end, it is obvious that no pixel to be printed is present in the processing band included in the analyzing band. Consequently, cumulating the number of printing pixels in a reverse direction, that is, a direction directed from the other end to the one end can be omitted. As a result, it is possible to shorten a processing period of time of the reference position setting member.
According to another aspect of the invention, there is provided a copier including the image processing apparatus according to the above-described configuration and a serial printer that receives printing data from the image processing apparatus and performs a printing operation using a logical seek function on the basis of the printing data.
The copier is mounted with the image processing apparatus having one of the above-described configurations. Consequently, it is possible to obtain one of the above-described advantages, for example, the advantage that shortening the printing period of time sufficiently at the time when the serial printer uses the logical seek function can be possible or the advantage that the upper portion or the lower portion of a character or the like is not treated as the isolated point.
According to still another aspect of the invention, there is provided an image processing method which generates printing data used in a serial printer having a logical seek function and is executed by computer software, the method including: (a) reading an image of a document to set the read image as image data; (b) setting a band constituted by a predetermined number of sequentially accumulated lines in the image data as one unit, and grasps distribution of the number of printing pixels in a main scanning direction of the serial printer in every band; (c) sequentially setting each band as a processing band; (d) setting an analyzing band including the set processing band, obtaining a cumulative value by cumulating the number of printing pixels of the analyzing band sequentially from one end to the other end of the processing band to set a position in the main scanning direction at the time when the cumulative value exceeds a predetermined range as a print start reference position, and obtaining a cumulative value by cumulating the number of printing pixels of the analyzing band sequentially from the other end to the one end to set a position in the main scanning direction at the time when the cumulative value exceeds the predetermined range as a print end reference position; and (e) generating printing data by setting a printing area on the basis of the print start reference position and the print end reference position.
In the image processing method, the cumulative value obtained by cumulating the number of printing pixels generated due to the isolated points does not exceed the normal predetermined range even though the isolated points are present between the one end of the band and the printing area or between the other end and the printing area in a case where the printing area is present in a band. Meanwhile, in the printing area, the number of printing pixel is abruptly increased, and thus the cumulative value exceeds the predetermined range. Consequently, the position in the main scanning direction at the time when the cumulative value obtained by cumulating the number of printing pixels from the one end to the other end of the band exceeds the predetermined range is set as the print start reference position; the position in the main scanning direction at the time when the cumulative value obtained by cumulating the number of printing pixels from the other end to the one end of the band is set as the print end reference position; the printing area is set on the basis of the print start reference position and the print end reference position to generate the printing data. In this way, it is possible to grasp the isolated points present between the one end of the band to the printing area or between the other end of the band to the printing area. Consequently, the serial printer can remove such isolated points and perform a printing operation using the logical seek function. Even when the isolated points are included in the read image data, it is possible to provide the printing data which makes it possible to sufficiently shorten the printing period of time when the serial printer uses the logical seek function. In the image processing method according to the invention, a step of realizing one of the functions of the image processing apparatus which have been described above may be added.
According to still another aspect of the invention, there is provided a program to be executed by one or plural computers for carrying out the image processing method according to the above-described configuration. The program may be stored in a storing medium (for example, a hard disc, ROM, FD, CD, DVD, etc.) which a computer can read, may be delivered from one computer to another computer through a transport medium (communication network such as Internet or LAN), and may be received or transported in any form. When the program is executed by one computer or each of the steps are shared with a plurality of computer, it is possible to obtain the same advantages as those of the image processing method according to the invention.
The invention will be described with reference to the accompanying drawings, wherein like numbers reference like elements.
An embodiment of the invention will be described with reference to the drawings.
As shown in
As shown in
As shown in
AS shown in
Next, an operation of the multi-function printer 10 according to the embodiment, particularly, a logical seek print routine in which the printing data for logical seek is generated and the logical seek is performed on the basis of the printing data to perform printing will be described. The logical seek refers to a method of minimizing movement of the printing head 47 before the next movement of the printing head 47 when the printer ASIC 42 controls the printer mechanism 41 on the basis of the printing data. The detailed description has been made in Related Art, and thus the description is omitted in the embodiment.
When a user presses the copy button (not shown) of the operation panel 70, the scanner ASIC 32 scans the line image sensor 34 to read an image of the target M placed on the glass plate 14, and stores the read image as scan data in the scanner buffer 26a. The logical seek print routine is a routine which is performed by the CPU 22 of the controller 20 after the scan data is stored in the scanner buffer 26a in this way. In addition, a logical seek print program is memorized in the ROM 24. When the logical seek print routine is performed, it is supposed that the user selects not a photograph but a document (which includes characters, figures, signs, etc.) as a type of the target M to be copied before pressing the copy button.
When the logical seek print routine is started, the CPU 22 of the controller 20 firstly performs an initialization operation (step S100). In this case, setting a threshold value T and the like used to analyze a histogram described below is performed. The threshold value T is a value used to determine whether printing pixels present in the document, which is the target M, are isolated points generated due to dusts or the like. The threshold value T is set so as to become larger as a scanner resolution set through the operation panel 70 is higher. That is because the isolated point having a certain size is recognized to have many printing pixels as the scanner resolution is higher. Subsequently, the histogram of a virtual band is prepared (step S102). A band is constituted by a predetermined number (for example, 16 lines in a case of 360 dpi) of lines accumulated sequentially in the sub-scanning direction.
Subsequently, the CPU 22 of the controller 20 reads data of the processing band among the scan data (image data) from the scanner buffer 26a (step S106) and prepares the histogram (step S108).
Subsequently, an analysis operation of the histograms for the three bands is performed (step S116).
Alternatively, when the left cumulative value ΣL is the threshold value T or more in step S306, it is considered to be within the printing area, and then the block positioned at the left end at this time is set as a print start reference position BSP (step S312). Here, the print start reference position BSP refers to a reference position when the print start position SP is obtained. After the print start reference position BSP is set in this way, the block positioned at the right end of the histogram for the analyzing band at this time is set as the processing block (step S314). Subsequently, the number of printing pixels included in the processing block is read and the number of printing pixels is added to the right cumulative value ΣR (step S316). Subsequently, it is determined whether the right cumulative value ΣR is the threshold value T or more (step S318). When the right cumulative value ΣR is less than the threshold value T, it is determined whether the processing block reaches the block including the print start reference position BSP (step S320). When the processing block has not reached, the processing block is changed into the left block by one block (step S322), and then step S316 and the following steps are performed. In this way, the processing block is changed sequentially from the right end block of the analyzing band to the left end block thereof. Alternatively, when the processing block has reached the block including the print start reference position BSP in step S320, it is considered that the printing area is not present in the processing band. In addition, the right end position of the image width is set as the print start position SP, the same position as that is also set as the print end position EP (step S324), and this routine is ended.
Alternatively, when the right cumulative value ΣR is the threshold value T or more in step S318, it is considered to be within the printing area, and then the block positioned at the right end at this time is set as a print end reference position BEP (step S326). Here, the print end reference position BEP refers to a reference position when the print end position EP is obtained. After the print end reference position BEP is set in this way, the print start position SP and the print end position EP are set on the basis of the print start reference position BSP and the print end reference position BEP. That is, it is determined whether the print start reference position BSP is a margin value m or more (step S328). When the print start reference position BSP is a margin value m or more, a position obtained by subtracting the margin value m from the print start reference position BSP is set as the print start position SP (step S330). Alternatively, the print start reference position BSP is less than a margin value m, a zero point, that is, a left end position of the image width is set as the print start position SP (step S332). For example, in a case where one isolated point is not present at all, the margin value m is a value which is set in consideration of a case where the print start reference position BSP intrudes into the printing area. In this case, the margin value m is set as the threshold value T. For example, in a case where a rule line extended in the main scanning direction by a length of one pixel is present in the processing band of the analyzing band, but the printing pixel other than the rule line is not present, the cumulated printing pixels are all pixels constituting the rule line by setting the margin value m as the threshold value T in this way. However, by restoring the number of printing pixels by the number of pixels of the threshold value T, it is possible to treat the cumulative number of printing pixels not as the isolated points but as the points to be printed. After steps S330 or S332, it is determined whether the print end reference position BEP is a value (comparative value) or less obtained by subtracting the margin value m from the right end position of the image width (step S334). When the print end reference position BEP is the comparative value or less, the position obtained by adding the margin value m to the print end reference position BEP is set as the print end position EP (step S336). Alternatively, when the print end reference position BEP exceeds the comparative value, the right end position of the image width is set as the print end position EP (step S338), and then the routine is ended. An example of the print start position SP and the print end position EP set in this way is illustrated in
The process is returned to the routine in
Constituent elements according to the embodiment correspond to constituent element according to the invention as follows. That is, the multi-function printer 10 according to the embodiment corresponds to an image processing apparatus or a copier according to the invention. The scanner mechanism 31 corresponds to a scanner mechanism. The CPU 22 of the controller 20 corresponds to a printing-pixel number distribution grasping member, a processing-band setting member, a reference position setting member, and a printing-data generating member. The printer mechanism 41 corresponds to a serial printer. In addition, the histogram-making routine in
According the above-described embodiment, the ink jet printer unit 40 is provided with the printing data which makes it possible to sufficiently shorten a printing period of time upon using the logical seek function even when the isolated points are included in the image data read by the scanner mechanism 31. In addition, when the cumulative value of the number of printing pixels is obtained, the total three bands of the processing band the bands each present above and below the processing band are set as the analyzing band. Consequently, the upper portion or the lower portion of a character may not be processed as the isolated point, comparing with a case where only the processing band is set as the analyzing band. In addition, the printing data is generated by changing the pixels present in an area other than the printing area in the image data into a white color. Consequently, the ink jet printer unit 40 which has acquired the printing data can shorten the printing period of time by performing the printing operation on the basis of the normal logical seek. In addition, in setting the printing area, a position returned from the print start reference position BSP to the one end of the processing band by the predetermined value m (which is the same as the threshold value T) is also set as the print start position SP, and a position advanced from the print end reference position BEP to the other end by the margin value m as the print end position EP. Consequently, the print start position SP or the print end position EP may not be set in the inside of the printing area. In addition, the width direction (main scanning direction) of the analyzing band is divided into a block unit containing a predetermined plurality of pixels and the number of the printing pixels of every block is cumulated. Consequently, a capacity of a storage area for storing the cumulative value may be smaller, comparing with a case where the number of printing pixels of every one pixel is cumulated. Moreover, the cumulative value is obtained by sequentially cumulating the number of printing pixels of the analyzing band from the one end to the other end, and when the other end is reached in a stat where the cumulative value has not jet exceeded a predetermined range (positive determination in step S308), it is apparent that no pixel to be printed is present in the processing band included in the analyzing band. Consequently, a processing period of time can be shortened by omitting a cumulating operation in a reverse direction, that is, in a direction directed from the other end to the one end.
The invention is not limited to the above-described embodiment, but may be embodied in one of various forms within a technical scope of the invention.
For example, in the above-described embodiment, the isolated points have been removed by the logical seek print routine in
In the above-described embodiment, when the print start position SP and the print end position EP are set by the histogram-analyzing routine in
In the above-described embodiment, in step S102 of the logical seek print routine in
In the above-described embodiment, the margin value m has been set as the same value of the threshold value T, but the margin value m may be set to have a value larger than the threshold value T. In this case, it is possible to prevent the print start position SP and the print end position EP from intruding into an area in which characters or the like are present. However, if the margin value m is set to be considerably large, the isolated points not to be printed may be printed. Consequently, the margin value m has to be set in consideration of this fact.
In the above-described embodiment, the multi-function printer 10 mounting with the scanner unit 30 and the ink jet printer unit 40 has been exemplified. However, the image processing apparatus according to the invention is applicable to a scanner apparatus (which includes the scanner unit 30, but does not include the ink jet printer unit 40). In this case, the generated printing data may be transported to an external ink jet printer which has the logical seek function. In addition, steps S100 to S116 of the logical seek print routine in
Number | Date | Country | Kind |
---|---|---|---|
2007-028063 | Feb 2007 | JP | national |