This application is based on and claims priority under 35 USC 119 from Japanese Patent Application No. 2007-012564 filed Jan. 23, 2007.
The present invention relates to an image processing apparatus, an image forming apparatus, an image forming system, a computer readable medium storing a program therefor, an image processing method, and a computer data signal.
According to an aspect of the invention, there is provided an image processing apparatus including an image partitions manipulating unit that manipulates image partitions of encoded image information, each image partition containing plural values of pixels; a decoding unit that decodes the image information manipulated by the image partitions manipulating unit; and a pixels manipulating unit that manipulates pixels of the image information decoded by the decoding unit, partitioning an image into partitions which are manipulated by the image partitions manipulating unit being changed according to what manipulation is to be performed by the pixels manipulating unit.
Exemplary embodiments of the present invention will be described in detail based on the following figures, wherein:
An image forming system in a first exemplary embodiment is outlined.
As illustrated in
The image processing apparatus 2 is a computer. The image processing apparatus 2 of the present exemplary embodiment is connected to a network such as LAN, performs image processing on image information received from a user terminal 92 or a scanner 94, and sends the processed image information to the printer 3. An example of image processing discussed in this exemplary embodiment is rotating an input image by 90 degrees or 180 degrees.
The printer 3 is one example of an image forming apparatus. The printer 3 of the present exemplary embodiment receives image information from the image processing apparatus 2 via the network such as LAN and prints an image on imaging paper from the received image information.
The image processing apparatus 2 may be installed within the chassis of the printer 3.
As illustrated in
A part or all of the organization of the functions of the image processing program 5 is stored, for example, in a storage medium 20 (
In the image processing program 5, the code conversion part 50 converts input image information into code data that can be decoded independently for each of image portions (hereinafter referred to as image partitions) of predefined size. Here, the image information is a concept including uncoded values of pixels (hereinafter image data) and encoded image data.
Specifically, the code conversion part 50 in the present exemplary embodiment, if uncoded image data is input, performs independent encoding of input image data for every image partition of predefined size. The following coding methods may be applied: LZ coding, run length coding, predictive coding, frequency transform coding by discrete cosine transform (DCT) or discrete wavelet transform (DWT), etc. By defining a window size, a run range, or a processing unit of frequency transform, a code that can be decoded independently for each image partition of predefined size can be generated.
The code conversion part 50 in the present exemplary embodiment, if encoded image data is input, converts the code data into coded data that can be decoded independently for each image partition of predefined size. Such conversion is made possible by dividing the run length or by a similar manner.
The code conversion part 50 may use code words having boundaries of nibbles (four bits), bytes, words (two bytes), or the like, because separation into and merging of code words or code strings are performed in a later stage. This makes the separation or the like into code strings easy.
The image partitions manipulating part 52 manipulates image partitions of encoded image information. Since values of plural pixels exist in an image partition, the image partitions manipulating part 52 processes each code string corresponding to the values of the plural pixels of a partition included in code data. In the description of the exemplary embodiment, a set of code values corresponding to the values of all pixels contained in an image partition is referred to as a code string and a set of code values corresponding to the whole image is referred to as code data.
For code data input from the code conversion part 50, the image partitions manipulating part 52 in the present exemplary embodiment rearranges the code strings contained in the code data in a sequence to obtain an angle of rotation of the image and outputs the thus rearranged code data to the decoding part 54.
The decoding part 54 decodes the code data input from the image partitions manipulating part 52 and outputs decoded image data to the pixels manipulating part 56. The input code data can be decoded even if the sequence of the code strings has been changed, because the code data converted by the code conversion part 50 is decodable independently for each image partition.
The pixels manipulating part 56 manipulates the pixels of the image data decoded by the decoding part 54.
The pixels manipulating part 56 in the present exemplary embodiment rearranges the decoded values of the pixels in a sequence to obtain an angle of rotation of the image.
As illustrated in
The code words separation section 520 separates code data into code words from the beginning of the code data, referring to a code book, and identifies the head position of each image partition. The code words separation section 520, for example, may identify the head position of each image partition, based on the number of pixels corresponding to separated code words. It may identify the head position of each image partition, based on a code (e.g., a line end code) indicating the end position of its preceding image partition.
In this way, separation into code words can be performed only if the length of a code word is known. There is no need for knowing the content (symbol) corresponding to a code word. Thus, the separation into code words can be performed at a higher speed than normal decoding processing. Although the present exemplary embodiment assumes that a variable length code is applied, the separation into code words becomes simpler if a fixed length code is applied.
The head position retaining section 522 retains the head position of an image partition (the position within code data) identified by the code words separation section 520.
The code fractions resorting section 524 resorts code strings from within the code data in an arbitrary sequence, based on the head position of each partition retained by the head position retaining section 522. The code fractions resorting section 524 in the present exemplary embodiment resorts the code strings from within the code data in a sequence to obtain an angle of rotation of the image and outputs the resorted code strings to the decoding part 54 serially.
As illustrated in
More specifically, the code words separation section 520 (
The image partitions manipulating part 52 rearranges the code strings of the image partitions in a slow-scanning direction (vertical direction of the image), as illustrated in
More specifically, the code fractions resorting section 524 (
Then, the decoding part 54 serially decodes the code strings which are serially input from the image partitions manipulating part 52 (the code fractions resorting section 524) and outputs a set of decoded values of pixels to the pixels manipulating part 56.
The pixels manipulating part 56 rearranges the pixels in the set of values of pixels input from the decoding part 54 in the fast-scanning direction. More specifically, the pixels manipulating part 56 writes the pixels as many as those contained in one image partition (five pixels in the present exemplary embodiment) in the set of values of pixels input from the decoding part 54 into a line buffer and reads these pixels in a sequence reverse to the writing sequence from the line buffer, as illustrated in
As above, the processing for 180-degree rotation is realized by combination of 180-degree rotation processing of image partitions (processing on codes) and 180-degree rotation processing of pixels (processing on the values of pixels).
As illustrated in
Specifically, the code words separation section 520 (
The image partitions manipulating part 52 rearranges the codes strings of the image partitions to rotate the image by 90 degrees on the level of image partitions, as illustrated in
Specifically, the code fractions resorting section 524 (
Then, the decoding part 54 serially decodes the code strings which are serially input from the image partitions manipulating part 52 (the code fractions resorting section 524) and outputs a set of decoded values of pixels to the pixels manipulating part 56.
The pixels manipulating part 56 rearranges the pixels in the set of values of pixels input from the decoding part 54, thereby rotating the set of values of pixels contained in each image partition by 90 degrees.
Specifically, the pixels manipulating part 56 writes sets of values of pixels in three image partitions input from the decoding part 54 into a block line buffer and reads these values in an orthogonal direction to the writing direction from the block line buffer, as illustrated in
As above, the processing for 90-degree rotation is realized by combination of 90-degree rotation processing of image partitions (processing on codes) and 90-degree rotation processing of pixels (processing on the values of pixels).
Next, examples of modifications to the above exemplary embodiment are described.
In the above exemplary embodiment, one line in the fast-scanning direction is regarded as an image partition in the case of processing for 180-degree rotation; however, image partitioning is not so limited. Image partitions may be defined as divisions of one line in the fast-scanning direction, for example, as illustrated in
In this case, the image partitions manipulating part 52 performs 180-degree rotation processing of image partitions, as illustrated in
Then, the pixels manipulating part 56 rearranges a set of pixels within each image partition, as illustrated in
In the above exemplary embodiment, an image partition is defined to have one-pixel length in the slow-scanning direction; however, image partitioning is not so limited. An image partition may be defined to have two-pixel length in the slow-scanning direction, for example, as illustrated in
In this case, the image partitions manipulating part 52 simply rearranges the image partitions in the slow-scanning direction, as is the case for the above exemplary embodiment. The pixels manipulating part 56 writes a set of pixels in an image partition into a block line buffer and reads the pixels in a sequence reverse to the writing sequence from the block line buffer, as illustrated in
Next, an embodiment for shifting an image is described as a second exemplary embodiment.
Sometimes, an input image which is illustrated in
In the present exemplary embodiment, processing that is performed on the image partition level includes at least one of the following: shifting pixels, adding margin portions, and removing out-of-frame portions. Then, processing such as shifting pixels is performed on the pixel level. The framework of the image forming system 1 and relevant configurations are substantially the same as described for the first exemplary embodiment.
As illustrated in
The image partition shift controller 620 controls shifting image partitions, adding margin portions, and removing out-of-frame portions, according to a shift direction and a shift amount.
The image partition shift controller 620 separates the input code data into code words and sequentially outputs the code words to the image partition buffer 622. The image partition buffer 622 stores the code words for one image partition (i.e., a code string), which are input from the image partition shift controller 620.
The image partition shift controller 620 determines whether the next image portion which is as large as an image partition is a margin portion, out-of-frame portion, or any other image portion from a shift direction and a shift amount. If the next image portion is a margin portion (a portion made up entirely of margin pixels), the controller 620 instructs the section for inserting margin code 626 to insert a margin code. If the next image portion is an out-of-frame portion (a portion made up entirely of pixels that run out of the frame), the controller 620 instructs the section for removing code fraction 624 to remove the code string of the image partition. If the next image portion is neither a margin portion nor an out-of-frame portion, the controller 620 instructs the image partition buffer 622 to output the code string held therein.
The section for removing code fraction 624, when instructed to remove the code string from the image partition shift controller 620, erases the code string held in the image partition buffer 622.
The section for inserting margin code 626, when instructed to insert a margin code from the image partition shift controller 620, outputs a code string corresponding to a margin portion for one image partition to the decoding part 54. The code string corresponding to the margin portion is a run of pixel values of 0 in the case of run length coding, which is prepared in advance.
The image partition buffer 622, when instructed to output the code string from the image partition shift controller 620, outputs the code string held therein to the decoding part 54. That is, by shifting the output timing of the code string held in the image partition buffer 622, translation of a set of pixels in an image partition is realized.
As illustrated in
The pixel shift controller 660 controls shifting pixels contained in an image partition, adding margin pixels, and removing out-of-frame pixels, according to a shift direction and a remaining amount of shift. Here, the remaining amount of shift is a value obtained by subtracting an amount of shift performed by the image partitions manipulating part 62 from a required amount of shift.
The pixel shift controller 660 in the present exemplary embodiment outputs a set of values of pixels, which has been input from the decoding part 54, to the pixel value buffer 662 serially. The pixel value buffer 662 stores a pixel value that is input from the pixel shift controller 660.
The pixel shift controller 660 determines whether the next pixel is a margin pixel, an out-of-frame pixel, or any other pixel from a shift direction and a remaining amount of shift. If the next pixel is a margin pixel, the controller 660 instructs the margin pixel inserting section 666 to insert a margin pixel. If the next pixel is an out-of-frame pixel, the controller 660 instructs the pixel removing section 664 to remove the pixel. If the next pixel is neither a margin pixel nor an out-of-frame pixel, the controller 660 instructs the pixel value buffer 662 to output the pixel value held therein.
The pixel removing section 664, when instructed to remove the pixel value from the pixel shift controller 660, removes the pixel value held in the pixel value buffer 662.
The margin pixel inserting section 666, when instructed to insert a margin pixel from the pixel shift controller 660, outputs one pixel value corresponding to a margin. The pixel value corresponding to a margin is, for example, 0, which is prepared in advance.
The pixel value buffer 662, when instructed to output the pixel value from the pixel shift controller 660, outputs the pixel value held therein. That is, by shifting the output timing of the pixel value held in the pixel value buffer 662, translation of pixels is performed.
As illustrated in
The image partitions manipulating part 62 performs shift processing on the image partition level, as illustrated in
Then, the decoding part 54 serially decodes code strings which are serially input from the image partitions manipulating part 62 and outputs a set of decoded values of pixels to the pixels manipulating part 66. Margin codes are decoded to pixel values corresponding to margins.
The pixels manipulating part 66 shifts sets of values of pixels which are input from the decoding part 54 by a remaining amount of shift on the pixel level.
Specifically, the pixels manipulating part 66 inserts margin pixels in the sets of values of pixels input from the decoding part 54 and removes out-of-frame pixels (the last pixels of an image partition 2, an image partition 5, and an image partition 8), if they exist, as illustrated in
As above, desired shift processing is realized by combination of shift processing on the image partition level (processing on codes) and shift processing on the pixel level (processing on pixels).
Next, an embodiment for combining plural input images is described as a third exemplary embodiment.
Sometimes, an input image A which is illustrated in
In the present exemplary embodiment, such combine processing (merge processing) is realized by combination of combine processing on the image partition level and combine processing on the pixel level. The framework of the image forming system 1 and relevant configurations are substantially the same as described for the first exemplary embodiment.
As illustrated in
The image partition tag interpreting section 720 extracts tag information for each image partition and determines which code string to select from code data of plural input images. The image partition tag interpreting section 720 outputs the extracted tag information to the tag generating section 724.
The code fraction selecting section 722 separates code data of plural input images into code strings corresponding to image partitions, respectively, based on a code book or the like, and selects at least one code string from plural code strings separated, according to the determination made by the image partition tag interpreting section 720.
In the present exemplary embodiment, the image partition tag interpreting section 720, if extracted tag information (tag information for a portion corresponding to an image partition) specifies the input image A only, instructs the code fraction selecting section 722 to select a code string of the input image A. According to this instruction, the code fraction selecting section 722 selects a code string of the input image A from plural code strings separated and outputs the selected code string to the decoding part 54. Likewise, if the tag information specifies the input image B only, the image partition tag interpreting section 720 instructs to select a code string of the input image B and, according to this instruction, the code fraction selecting section 722 selects a code string of the input image B and outputs the selected code string to decoding part 54. If the extracted tag information (tag information for a portion corresponding to an image partition) includes both tag A specifying the input image A and tag B specifying the input image B, the image partition tag interpreting section 720 instructs the code fraction selecting section 722 to select a code string of the input image A and a code string of the input image B. According to this instruction, the code fraction selecting section 722 selects a code string of the input image A and a code string of the input image B from plural code strings separated and outputs the selected code strings to the decoding part 54.
The tag generating section 724 generates tag information (tag on a pixel-by-pixel basis) for combine processing on the pixel level, based on tag information which has been input from the image partition tag interpreting section 720, and outputs a pixels tag generated to the pixels manipulating part 76.
As illustrated in
The section for interpreting pixels tag 760 extracts a tag for each pixel from input tag information and determines per pixel which pixel value to select from a set of plural pixel values which has been input from the decoding part 54, based on the extracted tag.
The section for interpreting pixels tag 760 in the present exemplary embodiment determines which pixel value to select from the pixel values of the respective images (pixel value of the input image A and pixel value of the input image B), input from the decoding part 54, based on the pixels tag generated by the tag generating section 724.
The section for selecting pixel value 762 selects per pixel a pixel value to assign from a set of plural pixel values which has been input from the decoding part 54. In doing so, if there are only pixel values of a single image (that is, if a code string of input image A or input image B has been selected on the image partition level), the section for selecting pixel value 762 outputs the present pixel values unconditionally as they are.
The section for selecting pixel value 762 in the present exemplary embodiment outputs the pixel values as they are for an image partition where only pixel values of input image A or input image B exist. For an image partition where pixel values of both input image A and input image B exist, the section for selecting pixel value 762 selects per pixel either a pixel value of input image A or a pixel value of input image B, based on the pixels tag generated by the tag generating section 724, and outputs the selected values of the pixels.
As illustrated in
Tag information exists for respective pixels. In the present exemplary embodiment, tag A that specifies input image A only exists for an image portion corresponding to image partition 1 (image partition A1 and image partition B1), both tag A that specifies input image A and tag B that specifies input image B coexist for an image portion corresponding to image partition 2, and tag B that specifies input image B only exists for an image portion corresponding to image partition 3.
The image partitions manipulating part 72 merges image partitions, as illustrated in
The image partition tag interpreting section 720 in the present exemplary embodiment instructs the tag generating section 724 to generate a pixels tag, only if the read tag information includes both the tag of input image A and the tag of input image B. According to this instruction, the tag generating section 724 generates a pixels tag including information for identifying an image partition (image partition ID) and tag information within the image partition, as illustrated in
Then, the decoding part 54 serially decodes code strings which are serially input from the image partitions manipulating part 72 and outputs a set of decoded values of pixels to the pixels manipulating part 76.
The pixels manipulating part 76 merges pixels within a set of values of pixels which is input from the decoding part 54.
Specifically, the section for interpreting pixels tag 760 identifies an image partition (image partition 2 in the present exemplary embodiment) in which the pixels are merged, based on the pixels tag illustrated in
As above, combine processing (merge processing) is realized by combination of merging image partitions (processing on codes) and merging pixels (processing on pixel values).
Next, an embodiment in which the above plural types of image processing can be executed is described as a fourth exemplary embodiment. The framework of the image forming system 1 and relevant configurations are substantially the same as described for the first exemplary embodiment.
As illustrated in
The code conversion part 50, the image partitions manipulating part 82, and the decoding part 54 in the present exemplary embodiment are implemented using a general-purpose processor such as a central processing unit (CPU) which is commonly used and software.
The pixels manipulating part 56 for rotation, the pixels manipulating part 66 for shifting, and the pixels manipulating part 76 for combining in the present exemplary embodiment are implemented using dedicated processors such as application specific integrated circuits (ASIC).
In the image processing unit 8, image partitions manipulating part 82 realizes, by software, the functions of the image partitions manipulating part 52 illustrated in
The image partitions manipulating part 82 in the present exemplary embodiment performs rotation, shift, or merge processing on code strings on the image partition level, according to requested image processing (rotate, shift, or merge).
As illustrated in
The pixels manipulating part 56 for rotation is a dedicated processor to realize the functions of the pixels manipulating part 56 (rotation processing of pixels) illustrated in
The pixels manipulating part 66 for shifting is a dedicated processor to realize the functions of the pixels manipulating part 66 (shift processing of pixels) illustrated in
The pixels manipulating part 76 for combining is a dedicated processor to realize the functions of the pixels manipulating part 76 (merge processing of pixels) illustrated in
Next, operation of the image processing apparatus 2 (image processing unit 8) is described.
As illustrated in
The code conversion part 50 of the image processing unit 8 (
At step 105 (S105), the image partitions manipulating part 82 (
The image processing unit 8 proceeds to step S110 if merge processing is performed; step S130 if shift processing is performed; or step S145 if rotation processing is performed.
At step 110 (S110), the image partitions manipulating part 82 merges code strings (code data for portions corresponding to image partitions) of plural input images, based on tag information attached to the code data. Specifically, as illustrated in
At step 115 (S115), the decoding part 54 decodes code data (merged on the image partition level) which is input from the image partitions manipulating part 82 and outputs a set of decoded values of pixels and a pixels tag input from the image partitions manipulating part 82 to the pixels manipulating part 76 for combining.
At step 120 (S120), the pixels manipulating part 76 for combining merges pixels within a set of values of pixels input from the decoding part 54, according to the input pixels tag, as illustrated in
This step of processing may be performed by the dedicated processor, because the amount of processing may become large on account of processing on the pixel level, though the reference range is limited within a partition and the processing is simple.
At step 130 (S130), the image partitions manipulating part 82 shifts code strings of image partitions according to a shift direction and a shift amount. Specifically, inserting margin codes, removing out-of-frame portions, and thereby shifting the code strings are performed, as illustrated in
This step of processing may be performed by the general-purpose processor, because the amount of processing is not large, though the reference range is wide and complex.
At step 135 (S135), the decoding part 54 decodes code data (shifted on the image partition level) which is input from the image partitions manipulating part 82 and outputs a set of decoded values of pixels to the pixels manipulating part 66 for shifting.
At step 140 (S140), the pixels manipulating part 66 for shifting adds margin pixels and removes out-of-frame pixels for sets of values of pixels input from the decoding part 54, according to the shift direction and the remaining amount of shift, as illustrated in
This step of processing may be performed by the dedicated processor, because the amount of processing may become large on account of processing on the pixel level, though the reference range is relatively narrow and the processing is simple.
At step 145 (S145), the image partitions manipulating part 82 (
The image processing unit 8 proceeds to step S150 if processing for 90-degree rotation is performed or step 165 if processing for 180-degree rotation is performed.
At step 150 (S150), the image partitions manipulating part 82 rotates code strings of image partitions by 90 degrees. Specifically, the image partitions manipulating part 82 rearranges the code strings corresponding to the image partitions to make a 90-degree rotation on the image partition level, as illustrated in
This step of processing may be performed by the general-purpose processor, because the amount of processing is not large, though the reference range is wide and complex.
At step 155 (S155), the decoding part 54 decodes code data (rotated by 90 degrees on the image partition level) which is input from the image partitions manipulating part 82 and outputs a set of decoded values of pixels to the pixels manipulating part 56 for rotation.
At step 160 (S160), the pixels manipulating part 56 for rotation rotates a set of values of pixels input from the decoding part 54 by 90 degrees within the image partition containing these pixels. Specifically, the pixels manipulating part 56 for rotation writes a set of values of pixels contained in an image partition into a block line buffer and reads the values of pixels from the block line buffer in a sequence in accordance with the rotation direction, as illustrated in
This step of processing may be performed by the dedicated processor, because the amount of processing may become large on account of processing on the pixel level, though the reference range is relatively narrow and the processing is simple.
At step 165 (S165), the image partitions manipulating part 82 assembles image partitions per line in the fast-scanning direction and these image partitions are to be rotated by 180 degrees.
The image partitions manipulating part 82 rotates the code strings of the image partitions by 180 degrees. Specifically, the image partitions manipulating part 82 rearranges the code strings corresponding to the image partitions in the slow-scanning direction, as illustrated in
This step of processing may be performed by the general-purpose processor, because the amount of processing is not large, though the reference range is wide and complex.
At step 170 (S170), the decoding part 54 decodes code data (rotated by 180 degrees on the image partition level) which is input from the image partitions manipulating part 82 and outputs a set of decoded values of pixels to the pixels manipulating part 56 for rotation.
At step 175 (S175), the pixels manipulating part 56 for rotation rotates a set of values of pixels input from the decoding part 54 by 180 degrees within the image partition containing these pixels. Specifically, the pixels manipulating part 56 for rotation writes a set of values of pixels contained in an image partition into a line buffer and reads these values of pixels from the line buffer in a sequence reverse to the writing sequence, as illustrated in
This step of processing may be performed by the dedicated processor, because the amount of processing may become large on account of processing on the pixel level, though the reference range is relatively narrow and the processing is simple.
At step 180 (S180), the values of pixels which are output from the pixels manipulating part 56 for rotation, the pixels manipulating part 66 for shifting, or the pixels manipulating part 76 for combining are transferred to the printer 3 (
At step 185 (S185), the printer 3 prints an image on imaging paper, based on the transferred values of pixels.
The present invention may be embodied in other specific forms without departing from its spirit or characteristics. The described exemplary embodiments are to be considered in all respects only as illustrated and not restrictive. The scope of the invention is, therefore, indicated by the appended claims rather than by the foregoing description. All changes that come within the meaning and range of equivalency of the claims are to be embraced within their scope.
Number | Date | Country | Kind |
---|---|---|---|
2007-012564 | Jan 2007 | JP | national |