WO2004084540A1 - カラー画像データの変換を行なう画像処理装置、および画像処理方法 - Google Patents

カラー画像データの変換を行なう画像処理装置、および画像処理方法 Download PDF

Info

Publication number
WO2004084540A1
WO2004084540A1 PCT/JP2004/003603 JP2004003603W WO2004084540A1 WO 2004084540 A1 WO2004084540 A1 WO 2004084540A1 JP 2004003603 W JP2004003603 W JP 2004003603W WO 2004084540 A1 WO2004084540 A1 WO 2004084540A1
Authority
WO
WIPO (PCT)
Prior art keywords
color
image data
block
edge
pixel
Prior art date
Application number
PCT/JP2004/003603
Other languages
English (en)
French (fr)
Inventor
Toshiaki Kakutani
Original Assignee
Seiko Epson Corporation
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Seiko Epson Corporation filed Critical Seiko Epson Corporation
Priority to EP04721371A priority Critical patent/EP1608147A4/en
Priority to US10/549,663 priority patent/US7612911B2/en
Publication of WO2004084540A1 publication Critical patent/WO2004084540A1/ja

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N1/00Scanning, transmission or reproduction of documents or the like, e.g. facsimile transmission; Details thereof
    • H04N1/40Picture signal circuits
    • H04N1/405Halftoning, i.e. converting the picture signal of a continuous-tone original into a corresponding signal showing only two levels
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N1/00Scanning, transmission or reproduction of documents or the like, e.g. facsimile transmission; Details thereof
    • H04N1/46Colour picture communication systems
    • H04N1/64Systems for the transmission or the storage of the colour picture signal; Details therefor, e.g. coding or decoding means therefor
    • H04N1/648Transmitting or storing the primary (additive or subtractive) colour signals; Compression thereof

Definitions

  • Image processing apparatus for converting color image data and image processing method
  • the present invention relates to a technique for converting color image data. More specifically, the present invention relates to a technique for converting image data of a first color system into image data of a second color system, and then converting the data after the color conversion. The present invention relates to a technique for converting image data into an expression format based on whether or not a dot is formed. Background art
  • Printing devices such as ink jet printers, which form dots on print media and print images, are widely used as output devices for imaging devices such as computers and digital cameras.
  • various output devices such as liquid crystals and organic LEDs, for displaying images by forming luminescent spots on a screen have begun to be used, and will be widely used in the future.
  • image processing called color conversion processing and half-i-one processing on image data. This is because the method of expressing color image data differs between the side that creates image data (such as a computer) and the side that displays images based on image data (such as a printing device), as follows. is there.
  • an apparatus for performing image processing such as a computer and an apparatus for outputting an image such as a printing apparatus are different in a method for expressing a hue. That is, in a computer or the like, elements that emit R (red), G (green), and B (blue) are assembled. In contrast, printers use a combination of C (cyan), M (magenta), and Y (yellow) inks, which are inks that absorb light of other colors. Expresses hue. As described above, the expression form of the hue using each RGB color is sometimes called an RGB color system. On the other hand, a hue expression format based on each CMY color is sometimes called a CMY color system.
  • RGB color system like computers such as LCDs and organic LEDs
  • the colors of the RGB colors are slightly different from each other in most cases. Therefore, even if the same RGB color system is adopted, color-image data conversion is required to correct the color difference.
  • a color image data expressed by a color system adopted by an image processing apparatus such as a computer is printed. It is necessary to convert the color image data into the color image data used by the device.
  • the color conversion process is a process for performing such conversion.
  • the gradation expression method differs between an image processing device such as a convenience store and an output device such as a printing device.
  • a pixel which is the minimum unit of an image can express multiple gradations by itself.
  • each pixel alone can be represented by 256 pixels. It is possible to express gradation.
  • printing devices and image display devices can basically take only two states, whether or not to form dots or bright spots, and thus change the formation density of dots or bright spots.
  • a method of expressing a gradation in a pseudo manner is mainly used. For this reason, it is necessary to perform a process of converting image data (gradation image data) capable of expressing multiple gradations for each pixel into image data (pseudo gradation image data) expressing pseudo gradations.
  • the halftone process is a process for performing such conversion.
  • Various methods have been proposed for the half I-one processing method.
  • a typical one is an error diffusion method.
  • the error diffusion method an error in gradation expression caused by the formation of a dot in the pixel of interest or the absence of a dot is diffused to an undetermined pixel around the pixel of interest and stored.
  • it is a method of judging the presence or absence of dot formation so as to eliminate errors diffused from surrounding pixels.
  • image data is accurately converted by suppressing the error generated by the conversion in order to perform the half-I-one processing while eliminating the gradation expression error generated in the peripheral pixels as described above. It is possible.
  • every time an error is diffused to neighboring pixels, reading and writing to the memory occur, so that the error diffusion processing takes a long time, and thus the image display tends to take a long time. . ,
  • a first image processing device of the present invention has the following configuration. That is,
  • An image processing apparatus for converting color image data expressed by one color system into image data expressed by the presence or absence of dots for each color constituting another color system
  • Color conversion means for converting the color image data expressed by the first color system into color image data of a second color system different from the first color system
  • Edge detecting means for collecting a plurality of pixels adjacent to each other as a first type block by a predetermined number, and detecting the presence or absence of an edge in the first type block;
  • Compressed data storage means for storing the color image data after color conversion for each pixel included in the first type block in a memory in a compressed state if no edge exists in the block;
  • Compressed data decompression means for reading out the color image data stored in the compressed state from the memory and decompressing them, and then combining predetermined adjacent pixels as a second type block by a predetermined plurality of pixels;
  • the gist is to provide Further, the first image processing method of the present invention corresponding to the above-described image processing apparatus is as follows.
  • the gist is to provide In the first image processing apparatus and the first image processing method, it is possible to quickly determine whether or not a dot is formed by performing the determination on a block basis.
  • a method for judging the presence or absence of dot formation a known method such as an error diffusion method or a dither method can be applied.
  • the color-converted image data used to determine the presence / absence of dot formation is temporarily stored in memory in a compressed state, and the presence / absence of dot formation is determined by reading from the memory as necessary. Is done. For this reason, the processing does not become complicated even though the dot on-off state is determined in units of blocks.
  • the process of color-converting color image data and converting it to data represented by the presence or absence of dots involves complicated processing. And can be done quickly.
  • the determination may be performed as follows.
  • pixels which have been compressed as having no edge in the first type block are treated as uniform data of the color image data of these pixels. Then, it may be determined whether or not a dot is formed.
  • the uniform image data the data of one pixel in the plurality of pixels may be used, or the average value of the data in a block may be used.
  • pixels that make up the second type of block pixels that were originally compressed as being contained in blocks without edges are considered to have similar values in the image data.
  • it is possible to treat the image data of a plurality of pixels as a uniform image when determining whether or not to form dots it is possible to speed up the process of determining whether or not to form dots. .
  • treating the data of these pixels as uniform data makes it possible to speed up the processing without affecting the image quality. Suitable.
  • the presence or absence of an edge is detected based on the color image data after the color conversion, and the edge within the block is detected.
  • Color image data after color conversion Evening may be compressed and stored in the memory. Since the color image data stored in the memory is the image data after the color conversion, the edge is detected based on the image data after the color conversion, and the image data is compressed. This is preferable because it is possible to reliably detect and compress the edge for each color constituting the color system.
  • the presence or absence of an edge is detected based on color image data before color conversion, and for a block in which no edge is detected, an image before color conversion is used.
  • the data may be compressed.
  • the color image data after compression is subjected to color conversion, and the obtained image data is stored in the memory.
  • the pixels included in the block can be color-converted collectively, so that color conversion can be performed more quickly, and furthermore, image processing can be performed. It can be done quickly.
  • the presence or absence of an edge is detected again for each color based on the color image data after color conversion. It is good. Then, after compressing the color image data after color conversion according to the edge detection result, the compressed image data is stored in the memory. In this way, the color image data that has not been compressed before the color conversion can be compressed based on the image data after the color conversion. Can be improved. As a result, the color image data after the color conversion can be quickly read and written to the memory, and the image processing can be speeded up, which is preferable.
  • the image data of a plurality of pixels included in the block is replaced with one pixel.
  • the image data may be compressed and stored as image data.
  • one pixel may be selected from a plurality of pixels and compressed into image data of the selected pixel, or an average value of image data for a plurality of pixels may be calculated.
  • the image data for a plurality of pixels may be compressed to the obtained average value.
  • the image data of a plurality of elements can be quickly and efficiently compressed, and the compressed image data can be quickly decompressed, which is preferable.
  • the block when the presence of an edge in the first type block is detected, the block is divided into sub-blocks that do not include edges.
  • the compressed image data may be stored in the memory.
  • the compression ratio of the image data can be further improved by compressing the color image data in units of sub-blocks. Since it is possible to speed up processing preferable.
  • the color image data after the color conversion is stored in the memory in a compressed state, and compression information indicating a state in which the image data is compressed is also stored.
  • each of the first type block and the second type block may include four pixels arranged in 2 rows and 2 columns.
  • a second image processing device of the present invention has the following configuration. That is, an image processing apparatus that converts color image data represented by one color system into image data represented by the presence or absence of dots for each color constituting another color system. ,
  • Color conversion means for converting color image data expressed by the first color system into color image data of a second color system different from the first color system
  • Edge detecting means for collecting pixels adjacent to each other as a first type block by a predetermined number, and detecting the presence or absence of an edge in the first type block;
  • Compressed data storage means for storing the color-converted color image data of each pixel included in the first type block in a compressed state when no edge exists in the block;
  • Compressed image data decompression means for reading out the color image data stored in the compressed state from the memory and decompressing the image data,
  • Dot formation determining means for determining whether a dot is formed for each color of the second color system based on the decompressed color image data
  • the gist is to provide Further, the second image processing method of the present invention corresponding to the above-mentioned image processing apparatus is a method of converting color image data expressed by one color system into dots of each color constituting another color system.
  • the gist is to provide In such a second image processing apparatus and image processing method as well, the image data after color conversion is temporarily stored in a memory in a compressed state. When determining whether or not to form dots, the determination is made while decompressing the data read from the memory as necessary. In this way, it is possible to rapidly perform the process of converting the color image data into color data and converting the color image data into data expressed by the presence or absence of dots without complicating the processing. .
  • the present invention can be realized by using a computer by reading the program for realizing the above-described image processing into the computer. Therefore, the present invention can be understood as a program or a recording medium corresponding to the above-described first and second image processing methods. If such a program or a program stored in a recording medium is read at the convenience of a computer, and the above-described various functions are realized using the computer, the color image data can be quickly converted without complicating the image processing. It can be converted.
  • FIG. 1 is a schematic configuration diagram of a printing system illustrating the outline of the present invention.
  • FIG. 2 is an explanatory diagram illustrating a configuration of a computer as the image processing device of the present embodiment.
  • FIG. 3 is a schematic configuration diagram of a printer as an image display device of the present embodiment.
  • FIG. 4 is a flowchart illustrating a flow of image processing performed by the image processing apparatus of the present embodiment.
  • FIG. 5 shows the color conversion of the first embodiment.
  • 5 is a flowchart showing a flow of a compression process.
  • FIG. 6A and FIG. 6B are explanatory diagrams showing a state in which a plurality of pixels are collectively set as a first block.
  • FIG. 7 is an explanatory diagram conceptually showing a color conversion table referred to for color conversion.
  • FIGS. 8A and 8B are explanatory diagrams conceptually showing how to detect the presence or absence of an edge by calculating a gradation difference between predetermined pixels in a block.
  • 9A and 9B are explanatory diagrams conceptually showing a state in which image data in a block is compressed according to the presence or absence of an edge and stored in a memory.
  • FIG. 10 is a flowchart showing the flow of halftone processing performed in block units.
  • FIGS. 11A to 11E are explanatory diagrams exemplifying a second block set in the halftone process performed in block units.
  • FIG. 4 is an explanatory diagram conceptually showing a state of diffusion to pixels on a side.
  • FIGS. 13A and 13B are explanatory diagrams exemplifying a diffusion ratio when a grayscale error generated in the entire block is diffused to peripheral pixels.
  • Figure 14 shows the half operation performed in block units! ⁇ This is a flow chart showing the flow of processing for binarizing each pixel in a block during a single process.
  • FIGS. 15A to 15D are explanatory diagrams conceptually showing a state where binarization is performed for each pixel in a block during halftone processing performed in block units.
  • FIG. 16 is a flowchart showing the flow of the color conversion / compression processing of the second embodiment.
  • FIG. 17 is a flowchart showing the flow of the color conversion / compression processing according to the third embodiment.
  • FIGS. 18A and 18B conceptually show a modification in which compression is performed while detecting edges in a block.
  • FIG. 18A and 18B conceptually show a modification in which compression is performed while detecting edges in a block.
  • FIGS. 19A to 19D are explanatory diagrams showing a modification in which image data is compressed while dividing a block into sub-blocks according to the state of an edge.
  • FIG. 1 is an explanatory diagram illustrating a schematic configuration of an embodiment of the present invention using a printing system as an example.
  • the printing system includes an image processing apparatus] 0, a color printer 20, and the like.
  • the image processing apparatus 10 is a computer on which software for image processing prepared in advance is executed.
  • the image processing apparatus 10 receives the color image data.
  • the image data is converted into print data expressed by the presence or absence of each color dot that can be printed by the power printer 20.
  • the printer driver 12 illustrated in FIG. 1 includes a plurality of modules such as a color conversion / compression module, an edge detection module, and a halftone module.
  • the color conversion / compression module receives the RGB image data whose resolution has been converted and converts it into dot colors that can be formed by color printing, namely, cyan (C), magenta (M), and yellow.
  • the color conversion is performed on the CMY image data represented by each color of (Y) color or each color added with black (K) color.
  • pre-processing may be performed as necessary, such as converting the resolution of the image data to a resolution for printing by the color printer 20.
  • Image data after color conversion One night (While the adjacent pixels are collectively compressed as a block for each predetermined number, this data is stored in the memory. Alternatively, as described later, the data is compressed before color conversion, and the color is compressed.
  • compressing image data it detects whether or not there is an edge in the block, and compresses it according to the detection result.
  • the edge detection is performed by the edge detection module. The details of the compression according to the detection result will be described in each of the embodiments described later.
  • the half I-one module reads out the compressed image data from the memory and stores the adjacent pixels in the memory.
  • the presence or absence of dot formation is performed for each pixel included in the block in units of blocks.
  • the blocks generated by the compression module need not be the same as the blocks generated by the color conversion / compression module, for example, the blocks generated by the halftone module and the color conversion. It is also possible to apply various methods, such as the method described later, to the method of determining whether or not dots are formed in block units.
  • the obtained data is output as a print data to the color printer 20.
  • Post-processing may be performed as necessary, for example, by rearranging the order of the data in consideration of the order in which the pudding and the dots are formed.
  • the color image is printed by forming ink dots of each color on a print medium based on the print data obtained in this manner.
  • the image data is read from the memory as needed and decompressed, then half-one processing is performed.Half-one processing is performed for each pixel in block units. So that quick processing is possible.
  • the image data is read from the memory as necessary and processed, so the half! ⁇ One processing is greatly simplified despite the processing in blocks.
  • processing to compress and decompress image data, and processing to read and write image data to and from the memory are newly generated.However, as described later, compression is performed according to the presence or absence of an edge in a block.
  • FIG. 2 is an explanatory diagram illustrating a configuration of a computer 100 as an image processing apparatus according to the present embodiment.
  • the computer ⁇ 100 is a well-known computer configured by connecting a ROM 104, a RAM 106 used as the above-mentioned memory, and the like to each other by a bus 116, centering on a CP LM 02. is there.
  • the CPU 102 includes an arithmetic unit, a register, a cache, and the like.
  • a register and a cache are the same kind of memories as RAMI 06 in storing data, but they can read and write data much faster than RAMI 06.
  • the computer 100 includes a disk controller DDC 109 for reading data of the flexible disk 124 and the compact disk 126, and a peripheral device interface (hereinafter, referred to as a “device”) for transferring data to and from peripheral devices.
  • PIF peripheral device interface
  • VIF video interface
  • FIG. 3 is an explanatory diagram illustrating a schematic configuration of the color printer 200 of the first embodiment.
  • Color pudding 200 is an inkjet pudding that can form dots of four color inks of cyan, magenta, yellow and plaque.
  • cyan (light cyan) ink which has a low dye concentration of about 1/4 that of cyan ink
  • magenta (light magenta) ink which also has low dye concentration
  • the color printer 200 has a mechanism for driving a print head 241, which is mounted on the carriage 240, to eject ink and form a dot.
  • a carriage motor 230 reciprocates in the axial direction of the platen 236 (hereinafter referred to as the main scanning direction), and the paper feed motor 235 drives the printing paper P orthogonal to the main scanning direction.
  • a control circuit 260 that controls the formation of dots, the movement of the carriage 240, and the conveyance of printing paper.
  • An ink cartridge 242 for storing black ink and an ink cartridge 243 for storing various inks of cyan ink, magenta ink and yellow ink are mounted on the carriage 240.
  • the control circuit 260 includes a CPU 261, a ROM 262, a RAM 263, and the like. The control circuit 260 drives the carriage motor 230 and the paper feed motor 235 appropriately. Thus, main scanning and sub-scanning of the carriage 240 are controlled.
  • the control circuit 260 also controls the ejection of ink droplets from each nozzle at an appropriate timing based on print data supplied from the computer 100.
  • the color printer 200 can print a color image by forming an ink dot of each color at an appropriate position on the print medium.
  • Various methods can be applied to the method of ejecting ink droplets from the ink ejection head of each color. That is, a method of ejecting ink using a piezo element, a method of generating bubbles in the ink passage by a heater arranged in the ink passage, and ejecting ink droplets can be used.
  • the color printer 200 having the above-described hardware configuration drives the carriage motor 230 so that the ink discharge heads 24 4 to 24 7 of each color are printed on the printing paper P.
  • the printing paper P is moved in the sub-scanning direction by moving it in the main scanning direction and driving the paper feed motor 235.
  • the control circuit 260 drives the nozzles at an appropriate timing to discharge the ink droplets while repeating the main scanning and sub-scanning of the carriage 240 in accordance with the print data. 0 prints a color image on printing paper.
  • FIG. 4 is a flowchart showing a flow of a process in which the computer 100 as the image processing apparatus of the present embodiment converts image data into print data by performing predetermined image processing on received image data. is there.
  • image processing is started when the operating system of the computer 100 activates the printer driver 12.
  • the printer driver 12 first starts reading RGB color image data to be converted (step S100).
  • the resolution of the captured image data is set to the resolution for printing by the color printer. (Step S102).
  • step S104 color image data expressed by a combination of gradation values of R, G, and B is combined with gradation values of each color used in a color printer 200 such as C, M, Y, and ⁇ .
  • a process is performed to convert the image represented by the image into the image data.
  • the printer driver # 2 starts halftone processing following the color conversion / compression processing (step S106).
  • the halftone process is as follows.
  • the RG image data is converted into C, ⁇ , ⁇ , and I gradation data by color conversion.
  • the gradation data of each of these colors is a data having 256 gradations of gradation values 0 to 255.
  • the color printer 200 according to the present embodiment can take only one of the states of “forming dots” and “not forming dots”. Therefore, it is necessary to convert the gradation data of each color having 256 gradations into image data represented by two gradations that can be represented by the color printer 200.
  • the process of converting the number of gradations is the half-one process.
  • the printer driver 12 of the present embodiment reads out the compressed color-converted image data from the memory, that is, the RAM 106, and collects adjacent pixels into a predetermined plurality of blocks. , Perform half-processing in block units. By processing in block units in this way, halftone processing can be performed quickly. Perform in block units The details of the half I-one processing will be described later.
  • the printer driver starts the interlace processing (step S108).
  • the interlacing process is a process of rearranging image data converted into a format representing the presence or absence of dot formation into an order in which the image data should be transferred to the color printer 200 in consideration of the dot formation order.
  • the print driver 12 outputs the image data finally obtained by performing the interlacing process to the color printer 200 as a print data (step S110).
  • the color printer 200 forms an ink dot of each color on a print medium according to the print data. As a result, a color image corresponding to the image data is printed on the print medium.
  • the color-converted image data is temporarily stored in the memory, and the necessary image data is read out from the memory and processed in the half-in-one processing. For this reason, the half I-one processing does not become complicated even though the processing is performed in block units for speeding up.
  • FIG. 5 is a flowchart showing the flow of the color conversion / compression processing of the first embodiment. This process is a process executed using the function of the CPU 102 built in the computer # 00. Hereinafter, description will be made according to the flowchart.
  • a plurality of adjacent pixels are grouped by a predetermined number to generate a first block (step S200).
  • 6A and 6B are explanatory diagrams conceptually illustrating a state in which a plurality of pixels are collectively formed to form a first block.
  • FIG. 6A shows a state in which a first block is generated by grouping four pixels Pa, Pb, Pc, and Pd in two rows and two columns.
  • FIG. 6B shows a state where two pixels Pa and Pb arranged side by side are grouped as a first block.
  • the method of generating the first block is not limited to this example, and a plurality of pixels having a predetermined positional relationship with each other can be collectively used as a first block.
  • the first block is composed of four pixels as shown in FIG. 6A will be described below.
  • the image data is subjected to color conversion for each pixel in the block (step S202).
  • the first block is composed of four pixels as shown in Fig. 6A, each of the RGB image data of these four pixels is converted to the gradation data of each color of C, M, ⁇ , and K.
  • FIG. 7 is an explanatory diagram conceptually showing the LUT.
  • the image data is 1 byte data
  • the gradation value of each RGB color can take a value from 0 to 255.
  • the B image data can be represented as coordinates inside a cube having a side length of 255, with the three orthogonal axes being the R axis, G axis, and B axis, respectively.
  • Such a cube is called a color solid.
  • the LUT is a numerical table that subdivides a color solid into a grid and stores the gradation values of each color of CMYK at each grid point.
  • step S202 of FIG. 5 by referring to such a LUT, the RGB image data of each pixel constituting the first block is rapidly color-converted into CMYK data.
  • one color to be compressed is selected from the C, M, ⁇ , and K colors generated by the color conversion (step S204).
  • a process of calculating a tone difference between predetermined pixels in the first block for the tone value of the selected color is performed.
  • FIG. 8A is an explanatory diagram conceptually showing how a tone difference between predetermined pixels in a block is calculated. For example, assuming that the color C to be compressed is selected as the color to be compressed in step S204 in FIG. 5, as shown in FIG. 8A, the pixel between the upper left pixel P a and the upper right pixel P b in the block is Then, the gradation difference for the C color is calculated.
  • the tone difference between the upper left pixel Pa and the lower left pixel Pc and the tone difference for the C color between the pixel Pa and the lower right pixel Pd are calculated, respectively.
  • the gradation difference between the pixel Pa and the pixel Pb indicates the amount of change in the gradation value in the main scanning direction (the horizontal direction in FIG. 8A).
  • the gradation difference between the pixel Pa and the pixel Pc indicates the amount of change in the gradation value in the sub-scanning direction (vertical direction in FIG. 8A), and the difference between the pixel Pa and the pixel Pd.
  • the difference between the gray levels indicates the amount of change in the oblique direction.
  • the tone difference obtained in this way is If any of the directions is equal to or less than the predetermined threshold, it can be determined that no edge exists in the block for the C color. On the other hand, if the gradation difference is larger than the predetermined threshold value in any one direction, it can be determined that an edge exists in the block for the C color.
  • FIG. 8B each of the eight small rectangles pp, arranged in two rows and four columns, represents a pixel, and the numerical value displayed inside the rectangle pp is the color selected for compression (here Indicates the gradation value of each pixel for C).
  • the gradation difference in both the main scanning direction and the sub-scanning direction is a gradation value “1”, and the gradation difference in an oblique direction is “0”.
  • the gradation difference is small in any direction. Therefore, in such a case, it can be determined that the block A does not include an edge.
  • the gradation difference in the main scanning direction is the gradation value “2”
  • the gradation difference in the sub-scanning direction is the gradation value “18”
  • the gradation difference in the oblique direction is the gradation value.
  • the adjustment value is “20”, which is a big value like a dumpling.
  • the threshold value is set to, for example, a gradation value of “15”, an edge in the block B can be detected.
  • the respective gradation differences in the vertical and horizontal directions in the block are calculated.
  • the presence or absence of an edge in the block is determined based on the tone difference thus calculated (step S208). That is, the calculated tone difference is compared with a predetermined threshold value, and if there is at least one tone difference greater than the threshold value, it is determined that an edge exists in the block (step S 208: yes). Conversely, each gradation difference is smaller than the threshold.
  • FIG. 9 is an explanatory view conceptually showing this state.
  • FIG. 9A shows a process when no edge exists in the block
  • FIG. 9B shows a process when an edge exists in the block.
  • each of the four small rectangles arranged in two rows and columns indicates the pixels included in the block.
  • D ata_a, D ata_b, D ata-c, and D ata_d displayed in each rectangle represent the gradation value of each pixel for the color to be compressed (here, C color).
  • the gradation difference between the pixels is small. Therefore, for the C color, the gradation values of all the pixels are almost the same.
  • the average value D ata-cm of the gradation values in the block is calculated, and the gradation values D ata—a, D ata—b, D ata—c of the four pixels are calculated.
  • D ata- d is compressed to the gradation value D ata- cm. Then, the gradation value Data-cm and the value “1” indicating that the gradation value Data_cm has compressed the gradation value for four pixels are written into the memory.
  • FIG. 9A conceptually illustrates a state in which four gradation values included in the block are compressed into one gradation value Data 1 cm and written to the memory together with the compression information “1”.
  • the compression information “0” is used without compressing the gradation values D at a a, D at a b, D at c, and D at d of each pixel. They are written to memory as they are.
  • the compression information “0” indicates that the gradation values in the block are not compressed, and therefore, the four gradation values D ata_a, D ata_b, D ata_c, and D ata_d are converted to the four pixels P a, P This corresponds to the gradation values of b, Pc, and Pd.
  • FIG. 9B conceptually shows a state in which the four gradation values included in the block are directly written into the memory together with the compression information.
  • step S212 shown in FIG. 5 after the gradation value of each pixel included in the block is compressed in accordance with the presence or absence of the edge, a process of writing it to the memory together with the compression information is performed.
  • the amount of data increases by an amount corresponding to the addition of the compression information, but for blocks without edges, the gradation values for four pixels are converted into one gradation value. Because it can be expressed, it is possible to compress the image data as a whole. Also, the storage capacity required to store the compressed information is small compared to the gradation value of each pixel. For example, in the examples shown in FIGS. 9A and 9B, the compression information takes only a value of “0” or “1”, so that a storage capacity of 1 bit per block is sufficient. As described above, the increase in the amount of data due to the addition of the compression information is only slight, and it is possible to greatly reduce the amount of image data as a whole.
  • an area for storing the compression information and an area for storing the gradation value are secured in the memory.
  • the compression information and the gradation value are written in each area.
  • a gradation value may be written after the compression information, and may be written in the same area on the memory.
  • step S216 it is determined whether or not unprocessed pixels remain (step S216). If unprocessed pixels remain (step S216: no), the process returns to step S200 to generate a new block, and performs a series of subsequent processes on each pixel in this block. When the processing has been completed for all the pixels (step S216: yes), the color conversion shown in FIG. 5 is performed. The pressure box processing ends, and the processing returns to the image processing of FIG.
  • step S106 in FIG. 4 is performed following the color conversion / compression processing (step S104 in FIG. 4).
  • the compressed image data is read out from the memory, and then the half-in process is performed in block units, thereby enabling quick processing.
  • the half I-one processing of the present embodiment will be described.
  • FIG. 10 is a flowchart showing the flow of halftone processing performed in block units in the image processing of the present embodiment. Such processing is also performed using the function of the CPU 102 built in the computer 100.
  • the halftone processing is performed for each of the colors C, M, ⁇ , and K obtained by the color conversion.However, in order to avoid complicating the description, the following description will be given without specifying the colors. By doing, about each color Means that the same processing is performed.
  • a block for performing the halftone processing is set (step S300). This block is composed of a plurality of pixels adjacent to each other in a predetermined positional relationship. As described above with reference to FIG.
  • the color conversion and the compression processing are also performed on a block basis.
  • the blocks processed by the color conversion / compression processing do not necessarily need to match the blocks processed by the halftone processing described below. Therefore, in this specification, a block set in the color conversion / compression processing may be called a first block, and a block set in the halftone processing may be called a second block to distinguish them. Shall be.
  • the second block can take various forms.
  • FIG. 11A to FIG. 11E are explanatory diagrams illustrating various forms that the second block can take.
  • the small rectangle shown in the figure! 3b represents a pixel, and a plurality of hatched pixels are pixels combined as a second block bb.
  • the second block is surrounded by a broken line.
  • the following description will be made assuming that four pixels in two rows and two columns are set as a second block as shown in FIG. 11A.
  • the compression information and the image data stored in the above-described color conversion / compression processing are read from the memory and decompressed as the second block. (Step S302).
  • the value of the compression information is “1”, it indicates that the image data after color conversion is compressed and stored in the memory (see FIG. 9A). Therefore, The gradation value D ata_cm read from the memory is set for the four pixels P a, P b, P c, and P d in the second block shown in FIG. 11A. In this way, the image data of the second block can be quickly decompressed from the compressed and stored image data.
  • Proc which has been stored in the compressed because it is originally Proc gradation difference is small between pixels, thus be set to the same gray scale value D a ta_ C m in all the pixels, the picture quality is degraded significantly None.
  • step S302 image data can be decompressed by a very simple method by using compression information. Therefore, it is possible to read out the compressed image data from the memory and quickly decompress the image data of the second block.
  • the first block and the second block match, but as described above, these blocks do not need to match.
  • step S304 a process of determining whether or not to form dots is performed in block units. The details of this processing will be described later using another figure.
  • a process of diffusing an error in gradation expression generated in the block by the determination to peripheral pixels is performed (step S306).
  • FIG. 12 is an explanatory view conceptually showing a state in which an error generated in a block is diffused to peripheral pixels.
  • a small rectangle shown in the figure represents a pixel, and a large rectangle shown by a broken line represents a second block.
  • the hatched blocks are blocks for which the presence or absence of a dot has been determined.
  • step S308 of FIG. 10 a process of distributing the error of the gradation expression generated in the entire block to a peripheral pixel at a predetermined ratio is performed.
  • Fig. 13 shows the ratio of distributing the error generated in the block to the surrounding pixels.
  • Fig. 13 shows the ratio of distributing the error generated in the block to the surrounding pixels.
  • FIG. 13 ⁇ shows the case of distribution to six pixels adjacent to the block where the decision was made
  • Fig. 13B shows the case of distribution to each pixel in the block adjacent to the block where the decision was made. Is shown.
  • the black arrows shown in FIG. 12 conceptually show how errors generated in the blocks are diffused to peripheral pixels according to the ratio illustrated in FIG. 13A.
  • the error thus diffused is accumulated for each pixel, and stored in the RAM I 06 of the computer 100 in a state where the error is associated with each pixel.
  • step S308: n0 If any unprocessed pixels remain (step S308: n0), the process returns to step S300 and the plot is performed. The position of the block is moved, and the above-described series of processing is performed on the set second block.
  • step S308: yes the half-toning processing shown in FIG. 10 is completed and the processing returns to the image processing shown in FIG.
  • FIG. 14 is a flowchart showing a flow of processing for determining whether or not a dot is formed on a block basis during the 81-phone processing of this embodiment.
  • one pixel (pixel of interest) for judging the presence or absence of dot formation is set from the blocks to be processed (step S40). 0). That is, as described above, since a plurality of discards are grouped into the second block, these pixels are determined one by one in a predetermined order to determine whether or not dots are formed. Choose. As shown in FIG. 11A, the second block bp is assumed to be composed of four adjacent pixels. Here, the presence or absence of dot formation is determined for these four pixels in the order of pixel Pa, pixel Pb, pixel Pc, and pixel Pd from the upper left pixel to the lower right pixel in the block. I decided to.
  • step S400 the pixel Pa at the upper left corner is set as the pixel of interest.
  • correction data Cx for the set target pixel (here, pixel Pa) is calculated (step S302).
  • the correction data C x can be obtained by adding the image data of the pixel of interest and the error diffused and stored in the pixel of interest (diffusion error).
  • the image data for each pixel of the second block being processed is shown in Fig. 10 in half! ⁇
  • step S302 during processing
  • the data stored in the memory is read out, decompressed, and stored in a register or cache incorporated in the CPU 102.
  • the diffusion error for the pixel of interest is accumulated and stored for each pixel in step S306 of FIG.
  • a process of calculating the correction data CX by adding the image data of the target pixel and the diffusion error is performed.
  • the magnitude relationship between the obtained correction data C x and a predetermined threshold th is determined (step S404). If the correction data C is larger, it is determined that a dot is formed at the pixel of interest (here, pixel Pa) (step S406). Otherwise, no dot is formed at the pixel of interest. Is determined (step S408).
  • the result of the judgment is stored in RAMI 06 as a variable indicating the judgment result for each pixel.
  • a tone error generated in the target pixel is calculated according to the determination (step S4 ⁇ 0).
  • the gradation error is obtained by correcting a gradation value (hereinafter, referred to as a result value) expressed in a target pixel by forming a dot or not forming a dot by correcting the target pixel. It can be calculated by subtracting from the data CX. If there is only one type of ink density, a negative error is usually calculated when a dot is formed, and a positive tone error is normally calculated when a dot is not formed.
  • step S 412 After calculating the gradation error generated in the pixel of interest, it is determined whether or not the processing of all the pixels in the block being processed has been completed (step S 412). If any unprocessed pixels remain (step S 4 ⁇ 2: n 0), the pixel of interest among these unprocessed pixels A process is performed to diffuse the error to surrounding pixels (step S4 14).
  • This processing will be described with reference to FIG. Fig. 15A is not shown and Fig. 15D is a diagram showing the dot on-off state for each block by selecting the target pixel one by one from the pixels in the second block being processed and judging the dot on-off state.
  • FIG. 9 is an explanatory diagram schematically showing a state of the judgment.
  • the four squares in the figure indicate the pixels P a, P b, P c, and P d that constitute the second block being processed.
  • DTa shown in the square indicating the pixel Pa indicates image data read from the memory and decompressed
  • EDa shown in the pixel Pa indicates the pixel Pa.
  • the accumulated diffusion error is shown.
  • DTb and EDb shown in the pixel Pb represent the image data and diffusion error of the pixel Pb, respectively
  • DTc and EDc in the pixel Pc represent the image data and diffusion data of the pixel Pc, respectively.
  • the error EDc, DTd and EDd in the pixel Pd indicate the image data and the diffusion error of the pixel Pd.
  • the image data of each pixel is read from the RAM 106, decompressed, and stored in a register or a cache built in the CPU 102. Immediately after the processing for the block is started, the diffusion error of each pixel is stored in RAM106.
  • the pixel Pa at the upper left in the block is set as the pixel of interest (see step S400 in FIG. 14). Then, the correction data C x for the pixel Pa is calculated, and the presence or absence of dot formation is determined by comparing the correction data C x with the threshold value th (see steps S402 and S404 in FIG. 14).
  • the diffusion error E Db stored in the pixel P b is updated to a new diffusion error ED b to which the error from the pixel P a has been added.
  • the updated diffusion error is stored in the CPU 102 register or cache. Similar processing is performed for the other pixels Pc and Pd.
  • the diffusion error ED c stored in the pixel P c and the error from the pixel P a are added, and a new diffusion error is obtained. It is stored in the pixel P c as ED c.
  • the diffusion error EDd stored in the pixel Pd and the error from the pixel Pa are added, and stored as a new diffusion error EDd in the pixel Pd.
  • the white arrows displayed from pixel P a to the other three pixels indicate that the error generated at pixel P a is diffused to these three pixels. This is shown in FIG.
  • the gradation error generated in the pixel P a is thus diffused, and the updated diffusion error of each pixel is stored in the register or cache of the CPU 102.
  • the gradation error does not necessarily need to be evenly distributed to the surrounding undetermined pixels, but can be distributed to each pixel at a predetermined ratio.
  • step S4 14 in FIG. 14 After the gradation error generated at the pixel P a has been diffused to the peripheral pixels in the block as described above, the process of step S4 14 in FIG. 14 is completed, and the process returns to step S400, where a new pixel of interest is set. Perform the setting process. Pixel P a has already been Since the presence or absence is determined, in step S400, the pixel Pb on the right of the pixel Pa is set as the target pixel. For the new pixel of interest set in this way, processing that is substantially the same as the processing described above is performed. Hereinafter, the differences from the processing at the pixel P a will be briefly described mainly.
  • the correction data C x is calculated when performing the processing for the pixel P b (step S 402).
  • the tone error previously generated in the pixel Pa is diffused and updated as a new diffusion error EDb. Therefore, by adding the image data DTb for the pixel Pb and a new diffusion error EDb obtained by diffusing the gradation error from the pixel Pa, the correction data Cx for the pixel Pb is obtained. calculate.
  • the image data DTb and the diffusion error E Db are both stored in a register or a cache in the CPU 102, they can be read out at very high speed to calculate the correction data CX.
  • step S 404 Determining the magnitude Relation correction data Xi CX and predetermined ⁇ th thus calculated (step S 404), determines to form a dot Bok the correction data evening C is greater if pixel P b towards the x (step S406), otherwise, it is determined that no dot is formed in the pixel Pb (step S408).
  • step S410 the gradation error generated for the pixel Pb is calculated (step S410).
  • the gradation error can be calculated by subtracting the result value from the correction data Cx of the pixel Pb as in the case of the pixel Pa. After calculating the gradation error generated at the pixel of interest P b, it is determined whether or not processing has been completed for all the pixels in the second block being processed (step S 4 12).
  • step S414 a process of diffusing the calculated gradation error to these unprocessed pixels is performed (step S414).
  • the image in the block Since the judgment of the element P a has already been completed, only two pixels, the pixel P c and the pixel P d, remain as undetermined pixels. Therefore, the gradation error generated at the pixel P b is diffused to these two pixels.
  • the process of diffusing the error from the pixel Pb will be described with reference to FIG. 15B.
  • FIG. 15B is an explanatory view conceptually showing a state in which the gradation error generated in the pixel Pb is diffused.
  • the hatched portion of the pixel Pa schematically indicates that the presence or absence of dot formation has already been determined for the pixel Pa.
  • two pixels Pc and Pd remain as undetermined pixels in the processing block. Therefore, as shown in FIG. 15B, the tone error generated in the pixel Pb is diffused by 12 each to the pixel Pc and the pixel Pd.
  • white arrows extending from the pixel Pb to the pixels Pc and Pd schematically indicate that the gradation error generated at the pixel Pb is diffused to these pixels. .
  • the diffusion error of each pixel is updated to a new diffusion error to which the diffused error is added, and is stored in the register or cache of the CP LM02.
  • the gradation error is assumed to be uniformly diffused to undetermined pixels in the processing block. However, it is needless to say that the error may be diffused at a predetermined rate instead of uniformly. .
  • the diffusion error ED c of the pixel P c is the error from the pixel P a and the error from the pixel P b in addition to the originally stored diffusion error.
  • the error and the error are added, updated as a new diffusion error ED c, and stored in the CPU 102 register or cache. From this, when calculating the correction data CX of the pixel Pc, a new diffusion error EDc is calculated for the image data DTc of the pixel Pc.
  • the correction data CX is calculated by adding the diffusion error EDd stored in the pixel Pd and the image data DTd of the pixel Pd (step S402).
  • the correction data CX is compared with the threshold th (step S404). If the correction data CX is larger, it is determined that a dot is formed at the pixel P d (step S406). It is determined that no dot is formed in the pixel Pd (step S408).
  • step S410 After determining the presence or absence of dot formation for the pixel Pd in this way, after calculating the gradation error generated at the pixel Pd (step S410), whether the processing of all the pixels in the block being processed has been completed? Judgment is made (step S 4 1 2). See Figure 15D. As described above, when the processing on the pixel P d is started, no undetermined pixel remains in the block being processed, and in step S 412 after the determination on the pixel P d is completed. Is determined that the processing has been completed for all the pixels in the block. Accordingly, the block-based binarization processing shown in FIG. 14 is terminated, and the process returns to the half! -One processing performed in block units described above with reference to FIG. As described above, in the half!
  • the gradation error generated in the processed second block is diffused to the surrounding blocks. Processing is performed (step S306 in FIG. 10).
  • the value of the gradation error obtained for the pixel P d in step S410 of the block-based binarization processing can be used. This is because the determination of dot formation is performed while diffusing the gradation error generated in the target pixel to undetermined pixels in the block, so that the gradation error generated in the block is the last pixel to be determined. This is due to accumulation in P d as diffusion error ED d.
  • this will be described in detail with reference to FIGS.
  • the gradation error generated at the pixel P a is diffused to three pixels P b, P c, and P d in the block being processed.
  • the presence or absence of dot formation is determined in consideration of the error from the pixel Pa so that the error diffused to the pixel Pb is eliminated as much as possible. You. It is assumed that the error diffused to the pixel Pb can be eliminated by determining the dot on-off state for the pixel Pb. In this case, a new gradation error does not occur at the pixel Pb, and no error is diffused from the pixel Pb to the pixels Pc and Pd.
  • the grayscale error generated at the pixel Pd to be determined last in the block can be used as the grayscale error generated in the entire block being processed.
  • the value of the tone error generated at the pixel P d for determining the last dot on-off state in the block being processed is used as the tone error generated in the entire block.
  • a tone error may be calculated for each pixel constituting the block, and the sum of these tone errors may be used as the tone error of the entire block.
  • the pixel Pa, the pixel Pb, the pixel Pc, the pixel P Although the determination was made in the order of d, it is not always necessary to make the determination in this order.For example, the presence / absence of dot formation may be determined in the order of the pixels P a, P c, P b, and P d. Absent.
  • the order in which the target pixels are set in the second block can be selected so that good image quality is obtained. As described above, in the image processing according to the present embodiment, whether or not an edge exists in the second block is detected based on the image data after the color conversion.
  • the image data is compressed depending on the presence or absence of an edge, and the compressed image data is temporarily stored in a memory.
  • necessary image data is read from the memory, and halftone processing is performed for each block. If halftone processing can be performed on a block basis, for each pixel in the block, processing to diffuse errors or calculate correction data CX to determine whether or not dots are formed can be performed quickly.
  • the half I-one processing can be speeded up. Further, if the half I-one processing is performed in units of blocks, the processing is likely to be complicated.
  • the image data is compressed and stored in the memory, and read out as necessary to read the half-I I'm working on it.
  • the image data (the image data after the color conversion) to be subjected to the half-one processing is compressed, the operation of writing to and reading from the memory can be performed very quickly.
  • the image processing of the present embodiment since the image data is compressed according to the presence or absence of an edge in the block, the compression and decompression of the image data can be performed very quickly and efficiently. That is, if no edge is detected in the block, the image data is compressed by representing the grayscale value of each pixel in the block by the average grayscale value, and the average grayscale value is decompressed for each pixel when decompressing. Set the key value.
  • the image data is not compressed.
  • a practically sufficient compression ratio can be secured for the entire image data. This is due to the fact that unless you set the blocks to be extremely large, not many blocks are detected for edges, and the compression ratio is high for blocks where no edges are detected. Since compression and decompression are performed according to the presence or absence of the edge in this way, both compression and decompression can be performed very quickly. As described above, according to the image processing of the present embodiment, the processing speed of the entire image processing can be improved without complicating the processing.
  • the edge detection is performed based on the image data after the color conversion.
  • the process of detecting the edge can be simplified.
  • FIG. 16 is a flowchart showing the flow of the color conversion / compression processing of the second embodiment.
  • differences from the first embodiment will be mainly described with reference to flowcharts.
  • first, adjacent pixels are grouped by a predetermined number to generate a first block (step S500).
  • the first block is described as being composed of four pixels arranged in two rows and two columns as shown in FIG. 6A. After generating the first block, for each pixel between predetermined pixels in the block
  • a process of calculating the gradation difference of the RGB image is performed (step S502). That is, as shown in FIG. 8A, for each of the RGB colors, between pixel Pa and pixel Pb, between pixel Pa and pixel Pc, and between pixel Pa and pixel Pd, respectively. It calculates the gradation difference.
  • the tone difference for each of the colors C, M, 1, and 1 ′ obtained by performing color conversion on the RGB image data is calculated as described above.
  • the second embodiment is significantly different in that the tone difference is calculated for each of the RGB colors before the color conversion. Based on the tone difference calculated in this way, a process of determining the presence or absence of an edge in the block is performed (step S504).
  • step S502 if at least one of the gradation differences of the RGB colors calculated between the predetermined pixels is larger than the predetermined threshold, it is determined that the block includes an edge. I do. Conversely, if any of the gradation differences is smaller than the threshold value, it is determined that the block does not include an edge. If no edge is included (step S504: no), the RGB image data in the block is compressed (step S506), and the compressed RGB image data is stored in the CM YK colors. Color conversion into image data (step S508). The compression of the RGB image data is performed by calculating the average value of the image data for each pixel included in the first block for each color.
  • the R image data has the gradation Compressed to the value Rave.
  • R ave (R a + R b + R c + R d) / 4
  • the gradation values of the G image data of the pixels P a P b, P c, and P d in the block are defined as G a, G b, G c, and G d.
  • the gradation values of the B image data are B a, B b, B c, and B d
  • the G image data is compressed to the gradation value G ave
  • the B image data has the gradation value B Compressed to ave.
  • G ave (G a + G b + G c + G d) / A
  • the RGB image data (R ave, G ave, B ave) compressed in this way is subjected to color conversion with reference to the LUT shown in FIG.
  • the color conversion is performed after the RGB image data is compressed in this manner. Therefore, it is not necessary to perform the color conversion for each pixel, and the color conversion is performed quickly. can do.
  • the RGB image data between pixels have almost the same gradation value, so the gradation of each color of CMYK obtained by color conversion of the RGB image data for each pixel is obtained. The values are considered to be almost the same. Therefore, for these blocks, the compressed R Even if color conversion is performed on GB image data, the image quality hardly deteriorates.
  • step S504 determines whether there is an edge in the block. If it is determined in step S504 that there is an edge in the block (step S504: yes), the RGB image data is color-converted into CM YK image data for each pixel included in the block. (Step S510).
  • all the gradation differences between the predetermined pixels in the block are calculated once for each color (step S502), and then, in step S504, the calculated gradation difference is compared with the threshold. It has been described that the presence or absence of an edge is detected. However, this is because the explanation is simplified for the sake of convenience of understanding, and it is not always necessary to calculate all the gradation differences in the block.
  • step S510 Processing may be performed.
  • the compression information when no edge exists in the first block (when the compressed RGB image data is subjected to color conversion), a value “1” indicating that the image data is compressed is stored. .
  • a value “0” indicating that image data is not compressed is stored as compression information.
  • the edge detection and the image data compression are performed for each of the colors C, M, ⁇ , and K, the compression state is changed depending on the color even within the same block. Different cases can occur. Therefore, compression information is set and stored for each block and for each color.
  • the edge detection and the compression are performed in block units, if the blocks are the same, the compression state is the same for each of the CMYK colors. Therefore, it is also possible to set and store compression information one by one for each block.
  • step S5 14 it is determined whether or not unprocessed pixels remain (step S5 14). If any unprocessed pixels remain (step S514: no), the process returns to step S500 to generate a new block, and performs a series of subsequent processes for each pixel in this block. .
  • step S5 ⁇ 4: yes the color conversion compression processing of the second embodiment shown in FIG. 16 is completed, and the processing returns to the image processing of FIG.
  • color conversion / compression processing of the second embodiment for a block having no edge, color conversion need only be performed once. Therefore, the color conversion according to the first embodiment in which color conversion is performed for all pixels in the block. Processing can be faster than compression processing.
  • the tone difference for each RGB color is calculated, and if even one tone difference larger than the threshold is found, the next process is performed without calculating the remaining tone difference. You can start. Also in this regard, the color conversion / compression processing of the second embodiment can achieve higher processing speed than the color conversion / compression processing of the first embodiment.
  • FIG. 17 is a flowchart showing the flow of the color conversion / compression processing of the third embodiment.
  • step S600 when the color conversion and compression processing is started, first, adjacent pixels are grouped by a predetermined number to generate a first block (step S600).
  • the first block will be described as being composed of four pixels arranged in two rows and columns as shown in FIG. 6A.
  • step S602 a gradation difference of RGB image data for each pixel is calculated between predetermined pixels in the block
  • step S602 a process of detecting an edge is performed.
  • step S604 This processing is similar to steps S502 and S504 in the second embodiment.
  • a gradation difference is calculated for each of the RGB colors between predetermined pixels in a block, and is compared with a predetermined threshold. If a tone difference larger than the threshold value is found, it is determined that the block includes an edge. Conversely, all tone differences are smaller than the threshold It is determined that the block for which is confirmed does not include an edge. If it is determined that no edge exists in the block (step S604: no), the RGB image data in the block is compressed (step S606), as in the second embodiment described above. Perform color conversion of the converted RGB image data (Step S608)
  • step S604 if it is determined that an edge exists in the block (step S604: yes), the RGB image data of each pixel is color-converted into C, M, ⁇ , and K image data (Step S610).
  • a gradation difference between predetermined pixels in the block is calculated for each color (step S612), and the presence or absence of an edge in the block is determined for each color. (Step S 6 1 4). That is, if any of the gradation differences between the predetermined pixels is smaller than the predetermined threshold value, it is determined that no edge exists in the block for the color.
  • step S 614: n 0 a process of compressing the image data in the block is performed (step S 614: n 0).
  • step S 614: n 0 the image data is compressed by calculating the average gradation value of each pixel in the block for the color to be compressed, and dividing the gradation value of each pixel by the average gradation value. It is done by representing.
  • the process of compressing image data in the block is skipped.
  • the presence / absence of an edge in a block is detected, and processing for compressing image data according to the presence / absence of an edge is performed.
  • the image data is stored in a memory, that is, RAM 106 together with compression information.
  • a writing process is performed (step S618).
  • the compression information “1” is written for colors that are compressing image data, and “0” is written for colors that are not compressed.
  • step S620 n0
  • the process returns to step S600 to generate a new block, and performs a series of subsequent processes for each pixel in this block. Do.
  • step S620: yes the color conversion / compression processing of the third embodiment shown in FIG. 17 is ended, and the processing returns to the image processing of FIG. .
  • the color conversion / compression processing of the third embodiment described above the presence / absence of an edge is detected based on the image data before color conversion, and for blocks that do not include an edge, the RGB image data is compressed. And then color convert.
  • a gradation difference between predetermined pixels shown in FIG. 8 is calculated.
  • the gradation difference calculated for detecting the edge is not limited to the gradation difference between the predetermined pixels shown in FIG.
  • a gradation difference between the pixel P a and the pixel P d and a gradation difference between the pixel P b and the pixel P c may be calculated.
  • Fig. 18B unless a narrow edge with a width of 1 pixel crosses the inside of the book obliquely, calculating the difference between the two gradations will make the block Edge can be detected correctly.
  • the average gradation value of each pixel in the block is calculated, and the gradation value of each pixel is compressed to the average gradation value. It has been described as a contraction. However, for simplicity, instead of the average gradation value, it may be compressed to the gradation value of one pixel in the block.
  • the grayscale value of the pixel Pa shaded in the figure is the grayscale value of another pixel in the block. May be represented. For blocks with no edges, the grayscale values of each pixel are nearly similar, so it is possible to substitute the average grayscale value with the grayscale value of one pixel.
  • the pixel that uses the gradation value instead of the average gradation value may be a pixel at a predetermined position in the block. Alternatively, any pixel may be selected.
  • FIGS. 19A to 19D are explanatory diagrams exemplifying a state in which various compression states are switched according to the direction of the edge.
  • Figure 9A shows the case where no edge is included in the block. In this case, the image data of each pixel is compressed to one gradation value, as in the above-described various embodiments.
  • the compression information since only two compression states were available, the compression information was sufficient with ⁇ -bit data. Can take four compression states, so the compression information is 2-bit data. Therefore, for blocks that do not include edges, the value “1 1” is stored as compression information.
  • the grayscale difference between two pixels arranged in the vertical direction that is, the grayscale difference between the pixels Pa and Pc and the grayscale difference between the pixels Pb and Pd.
  • the edge runs in the block in the vertical direction. Therefore, in such a case, as shown in FIG. 19B, one block is divided into two sub-blocks, and the image data is compressed for each sub-block.
  • the compressed information at this time I will remember ⁇ 0 J as information. Furthermore, if the gradation difference between two horizontally arranged pixels is small, but the gradation difference is not necessarily small between pixels in the vertical direction or diagonal direction, the edge runs in the block in the horizontal direction. It is thought that it is. Therefore, in such a case, one block is divided into two sub-blocks as shown in FIG. 19C, and the image data is compressed for each sub-block. In this case, “01J is stored as the compression information. If it does not correspond to any of the cases, as shown in Fig. 19D, the image data is directly stored in the memory without being compressed. The compression information at this time stores “0 0” indicating that the image data is not compressed.
  • the present invention is not limited to all the embodiments described above, and can be implemented in various modes without departing from the gist of the invention.
  • a software program for realizing the above-described functions may be supplied to a main memory or an external storage device of a computer system via a communication line and executed.
  • a software program for realizing the above-described functions may be supplied to a main memory or an external storage device of a computer system via a communication line and executed.
  • it may be one that reads and executes a software program stored on a CD-ROM or a flexible disk.
  • the image-to-data conversion process including the half! -In process has been described as being executed in the computer. However, part or all of the image data conversion process is performed on the printer side or It may be executed by using a dedicated image processing device.
  • INDUSTRIAL APPLICABILITY The present invention is not limited to an image display device that forms an ink dot on a print medium and prints an image.
  • liquid crystal display device that expresses an image in which the gradation changes continuously. It can be used not only as a pudding machine itself, but also in facsimile machines, multifunction machines with scanner pudding machines, and copiers.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Facsimile Image Signal Circuits (AREA)
  • Image Processing (AREA)
  • Color Image Communication Systems (AREA)
  • Compression Of Band Width Or Redundancy In Fax (AREA)
  • Color, Gradation (AREA)

Abstract

本発明は、カラー画像データをドット形成有無により表現されたデータに迅速に変換することを目的とする。隣接する複数の画素を第1種のブロックとしてまとめ、誤差拡散法を適用して行うドット形成有無の判断を、ブロック単位で行う。かかる判断に用いられる色変換後の画像データは、ブロック内でのエッジの有無に応じて圧縮された状態で一旦メモリに記憶しておき、必要に応じてメモリから読み出しながらドット形成の有無を判断する。こうすれば、ブロック単位で行うドット形成有無の判断が複雑化することを避けつつ、迅速に判断することができる。また、画像データはエッジの有無に応じて圧縮されているので、メモリに対して迅速に読み書きし、更に迅速に解凍することができる。このため、カラー画像データを色変換して、ドットの形成有無により表現されたデータに変換する処理を、処理内容を複雑化させることなく、迅速に行うことが可能となる。

Description

明細書
カラー画像データの変換を行なう画像処理装置、 および画像処理方法 技術分野
この発明は、 カラー画像データを変換する技術に関し、 詳しくは、 第 1の表色 系による画像デ一夕を第 2の表色系の画像データに色変換した後、 該色変換後の データを、 ドッ卜形成の有無による表現形式の画像データに変換する技術に関す る。 背景技術
インクジエツ卜プリン夕など、 印刷媒体上にドッ卜を形成して画像を印刷する 印刷装置は、 コンピュータやデジタルカメラなどの画像機器の出力装置として広 く使用されている。 また近年では、 液晶や有機 L E Dなどの画面上に輝点を形成 して画像を表示する様々な出力装置も使用され始めており、 今後は、 広く使用さ れるようになるものと者えられる。 コンピュータやデジタルカメラ上の画像を、 これら出力装置を用いて表示する ためには、 画像データに、 色変換処理およびハーフ i ^一ン処理と呼ばれる画像処 理を施しておく必要がある。 これは、 画像データを作成する側 (コンピュータな ど) と画像データに基づいて画像を表示する側 (印刷装置など) とで、 カラー画 像データの表現方法が以下のように異なっているためである。 先ず、 コンピュータなどの画像処理を行なう装置と印刷装置などの画像出力を 行なう装置とでは、 色相を表現するための方式が異なっている。 すなわち、 コン ピュー夕などでは、 R (赤色)、 G (緑色)、 B (青色) を発色する素子を組み 合わせて色相を表現するのに対して、 印刷装置では C (シアン色)、 M (マゼン 夕色)、 Y (イエロ色) のインク、 即ち他の色の光を吸収するインクの組み合せ を用いて色相を表現する。 このように、 R G B各色を用いた色相の表現形式は R G B表色系と呼ばれることがある。 これに対して、 C M Yの各色を基本として用 いた色相の表現形式は C M Y表色系と呼ばれることがある。 また、 液晶や有機 L E Dなど、 コンピュータなどと同じく R G B表色系を採用している場合でも詳し く見れば、ほとんどの場合は、 R G B各色の色目が微妙に異なっている。従って、 同じ R G B表色系を採用している場合でも、 色目の違いを補正するために、 カラ —画像データの変換が必要となる。 このように、 コンピュータやデジタルカメラ などのカラー画像を正しい色相で表現するためには、 コンピュータなどの画像処 理装置側で採用されている表色系により表現されたカラー画像デ一夕を、 印刷装 置などの側で採用されている表色系によるカラー画像デー夕に変換する必要があ る。 色変換処理とは、 こうした変換を行う処理である。 また、 コンビユー夕などの画像処理装置と印刷装置などの出力装置とでは、 階 調の表現方法も異なっている。 すなわち、 コンピュータなどでは、 画像の最小単 位である画素が、 それ単独で多階調を表現可能であり、 例えば〗バイ卜の画像デ 一夕であれば、 個々の画素が単独で 2 5 6階調を表現することが可能である。 こ れに対して、 印刷装置や画像表示装置では、 基本的には、 ドットまたは輝点を形 成するか否かの 2つの状態しか取り得ず、 従って、 ドットや輝点の形成密度を変 えることによって擬似的に階調を表現する方法が主に用いられる。このことから、 画素毎に多階調を表現可能な画像データ (階調画像データ) を、 擬似的に階調を 表現した画像データ (擬似階調画像データ) に変換する処理が必要となる。 ハー フトーン処理とは、 こうした変換を行う処理である。 ハーフ I ^一ン処理の手法には種々の手法が提案されているが、代表的なものに、 誤差拡散法と呼ばれる手法がある。 誤差拡散法は、 着目画素にドットを形成した こと、 あるいはドッ卜を形成しなかったことによって生じる階調表現の誤差を、 着目画素周辺の未判断画素に拡散して記憶しておき、 未判断画素についてのドッ 卜形成有無を判断するにあたっては、 周辺画素から拡散されてきた誤差を解消す るように、 ドットの形成有無を判断する手法である。 誤差拡散法では、 このよう に周辺画素で発生した階調表現の誤差を解消しながらハーフ I ^一ン処理を行うた めに、 変換により発生する誤差を抑制して画像データを精度良く変換することが 可能である。 もっとも、 誤差拡散法では、 誤差を周辺の画素に拡散するたびに、 メモリに対する読み出しおよび書き込みが発生するため、 誤差拡散処理に時間が かかり、 従って、 画像の表示に時間がかかってしまう傾向がある。 ,
' -
発明の開示
この発明は、 従来技術における上述の課題を解決するためになされたものであ り、 画像処理を複雑化させることなく、 処理時間を短縮する技術を提供すること を目的とする。 上述の課題の少なくとも一部を解決するため、本発明の第 1の画像処理装置は、 次の構成を採用した。 すなわち、
—つの表色系により表現されたカラー画像データを、 他の表色系を構成する各 色についてのドッ卜の形成有無によって表現された画像データに変換する画像処 理装置であって、
第 1の表色系により表現されたカラー画像データを、 該第 1の表色系とは異な る第 2の表色系によるカラー画像データに色変換する色変換手段と、
互いに隣接する画素を所定の複数個ずつ第 1種のブロックとしてまとめて、 該 第 1種のブロック内でのエッジの有無を検出するエッジ検出手段と、
前記第 1種のプロックに含まれる各画素についての前記色変換後のカラー画像 デ一夕を、 該ブロック内にェッジが存在しない場合には圧縮した状態でメモリに 記憶する圧縮データ記憶手段と、
前記圧縮された状態で記憶されたカラー画像データを前記メモリから読み出し て解凍した後、 互いに隣接する画素を所定の複数個ずつ第 2種のプロックとして まとめる圧縮データ解凍手段と、
前記第 2種のプロックとしてまとめられたカラー画像データに基づいて、 該プ ロックに含まれる各画素についてのドッ卜の形成有無を、 前記第 2の表色系の各 色毎に該プロック単位で判断するドッ卜形成有無判断手段と
を備えることを要旨とする。 また、 上記の画像処理装置に対応する本発明の第 1の画像処理方法は、 —つの表色系により表現されたカラー画像データを、 他の表色系を構成する各 色についてのドッ卜の形成有無によって表現された画像デ一夕に変換する画像処 理方法であって、 第 1の表色系により表現されたカラー画像データを、 該第 1の表色系とは異な る第 2の表色系による力ラー画像デー夕に色変換する工程と、
互いに隣接する画素を所定の複数個ずつ第 1種のブロックとしてまとめて、 該 第 1種のプロック内でのェッジの有無を検出する工程と、
前記第 1種のブロックに含まれる各画素についての前記色変換後のカラー画像 データを、 該ブロック内にェッジが存在しない場合には圧縮した状態でメモリに 記憶する工程と、
前記圧縮された状態で記憶されたカラー画像データを前記メモリから読み出し て解凍した後、 互いに隣接する画素を所定の複数個ずつ第 2種のブロックとして まとめる工程と、
前記第 2種のブロックとしてまとめられたカラー画像デー夕に基づいて、 該ブ ロックに含まれる各画素についてのドッ卜の形成有無を、 前記第 2の表色系の各 色毎に該プロック単位で判断する工程と
を備えることを要旨とする。 かかる第 1の画像処理装置および第〗の画像処理方法においては、 ドッ卜形成 有無の判断を、 ブロック単位で行うことにより迅速に行うことができる。 ドット 形成有無を判断するための手法としては、 誤差拡散法やディザ法などの周知の方 法を適用することができる。 こうしたドッ卜形成の有無を判断するために用いら れる色変換後の画像データは、 圧縮された状態で一旦メモリに記憶されており、 必要に応じてメモリから読み出しながらドッ卜形成の有無が判断される。 このた め、 ドット形成有無の判断をプロック単位で行うにも関わらず、 処理が複雑化す ることがない。 また、 互いに隣接する画素を所定の複数個ずつ、 第 1種のプロッ クとしてまとめ、 該ブロック内でのエッジの有無を検出した後、 エッジの有無に 応じて画像データを圧縮しているので、 画像データの圧縮および解凍を迅速に行 うことができる。このように、上記の画像処理装置および画像処理方法によれば、 カラー画像データを色変換して、 ドッ卜の形成有無により表現されたデータに変 換する処理を、 処理の複雑化を伴うことなく、 迅速に行うことが可能となる。 こうした第 1の画像処理装置および画像処理方法においては、 前記第 2種のブ ロックを構成する各画素についてドッ卜形成有無を判断するに際して、 次のよう にして判断しても良い。 該第 2種のブロックを構成する複数の画素の中で、 第 1 種のブロックにエッジが含まれないとして圧縮されていた画素については、 これ ら画素のカラ一画像データを均一のデータとして扱って、 ドッ卜形成の有無を判 断することとしても良い。 ここで、 均一な画像データとしては、 これら複数の画 素の中の 1の画素についてのデ一夕を用いても良いし、 あるいはプロック内のデ 一夕の平均値を用いても良い。 第 2種のブロックを構成する画素の中、 元々、 エッジのないブロックに含まれ ているとして圧縮されていた画素については、 画像デ一夕は近い値を取るものと 考えられる。 一方、 ドット形成の有無を判断する際に、 複数の画素の画像データ を均一なデ一夕として扱うことができれば、 ドッ卜形成の有無を判断する処理の 迅速化を図ることとが可能である。 従って、 エッジが検出されないものとして圧 縮されていた画素については、 これら画素のデータを均一なデータとして扱うこ とで、 画質に悪影響を与えることなく処理を迅速化することが可能となるので好 適である。 また、 画像処理装置および画像処理方法においては、 前記第 1種のブロックに 含まれる各画素について、 色変換後のカラー画像デ一夕に基づいてエッジの有無 を検出し、 該ブロック内でのエッジの有無に応じて、 色変換後のカラー画像デー 夕を圧縮して前記メモリに記憶することとしても良い。 メモリに記憶されるカラ一画像デー夕は色変換後の画像デー夕であるから、 こ うして色変換後の画像データに基づいてェッジを検出し、 画像データを圧縮して やれば、 第 2の表色系を構成する各色毎に確実にエッジを検出して圧縮すること が可能となるので好ましい。 あるいは、 前記第 1種のブロックに含まれる各画素について、 色変換前のカラ 一画像データに基づいてエッジの有無を検出し、 エッジの検出されなかったプロ ックについては、色変換前の画像データを圧縮することとしても良い。こうして、 圧縮後のカラー画像データを色変換し、 得られた画像データを前記メモリに記憶 する。 こうすれば、 エッジの検出されなかったブロックについては、 該ブロックに含 まれる画素をまとめて色変換することができるので、 それだけ迅速に色変換を行 うことができ、 延いては画像処理を迅速に行うことが可能となる。 更に、 色変換前のカラー画像データに基づいてエツジの存在が検出された前記 第 1種のプロックについては、 色変換後のカラー画像データに基づいて再びエツ ジの有無を各色毎に検出することとしても良い。 そして、 該エッジの検出結果に 応じて、 色変換後のカラー画像デ一夕を圧縮した後、 該圧縮した画像データを前 記メモリに記憶する。 こうすれば、 色変換前に圧縮されなかったカラー画像データについても、 色変 換後の画像データに基づいて圧縮することができるので、 画像データの圧縮率を 向上させることができる。 その結果、 色変換後のカラー画像データを、 前記メモ リに対して迅速に読み書きすることが可能となり、 延いては画像処理を高速化す ることができるので好ましい。 上述した第 1の画像処理装置および画像処理方法においては、 前記第 1種のプ 口ック内でェッジが検出されなかった場合は、 該ブロック内に含まれる複数画素 の画像データを、 1画素分の画像データに圧縮して記憶することとしても良い。 また、 かかる圧縮に際しては、 複数画素の中から 1の画素を選択して、 選択した 画素の画像データに圧縮しても良いし、 あるいは、 複数画素についての画像デ一 夕の平均値を算出して、 複数画素分の画像データを得られた平均値に圧縮するこ ととしても良い。 こうした方法によれば、 複数凾素の画像データを迅速に且つ効率よく圧縮する ことが可能であり、 また、 圧縮された画像データを迅速に解凍することが可能と なるので好適である。 あるいは、 上述した第 1の画像処理装置および画像処理方法においては、 前記 第 1種のプロック内にェッジの存在が検出された場合には、 該ブロックをエッジ を含まないサブブロックに分割し、 該サブブロックに含まれる画素について前記 色変換後の画像データを圧縮した後、 該圧縮された画像データを前記メモリに記 憶することとしても良い。 こうして前記第 1種のブロック内にエッジが検出された場合には、 サブブロッ ク単位でカラー画像データを圧縮してやれば、 画像データの圧縮率を更に向上さ せることが可能となり、 延いては、 画像処理を高速化することが可能となるので 好ましい。 更に、 こうした各種の画像処理装置および画像処理方法においては、 色変換後 のカラー画像データを圧縮された状態で前記メモリに記憶するとともに、 該画像 デー夕が圧縮されている状態を表す圧縮情報も、 該メモリに記憶することとして も良い。 こうして圧縮された画像デ一夕とともに、 圧縮情報を記憶しておけば、 画像デ —夕を簡便に解凍することが可能となるので好ましい。 また、 上述した第 1の画像処理装置および画像処理方法においては、 画像デー 夕を圧縮する際に用いられる前記第 1種のブロックと、 ドッ卜形成有無を判断す る際に用いられる前記第 2種のプロックとを、 同一のプロックとしても良い。 前記第 1種のブロックと前記第 2種のプロックとを同一のプロックとしておけ ば、 圧縮されたカラ一画像データを前記メモリから読み出して解凍する処理を簡 素なものとすることができる。 このため、 画像処理を迅速に行うことが可能とな るので好適である。 特に、 前記第 1種のブロックおよび前記第 2種のブロックを、 いずれも 2行 2 列に配列された 4つの画素から構成することとしても良い。 これらブロックに含まれる画素があまりに多くなると、 エッジが含まれる確率 が高くなつたり、 画像処理が複雑となる。 かといつて、 ブロックに含まれる画素 があまりに少ないのでは、 ブロック内のカラー画像データを圧縮しても、 データ 量がそれほど小さくならず、 また、 ドット形成有無の判断をブロック単位で行う ことによるメリツ卜も小さいので、 画像処理を十分に迅速化することが困難とな る。 こうした観点から、 2行 2列に配列された 4つの画素を第 1種のブロックお よび第 2種のブロックとしてまとめてやれば、画像処理を複雑化させることなく、 処理速度を効果的に向上させることができる。 また、 上述した課題の少なくとも一部を解決するために、 本発明の第 2の画像 処理装置は、 次の構成を採用した。 すなわち、 一つの表色系により表現された力 ラー画像データを、 他の表色系を構成する各色についてのドッ卜の形成有無によ つて表現された画像データに変換する画像処理装置であって、
第 1の表色系により表現されたカラー画像データを、 該第 1の表色系は異なる 第 2の表色系によるカラー画像デ一夕に色変換する色変換手段と、
互いに隣接する画素を所定の複数個ずつ第 1種のブロックとしてまとめて、 該 第 1種のブロック内でのェッジの有無を検出するエツジ検出手段と、
前記第 1種のブロックに含まれる各画素についての前記色変換後のカラ一画像 データを、 該プロック内にエッジが存在しない場合には圧縮した状態で記憶する 圧縮データ記憶手段と、 前記圧縮された状態で記憶された力ラー画像データを 前記メモリから読み出して解凍する圧縮画像データ解凍手段と、
前記解凍されたカラー画像データに基づいて、 前記第 2の表色系の各色毎にド ッ卜の形成有無を判断するドッ卜形成有無判断手段と
を備えることを要旨とする。 また、 上記の画像処理装置に対応する本発明の第 2の画像処理方法は、 一つの 表色系により表現されたカラー画像データを、 他の表色系を構成する各色につい てのドッ卜の形成有無によって表現された画像データに変換する画像処理方法で あって、
第 1の表色系により表現されたカラー画像データを、 該第 1の表色系とは異な る第 2の表色系によるカラー画像データに色変換する工程と、
互いに隣接する画素を所定の複数個ずつ第 1種のブロックとしてまとめて、 該 第 1種のブロック内でのエッジの有無を検出する工程と、
前記第 1種のブロックに含まれる各画素についての前記色変換後のカラー画像 デ一夕を、 該ブロック内にェッジが存在しない場合には圧縮した状態でメモリに 記憶する工程と、 前記圧縮された状態で記憶されたカラー画像デー夕を前記メ モリから読み出して解凍する工程と、
前記解凍されたカラー画像データに基づいて、 前記第 2の表色系の各色毎にド ッ卜の形成有無を判断する工程と
を備えることを要旨とする。 こうした第 2の画像処理装置および画像処理方法においても、 色変換後の画像 データを圧縮された状態で一旦メモリに記憶しておく。 そして、 ドット形成の有 無を判断する際には、 必要に応じてメモリから読み出したデータを解凍しながら 判断する。 こうすれば、 カラー画像データを色変換して、 ドットの形成有無によ り表現されたデ一夕に変換する処理を、 処理の複雑化を伴うことなく、 迅速に行 うことが可能となる。 更に本発明は、 上述した画像処理を実現するためのプログラムをコンピュータ に読み込ませることにより、 コンピュータを用いて実現することも可能である。 従って、 本発明は、 上述した第 1, 第 2の画像処理方法に対応するプログラムや 記録媒体としても把握することができる。 こうしたプログラム、 あるいは記録媒体に記憶されているプログラムをコンビ ユー夕に読み込ませ、 該コンピュータを用いて上述の各種機能を実現すれば、 画 像処理を複雑化することなく、 迅速にカラー画像データを変換することが可能と なる。
図面の簡単な説明
図 1は、 本発明の概要を例示した印刷システムの概略構成図である。
図 2は、 本実施例の画像処理装置としてのコンピュータの構成を示す説明図 である。
図 3は、 本実施例の画像表示装置としてのプリンタの概略構成図である。 図 4は、 本実施例の画像処理装置で行われる画像処理の流れを示すフローチ ヤー卜である。
図 5は、第 1実施例の色変換。圧縮処理の流れを示すフローチヤ一卜である。 図 6 Aおよび図 6 Bは、 複数個の画素をまとめて第 1のブロックを設定して いる様子を示す説明図である。
図 7は、 色変換のために参照される色変換テーブルを概念的に示した説明図 である。
図 8 Aおよび図 8 Bは、 プロック内で所定画素間の階調差を算出することに よりエツジの有無を検出する様子を概念的に示した説明図である。
図 9 Aおよび図 9 Bは、 エッジの有無に応じてプロック内の画像データを圧 縮し、 メモリに記憶する様子を概念的に示した説明図である。
図 1 0は、 ブロック単位で行うハーフトーン処理の流れを示すフローチヤ一 卜である。
図 1 1 Aないし図 1 1 Eは、 ブロック単位で行うハーフ卜一ン処理において 設定される第 2のブロックを例示した説明図である。
図 1 2は、 ハーフ ! ^一ン処理において処理したブロックで発生した誤差を周 辺の画素に拡散する様子を概念的に示した説明図である。
図 1 3 Aおよび図 1 3 Bは、 プロック全体で生じた階調誤差を周辺の画素に 拡散する際の拡散比率を例示した説明図である。
図 1 4は、 ブロック単位で行うハーフ! ^一ン処理中でブロック内の各画素に ついて 2値化を行う処理の流れを示したフローチヤ一卜である。
図 1 5 Aないし図 1 5 Dは、 ブロック単位で行うハーフトーン処理中でプロ ック内の各画素について 2値化を行う様子を概念的に示した説明図である。
図 1 6は、 第 2実施例の色変換■圧縮処理の流れを示すフローチャートであ る。
図 1 7は、 第 3実施例の色変換 ·圧縮処理の流れを示すフローチャートであ 図 1 8 Aおよび図 1 8 Bは、 プロック内でエッジを検出しながら圧縮を行う 変形例を概念的に示した説明図である。
図 1 9 Aないし図 1 9 Dは、 エッジの状態に応じてブロックをサブブロック に分割しながら画像デー夕を圧縮する変形例について示した説明図である。 発明を実施する最良の形態
本発明の作用 ·効果をより明確に説明するために、 本発明の実施の形態を、 次 のような順序に従って以下に説明する。
A . 実施の態様:
B . 第 1実施例:
B— 1 . 装置構成:
B— 2 . 画像処理の概要:
B - 3 . 第 1実施例の色変換 ·圧縮処理:
B— 4 . ハーフトーン処理の概要: C . 第 2実施例:
D . 第 3実施例:
E . 変形例: に 実施の態様:
実施例の詳細な説明を開始する前に、 理解の便宜から、 発明の実施の態様につ いて簡単に説明しておく。 図 1は、 印刷システムを例にとって、 本発明の実施の 態様の概略構成を例示した説明図である。 本印刷システムは、 画像処理装置】 0 と、 カラープリンタ 2 0等から構成されている。 画像処理装置 1 0は、 予め用意 された画像処理用のソフトウェアが実行されるコンピュータであり、 デジ夕ルカ メラやカラースキャナなどの画像機器から R G Bカラー画像の階調画像データを 受け取ると、 該カラ一画像データに所定の画像処理を施すことによリ、 力ラープ リン夕 2 0で印刷可能な各色ドッ卜の形成有無によリ表現された印刷データに変 換する。 かかる画像処理は、 プリン夕ドライバ 1 2と呼ばれる専用のプログラム を用いて行われる。 尚、 R G Bカラー画像デ一夕は、 各種アプリケーションプロ グラムを用いて画像処理装置 1 0自体で作成することもできる。 図 1 に例示のプリンタドライバ 1 2は、 色変換■圧縮モジュール、 エッジ検出 モジュール、 ハーフトーンモジュールなどの複数のモジュールから構成されてい る。 色変換■圧縮モジュールは、 解像度が変換された R G B画像データを受け取 リ、 これをカラ一プリン夕 2 0が形成可能なドットの色、 すなわちシアン (C ) 色、 マゼン夕 (M ) 色、 イエロ (Y ) 色の各色、 あるいはこれに黒 (K ) 色を加 えた各色により表現された C M Y画像デ一夕に色変換する。 色変換に先立って、 画像デ一夕の解像度をカラープリン夕 2 0が印刷するための解像度に変換してお くなど、 必要に応じて前処理を施しておくこととしても良い。 色変換後の画像デ 一夕 (ま、 隣接する画素を所定の複数個ずつプロックとしてまとめて圧縮した後、 このデータをメモリに記憶する。 あるいは、 後述するように色変換前に圧縮して おき、 圧縮した状態で色変換することとしてもよい。 画像データの圧縮に際して は、 ブロック内にエッジが存在するか否かを検出し、 この検出結果に応じて圧縮 する。 エッジの検出は、 エッジ検出モジュールによって行われる。 エッジの検出 結果に応じた圧縮の詳細については、 後述の各実施例において説明する。 ハーフ I ^一ンモジュールは、 圧縮して記憶されている画像デ一夕をメモリから 読み出して、 隣接する画素を複数個ずつブロックとしてまとめた後、 ブロック内 に含まれる各画素についてドットの形成有無をブロック単位で行う。 ここで、 ノヽ ーフトーンモジュールが生成するブロックは、 色変換■圧縮モジュールが生成す るプロックと同一である必要はなく、 例えば、 ハーフトーンモジュールが生成す るプロックと色変換。圧縮モジュールが生成するブロックとで、 画素数を異なら せることも可能である。 また、 ドットの形成有無をブロック単位で行う方法につ いても、 後述する方法を初めとして種々の方法を適用することができる。 こうし て、 色^換によって生成した各色の画像データにハーフ 1 ^一ン処理を加えた後、 得られたデータを印刷デ一夕としてカラ一プリンタ 2 0に出力する。 カラープリ ン夕 2 0への出力に先立って、 プリン夕がドッ卜を形成する順番を考慮してデー 夕の順番を並べ替えるなど、 必要に応じて後処理を施すこととしてもよい。 カラ 一プリンタ 2 0は、 こうして得られた印刷データに基づいて、 印刷媒体上に各色 インクドッ卜を形成することによってカラー画像を印刷する。 以上に説明した画像処理装置は、 色変換後の画像データを圧縮してメモリに一 旦記憶しておき、 画像デー夕を必要に応じてメモリから読み出して解凍してから ハーフ ! ^一ン処理を行う。 ハーフ ! ^一ン処理は複数画素ずつブロック単位で行つ ているので、 迅速な処理が可能である。 また、 ハーフ ! ^一ン処理では、 必要に応 じて画像デー夕をメモリから読み出して処理しているので、 ブロック単位で処理 を行うにも関わらず、 ハーフ ! ^一ン処理を大幅に簡素化することができる。 もち ろん、 画像データを圧縮したり解凍する処理や、 画像データをメモリに対して読 み書きする処理が新たに発生するが、 後述するように、 ブロック内でのエッジの 有無に応じて圧縮することとすれば、 極めて迅速に画像データを圧縮および解凍 することが可能である。また、こうして圧縮された画像データを扱うことにより、 メモリへの読み書きも極めて迅速に行うことができる。 このため、 本発明の画像 処理によれば、 処理内容を簡素化しつつ、 画像処理全体としての処理速度を向上 させることが可能となるのである。以下では、こうした画像処理の詳細について、 実施例に基づき説明する。
B . 第 1実施例:
B— 1 . 装置構成:
図 2は、 本実施例の画像処理装置としてのコンピュータ〗 0 0の構成を示す説 明図である。 コンピュータ Ί 0 0は、 C P LM 0 2を中心に、 R O M 1 0 4や、 上述のメモリとして使用される R A M 1 0 6などを、 バス 1 1 6で互いに接続し て構成された周知のコンピュータである。 C P U 1 0 2には、演算器やレジスタ、 キャッシュなどが搭載されている。 レジス夕やキャッシュは、 データを記憶する 点では R A M I 0 6と同じメモリの一種であるが、 R A M I 0 6に比べてデータ を遙かに高速に読み書きすることができる。 コンピュータ 1 0 0には、 フレキシブルディスク 1 2 4ゃコンパク卜ディスク 1 2 6のデータを読み込むためのディスクコントローラ D D C 1 0 9や、 周辺機 器とデータの授受を行うための周辺機器インターフェース(以下、 P I Fという) 1 0 8、 C R T ! 1 4を駆動するためのビデオインタ一フェース (以下、 V I F という) 1 1 2等が接続されている。 P I F 1 0 8には、 後述するカラープリン 夕 2 0 0や、 ハードディスク 1 1 8等が接続されている。 また、 デジタルカメラ 1 2 0やカラースキャナ 1 2 2等を P I F 1 0 8に接続すれば、 デジタルカメラ 1 2 0やカラースキャナ 1 2 2で取り込んだ画像を印刷することも可能である。 また、 ネットワークインターフェースカード N I C 1 1 0を装着すれば、 コンビ ユー夕 1 0 0を通信回線 3 0 0に接続して、 通信回線に接続された記憶装置 3 1 0に記憶されているデータを取得することもできる。 図 3は、 第 1実施例のカラープリンタ 2 0 0の概略構成を示す説明図である。 カラ一プリン夕 2 0 0はシアン, マゼン夕, イエロ, プラックの 4色インクのド ッ卜を形成可能なインクジェットプリン夕である。 もちろん、 これら 4色のイン クに加えて、 染料濃度がシアンインクに対して約 1 / 4程度と低いシアン (淡シ アン) インクと、 同様に染料濃度の低いマゼンタ (淡マゼン夕) インクとを含め た合計 6色のインクドッ卜を形成可能なインクジエツ卜プリン夕を用いることも できる。 カラープリンタ 2 0 0は、 図示するように、 キャリッジ 2 4 0に搭載された印 字へッド 2 4 1を駆動してインクの吐出およびドッ卜の形成を行う機構と、 この キャリッジ 2 4 0をキヤリッジモータ 2 3 0によってプラテン 2 3 6の軸方向 (以下、 主走査方向という) に往復動させる機構と、 紙送りモータ 2 3 5によつ て印刷用紙 Pを主走査方向とは直交する方向 (以下、 副走査方向という) に搬送 する機構と、 ドッ卜の形成やキヤリッジ 2 4 0の移動および印刷用紙の搬送を制 御する制御回路 2 6 0とから構成されている。 キヤリッジ 2 4 0には、 ブラックインクを収納するインクカートリッジ 2 4 2 と、 シアンインク, マゼンタインク, イエロタインクの各種インクを収納するィ ンクカートリッジ 2 4 3とが装着されている。 キヤリッジ 2 4 0にインクカー卜 リッジ 2 4 2, 2 4 3を装着すると、 カートリッジ内の各インクは図示しない導 入管を通じて、 印字へッド 2 4 1の下面に設けられた各色毎のインク吐出用へッ ド 2 4 4ないし 2 4 7に供給される。 各色毎のインク吐出用へッド.2 4 4ないし 2 4 7には、 4 8個のノズル N zが副走査方向に一定のノズルピッチ kで配列さ れたノズル列が 1組ずつ設けられている。 制御回路 2 6 0は、 C P U 2 6 1と、 R O M 2 6 2、 R A M 2 6 3等から構成 されている。 制御回路 2 6 0は、 キャリッジモー夕 2 3 0と紙送りモータ 2 3 5 とを適切に駆動する。 これによリ、 キャリッジ 2 4 0の主走査と副走査とが制御 される。 また、 制御回路 2 6 0は、 コンピュータ 1 0 0から供給される印刷デー 夕に基づいて、 各ノズルから適切なタイミングでインク滴を吐出する制御も司つ ている。 こうして、 制御回路 2 6 0の制御の下、 印刷媒体上の適切な位置に各色 のインクドッ卜を形成することによって、 カラープリン夕 2 0 0はカラー画像を 印刷することができる。 尚、 各色のィンク吐出へッドからインク滴を吐出する方法には、 種々の方法を 適用することができる。すなわち、ピエゾ素子を用いてィンクを吐出する方式や、 インク通路に配置したヒータでインク通路内に泡 (バブル) を発生させてインク 滴を吐出する方法などを用いることができる。また、インクを吐出する代わりに、 熱転写などの現象を利用して印刷用紙上にインクドッ卜を形成する方式や、 静電 気を利用して各色のトナー粉を印刷媒体上に付着させる方式のプリン夕を使用す ることも可能である。 更には、 吐出するインク滴の大きさを制御したり、 あるいは一度に複数のイン ク滴を吐出して、 吐出するインク滴の数を制御することにより、 印刷用紙上に形 成されるインクドッ卜の大きさを制御可能な、 いわゆるバリアブルドッ卜プリン 夕を使用することもできる。 以上のようなハードウエア構成を有するカラープリン夕 2 0 0は、 キヤリッジ モータ 2 3 0を駆動することによって、 各色のインク吐出用へッド 2 4 4ないし 2 4 7を印刷用紙 Pに対して主走査方向に移動させ、 また紙送りモータ 2 3 5を 駆動することによって、 印刷用紙 Pを副走査方向に移動させる。 制御回路 2 6 0 は、 印刷データに従って、 キャリッジ 2 4 0の主走査および副走査を繰り返しな がら、 適切な夕イミングでノズルを駆動してィンク滴を吐出することによって、 カラ一プリン夕 2 0 0は印刷用紙上にカラー画像を印刷している。 B - 2 . 画像処理の櫬要:
図 4は、 本実施例の画像処理装置としてのコンピュータ 1 0 0が、 受け取った 画像データに所定の画像処理を加えることによって、 画像データを印刷デ一夕に 変換する処理の流れを示すフローチャートである。 かかる画像処理は、 コンビュ 一夕 1 0 0のオペレーティングシステムがプリンタドライバ 1 2を起動すること によって開始される。 以下、 図 4に従って、 本実施例の画像処理について簡単に 説明する。 プリンタドライバ 1 2は、 画像処理を開始すると、 先ず初めに、 変換すべき R G Bカラー画像データの読み込みを開始する (ステップ S 1 0 0 )。 次いで、 取 リ込んだ画像データの解像度を、 カラープリン夕 2 0 0が印刷するための解像度 に変換する (ステップ S 1 0 2 )。 カラー画像データの解像度が印刷解像度より も低い場合は、 線形補間を行うことで隣接する画像データ間に新たなデータを生 成し、 逆に印刷解像度よりも高い場合は一定の割合でデータを間引くことによつ て、 画像デ一夕の解像度を印刷解像度に変換する。 こうして解像度を変換すると、カラー画像データの色変換および圧縮を行って、 圧縮後の画像デ一夕をメモリすなわち R A M 1 0 6に書き込む処理を行う (ステ ップ S 1 0 4 )。 色変換においては、 R, G, Bの階調値の組み合わせによって 表現されているカラー画像データを、 C, M, Y , Κなどのカラープリンタ 2 0 0で使用する各色の階調値の組み合わせによって表現された画像デ一夕に変換す る処理を行う。 色変換 圧縮処理の詳細については後述する。 プリン夕ドライバ Ί 2は、 色変換■圧縮処理に続いてハーフトーン処理を開始 する (ステップ S 1 0 6 )。 ハーフトーン処理とは次のような処理である。 R G Β画像デ一夕は、 色変換を施されることによって、 C , Μ , Υ , Iく各色の階調デ —夕に変換される。 これら各色の階調データは、 階調値 0から 2 5 5の 2 5 6階 調を有するデ一夕である。 これに対し、本実施例のカラープリンタ 2 0 0は、 Γド ッ卜を形成する」, 「ドットを形成しない」 のいずれかの状態しか採り得ない。 そこで、 2 5 6階調を有する各色の階調データを、 カラープリンタ 2 0 0が表現 可能な 2階調で表現された画像デー夕に変換する必要がある。 このような階調数 の変換を行う処理がハーフ ! ^一ン処理である。 後述するように、 本実施例のプリ ンタドライバ 1 2は、 圧縮された色変換済みの画像データをメモリすなわち R A M 1 0 6から読み出して、 隣接する画素を所定の複数個ずつブロックにまとめた 後、 ブロック単位でハーフ ! ^一ン処理を行う。 こうしてブロック単位で処理する ことで、 ハーフトーン処理を迅速に行うことが可能である。 ブロック単位で行う ハーフ I ^一ン処理の詳細については後述する。 こうしてハーフ I ^一ン処理を終了したら、 プリン夕ドライバはインターレース 処理を開始する (ステップ S 1 0 8 )。 インターレース処理とは、 ドットの形成 有無を表す形式に変換された画像データを、 ドットの形成順序を考慮しながら力 ラープリンタ 2 0 0に転送すべき順序に並べ替える処理である。 プリン夕ドライ バ 1 2は、 インターレース処理を行って最終的に得られた画像データを、 印刷デ 一夕としてカラープリンタ 2 0 0に出力する (ステップ S 1 1 0 )。 カラープリ ンタ 2 0 0は、 印刷データに従って、 各色のインクドッ卜を印刷媒体上に形成す る。 その結果、 画像データに対応したカラー画像が印刷媒体上に印刷される。 以上に説明した画像処理では、 色変換済みの画像データをメモリに一旦記憶し ておき、 ハーフ ! ^一ン処理に際しては、 必要な画像デ一夕をメモリから読み出し て処理している。 このため、 迅速化のためにブロック単位で処理を行っているに もかかわらず、 ハーフ I ^一ン処理が複雑化することがな 、。 画像データは圧縮さ れた状態でメモリに読み書きされるので、 色変換済みの画像デ一夕を書き込む動 作も、 ハーフ I ^一ン処理のためにメモリから読み出す動作も、 迅速に実行するこ とができる。もっとも、こうして画像デ一夕を圧縮した状態で読み書きする場合、 データの圧縮および解凍する処理が必要となるが、 以下に説明するように、 隣接 する画素を所定の複数個ずつブロックにまとめて、 ブロック内でのエッジの有無 に応じて画像データを圧縮しているので、 画像データの圧縮も解凍も極めて迅速 に行うことが可能である。 このため、 本実施例の画像処理では、 処理内容を複雑 化させることなく、 迅速な処理が可能となっている。 B— 3 . 第 1実施例の色変換■圧縮処理: 図 5は、 第 1実施例の色変換 '圧縮処理の流れを示すフローチャートである。 かかる処理は、 コンピュータ〗 00が内蔵した C P U 1 0 2の機能を用いて実行 する処理である。 以下、 フローチャートに従って説明する。 第 1実施例の色変換 ·圧縮処理を開始すると、 先ず初めに、 隣接する画素を所 定の複数個ずつまとめて、 第 1のブロックを生成する (ステップ S 2 00)。 図 6 Aおよび図 6 Bは、 複数の画素をまとめて第 1のブロックを形成している様子 を概念的に例示した説明図である。 図 6 Aは、 縦横 2列ずつの 4つの画素 P a、 P b 、 P c 、 P d をまとめることにより、 第 1のブロックを生成している様子 を示している。 また図 6 Bは、 横に並んだ 2つの画素 P a および画素 P b を、 第 1のブロックとしてまとめている様子を示している。 もちろん、 第 1のプロッ クを生成する方法は、 こうした例示に限られるものではなく、 互いに所定の位置 関係にある複数の画素をまとめて第 Ίのプロックとすることができる。 尚、 説明 の便宜から、 以下では、 第 1のプロックは、 図 6 Aに示すように 4つの画素で構 成されている場合について説明する。 第 1のブロックを生成したら、 該ブロック内の各画素について、 画像データを 色変換する処理を行う (ステップ S 2 0 2)。 今、 第 1のプロックは図 6 Aに示 すように 4つの画素で構成されているから、 これら 4つの画素の R G B画像デー 夕のそれぞれを、 C, M, Υ, K各色の階調データに変換するのである。 こうし た変換は、色変換テーブル(L o o k— U p— T a b I e、以下、 L U Tという) と呼ばれる 3次元の数表を参照することによつて迅速に行うことができる。 図 7は、 L UTを概念的に示した説明図である。 画像データが 1バイ卜データ であるとすると、 R G B各色の階調値は 0から 2 5 5の値を取りうるので、 R G B画像データは、 図 7に示すように、 直交 3軸をそれぞれ R軸, G軸, B軸とす る一辺の長さ 255の立方体の内部の座標として表すことができる。 このような 立方体を色立体と呼ぶ。 L UTは色立体を格子状に細分し、 各格子点に CMYK の各色の階調値を記憶した数表である。 図 5のステップ S 202においては、 こ のような L UTを参照することにより、 第 1のブロックを構成する各画素の RG B画像データを、 迅速に CM YKのデータに色変換する。 次いで、 色変換することによって発生した C, M, Υ, K各色の中から、 圧縮 しょうとする色を 1つ選択する (ステップ S 204)。 ついで、 選択した色の階 調値について、 第 1のブロック内の所定画素間での階調差を算出する処理を行う
(ステップ S 206)。 こうして階調差を求めておけば、 プロック内でのエッジ の有無を容易に判断することができる。 これについて、 図 8 Aおよび図 8 Bを參 照しながら説明する。 図 8 Aは、 ブロック内の所定画素間の階調差を算出する様子を概念的に示した 説明図である。 例えば、 図 5のステップ S 204において、 圧縮しょうとする色 として C色を選択したものとすると、 図 8 Aに示すように、 ブロック内の左上の 画素 P a と右上の画素 P b との間で、 C色についての階調差を算出する。 同様 に、 左上の画素 P a と左下の画素 P c との間の階調差、 および画素 P a と右下 の画素 P d との間での C色についての階調差を、 それぞれ算出する。 画素 P a と画素 P b との階調差は主走査方向 (図 8 A上では左右方向) への階調値の変 化量を示している。 同様に、 画素 P a と画素 P c との間の階調差は副走査方向 (図 8 A上では上下方向) への階調値の変化量を示し、 画素 P a と画素 P d と の間の階調差は斜め方向への変化量を示している。 エッジの部分では階調差が大 きくなつていると考えることができるから、 こうして求めた階調差が、 縦横斜め のいずれの方向についても所定の閾値以下であれば、 C色についてはプロック内 にエッジが存在しないと判断することができる。 これに対して、 いずれか一つの 方向でも、 階調差が所定の閾値より大きい場合は、 C色についてはブロック内に エッジが存在していると判断することができる。 エッジを検出する様子を、 図 8 Bに示した具体例を用いて説明する。 図 8 B中 で、 2行 4列に並んで示された 8つの小さな矩形 p pは、 それぞれが画素を示し ており、 矩形 p pの中に表示された数値は、 圧縮しょうとして選択した色 (ここ では C色) についての各画素の階調値を示している。 先ず、 図 8 Bのブロック A に着目すると、 主走査方向および副走査方向の階調差はいずれも階調値 「1」 で あり、 斜め方向への階調差は 「0」 である。 いずれの方向についても階調差は小 さく、 従ってこの様な場合は、 ブロック Aにはエッジが含まれていないと判断す ることができる。 次にプロック Bに着目すると、 主走査方向の階調差は階調値 「2」 であるが、 副走査方向の階調差は階調値 「1 8」、 斜め方向の階調差は階 調値「2 0」 と比餃的大きな値となる。従って、 闘値の値を例えば階調値「1 5」 程度に設定しておけば、 プロック B内のエッジを検出することができる。 このよ うに、 プロック内の所定画素間の階調差を検出することで、 エッジの有無を容易 に検出することができる。 そこで、 図 5のステップ S 2 0 4においては、 図 8 A に示すように、 プロック内の縦横斜め方向へのそれぞれの階調差を箅出するので ある。 こうして算出した階調差に基づいて、 ブロック内でのエッジの有無を判断する (ステップ S 2 0 8 )。 すなわち、 算出しておいた階調差と所定の閾値とを比較 して、 一つでも閾値より大きな階調差があれば該ブロック内にェッジが存在する と判断する (ステップ S 2 0 8 : y e s )。 逆に、 いずれの階調差も閾値より小 さい場合は、 そのプロック内にはエッジは存在しないと判断する (ステップ S 2 0 8 : n 0 )。 次いで、 エッジの有無に応じてプロック内の画像データを圧縮し (ステップ S 2 1 0 )、 得られた画像データをメモリに書き込む処理を行う (ステップ S 2 1 2 )。 図 9は、 この様子を概念的に示す説明図である。 図 9 Aはブロック内のェ ッジが存在していない場合の処理を示し、 図 9 Bはブロック内にエッジが存在し ている場合の処理を示している。 図中で、 縦横 2列に並んだ 4つの小さな矩形の それぞれは、 ブロックに含まれている画素を示している。 また、 各矩形の中に表 示された D ata_a 、 D ata_b 、 D ata— c 、 D ata_dは、 圧縮しょうとする色 (ここ では C色) についての各画素の階調値を表している。 ブロック内にエッジが存在しない場合は、 各画素間の階調差が小さく、 従って C色については、 いずれの画素の階調値もほぼ同じような値となっている。 そこ で、 このような場合は、 ブロック内での階調値の平均値 D ata— cmを算出して、 4つの画素の階調値 D ata— a、 D ata— b 、 D ata— c 、 D ata— dを、 階調値 D ata— cm に圧縮する。 そして、 メモリには、 階調値 Data— cm と、 階調値 Data_cmが 4画 素分の階調値を圧縮したことを表す値 「1」 とを書き込んでやる。 このように、 メモリに記憶された階調値が、何画素分の階調値に相当するかを表している値を、 本明細書では圧縮情報と呼ぶ。図 9 Aは、プロック内に含まれる 4つの階調値を、 1つの階調値 Data一 cm に圧縮して、 圧縮情報 「1」 とともにメモリに書き込ん でいる様子を概念的に表している。 これに対して、 ブロック内にエッジが存在する場合は、 各画素の階調値 D ata a 、 D ata b 、 D ata c 、 D ata dを圧縮することなく、 圧縮情報 「0」 とと もにそのまま順番にメモリに書き込んでやる。 圧縮情報 「0」 は、 ブロック内の 階調値が圧縮されておらず、従って、 4つの階調値 D ata_a、 D ata_b、 D ata_c、 D ata_dが、 ブロック内の 4つの画素 P a、 P b、 P c、 P dの階調値に対応す ることを示している。 図 9 Bは、 ブロック内に含まれる 4つの階調値を、 圧縮情 報とともにそのままメモリに書き込んでいる様子を概念的に表している。 図 5に示したステップ S 2 1 2では、ブロック内に含まれる各画素の階調値を、 ェッジの有無に応じて圧縮した後、 圧縮情報とともにメモリに書き込む処理を行 う。 こうすれば、 エッジを含むブロックについては圧縮情報を付加する分だけデ 一夕量が増加してしまうが、 エッジを含まないブロックについては、 4画素分の 階調値を 1つの階調値で表現することができるので、 全体として画像デ一夕を圧 縮することができる。 また、 圧縮情報を記憶するために要する記憶容量は、 各画 素の階調値に比べれば僅かなものである。 例えば、 図 9 A , 図 9 Bに示した例で は、 圧縮情報は 「0」 または 「1」 のいずれかの値しか採らず、 従って 1プロッ クあたリ 1 b i tの記憶容量で足りる。 このように圧縮情報を付加することによ るデ一夕量の増加はわずかなものに過ぎず、 全体としては画像デ一夕を大きく圧 縮することが可能である。 尚、 圧縮情報と階調値とをメモリに書き込むにあたっては、 本実施例では、 メ モリ上に圧縮情報を記憶するための領域と階調値を記憶するための領域とを確保 しておき、それぞれの領域に圧縮情報および階調値を書き込んでいる。もちろん、 このような方式に限られるものではなく、 例えば、 圧縮情報の後に続けて階調値 を書き込むなどして、 メモリ上の同じ領域に書き込むこととしても良い。 以上のようにして、 圧縮しようと選択した色 (ここでは C色) についての各画 素の階調値と階調値とをメモリに書き込んだら、 未選択の色が残っているか否か を判断する (ステップ S 2 1 4)。 ここでは、 まだ C色についてしか選択してい ないので、 ステップ S 2 1 4で y e sと判断する。 そして、 ステップ S 204に 戻って新たな色を選択し、 上述した一連の処理を行う。 以上のような処理を繰り 返し、 すべての色を選択し終わったら (ステップ S 2 1 4 : n 0)、 1つのプロ ックについて色変換■圧縮処理を行ったことになる。 こうして 1つのプロックについての処理が終わったら、 未処理の画素が残って いるか否かを判断する (ステップ S 2 1 6)。 そして、 未処理の画素が残ってい れぱ (ステップ S 2 1 6 : n o)、 ステップ S 200に戻って新たなブロックを 生成し、 このブロック内の各画素について、 続く一連の処理を行う。 こうしてす ベての画素についての処理を終了したら (ステップ S 2 1 6 : y e s), 図 5に 示す色変換。圧箱処理を終了して、 図 4の画像処理に復帰する。 画像処理では、 色変換 '圧縮処理 (図 4のステップ S 1 04) に続いて、 ハーフ ! ^一ン処理 (図 4のステップ S 1 06) を行う。 本実施例のハーフ [ ^一ン処理では、 圧縮された 画像デ一夕をメモリから読み出した後、 ブロック単位でハーフ I ン処理を行う ことで、 迅速な処理が可能となっている。 以下、 本実施例のハーフ I ^一ン処理に ついて説明する。 B- 4. ハーフトーン処理の概要:
図 1 0は、 本実施例の画像処理において、 ブロック単位で行うハーフ ! ン処 理の流れを示すフローチヤ一卜である。 かかる処理も、 コンピュータ 1 00に内 蔵された C PU 1 02の機能を用いて実行される。 尚、 ハーフトーン処理は、 色 変換によって得られた C, M, Υ, Kの各色ごとに行われるが、 説明が煩雑とな ることを避けるために、 以下では、 色を特定せずに説明することで、 各色につい て同様の処理を行っていることを表すものとする。 処理を開始すると、 まず初めに、 ハーフトーン処理を行うブロックを設定する (ステップ S 3 0 0 )。 このブロックは、 所定の位置関係で互いに隣接した複数 の画素から構成されている。 尚、 図 5を用いて前述したように、 本実施例の画像 処理では、 色変換 '圧縮処理においてもブロック単位で処理を行っている。 この 色変換■圧縮処理で処理するブロックと、 以下に説明するハーフトーン処理で処 理するブロックとは、必ずしも一致している必要はない。そこで、本明細書では、 色変換 ·圧縮処理において設定するブロックを第 1のプロックと呼び、 ハーフ卜 —ン処理において設定するブロックを第 2のプロックと呼んで区別することにす ることがあるものとする。
A—フ卜一ン処理においても、 第 2のプロックは種々の形態を取ることができ る。 図 1 1 Aないし図 1 1 Eは、 第 2のブロックが取り得る種々の形態を例示し た説明図である。図中に示した小さな矩形! 3 bは、それぞれが画素を表しており、 斜線が付された複数の画素が、 第 2のプロック b bとしてまとめられた画素であ る。 図中では、 第 2のブロックを破線で囲って表している。 説明の便宜から、 以 下では、 図 1 1 Aに示すように、 縦横 2列ずつの 4つの画素を第 2のブロックと して設定するものとして説明する。 こうして、 ハーフ ! ^一ン処理しょうとする第 2のプロックを設定したら、 前述 した色変換■圧縮処理において記憶しておいた圧縮情報と画像データとをメモリ から読み出して、第 2のプロックとして解凍する処理を行う(ステップ S 3 0 2 )。 例えば、 圧縮情報の値が 「1」 である場合は、 色変換後の画像データが圧縮され てメモリに記憶されていることを示している (図 9 Aを参照のこと)。 そこで、 図 1 1 Aに示した第 2のブロック内の 4つの画素 P a 、 画素 P b 、 画素 P c 、 画素 P d に、 メモリから読み出した階調値 D ata_cmを設定してやる。 こうすれ ぱ、 圧縮して記憶された画像データから、 第 2のブロックの画像データを速やか に解凍することができる。 圧縮されて記憶されているプロックは、 もともと画素 間の階調差が小さいプロックであるから、 こうしてすべての画素に同一の階調値 D ata_Cmを設定しても、 画質が大きく悪化することはない。 逆に、 メモリから読み出した圧縮情報の値が 「0」 である場合は、 画像データ は圧縮されることなく、 そのままメモリに記憶されていることを示している (図 9 Bを参照のこと)。 そこで、 メモリから 4画素分の画像データを読み出して、 これら画像デ一夕を、 第 2のプロック内の 4つの画素 P a、 画素 P b、 画素 P c 、 画素 P dの階調値として、 それぞれ設定してやる。 以上に説明したように、 ステップ S 3 0 2では、 圧縮情報を用いることにより きわめて簡単な方法で画像データを解凍することができる。 このため、 メモリか ら圧縮された画像データを読み出して、 第 2のブロックの画像デー夕を迅速に解 凍することが可能である。 尚、 ここでは、 第 1のブロックと第 2のブロックとが一致しているものとして いるが、 前述したように、 これらブロックは一致している必要はない。 一致して いない場合は、 第 2のブロックに含まれるすべての画素について画像データを設 定し終わるまで、 メモリに記憶された圧縮情報と画像データとを読み出してやれ ばよい。 従って、 第 2のブロック中の一部の画素は圧縮された状態でメモリに記 憶されており、 他の画素は圧縮されずに記憶されているといった場合も起こり得 る。 ついで、 こうして解凍した第 2のブロック内の各画素について、 ブロック単位 でドット形成の有無を判断する処理を行う (ステップ S 3 0 4 )。 この処理の詳 細については、 別図を用いて後述する。 第 2のブロック内の各画素について、 ドット形成の有無を判断したら、 該判断 によってブロック内で生じた階調表現の誤差を、 周辺の画素に拡散する処理を行 う (ステップ S 3 0 6 )。 ブロック内で生じた階調表現の誤差を求める方法につ いては後述する。 図 1 2は、 ブロック内で生じた誤差を周辺の画素に拡散してい る様子を概念的に示す説明図である。 図中に示した小さな矩形は画素を表してお υ、 破線で示した大きな矩形は第 2のブロックを表している。 斜線が付されたブ 口ックが、 ドッ卜形成の有無が判断されたブロックである。 図 1 0のステップ S 3 0 8では、 このプロック全体で発生した階調表現の誤差を、 周辺の画素に向か つて所定の比率で分配する処理を行う。 一例として、 ブロック内で生じた誤差を 周辺の各画素に分配する比率を、 図 1 3に例示した。 図 1 3 Αは、 判断を行った プロックに隣接している 6つの画素に分配する場合を示し、 図 1 3 Bは、 判断を 行つたプロックに隣接するプロック内の各画素に分配する場合を示している。 図 1 2に示した黒い矢印は、 図 1 3 Aに例示された比率に従って、 ブロックで生じ た誤差を周辺の画素に拡散している様子を概念的に表している。 こうして拡散さ れた誤差は各画素毎に蓄積され、 各画素に対応付けられた状態でコンピュータ 1 0 0の R A M I 0 6に記憶される。 以上のようにして、 ブロック内で生じた誤差を拡散したら、 全画素についての 処理を終了したか否かを判断する (ステップ S 3 0 8 )。 そして、 未処理の画素 が残っていれば (ステップ S 3 0 8 : n 0 )、 ステップ S 3 0 0に戻ってプロッ クの位置を移動させ、 設定した第 2のブロックについて、 上述した一連の処理を 行う。 こうして全ての画素についての処理を終了したら (ステップ S 3 0 8 : y e s )、図 1 0に示したハーフ卜一ン処理を終了して図 4の画像処理に復帰する。 以下では、 ブロック単位で各画素についてのドット形成の有無を判断する処理 (プロック単位 2値化処理) について説明する。 図 1 4は、 本実施例の八一フ卜 ーン処理中で、 プロック単位でドッ卜形成の有無を判断する処理の流れを示した フローチヤ一卜である。 図 1 4に示すブロック単位 2値化処理を開始すると、 先ず初めに、 処理しょう とするプロックの中から、 ドット形成の有無を判断する画素 (着目画素) を 1つ 設定する (ステップ S 4 0 0 )。 つまリ、 前述したように、 複数の画棄をまとめ て第 2のブロックとしているから、 これらの画素を所定の順序で 1画素ずつドッ ト形成の有無を判断することとして、 着目画素を 1つ選択するのである。 図 1 1 Aに示したように、 第 2のプロック b pは隣接する 4つの画素から構成されてい るとしている。 ここでは、 これら 4つの画素を、 プロック内の左上にある画素か ら右下の画素に向かって画素 P a 、 画素 P b 、 画素 P c 、 画素 P d の順番にド ッ卜形成有無を判断することとする。 そこで、 先ず初めに、 ステップ S 4 0 0で は、 左上隅にある画素 P aを着目画素として設定する。 次いで、 設定した着目画素 (ここでは、 画素 P a ) についての補正データ C x を算出する (ステップ S 3 0 2 )。 補正データ C x は、 着目画素の画像データと 着目画素に拡散されて記憶されている誤差 (拡散誤差) とを加算することによつ て求めることができる。 処理している第 2のブロックの各画素についての画像デ 一夕は、 図 1 0に示したハーフ! ^一ン処理中のステップ S 3 0 2において、 圧縮 されてメモリに記憶されているデータを読み出して既に解凍され、 C P U 1 0 2 に内蔵されたレジスタあるいはキャッシュに記憶されている。 また、 着目画素に ついての拡散誤差は、 図 1 0のステップ S 3 0 6中で、 画素毎に蓄積されて記憶 されている。 図 1 4に示したステップ S 4 0 2においては、 着目画素についての 画像データと拡散誤差とを加算することによって、 補正データ C X を算出する 処理を行う。 着目画素 P a の補正データ C x を算出したら、 得られた補正データ C x と所 定の閾値 t hとの大小関係を判断する (ステップ S 4 0 4 )。 そして、 補正デー 夕 C の方が大きければ着目画素 (ここでは画素 P a ) にドッ卜を形成すると 判断し (ステップ S 4 0 6 )、 そうでなければ、 着目画素にはドットを形成しな いと判断する (ステップ S 4 0 8 )。 判断の結果は、 各画素についての判断結果 を示す変数として R A M I 0 6に蓄えられる。 こうして着目画素についてのドット形成有無を判断したら、 判断に伴って着目 画素に生じた階調誤差を算出する (ステップ S 4〗 0 )。 階調誤差は、 ドットを 形成したこと、 あるいはドッ卜を形成しなかったことによって着目画素に表現さ れる階調値 (以下では、 この階調値を結果値と呼ぶ) を、 着目画素の補正データ C X から減算することによって算出することができる。 インクの濃さが一種類 であれば、 ドッ卜を形成した場合は通常はマイナスの誤差が、 ドッ卜を形成しな かつた場合は通常はプラスの階調誤差が、 算出される。 着目画素で生じた階調誤差を算出したら、 処理中のブロック内の全画素の処理 を終了したか否かを判断する (ステップ S 4 1 2 )。 そして、 未処理の画素が残 つている場合は (ステップ S 4 Ί 2 : n 0 )、 これら未処理の画素中で着目画素 周辺にある画素に誤差を拡散させる処理を行う (ステップ S 4 1 4)。 この処理 について、 図 1 5を参照しながら説明する。 図 1 5 Aない図 1 5 Dは、 処理中の第 2のブロック内の画素から着目画素を 1 つずつ選択してドット形成の有無を判断することにより、 ドット形成の有無をブ ロック単位で判断している様子を模式的に示した説明図である。 図中の 4つの正 方形は、 処理中の第 2のブロックを構成する画素 P a 、 画素 P b 、 画素 P c 、 画素 P d をそれぞれ示している。 また、 画素 P a を示す正方形の中に示した D T a は、 メモリから読み出されて解凍された画像データを示しており、 また、 画素 P a 中に示した E D a は、 画素 P a に拡散された蓄積されている拡散誤差 を示している。 同様に、 画素 P b 中に示した DT b および E D b はそれぞれ画 素 P b の画像データおよび拡散誤差を示し、 画素 P c 中の DT c および E D c はそれぞれ画素 P cの画像データおよび拡散誤差 E D cを、 画素 P d中の DT d および E D d は画素 P d の画像データおよび拡散誤差を示している。 前述した ように、 これら各画素の画像データは、 RAM 1 06から読み出されて解凍され た後、 C P U 1 02に内蔵されたレジス夕あるいはキャッシュに記憶されている。 また、 そのブロックについての処理を開始した直後では、 各画素の拡散誤差は、 R AM 1 06に記憶されている。 前述したように、 ブロック単位 2値化処理を開始すると、 先ず初めにブロック 内で左上の画素 P a が着目画素として設定される (図 1 4のステップ S 400 参照)。 そして、 画素 P a についての補正データ C x を算出し、 閾値 t hと比較 することによってドット形成の有無を判断する (図 1 4のステップ S 402, S 404参照)。 画素 P a についてドッ卜形成の有無を判断した時点では、 図 1 5 Aに示すように、 同じブロック内には画素 P b と画素 P c と画素 P d の 3つの 画素が未判断画素として残っている。 そこで、 画素 P a で生じた階調誤差を、 これら 3つの画素に 1 /3ずつ均等に分配して、 これら誤差を、 各画素毎に記憶 されている拡散誤差に加算する処理を行う。 例えば図 1 5 Aに示すように、 画素 P b に既に記憶されている拡散誤差を E Db とすると、 画素 P a で生じた階調 誤差は、 その 1 /3の階調値が画素 P b に分配されて、 拡散誤差 E Db に加算 される。 その結果、 画素 P b に記憶されていた拡散誤差 E Db は、 画素 P a か らの誤差が加算された新たな拡散誤差 E D b に更新される。 更新された拡散誤 差は、 C PU 1 02のレジスタあるいはキャッシュに記憶される。 他の画素 P c および画素 P d についても同様な処理を行う。 簡単に説明する と、 画素 P a からの誤差が画素 P c に拡散されると、 画素 P c に記憶されてい た拡散誤差 E D c と画素 P a からの誤差とが加算され、 新たな拡散誤差 E D c として画素 P c に記憶される。 また、 画素 P d についても同様に、 画素 P d に 記憶されていた拡散誤差 E D d と画素 P a からの誤差とが加算され、 新たな拡 散誤差 E D d として画素 P d に記憶される。 図 1 5 A中で画素 P a から他の 3 つ画素に向かって表示されている白抜きの矢印は、 画素 P a で生じた誤差がこ れら 3つの画素に拡散されることを模式的に示したものである。 こうして画素 P a で生じた階調誤差が拡散されて更新された各画素の拡散誤差は、 C P U 1 02 のレジスタあるいはキャッシュに記憶される。 尚、 階調誤差は、 必ずしも周辺の 未判断画素に均等に分配する必要はなく、 各画素に所定の割合で分配することも 可能である。 以上のようにして画素 P a で生じた階調誤差をブロック内の周辺画素に拡散 したら、 図 1 4のステップ S 4 1 4の処理を終了してステップ S 400に戻り、 新たな着目画素を設定する処理を行う。 画素 P a については既にドット形成の 有無を判断したから、 ステップ S 400では、 今度は画素 P a の右隣の画素 P b を着目画素として設定する。 こうして設定した新たな着目画素について、 上述し た処理とほぼ同様の処理を行う。 以下、 画素 P a における処理との相違点を中 心に簡単に説明する。 画素 P b についての処理を行う場合にも画素 P a における場合と同様に、 先 ず初めに、 補正データ C x を算出する (ステップ S 402)。 ここで、 画素 P b に記憶されている拡散誤差 E D b には、 先に画素 P a で生じた階調誤差が拡散 されて、 新たな拡散誤差 E Db として更新されている。 そこで、 画素 P b につ いての画像データ DT b と、 画素 P a からの階調誤差が拡散された新たな拡散 誤差 E Db とを加算することにより、 画素 P b についての補正データ C x を算 出する。 ここで、 画像データ DTb および拡散誤差 E Db は、 いずれも C PU 1 02内のレジス夕あるいはキャッシュに記憶されているので、 極めて高速に読 み出して補正データ C X を算出することができる。 こうして算出した補正デー 夕 C X と所定の闘値 t hとの大小關係を判断し (ステップ S 404 )、 補正デー 夕 C x の方が大きければ画素 P b にはドッ卜を形成すると判断し (ステップ S 406)、 そうでなければ画素 P b にはドッ卜を形成しないと判断する (ステツ プ S 408)。 次いで、 画素 P b について発生した階調誤差を算出する (ステツ プ S 4 1 0)。 階調誤差は、 画素 P aの場合と同様に、 画素 P bの補正デ一夕 C x から結果値を減算することによって算出することができる。 着目画素 P b で生じた階調誤差を算出したら、 処理中の第 2のブロック内の すべての画素について処理を終了したか否かを判断し (ステップ S 4 1 2)、 未 処理の画素が残っていれば、 算出しておいた階調誤差を、 これら未処理の画素に 拡散させる処理を行う (ステップ S 4 1 4)。 前述したように、 プロック内の画 素 P a については既に判断を終了しているから、 未判断画素として残っている のは画素 P c および画素 P d の 2つの画素である。 そこで、 画素 P b で生じた 階調誤差はこれら 2つの画素に拡散させることになる。図 1 5 Bを参照しながら、 画素 P bからの誤差を拡散させる処理について説明する。 図 1 5 Bは、 画素 P b で生じた階調誤差を拡散している様子を概念的に示し た説明図である。 図中で、 画素 P a に斜線が施されているのは、 画素 P a につ いては既にドッ卜形成の有無を判断済みであることを模式的に示したものであ る。 画素 P b についてドット形成の有無を判断した時点では、 処理ブロック内 には未判断画素として画素 P c、 画素 P dの 2つの画素が残っている。 そこで、 画素 P b で生じた階調誤差は、 図 1 5 Bに示したように、 これらの画素 P c お よび画素 P d にそれぞれ、 1 2ずつ拡散させる。 図中で、 画素 P b から画素 P c および画素 P d に向かって伸びる白抜きの矢印は、 画素 P b で生じた階調 誤差がこれら画素に拡散されていることを模式的に示している。 こうして誤差が 拡散される結果、 各画素の拡散誤差は、 拡散されてきた誤差が加算された新たな 拡散誤差に更新されて、 C P LM 0 2のレジス夕あるいはキャッシュに記憶され る。 尚、 ここでも、 階調誤差は処理ブロック内の未判断画素に均等に拡散される ものとしているが、 もちろん、 均等に拡散させるのではなく、 所定の割合で誤差 を拡散させることとしても構わない。 こうして画素 P b で生じた階調誤差を周辺の画素に拡散したら、 再び図 1 4 のステップ S 4 0 0に戻って、 今度は着目画素を画素 P c に移動させた後、 着 目画素 P c について同様の処理を行う。 以下では、 かかる処理について、 図 Ί 5 Cを参照しながら説明する。 画素 P c についての処理を開始すると、 先ず初 めに画素 P cの画像データ D T cと拡散誤差 E D cとを加算して補正データ C x を算出する。 ここで、 画素 P cについてのドット形成有無を開始した時点では、 画素 P cの拡散誤差 E D cは、 元々記憶されていた拡散誤差に加えて、 画素 P a からの誤差と画素 P b からの誤差とが加算され、 新たな拡散誤差 E D c として 更新されて C PU 1 02のレジスタあるいはキャッシュに記憶されている。 この ことから、 画素 P c の補正データ C X の算出に際しては、 画素 P c の画像デー 夕 DT c に、 新たな拡散誤差 E D c が算出されることになる。 こうして得られ た補正データ C x と、 所定の閾値 t hとを比較することによって、 画素 P c に ついてのドット形成有無を判断する。 こうして画素 P c についてのドット形成 有無を判断した時点では、 処理中のブロック内に残る未判断画素は、 図 1 5 Cに 示すように画素 P d のみである。 そこで、 画素 P c で生じた階調誤差は全て画 素 P d に拡散され、 画素 P d に元々記憶されていた拡散誤差に加算されて、 新 たな拡散誤差 E D dとして更新される。 着目画素 P c で生じた階調誤差を拡散したら、 図 1 4のステップ S 400に 屄つて着目画素を画素 P d に移動した後、 画素 P d についてのドット形成有無 の判断を開始する。 すなわち、 画素 P d に記憶されている拡散誤差 E D d と画 素 P d の画像データ DT d とを加算して補正データ C X を算出する (ステップ S 402)。次いで、補正データ C Xと閾値 t hとを比較し(ステップ S 404)、 補正データ C X の方が大きい場合は画素 P d にはドッ卜を形成する (ステップ S 406) と判断し、 そうでない場合は画素 P d にはドットを形成しないと判 断する (ステップ S 408)。 こうして画素 P d についてのドット形成の有無を判断したら、 画素 P d で生 じた階調誤差を算出した後 (ステップ S 4 1 0)、 処理中のブロック内の全画素 の処理を終了したか否かを判断する (ステップ S 4 1 2)。 図 1 5 Dに示したよ うに、 画素 P d について処理を開始した時点で、 もはや処理中のブロック内に は未判断の画素は残っておらず、 画素 P d についての判断が終了した後のステ ップ S 4 1 2においては、 ブロック内の全画素についての処理が終了したと判断 される。 そこで、 図 1 4に示したブロック単位 2値化処理を終了して、 図 1 0を 用いて前述したブロック単位で行うハーフ ! ^一ン処理に復帰する。 前述したよう に、 図 1 0に示したハーフ ! ^一ン処理では、 ブロック単位 2値化処理から復帰す ると、 処理した第 2のブロックで生じた階調誤差を周辺のブロックに拡散する処 理を行う (図 1 0のステップ S 3 0 6 )。 ここで、 処理した第 2のプロックで生じた階調表現の誤差としては、 ブロック 単位 2値化処理のステップ S 4 1 0において画素 P d について求めた階調誤差 の値を用いることができる。 これは、 着目画素で生じた階調誤差をプロック内の 未判断画素に拡散しながらドッ卜形成有無の判断を行っているために、 プロック 内で生じた階調誤差が、 最後に判断する画素 P d に拡散誤差 E D d として蓄積 されることによる。 以下、 図 1 5 Aないし図 1 5 Dを参照して詳しく説明する。 画素 P a で生じた階調誤差は、 処理中のブロック内の画素 P b 、 画素 P c 、 画素 P d の 3つの画素に拡散される。 画素 P b のドット形成有無の判断に際し ては、 画素 P a からの誤差を考慮して、 画素 P b に拡散されている誤差ができ るだけ解消されるようにドッ卜形成の有無が判断される。 仮に、 画素 P b につ いてドット形成有無を判断することにより、 画素 P b に拡散されている誤差を 解消することができたものとする。 この場合は、 画素 P b では新たな階調誤差 は発生せず、 また、 画素 P b から画素 P c 、 画素 P d に拡散される誤差も生じ ない。 他の 2つの画素 P c 、 画素 P d についても同様に、 ドット形成の有無を 判断したことで、 それぞれの画素に拡散されている誤差を解消することができた ものとすると、 これらの画素では階調誤差は生じない。 結局、 この場合は、 画素 P aで生じた階調誤差を、 周辺の未判断画素 P b 、 画素 P c 、 画素 P d で解消 したこととなって、 処理プロック全体としては階調誤差の発生を避けることがで さる。 ここでは、 画素 P b のドット形成有無の判断によって、 画素 P b での誤差を 解消するものとしたが、 画素 P b で新たな階調誤差が発生した場合には、 この 誤差は周辺の未判断画素 P c および画素 P d に拡散されて、 その結果、 これら の画素には、 画素 P a で生じた階調誤差と画素 P b で生じた階調誤差とが拡散 されることになる。 しかし、 これら画素 P c 、 画素 P d についてドット形成の 有無を判断することで、 それぞれの画素に拡散された誤差を解消することができ れぱ、 依然としてブロック全体としてみれば階調誤差は生じない。 画素 P c についてドット形成有無を判断することで、 画素 P c に拡散されて いる拡散誤差を解消することができない場合も、 全く同様にして、 画素 P d で 誤差を解消することができれば、 プロック全体としては階調誤差が生じることは ない。 換言すれば、 画素 P d で解消しきれずに残った誤差が、 ブロック全体で 生じた階調誤差となる。 このように、 着目画素で生じた階調誤差をブロック内の 未判断画素に拡散しながらドッ卜形成有無を判断していくと、 各画素で解消しき れずに残つた階調誤差が後続する画素に集約されていくので、 ブロック内で最後 に判断する画素 P d で生じた階調誤差を、 処理中のブロック全体で生じた階調 誤差として用いることができるのである。 尚、 以上の説明では、 処理中のプロック内で最後にドット形成有無を判断する 画素 P d で生じた階調誤差の値を、 ブロック全体で生じた階調誤差として用い るものとしたが、 もちろん、 ブロックを構成する各画素毎に階調誤差を算出し、 これら階調誤差の総和をプロック全体としての階調誤差としても構わない。 また、 図 1 5 Aないし図 1 5 Dに示した例では、 第 2のブロックを構成する各 画素のドット形成有無を判断するに際しては、 画素 P a、 画素 P b、 画素 P c、 画素 P d の順番で判断を行ったが、 必ずしもこの順番で判断する必要はなく、 例えば、 画素 P a 、 画素 P c 、 画素 P b 、 画素 P dの順番でドッ卜形成有無を 判断しても構わない。 第 2のブロック内で着目画素を設定する順番は、 良好な画 質が得られる順番を選択しておくことができる。 以上に説明したように本実施例の画像処理では、 色変換後の画像データに基づ いて、 第 2のプロック内にエッジが存在するか否かを検出する。 そして、 エッジ の有無によって画像データを圧縮し、 圧縮後の画像データを一旦メモリに記憶す る。 続くハーフトーン処理では、 メモリから必要な画像データを読み出して、 ブ ロック単位でハーフトーン処理を行う。 ハーフトーン処理をプロック単位で行え ば、 プロック内の各画素については、 誤差を拡散する処理あるいは補正デ一夕 C X を算出してドッ卜形成の有無を判断する処理を迅速に行うことができるので、 ハーフ I ^一ン処理を高速化することができる。 また、ハーフ I ^一ン処理をプロック単位で行った場合、処理が複雑化し易いが、 本実施例では、 メモリに画像データを圧縮して記憶しておき、 必要に応じて読み 出してハーフ I ^一ン処理を行っている。 このように必要なデータを読み出しなが らハーフ I ^一ン処理を行えば、 処理が複雑化することを効果的に回避することが できる。 加えて、 ハーフ ! ^一ン処理を行う画像データ (色変換後の画像データ) は圧縮 されているので、 メモリに書き込む動作もメモリから読み出す動作も極めて迅速 に行うことができる。 更に本実施例の画像処理では、 ブロック内でのエッジの有 無に応じて画像データを圧縮しているので、 画像データの圧縮および解凍も極め て迅速に且つ効率良く行うことができる。 すなわち、 ブロック内でエッジが検出 されなかった場合は、 ブロック内の各画素の階調値を平均階調値によって代表さ せることによって画像デ一夕を圧縮し、 解凍に際しては各画素に平均階調値を設 定する。 また、 プロック内にエッジが検出された場合は画像データの圧縮は行わ ない。 このようにエッジが検出された場合は圧縮を行わないとしても、 画像デー 夕全体としては、 実用上十分な圧縮率を確保することができる。 これは、 ブロッ クを極端に大きなものに設定しない限り、 エツジが検出されるブロックはさほど 多くはないことと、 エッジが検出されなかったブロックについての圧縮率が高い ことによる。 こうしてエッジに有無に応じて圧縮および解凍しているために、 圧 縮も解凍も極めて迅速に行うことができる。 以上に説明したように、 本実施例の画像処理によれば、 処理を複雑化させるこ となく、 画像処理全体としての処理速度を向上させることが可能となる。
C . 第 2実施例:
上述した第 1実施例では、 エッジの検出は色変換後の画像データに基づいて行 つた。 しかし、 色変換前の画像デ一夕に基づいてエッジを検出することで、 エツ ジを検出する処理をより簡素なものとすることもできる。 以下では、 こうした第
2実施例について説明する。 図 1 6は、第 2実施例の色変換 ·圧縮処理の流れを示すフローチャートである, 以下ではフローチャートを参照しながら、 第 1実施例との相違点を中心に説明す る。 第 2実施例においても、 色変換 '圧縮処理を開始すると、 先ず初めに、 隣接す る画素を所定の複数個ずつまとめて、 第 1のプロックを生成する (ステップ S 5 0 0)。 ここでは、 前述した第 1実施例と同様に、 第 1のブロックは、 図 6 Aに 示すように、 縦横 2個ずつに並んだ 4つの画素で構成されているものとして説明 する。 第 1のブロックを生成したら、 該ブロック内の所定画素間で、 各画素について
R G B画像デ一夕の階調差を算出する処理を行う (ステップ S 5 0 2)。 すなわ ち図 8 Aに示したように、 画素 P a と画素 Pb との間、 画素 P a と画素 Pc との 間、 画素 P a と画素 P d との闆のそれぞれについて、 R G B各色毎に階調差を 算出するのである。 前述した第 1実施例の色変換 ·圧縮処理では、 このように、 R G B画像デ一夕を色変換して得られた C, M, Υ, 1'くの各色についての階調差 を算出したが、 第 2実施例では、 色変換前の R G B各色について階調差を算出す る点が大きく異なっている。 こうして算出した階調差に基づいて、 ブロック内でのエッジの有無を判断する 処理を行う (ステップ S 5 0 4)。 ステップ S 5 0 2において所定画素間で算出 した R G B各色の階調差の中で、 所定の閾値より大きなものが 1つでも含まれて いれば、 そのブロックにはエッジが含まれていると判断する。 逆に、 いずれの階 調差も閾値より小さい場合には、 そのブロックにはエッジは含まれていないと判 断する。 そして、 エッジが含まれていない場合は (ステップ S 5 0 4 : n o)、 プロッ ク内の R G B画像データを圧縮し (ステップ S 5 0 6)、 圧縮した R G B画像デ 一夕を CM Y K各色による画像データに色変換する (ステップ S 5 0 8)。 R G B画像データの圧縮は、 第 1のブロックに含まれる各画素についての画像データ の平均値を、 各色毎に算出することによって行う。 例えば、 ブロック内の各画素 P a、 P b、 P c、 P dの R画像データの階調値が、 それぞれ R a、 R b、 R c 、 R dとすると、 R画像データは、 階調値 R aveに圧縮される。 ここで、
R ave = (R a + R b + R c + R d ) /4
である。 G画像データ、 B画像デ一夕についても同様に、 プロック内の各画素 P a P b 、 P c 、 P dの G画像データの階調値を G a、 G b 、 G c、 G dとして、 B画像デ一夕の階調値を B a 、 B b 、 B c 、 B d とすると、 G画像デ一夕は、 階調値 G aveに圧縮され、 B画像データは、階調値 B aveに圧縮される。 ここで、 G aveおよび B aveは、 それぞれ
G ave = (G a +G b +G c +G d ) /A
B ave = (B a + B b + B c + B d )
として求められる。 続くステップ S 5 0 8では、 こうして圧縮された R G B画像データ (R ave , G ave , B ave ) について、 図 7に示した L U Tを参照しながら色変換する。 第 2実施例では、 第〗のブロック内にエッジが存在しない場合には、 こうして R G B画像データを圧縮した後に色変換しているので、 画素毎に色変換を行う必要が 無く、迅速に色変換することができる。また、エッジが存在しないブロックでは、 画素間での R G B画像データがほぼ同じ階調値となっているから、 各画素につい ての R G B画像データを色変換して得られた CMY K各色の階調値も、 ほぼ同じ 階調値になると考えられる。 従って、 こうしたブロックについては、 圧縮した R G B画像データを色変換することとしても、ほとんど画質が悪化することはない。
—方、 ステップ S 504においてブロック内にエッジが存在すると判断された 場合は (ステップ S 504 : y e s), 該ブロックに含まれる各画素毎に、 RG B画像データを CM YK画像データに色変換する (ステップ S 5 1 0)。 尚、 以上の説明では、 ブロック内の所定画素間での全ての階調差を各色毎に一 旦算出し (ステップ S 502)、 その後ステップ S 504において、 算出した階 調差と閾値を比較してエッジの有無を検出するものとして説明した。 しかし、 こ れは、 理解の便宜を考慮して説明の簡素化を図ったためであり、 必ずしもプロッ ク内の全ての階調差を算出する必要はない。 すなわち、 所定の閾値を超える階調 差が 1つでも見出されたら、 他の階調差については算出することなく、 そのブロ ックにはエッジ存在すると判断して、 ステップ S 5 1 0の処理を行うこととして も良い。 以上のようにして、 圧縮した RG B画像デ一夕あるいは圧縮していない R G B 画像データの色変換を終了したら、 得られた CM Y K各色の画像データを、 圧縮 情報とともにメモリすなわち RAM I 06に記憶する (ステップ S 5 1 2)。 圧 縮情報は、 第 1のブロックにエッジが存在していない場合 (圧縮した RG B画像 データを色変換した場合)には、画像データが圧縮されていることを表す値「 1」 を記憶する。 逆に、 第 1のブロックにエッジが存在する場合は、 画像データが圧 縮されていないことを表す値 「0」 を、 圧縮情報として記憶する。 尚、 前述した第 1実施例では、 C, M, 丫, K各色毎にエッジの検出および画 像データの圧縮を行っているので、 同一プロック内でも、 色によって圧縮状態が 異なっている場合が起こり得る。 このため圧縮情報は、 プロック毎に、 そして各 色毎に設定して記憶されている。 これに対して第 2実施例では、 エッジの検出と 圧縮とをブロック単位で行っているので、 同一プロックで有れば、 圧縮状態は C M Y K各色いずれも同じとなっている。 従って、 ブロック毎に 1つずつ圧縮情報 を設定して記憶することも可能である。 こうして 1つのプロックにつ t、ての処理が終わつたら、 未処理の画素が残つて いるか否かを判断する (ステップ S 5 1 4 )。 そして、 未処理の画素が残ってい れば (ステップ S 5 1 4 : n o ) , ステップ S 5 0 0に戻って新たなブロックを 生成し、 このブロック内の各画素について、 続く一連の処理を行う。 こうしてす ベての画素についての処理を終了したら (ステップ S 5 〗 4 : y e s )、 図 1 6 に示す第 2実施例の色変換 圧縮処理を終了して、 図 4の画像処理に復帰する。 こうした第 2実施例の色変換 ·圧縮処理においては、 エッジの存在しないプロ ックについては、 1回だけ色変換すればよい。 従って、 プロック内の全画素につ いて色変換する第 1実施例の色変換。圧縮処理よりも、 処理の高速化を図ること ができる。 また、 エッジの検出に際しても、 R G B各色についての階調差を算出 して、 閾値より大きな階調差が 1つでも見出されたら、 残りの階調差は算出する ことなく、 次の処理を開始することができる。 この点においても、 第 2実施例の 色変換■圧縮処理は、 第 1実施例の色変換■圧縮処理よりも処理の高速化を図る ことが可能である。
D . 第 3実施例:
上述した第 2実施例の色変換 ·圧縮処理では、 プロック内の画素間で R G B各 色についての階調差がいずれも小さい場合にのみ、 画像データを圧縮する。 こう することにより、 第 1実施例に対して画像処理をより迅速化することが可能であ るが、 その一方で、 画像データ全体としてみたときの圧縮率が小さくなる傾向が ある。 圧縮率があまりに小さくなつてしまっては、 画像データをメモリすなわち R A 1 0 6に対して読み書きするために時間がかかり、 却って処理速度が低下 するおそれが生じる。 こうした可能性を回避するためには、 色変換の前後で画像 デ一夕を圧縮することが効果的である。 以下では、 こうした第 3実施例の色変換 •圧縮処理について説明する。 図 1 7は、第 3実施例の色変換 ·圧縮処理の流れを示すフローチャートである。 以下ではフローチヤ一卜を参照しながら、 第 1実施例および第 2実施例との相違 点を中心に説明する。 第 3実施例においても、 色変換,圧縮処理を開始すると、 先ず初めに、 隣接す る画素を所定の複数個ずつまとめて、 第 1のブロックを生成する (ステップ S 6 0 0 )。 ここでも前述した各種実施例と同様に、 第 1のプロックは、 図 6 Aに示 すように、 縦横 2個ずつに並んだ 4.つの画素で構成されているものとして説明す る。 第 1のプロックを生成したら、 該プロック内の所定画素間で、 各画素について の R G B画像データの階調差を算出して (ステップ S 6 0 2 )、 エッジを検出す る処理を行う (ステップ S 6 0 4 )。 かかる処理は、 第 2実施例におけるステツ プ S 5 0 2および S 5 0 4と同様である。 以下、 概要のみ説明すると、 先ず、 ブ ロック内の所定画素間について、 R G B各色毎に階調差を算出し、 所定の閾値と 比較する。 そして、 閾値より大きな階調差が見出されたら、 そのブロックについ てはエッジを含んでいると判断する。 逆に、 全ての階調差が閾値より小さいこと が確認されたブロックについては、 エッジを含んでいないと判断する。 ブロック内にエッジが存在していないと判断された場合は (ステップ S 604 : n o)、 前述した第 2実施例と同様に、 ブロック内の RG B画像データを圧縮 し (ステップ S 606)、 圧縮した R G B画像データの色変換を行う (ステップ S 608)„
—方、 ブロック内にエツジが存在していると判断された場合は (ステップ S 6 04 : y e s), 各画素の R G B画像データを C, M, Υ, K各色の画像データ に色変換する (ステップ S 6 1 0)。 次いで、 第 1実施例の色変換 ·圧縮処理と 同様に、ブロック内の所定画素間での階調差を各色毎に算出(ステップ S 6 1 2)、 ブロック内でのエッジの有無を各色毎に判断する (ステップ S 6 1 4)。 すなわ ち、 所定画素間での階調差がいずれも、 所定の闘値よリ小さければ、 その色につ いてはブロック内にエッジが存在しないと判断する。 逆に、 閾値より大きな階調 差が存在する場合には、 その色についてはブロック内にエッジが含まれていると 判断する。 こうしてプロックについてのエッジの有無を検出した結果、 エッジが含まれて いないと判断された色については (ステップ S 6 1 4 : n 0)、 ブロック内の画 像データを圧縮する処理を行う (ステップ S 6 1 6)。 画像データの圧縮は、 前 述した第 1実施例と同様に、 圧縮しょうとしている色について、 ブロック内の各 画素の平均階調値を算出し、 各画素の階調値を平均階調値で代表させることによ つて行う。一方、ブロック内にエッジが含まれていると判断された色については、 ブロック内の画像データを圧縮する処理はスキップする。 以上のようにして、 ブロック内でのエッジの有無を検出し、 エッジの有無に応 じて画像データを圧縮する処理を行ったら、 これら画像データを圧縮情報ととも にメモリすなわち R A M 1 0 6に書き込む処理を行う (ステップ S 6 1 8 )。 圧 縮情報は、 画像データを圧縮している色については 「1」 を、 圧縮していない色 については 「0」 を書き込んでやる。 こうして 1つのブロックについての処理が終わったら、 未処理の画素が残って いるか否かを判断する (ステップ S 6 2 0 )。 そして、 未処理の画素が残ってい れば (ステップ S 6 2 0 : n 0 )、 ステップ S 6 0 0に戻って新たなプロックを 生成し、 このブロック内の各画素について、 続く一連の処理を行う。 こうしてす ベての画素についての処理を終了したら (ステップ S 6 2 0 : y e s )、 図 1 7 に示す第 3実施例の色変換■圧縮処理を終了して、 図 4の画像処理に復帰する。 以上に説明した第 3実施例の色変換 ·圧縮処理においては、 色変換前の画像デ 一夕に基づいてエッジの有無を検出し、 エッジを含まないブロックについては、 R G B画像デ一夕を圧縮した後に色変換する。こうして、圧縮後に色変換すれば、 色変換を 1度に行うことができるので、 迅速に色変換■圧縮処理を行うことがで さる。 また、 エッジの検出されたブロックについては、 各画素毎に色変換した後、 各 色毎にエッジの有無を検出する。 そして、 エッジの検出されなかった色について は画像データの圧縮を行う。 こうすれば、 色変換後の画像データについて各色毎 にェッジの有無を検出して圧縮しなければならないのは、 色変換前にェッジが検 出されたブロックだけでよいので、色変換 ·圧縮処理を迅速に行うことができる。 加えて、 これらプロックについては各色毎にエッジの有無を検出して圧縮してい るので、 第 1実施例と同様に、 十分な圧縮率を確保することが可能となる。 E . 変形例:
以下では、 上述した各種実施例の変形例について簡単に説明する。
( 1 ) 第 1の変形例:
上述した各種実施例では、 プロック内でのエッジの有無を検出するために、 図 8に示した所定画素間での階調差を算出するものとした。 もっとも、 エッジを検 出するために算出する階調差は、 図 8に示した所定画素間の階調差に限定される ものではない。 例えば、 図 1 8 Aに示すように、 画素 P a と画素 P d との階調 差および画素 P b と画素 P c との階調差を算出することとしても良い。 こうす れば、 例えば図 1 8 Bに示すように、 幅が 1画素の細いェッジがブ口ック内を斜 めに横切っていない限リ、 2つの階調差を算出するだけでプロック内のェッジを 正しく検出することができる。
( 2 ) 第 2の変形例:
上述した各種実施例では、 プロック内の画像デ一夕を圧縮する場合、 先ず、 該 プロック内の各画素の平均階調値を算出して、 各画素の階調値を平均階調値に圧 縮するものとして説明した。 しかし、 簡便には、 平均階調値の代わりに、 プロッ ク内の 1つの画素の階調値に圧縮することとしても良い。 再び、 図〗 8 Aを用い て説明すると、 ブロック内でエッジが検出されなかった場合は、 図中で斜線を付 した画素 P aの階調値で、 プロック内の他の画素の階調値を代表させても良い。 エッジの存在しないプロックについては、 各画素の階調値はほぼ近い値を取るか ら、 平均階調値を 1つの画素の階調値で代用することも可能である。 階調値を平 均階調値の代わりに用いる画素は、 ブロック内の所定位置の画素とすることもで きるし、 任意の画素を選択することとしても良い。 ( 3 ) 第 3の変形例:
上述した各種実施例においては、 プロック内にエッジが含まれているか否かだ けを判断して、 エッジが含まれていなければ画像データを圧縮し、 エッジが含ま れていれば圧縮しないものとして説明した。すなわち、画像データの圧縮状態は、 圧縮されているか圧縮されていないかの、 いずれかの状態しか取らないものとし て説明した。 しかし、 エッジの有無だけでなく、 エッジの方向も判断して、 それ に応じて圧縮状態を切り換えることとしても良い。 図 1 9 Aないし図 1 9 Dは、 エッジの方向によって種々の圧縮状態を切り換え ている様子を例示した説明図である。 図 Ί 9 Aは、 ブロック内にエッジが含まれ ていない場合を示している。 この場合は、 上述した各種実施例と同様に、 各画素 の画像データを 1つの階調値に圧縮してやる。 また、 前述した各種実施例では、 圧縮状態は 2つの状態しか取リ得なかつたので、 圧縮情報は Ί b i tのデー夕で 足リたが、 図 1 9 Aないし図 1 9 Dに例示した場合は 4つの圧縮状態を取リ得る ので、 圧縮情報は 2 b i tのデータとなる。 そこで、 エッジが含まれていないプ ロックについては、 圧縮情報として値 「1 1」 を記憶してやる。 また、 縦方向に並んだ 2つの画素間の階調差、 すなわち、 画素 P a と画素 P c との間の階調差、 および画素 P b と画素 P d との間の階調差はいずれも小さい が、 横方向あるいは斜め方向の画素間の階調差は必ずしも小さくない場合は、 ブ ロック内をエッジが縦方向に走っているものと考えられる。 そこで、 この様な場 合は、 図 1 9 Bに示したように、 1つのブロックを 2つのサブブロックに分けて 考えて、 サブブロック毎に画像デ一夕を圧縮してやる。 また、 このときの圧縮情 報として 门 0 J を記憶してやる。 更に、 横に並んだ 2つの画素間での階調差は小さいが、 縦方向あるは斜め方向 の画素間では必ずしも階調差が小さくはない場合は、 エッジがブロック内を横方 向に走っていると考えられる。 そこで、 この様な場合は、 1つのブロックを、 図 1 9 Cに示すような 2つのサブブロックに分割して、 サブブロックごとに画像デ 一夕を圧縮してやる。 このときは、 圧縮情報として 「0 1 J を記憶する。 そして、 いずれの場合に該当しない場合は、 図 1 9 Dに示すように、 画像デ一 夕を圧縮することなく、 そのままメモリに記憶してやる。 また、 このときの圧縮 情報は、 画像データが圧縮されていないことを示す 「0 0」 を記憶する。 この様に、 プロック内でのエッジの有無だけでなく、 エッジが走っている方向 も検出し、 これに応じて画像データを圧縮してやれば、 画像データの圧縮率を更 に向上させることができる。 また、 このような圧縮を行った場合でも、 上述した 各種実施例と同様に、 画像データの圧縮および解凍する処理を迅速に行うことが できる。 このため、 色変換後の画像データをメモリに対して読み書きする動作が 更に高速化され、画像処理全体として、より迅速な処理を行うことが可能となる。 ( 4 ) 第 4の変形例:
図 1 4および図 1 5を用いて説明したハーフ ! ^一ン処理では、 ブロックを構成 する各画素がどのような階調値を取る場合であっても、 処理内容は全く同じもの として説明した。 しかし、 ブロック内でも、 エッジを含まないとして圧縮されて いた画素間では近似した階調値を取るものと考えられる。 特に、 図 9に示したよ うに、 エッジを含まないプロックについては複数の画素の階調値を単一の階調値 に圧縮する場合、 解凍された各画素の階調値は同じ値となる。 このように、 エツ ジを含まないとして圧縮されていた画素については、近似した(あるいは同一の) 階調値を有するものと考えられるので、 これを利用して、 処理の高速化を図るこ とも可能である。 例えば、 ディザ法を用いたハーフ I ン処理においてディザマ卜リックスを画 像データの階調値に応じて使い分けたり、 あるいは誤差拡散法で用いられる閾値 を画像データの階調値に応じて変更する場合がある。 また、 誤差拡散法では、 画 像データの階調値に応じて誤差拡散マ卜リックスを切り換える処理を行う場合も ある。 複数の画素については、 階調値が近似あるいは同一であることが分かって いれば、 マトリックスや閾値を変更する処理を簡素なものとすることが可能とな Φ。 以上、 各種の実施例について説明してきたが、 本発明は上記すベての実施例に 限られるものではなく、 その要旨を逸脱しない範囲において種々の態様で実施す ることができる。 例えば、 上述した機能を実現するソフトウェアプログラム (ァ プリケーシヨンプログラム) を、 通信回線を介してコンピュータシステムのメイ ンメモリまたは外部記憶装置に供給し実行するものであってもよい。 もちろん、 C D— R O Mやフレキシブルディスクに記憶されたソフトウェアプログラムを読 み込んで実行するものであっても構わない。 また、 上述した各種実施例では、 ハーフ ! ^一ン処理を含む画像デ一夕変換処理 はコンピュータ内で実行されるものとして説明したが、 画像データ変換処理の一 部あるいは全部をプリンタ側、 あるいは専用の画像処理装置を用いて実行するも のであっても構わない。 産業上の利用可能性 本発明は、 画像表示装置は、 印刷媒体上にインクドットを形成して画像を印刷 する印刷装置に限定されるものではなく、 例えば、 液晶表示画面上で輝点を適切 な密度で分散させることにより、 階調が連続的に変化する画像を表現する液晶表 示装置としても利用することができる。 また、 プリン夕それ自体として利用する ばかりでなく、 ファクシミリ装置やスキャナプリン夕の複合機、 コピー機などに おいても利用可能である。

Claims

請求の範囲
1 . 一つの表色系により表現されたカラー画像データを、 他の表色系を構 成する各色についてのドッ卜の形成有無によって表現された画像データに変換す る画像処理装置であって、
第 1の表色系により表現されたカラー画像データを、 該第 1の表色系とは異な る第 2の表色系によるカラー画像デー夕に色変換する色変換手段と、
互いに隣接する画素を所定の複数個ずつ第 1種のブロックとしてまとめて、 該 第 1種のプロック内でのェッジの有無を検出するエツジ検出手段と、
前記第 1種のブロックに含まれる各画素についての前記色変換後のカラー画像 データを、 該ブロック内にェッジが存在しない場合には圧縮した状態でメモリに 記憶する圧縮デー夕記憶手段と、
前記圧縮された状態で記憶された力ラー画像データを前記メモリから読み出し て解凍した後、 互いに隣接する画素を所定の複数個ずつ第 2種のプロックとして まとめる圧縮デ一夕解凍手段と、
前記第 2種のブロックとしてまとめられたカラー画像デー夕に基づいて、 該プ ロックに含まれる各画素についてのドッ卜の形成有無を、 前記第 2の表色系の各 色毎に該ブロック単位で判断するドッ卜形成有無判断手段と
を備える画像処理装置。
2 . 請求項 1記載の画像処理装置であつて、
前記ドッ卜形成有無判断手段は、 前記第 2種のブロックを構成する複数の画素 の中で、 エッジが検出されることなく圧縮されていた複数の画素については、 該 画素のカラー画像データを均一な画像データとして扱って、 前記ドッ卜の形成有 無を判断する手段である画像処理装置。
3 . 請求項 Ί記載の画像処理装置であつて、
前記エッジ検出手段は、 前記第 1種のブロック内でのエッジの検出を、 該プロ ック内の各画素についての前記色変換後のカラー画像データに基づいて行う手段 であり、
前記圧縮データ記憶手段は、 前記色変換後のカラー画像データを、 前記第 1種 のプロック内でのェッジの有無に応じて圧縮した後、 圧縮されたデータを前記メ モリに記憶する手段である画像処理装置。
4 . 請求項 1記載の画像処理装置であつて、
前記エッジ検出手段は、 前記第 1種のブロック内でのエッジの検出を、 該プロ ック内の各画素についての前記色変換前のカラ一画像デ一夕に基づいて行う手段 であリ、
前記圧縮データ記憶手段は、 前記エッジの検出されなかった前記第 1種のプロ ックについて、 前記色変換前のカラ一画像デ一夕を圧縮した後、 該圧縮したカラ 一画像デ一夕を前記第 2の表色系のカラー画像データに色変換して前記メモリに 記憶する手段である画像処理装置。
5 . 請求項 4記載の画像処理装置であつて、
前記ェッジ検出手段は、 前記色変換前のカラー画像データに基づいてェッジが 検出された前記第〗種のプロックについては、 前記色変換後のカラー画像データ に基づいて再びェッジの検出を行う手段であり、
前記圧縮データ記憶手段は、 前記色変換後のカラ一画像データに基づいて再び エッジの有無を検出した前記第〗種のブロックについては、 該エッジの検出結果 に応じて該色変換後のカラー画像データを圧縮した後、 前記メモリに記憶する手 段である画像処理装置。
6 . 請求項 1ないし請求項 5のいずれかに記載の画像処理装置であって、 前記圧縮データ記憶手段は、 エッジを含まない前記第 1種のプロックについて は、 該プロックに含まれる複数個分の画素の画像データを 1画素分の画像データ に圧縮して記憶する手段である画像処理装置。
7 . 請求項 6記載の画像処理装置であつて、
前記圧縮データ記憶手段は、 エッジを含まない前記第 1種のブロックについて は、 該ブロックに含まれる複数個分の画素の画像デーダを、 該画像データの平均 値に圧縮して記憶する手段である画像処理装置。
8 . 請求項 6記載の画像処理装置であって、
前記圧縮データ記憶手段は、 エッジを含まない前記第 1種のブロックについて は、 該プロックに含まれる複数個分の画棄の画像データを、 該プロック内から選 択された 1の画素の画像データに圧縮して記憶する手段である画像処理装置。
9 . 請求項 1ないし請求項 5のいずれかに記載の画像処理装置であって、 前記圧縮データ記憶手段は、 前記第 1種のプロック内にエッジが検出された場 合には、 該ブロックをエッジを含まないサブプロックに分割し、 該サブブロック に含まれる画素について前記色変換後の画像データを圧縮した後、 前記メモリに 記憶する手段である画像処理装置。
1 0 . 請求項 1ないし請求項 5のいずれかに記載の画像処理装置であって、 前記圧縮データ記憶手段は、 前記エッジの有無に応じて圧縮された色変換後の カラー画像データとともに、 該カラー画像データが圧縮されている状態を表す圧 縮情報を前記メモリに記憶する手段である画像処理装置。
1 1 . 請求項 1ないし請求項 5のいずれかに記載の画像処理装置であって、 前記圧縮デ一夕解凍手段は、 前記第 2種のブロックとして、 前記第 1種のプロ ックと同一のブロックにまとめる手段である画像処理装置。
1 2 . 請求項 1 1記載の画像処理装置であって、
前記ェッジ検出手段および前記圧縮データ解凍手段は、 2行 2列に配列された 4つの画素を、 それぞれ前記第 1種のプロックおよび前記第 2種のブロックとし てまとめる手段である画像処理装置。
1 3 . 一つの表色系により表現されたカラー画像データを、 他の表色 ¾を 構成する各色についてのドッ卜の形成有無によって表現された画像データに変換 する画像処理装置であって、
第 Ίの表色系により表現されたカラー画像デ一夕を、 該第 1の表色系は異なる 第 2の表色系によるカラー画像デ一夕に色変換する色変換手段と、
互いに隣接する画素を所定の複数個ずつ第 1種のブロックとしてまとめて、 該 第 1種のプロック内でのエッジの有無を検出するエッジ検出手段と、
前記第 1種のブロックに含まれる各画素についての前記色変換後のカラー画像 データを、 該プロック内にェッジが存在しない場合には圧縮した状態で記憶する 圧縮データ記憶手段と、
前記圧縮された状態で記憶されたカラー画像データを前記メモリから読み出し て解凍する圧縮画像デー夕解凍手段と、
前記解凍されたカラー画像データに基づいて、 前記第 2の表色系の各色毎にド ッ卜の形成有無を判断するドッ卜形成有無判断手段と
を備える画像処理装置。
1 4 . —つの表色系により表現されたカラー画像データを、 他の表色系を 構成する各色についてのドッ卜の形成有無によって表現された画像データに変換 する画像処理方法であつて、
第 1の表色系により表現されたカラー画像データを、 該第 1の表色系とは異な る第 2の表色系によるカラー画像データに色変換する工程と、
互いに隣接する画素を所定の複数個ずつ第 1種のプロックとしてまとめて、 該 第 1種のブロック内でのエッジの有無を検出する工程と、
前記第 1種のプロックに含まれる各画素についての前記色変換後のカラー画像 データを、 該ブロック内にェッジが存在しない場合には圧縮した状態でメモリに 記憶する工程と、
前記圧縮された状態で記憶されたカラー画像データを前記メモリから読み出し て解凍した後、 互いに隣接する画素を所定の複数個ずつ第 2種のプロックとして まとめる工程と、
前記第 2種のブロックとしてまとめられたカラー画像デー夕に基づいて、 該ブ ロックに含まれる各画素についてのドッ卜の形成有無を、 前記第 2の表色系の各 色毎に該ブロック単位で判断する工程と
を備える画像処理方法。
1 5 . —つの表色系により表現されたカラー画像データを、 他の表色系を 構成する各色についてのドッ卜の形成有無によって表現された画像データに変換 する画像処理方法であつて、
第 1の表色系により表現されたカラー画像データを、 該第 1の表色系とは異な る第 2の表色系によるカラー画像データに色変換する工程と、 互いに隣接する画素を所定の複数個ずつ第 1種のプロックとしてまとめて、 該 第 1種のプロック内でのエツジの有無を検出する工程と、
前記第 1種のブロックに含まれる各画素についての前記色変換後のカラー画像 データを、 該プロック内にェッジが存在しない場合には圧縮した状態でメモリに 記憶する工程と、
前記圧縮された状態で記憶された力ラー画像デー夕を前記メモリから読み出し て解凍する工程と、
前記解凍されたカラー画像データに基づいて、 前記第 2の表色系の各色毎にド ッ卜の形成有無を判断する工程と
を備える画像処理方法。
1 6 . —つの表色系にょリ表現されたカラー画像データを、 他の表色系を 構成する各色についてのドッ卜の形成有無によって表現された画像データに変換 する方法を、 コンピュータを用いて実現するためのプログラ厶であって、 第 1の表色系により表現されたカラー画像デ一夕を、 該第〗の表色系とは異な る第 2の表色系によるカラー画像デー夕に色変換する機能と、
互いに隣接する画素を所定の複数個ずつ第 1種のブロックとしてまとめて、 該 第 1種のプロック内でのェッジの有無を検出する機能と、
前記第 1種のプロックに含まれる各画素についての前記色変換後のカラ一画像 データを、 該ブロック内でのエッジの有無に応じて圧縮された状態でメモリに記 憶する機能と、
前記圧縮された状態で記憶されたカラー画像データを前記メモリから読み出し て解凍した後、 互いに隣接する画素を所定の複数個ずつ第 2種のプロックとして まとめる機能と、 前記第 2種のブロックとしてまとめられたカラー画像デー夕に基づいて、 該ブ ロックに含まれる各画素についてのドッ卜の形成有無を、 前記第 2の表色系の各 色毎に該ブロック単位で判断する機能と
を実現するプログラム。
1 7 . 一つの表色系により表現されたカラー画像データを、 他の表色系を 構成する各色についてのドッ卜の形成有無によって表現された画像データに変換 する方法を、 コンピュータを用いて実現するためのプログラムであって、 第 1の表色系により表現されたカラー画像データを、 該第 1の表色系とは異な る第 2の表色系によるカラー画像データに色変換する機能と、
互いに隣接する画素を所定の複数個ずつ第 1種のプロックとしてまとめて、 該 第 1種のプロック内でのエッジの有無を検出する機能と、
前記第 1種のブロックに含まれる各画素についての前記色変換後の力ラー画像 データを、 該ブロック内にェッジが存在しない場合には圧縮した状態でメモリに 記憶する機能と、
前記圧縮された状態で記憶されたカラー画像デ一夕を前記メモリから読み出し て解凍する機能と、
前記解凍されたカラー画像デ一夕に基づいて、 前記第 2の表色系の各色毎にド ッ卜の形成有無を判断する機能と
を実現するプログラム。
PCT/JP2004/003603 2003-03-19 2004-03-17 カラー画像データの変換を行なう画像処理装置、および画像処理方法 WO2004084540A1 (ja)

Priority Applications (2)

Application Number Priority Date Filing Date Title
EP04721371A EP1608147A4 (en) 2003-03-19 2004-03-17 IMAGE PROCESSING DEVICE AND IMAGE PROCESSING METHOD FOR IMPLEMENTING THE IMPLEMENTATION OF COLOR IMAGE DATA
US10/549,663 US7612911B2 (en) 2003-03-19 2004-03-17 Image processing device and image processing method for performing conversion of color image data

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2003-076071 2003-03-19
JP2003076071A JP4192640B2 (ja) 2003-03-19 2003-03-19 ブロック内のエッジを検出しながら処理を行う画像処理装置、および画像処理方法

Publications (1)

Publication Number Publication Date
WO2004084540A1 true WO2004084540A1 (ja) 2004-09-30

Family

ID=33027879

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2004/003603 WO2004084540A1 (ja) 2003-03-19 2004-03-17 カラー画像データの変換を行なう画像処理装置、および画像処理方法

Country Status (5)

Country Link
US (1) US7612911B2 (ja)
EP (1) EP1608147A4 (ja)
JP (1) JP4192640B2 (ja)
CN (1) CN100379250C (ja)
WO (1) WO2004084540A1 (ja)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100550971C (zh) * 2004-10-26 2009-10-14 佳能株式会社 图像处理装置和图像处理方法

Families Citing this family (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060061822A1 (en) * 2004-09-22 2006-03-23 Sung Chih-Ta S Method and device for temporarily storing image data
JP2006319793A (ja) * 2005-05-13 2006-11-24 Pioneer Electronic Corp 画像信号処理回路、表示装置及び画像信号処理方法
JP2007028395A (ja) * 2005-07-20 2007-02-01 Fuji Xerox Co Ltd 符号化装置、画像処理装置、画像処理方法及びそのプログラム
JP4626473B2 (ja) * 2005-10-12 2011-02-09 セイコーエプソン株式会社 画像処理装置、画像出力装置および方法
JP4623300B2 (ja) * 2005-12-17 2011-02-02 富士ゼロックス株式会社 画像処理装置および画像処理プログラム
US9418450B2 (en) 2006-08-31 2016-08-16 Ati Technologies Ulc Texture compression techniques
WO2008133632A1 (en) * 2007-04-30 2008-11-06 Hewlett-Packard Development Company, L.P. Image compression
KR101415564B1 (ko) 2007-10-29 2014-08-06 삼성디스플레이 주식회사 표시 장치의 구동 장치 및 방법
JP4507265B2 (ja) 2008-06-30 2010-07-21 ルネサスエレクトロニクス株式会社 画像処理回路、及びそれを搭載する表示パネルドライバ並びに表示装置
JP2011193394A (ja) * 2010-03-16 2011-09-29 Canon Inc 画像処理装置、画像処理方法、及びプログラム
JP5699709B2 (ja) * 2011-03-16 2015-04-15 セイコーエプソン株式会社 画像処理装置
JP5853651B2 (ja) * 2011-11-30 2016-02-09 セイコーエプソン株式会社 印刷システム
JP5853650B2 (ja) 2011-11-30 2016-02-09 セイコーエプソン株式会社 印刷システム及び印刷システム用プログラム
CN102497489B (zh) * 2011-12-05 2015-11-18 优视科技有限公司 图像压缩方法、图像压缩装置和移动终端
KR101996646B1 (ko) * 2017-03-30 2019-10-01 주식회사 아나패스 디스플레이 구동 방법 및 디스플레이 구동 장치
KR20200144097A (ko) * 2018-04-12 2020-12-28 도판 인사츠 가부시키가이샤 라이트 필드 화상 생성 시스템, 화상 표시 시스템, 형상 정보 취득 서버, 화상 생성 서버, 표시 장치, 라이트 필드 화상 생성 방법 및 화상 표시 방법
US10880455B2 (en) * 2019-03-25 2020-12-29 Apple Inc. High dynamic range color conversion using selective interpolation

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0353767A (ja) * 1989-07-21 1991-03-07 Toppan Printing Co Ltd 印刷用画像データ圧縮・復元システム
JPH05324815A (ja) * 1992-05-20 1993-12-10 Ricoh Co Ltd 多値画像圧縮方式及び多値画像出力方式
JPH06121175A (ja) * 1992-10-06 1994-04-28 Fuji Xerox Co Ltd 画像処理装置
JPH06125464A (ja) * 1992-10-13 1994-05-06 Canon Inc 画像処理方法及び装置
JPH08307691A (ja) * 1995-05-11 1996-11-22 Minolta Co Ltd 画像処理装置
JP2001298622A (ja) * 2000-04-11 2001-10-26 Ricoh Co Ltd 画像処理装置
JP2002064713A (ja) * 2000-08-21 2002-02-28 I & F Kk データ処理方法、データ処理装置及び記憶媒体
JP2003087570A (ja) * 2001-09-06 2003-03-20 Ricoh Co Ltd 画像圧縮装置及び画像圧縮方法
JP2003162382A (ja) * 2001-11-22 2003-06-06 Ricoh Co Ltd カラー画像形成装置およびカラー複写装置

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5838455A (en) * 1919-05-11 1998-11-17 Minolta Co., Ltd. Image processor with image data compression capability
US4974071A (en) 1987-04-28 1990-11-27 Canon Kabushiki Kaisha Color image data encoding apparatus having improved resolution/efficiency characteristics
JPH08202881A (ja) 1995-01-27 1996-08-09 Fuji Xerox Co Ltd 画像処理装置
US5729625A (en) * 1995-07-14 1998-03-17 Canon Kabushiki Kaisha Image processing method and apparatus which expand a pixel into multiple pixels, with a change in the number of gray levels
JPH10271331A (ja) 1997-03-26 1998-10-09 Oki Data:Kk 画像処理方法及びその装置
JPH1127666A (ja) 1997-07-01 1999-01-29 Matsushita Electric Ind Co Ltd 画像符号化方法
JP3743471B2 (ja) 1998-02-16 2006-02-08 リコープリンティングシステムズ株式会社 印刷システム、印刷装置及び印刷制御装置
JP2002185788A (ja) 2000-10-06 2002-06-28 Seiko Epson Corp 画像処理装置、画像処理方法、印刷制御装置、および記録媒体

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0353767A (ja) * 1989-07-21 1991-03-07 Toppan Printing Co Ltd 印刷用画像データ圧縮・復元システム
JPH05324815A (ja) * 1992-05-20 1993-12-10 Ricoh Co Ltd 多値画像圧縮方式及び多値画像出力方式
JPH06121175A (ja) * 1992-10-06 1994-04-28 Fuji Xerox Co Ltd 画像処理装置
JPH06125464A (ja) * 1992-10-13 1994-05-06 Canon Inc 画像処理方法及び装置
JPH08307691A (ja) * 1995-05-11 1996-11-22 Minolta Co Ltd 画像処理装置
JP2001298622A (ja) * 2000-04-11 2001-10-26 Ricoh Co Ltd 画像処理装置
JP2002064713A (ja) * 2000-08-21 2002-02-28 I & F Kk データ処理方法、データ処理装置及び記憶媒体
JP2003087570A (ja) * 2001-09-06 2003-03-20 Ricoh Co Ltd 画像圧縮装置及び画像圧縮方法
JP2003162382A (ja) * 2001-11-22 2003-06-06 Ricoh Co Ltd カラー画像形成装置およびカラー複写装置

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP1608147A4 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100550971C (zh) * 2004-10-26 2009-10-14 佳能株式会社 图像处理装置和图像处理方法

Also Published As

Publication number Publication date
EP1608147A4 (en) 2007-03-07
EP1608147A1 (en) 2005-12-21
CN100379250C (zh) 2008-04-02
JP2004289274A (ja) 2004-10-14
JP4192640B2 (ja) 2008-12-10
US7612911B2 (en) 2009-11-03
CN1762149A (zh) 2006-04-19
US20060181720A1 (en) 2006-08-17

Similar Documents

Publication Publication Date Title
US8040569B2 (en) Image processing apparatus and method for contrast processing and intermediate color removal
WO2004084540A1 (ja) カラー画像データの変換を行なう画像処理装置、および画像処理方法
JP3912055B2 (ja) 画像処理装置、印刷制御装置、画像処理方法、および記録媒体
JP4103590B2 (ja) 画像処理装置、印刷制御装置、画像処理方法、および記録媒体
US20110149304A1 (en) Image Output Control System, Image Processing Device, and Image Processing Method
JP3974721B2 (ja) 画像処理方法及び画像処理装置
JP2004235993A (ja) 画像処理方法
JP6193594B2 (ja) 画像処理装置、画像処理方法、画像処理システムおよびプログラム
JP6012425B2 (ja) 画像処理装置および画像処理方法
JP3666427B2 (ja) 画像処理装置、印刷制御装置、画像処理方法、および記録媒体
JP4375050B2 (ja) 所定領域内に形成されるドット個数の情報に基づいて画像を出力する画像出力システム
JP6192327B2 (ja) 画像処理装置、画像処理方法およびプログラム
JP2005269527A (ja) 所定領域内に形成されるドット個数の情報に基づいて画像を出力する画像出力システム
US20070041054A1 (en) Image output control system, image output device, and image processing device
JP2011044821A (ja) 画像処理装置
US20060132849A1 (en) Technique for image data recording
JP4100522B2 (ja) 画像処理装置,画像処理方法およびそのプログラムを記録した記録媒体
JP6659174B2 (ja) 画像処理装置、画像処理方法及びプログラム
JP2005138421A (ja) 圧縮した画像データに画像処理を行って画像を出力する画像出力装置
JP4225320B2 (ja) 画像出力制御システム、画像出力装置、画像処理装置およびそれらの方法
JP2006191268A (ja) 複数画素ずつ画像処理を行いながら画像を出力する画像出力装置
JP3870604B2 (ja) データ変換装置
JP2018142781A (ja) 画像処理装置、画像処理システム、画像処理方法およびそのコンピュータープログラム
JP2005039491A (ja) 所定領域内に形成されるドット個数の情報に基づいて画像を表示する画像表示システム
JP2005007801A (ja) 所定領域内に形成されるドット個数の情報に基づいて画像を表示する画像表示システム

Legal Events

Date Code Title Description
AK Designated states

Kind code of ref document: A1

Designated state(s): AE AG AL AM AT AU AZ BA BB BG BR BW BY BZ CA CH CN CO CR CU CZ DE DK DM DZ EC EE EG ES FI GB GD GE GH GM HR HU ID IL IN IS KE KG KP KR KZ LC LK LR LS LT LU LV MA MD MG MK MN MW MX MZ NA NI NO NZ OM PG PH PL PT RO RU SC SD SE SG SK SL SY TJ TM TN TR TT TZ UA UG US UZ VC VN YU ZA ZM ZW

AL Designated countries for regional patents

Kind code of ref document: A1

Designated state(s): BW GH GM KE LS MW MZ SD SL SZ TZ UG ZM ZW AM AZ BY KG KZ MD RU TJ TM AT BE BG CH CY CZ DE DK EE ES FI FR GB GR HU IE IT LU MC NL PL PT RO SE SI SK TR BF BJ CF CG CI CM GA GN GQ GW ML MR NE SN TD TG

121 Ep: the epo has been informed by wipo that ep was designated in this application
WWE Wipo information: entry into national phase

Ref document number: 2006181720

Country of ref document: US

Ref document number: 10549663

Country of ref document: US

WWE Wipo information: entry into national phase

Ref document number: 20048074156

Country of ref document: CN

WWE Wipo information: entry into national phase

Ref document number: 2004721371

Country of ref document: EP

WWP Wipo information: published in national office

Ref document number: 2004721371

Country of ref document: EP

WWP Wipo information: published in national office

Ref document number: 10549663

Country of ref document: US