Image processing device, image processing method, and program
The image processing device uses distinct filters for inner and edge portions of an image to reduce resolution effectively, addressing blurring and directional inconsistencies, ensuring high-quality image conversion for printing.
Patent Information
- Application Number
- JP2024041405
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2024-03-15
- Publication Date
- 2025-09-29
AI Technical Summary
Existing image processing methods struggle to effectively reduce image resolution without causing defects such as blurring or inconsistencies between different directions, especially when converting resolutions for printing.
An image processing device applies different types of filters to inner and edge portions of an image to calculate color values, using a first type of filter for inner parts and a second type of filter for edge parts, allowing for a lower resolution representation while minimizing defects.
This approach enables proper calculation of color values at a lower resolution, reducing the possibility of image defects and maintaining consistent image quality across different directions.
Smart Images

Figure 2025141462000001_ABST
Abstract
Description
[Technical Field]
[0001] This specification relates to techniques for reducing the resolution of an image. [Background technology]
[0002] Various image processes can be performed at various resolutions. For example, Patent Document 1 discloses a technique for increasing the resolution of printed matter to 1000 dpi or higher (e.g., 1200 dpi) in order to improve the image quality of printed matter produced by an inkjet recording method. [Prior art documents] [Patent documents]
[0003] [Patent Document 1] Japanese Patent Publication No. 2020-062784 Summary of the Invention [Problem to be solved by the invention]
[0004] Image processing may include converting the resolution of an image to a resolution suitable for the image processing. For example, image processing for printing may convert the resolution of an image to a resolution suitable for a printing device. If the resolution suitable for the printing device is lower than the resolution of the image, the image resolution is reduced to the resolution for printing by the image processing. However, there is room for improvement in reducing the resolution.
[0005] This specification discloses techniques for reducing the resolution of an image. [Means for solving the problem]
[0006] The techniques disclosed in this specification can be implemented in the following application examples.
[0007] [Application Example 1] An image processing device comprising: an acquisition unit that acquires raster data representing a target image; and a filter processing unit that calculates color values of each of a plurality of pixels in a filtered image by applying a filter from a plurality of filters that corresponds to a position in the target image to each of a plurality of portions included in the target image, wherein the filtered image represents the target image at a resolution in a first direction that is lower than a resolution of the target image in the first direction; the plurality of portions included in the target image include inner portions that are portions used to calculate color values of inner pixels away from an edge of the filtered image, and edge portions that are portions used to calculate color values of pixels adjacent to the edge of the filtered image; the plurality of filters include a first type of filter and a second type of filter having a size smaller than that of the first type of filter; and the filter processing unit applies the first type of filter to the inner portions of the target image and applies the second type of filter to the edge portions of the target image.
[0008] According to this configuration, a first type filter is applied to the inner part of the target image, and a second type filter having a size smaller than that of the first type filter is applied to the edge part of the target image, so that it is possible to properly calculate the color values of each of the multiple pixels of the filtered image representing the target image at a first-direction resolution lower than the first-direction resolution of the target image.
[0009] The technology disclosed in this specification can be realized in various forms, such as an image processing method and an image processing device, a computer program for realizing the functions of those methods or devices, a recording medium (e.g., a non-temporary recording medium) on which that computer program is recorded, and the like. [Brief explanation of the drawings]
[0010] [Figure 1] FIG. 1 is an explanatory diagram illustrating an image processing apparatus according to an embodiment; [Figure 2] 10 is a flowchart illustrating an example of image processing. [Figure 3] 1A is a diagram showing an example of a target image, and FIG. 1B is a diagram showing an example of a filtered image. [Figure 4] 10 is a flowchart illustrating an example of an image compression process. [Figure 5] 1A is a diagram showing a target image IM1 and blocks, and FIG. 1B is a diagram showing the correspondence between block positions and filters. [Figure 6] 10(A) and 10(B) are explanatory diagrams of the inner filter k34. [Figure 7] 10A-10I are explanatory diagrams of the corner filters k23TL, k23TR, k23BL, and k23BR. [Figure 8] 10A-10E are explanatory diagrams of edge filters k24T and k24B. [Figure 9] 10A to 10E are explanatory diagrams of edge filters k33L and k33R. [Figure 10] 10 is a flowchart illustrating an example of a first compression process sTL. [Figure 11] 10A-10L are diagrams showing filters and target pixels p2i. [Figure 12] 10 is a flowchart illustrating an example of a second compression process sT. [Figure 13] 10A-10L are diagrams showing filters and target pixels p2i. [Figure 14] 10 is a flowchart illustrating an example of a third compression process sTR. [Figure 15] 10A-10L are diagrams showing filters and target pixels p2i. [Figure 16] 10 is a flowchart illustrating an example of a fourth compression process sL. [Figure 17] 10A-10L are diagrams showing filters and target pixels p2i. [Figure 18] 10 is a flowchart illustrating an example of a fifth compression process sM. [Figure 19] 10A-10L are diagrams showing filters and target pixels p2i. [Figure 20]10 is a flowchart illustrating an example of a sixth compression process sR. [Figure 21] 10A-10L are diagrams showing filters and target pixels p2i. [Figure 22] 10 is a flowchart illustrating an example of a seventh compression process sBL. [Figure 23] 10A-10L are diagrams showing filters and target pixels p2i. [Figure 24] 13 is a flowchart illustrating an example of an eighth compression process sB. [Figure 25] 10A-10L are diagrams showing filters and target pixels p2i. [Figure 26] 13 is a flowchart illustrating an example of a ninth compression process sBR. [Figure 27] 10A-10L are diagrams showing filters and target pixels p2i. DETAILED DESCRIPTION OF THE INVENTION
[0011] A. Working Example: A1.Device configuration: 1 is an explanatory diagram showing an image processing apparatus according to an embodiment. The image processing apparatus 200 is, for example, a personal computer. The image processing apparatus 200 executes a process for causing a printing apparatus 900 to print an image.
[0012] The image processing device 200 includes a processor 210, a storage device 215, a display unit 240, an operation unit 250, and a communication interface 270. These elements are connected to each other via a bus. The storage device 215 includes a volatile storage device 220 and a non-volatile storage device 230.
[0013] The processor 210 is a device configured to perform data processing, and is, for example, a central processing unit (CPU) or a system on a chip (SoC). The volatile storage device 220 is, for example, a dynamic random access memory (DRAM), and the nonvolatile storage device 230 is, for example, a flash memory. The nonvolatile storage device 230 stores a program 231 and data for each of a plurality of filters k34, k23TL, k23TR, k23BL, k23BR, k24T, k24B, k33L, and k33R (details will be described later).
[0014] The display unit 240 is a device configured to display images, such as a liquid crystal display or an organic EL display. The operation unit 250 is a device configured to receive operations by a user, such as a button, a lever, or a touch panel overlaid on the display unit 240. The display unit 240 and the operation unit 250 may form a so-called touch screen. The user can input various requests and instructions to the image processing device 200 by operating the operation unit 250. The display unit 240 may display operation elements (e.g., buttons, sliders, etc.), and the displayed elements may be operated through operation of the operation unit 250.
[0015] The communication interface 270 is an interface for communicating with other devices (for example, it includes one or more of a USB interface, a wired LAN interface, and an IEEE802.11 wireless interface). In this embodiment, the communication interface 270 is connected to a printing device 900.
[0016] In this embodiment, the printing device 900 is a so-called line printer. The printing device 900 includes a conveying device 910, heads 940C, 940M, 940Y, and 940K, and a control unit 970.
[0017] The transport device 910 is a device that transports the print medium PM (e.g., paper) in a first direction Dx. In this embodiment, the transport device 910 includes a first roller 910a, a second roller 910b, and an electric motor (not shown) that rotates the rollers 910a and 910b. The transport device 910 transports the print medium PM by rotating the rollers 910a and 910b.
[0018] The heads 940C, 940M, 940Y, and 940K are devices that form ink dots on the printing medium PM. In this embodiment, the heads 940C, 940M, 940Y, and 940K are disposed between the first roller 910a and the second roller 910b. The heads 940C, 940M, 940Y, and 940K correspond to cyan, magenta, yellow, and black inks, respectively. The surface of each head 940C, 940M, 940Y, and 940K facing the printing medium PM has multiple nozzles Nz for ejecting ink toward the printing medium PM. Each head 940C, 940M, 940Y, and 940K forms ink dots on the printing medium PM by ejecting ink from the nozzles Nz. The second direction Dy in the figure is perpendicular to the first direction Dx. On each of the heads 940C, 940M, 940Y, and 940K, the nozzles Nz are arranged at a predetermined pitch at multiple positions in the second direction Dy.
[0019] The control unit 970 controls the transport device 910 and the heads 940C, 940M, 940Y, and 940K in accordance with print job data from an external device (e.g., image processing device 200). The control unit 970 causes the transport device 910 to transport the printing medium PM while causing the heads 940C, 940M, 940Y, and 940K to eject ink. This causes an image IMp to be printed on the printing medium PM. The control unit 970 may include, for example, a dedicated electrical circuit (e.g., an ASIC (Application Specific Integrated Circuit)) and / or a computer.
[0020] The printed image IMp is represented by a plurality of dots arranged in a first direction Dx and a second direction Dy. Here, the density of positions at which dots can be formed is referred to as the printing resolution. The unit of printing resolution is, for example, dots per inch (dpi). The printing resolution in the first direction Dx and the printing resolution in the second direction Dy may each be various resolutions. The printing resolution in the second direction Dy may be determined by the pitch of the plurality of nozzles Nz at multiple positions in the second direction Dy. In this embodiment, the printing resolution in the second direction Dy is 1200 dpi. The printing resolution in the first direction Dx can be adjusted by adjusting the transport speed of the printing medium PM during printing. The printing resolution in the first direction Dx may be the same as the printing resolution in the second direction Dy. Alternatively, the printing resolution in the first direction Dx may be different from the printing resolution in the second direction Dy. In this embodiment, the printing resolution in the first direction Dx is 900 dpi.
[0021] As will be described later, the image processing device 200 uses target image data representing the target image to cause the printing device 900 to print the target image. The target image data represents the color values of multiple pixels arranged in a grid pattern along the horizontal and vertical directions. In this embodiment, the horizontal direction corresponds to the first direction Dx, and the vertical direction corresponds to the second direction Dy. In the target image, the horizontal resolution (i.e., pixel density) and vertical resolution correspond to the printing resolution in the second direction Dy (here, 1200 dpi). In other words, N pixel positions aligned vertically in the target image correspond to N dot formation positions aligned in the second direction Dy. Meanwhile, the printing resolution in the first direction Dx is lower than the printing resolution in the second direction Dy. The image processing device 200 converts the resolution of the target image to match the printing resolution. In this embodiment, the image processing device 200 converts a 1200 pixel x 1200 pixel region in the target image into a 1200 pixel x 900 pixel region representing the same image (where the size of the region is expressed as the number of pixels in the second direction Dy x the number of pixels in the first direction Dx). That is, the image processing device 200 compresses (i.e., reduces) the resolution in the direction corresponding to the first direction Dx, and keeps the resolution in the direction corresponding to the second direction Dy unchanged.
[0022] As a method for reducing the resolution, for example, a method of thinning out pixel lines may be adopted. However, this method may cause defects such as blurring of the image. Furthermore, if the number of pixel lines thinned out differs between the first direction Dx and the second direction Dy, differences may occur in the features expressed between the first direction Dx and the second direction Dy. In this embodiment, the image processing device 200 reduces the resolution by performing a filter process to reduce the possibility of such defects (details will be described later).
[0023] A2.Image Processing: FIG. 2 is a flowchart illustrating an example of image processing. The processor 210 of the image processing device 200 (FIG. 1) executes image processing according to a program 231 in response to a print instruction input to the image processing device 200. The print instruction may be input by any method. In this embodiment, the user inputs the print instruction by operating the operation unit 250. The print instruction may include data information specifying image data representing the image to be printed. The data information may specify image data stored in various storage devices. The storage device may be selected from, for example, the storage device 215 (e.g., the non-volatile storage device 230), a storage device (not shown) connected to the communication interface 270 (e.g., a USB flash drive), or a storage device of a server capable of communicating with the image processing device 200. The user may input the print instruction and image data to the image processing device 200 via a terminal device (not shown) (e.g., a smartphone) capable of communicating with the image processing device 200.
[0024] In S13, the processor 210 acquires target image data in accordance with the print instruction. The processor 210 stores the acquired target image data in the storage device 215 (e.g., the non-volatile storage device 230). Image data having a data format for printing is used as the target image data. The data format for printing may be any of various data formats suitable for image processing for printing. In this embodiment, the data format for printing is a raster format having a resolution equivalent to 1200 dpi*1200 dpi. The processor 210 may acquire the image data specified by the print instruction as the target image data as is. Alternatively, the processor 210 may acquire the target image data by performing image processing (also referred to as preprocessing) on the image data specified by the print instruction. The preprocessing may include various processes. For example, the preprocessing may include one or more of contrast adjustment processing, white balance adjustment processing, and resolution conversion processing.
[0025] FIG. 3A is a diagram showing an example of a target image represented by target image data. Directions Dx and Dy are shown in the figure. These directions Dx and Dy respectively indicate the directions Dx and Dy relative to the printed image when the image is printed on the printing medium PM (FIG. 1). In this embodiment, the target image IM1 is a rectangular image including two sides eL1 and eR1 perpendicular to the first direction Dx, two sides eT1 and eB1 parallel to the first direction Dx, and four corners cTL1, cTR1, cBL1, and cBR1. Hereinafter, the sides eL1 and eR1 perpendicular to the first direction Dx will be referred to as first-type sides eL1 and eR1. The sides eT1 and eB1 parallel to the first direction Dx will be referred to as second-type sides eT1 and eB1.
[0026] The target image data is raster data representing the color values of a plurality of pixels p1 arranged in a grid pattern along a first direction Dx and a second direction Dy. In this embodiment, the color value of each pixel p1 is represented by the gradation values of three color components: red R, green G, and blue B. The RGB gradation values are represented, for example, in 256 gradations from zero to 255.
[0027] The figure shows multiple partial regions A1 that form the target image IM1. The partial region A1 is a region that serves as a reference for blocks used in resolution conversion, which will be described later. The partial region A1 is a rectangular region with two sides parallel to the first direction Dx and two sides parallel to the second direction Dy. Within the target image IM1, the multiple partial regions A1 are arranged in a grid pattern along the first direction Dx and the second direction Dy without any gaps, so as not to overlap one another. The multiple partial regions A1 are arranged so that a corner of each partial region A1 overlaps a specific corner of the target image IM1 (for example, the upper left corner cTL1). In this embodiment, as a result of this arrangement, no part of the partial region A1 extends outside the target image IM1, and the entire target image IM1 is represented by the multiple partial regions A1. In other words, the corners of the partial region A1 overlap each of the corners cTL1, cTR1, cBL1, and cBR1 of the target image IM1. In this embodiment, the length of the partial region A1 in the first direction Dx and the length of the partial region A1 in the second direction Dy are each 4 pixels, that is, the shape of the partial region A1 is a square.
[0028] 3(B) is a diagram showing an example of a filtered image. The filtered image IM2 is an image obtained by converting the resolution of the target image IM1 (FIG. 3(A)) into a resolution suitable for the printing resolution of the printing device 900. The filtered image IM2 represents the same image as the target image IM1 (FIG. 3(A)).
[0029] The filtered image IM2 is a rectangular image including two sides eL2 and eR2 perpendicular to the first direction Dx, two sides eT2 and eB2 parallel to the first direction Dx, and four corners cTL2, cTR2, cBL2, and cBR2. The first-type sides eL2 and eR2 of the filtered image IM2 correspond to the first-type sides eL1 and eR1 of the target image IM1, respectively. The second-type sides eT2 and eB2 of the filtered image IM2 correspond to the second-type sides eT1 and eB1 of the target image IM1, respectively. The corners cTL2, cTR2, cBL2, and cBR2 of the filtered image IM2 correspond to the corners cTL1, cTR1, cBL1, and cBR1 of the target image IM1, respectively.
[0030] The filtered image IM2 is represented by a plurality of pixels p2 arranged in a grid pattern along a first direction Dx and a second direction Dy. The figure shows a plurality of partial regions A2 that form the filtered image IM2. The partial regions A2 are respectively associated with a plurality of partial regions A1 (FIG. 3(A)). Each partial region A2 is a rectangular region having two sides parallel to the first direction Dx and two sides parallel to the second direction Dy. Within the filtered image IM2, the partial regions A2 are arranged without gaps along the first direction Dx and the second direction Dy so as not to overlap one another. The partial regions A2 represent the same partial image as the corresponding partial region A1. In this embodiment, the length of the partial region A2 in the first direction Dx is 3 pixels. The length of the partial region A2 in the second direction Dy is 4 pixels.
[0031] In S16 (FIG. 2), the processor 210 executes an image compression process. This process includes a resolution conversion process for generating a filtered image IM2 (FIG. 3B) suitable for printing from the target image IM1 (FIG. 3A). In this embodiment, the processor 210 reduces the resolution in the first direction Dx from a resolution corresponding to 1200 dpi to a resolution corresponding to 900 dpi. As shown in FIG. 3A, the number of pixels in the first direction Dx of the partial area A1 of the target image IM1 is 4. As shown in FIG. 3B, the number of pixels in the first direction Dx of the partial area A2 of the filtered image IM2 is reduced from 4 to 3. The number of pixels in the second direction Dy is the same between the partial area A1 and the partial area A2. Details of the image compression process will be described later.
[0032] In S20 (FIG. 2), the processor 210 performs color conversion processing on the raster data representing the filtered image IM2. The color conversion processing converts the color values of each pixel from the color values in the color space before conversion (in this embodiment, the RGB color space) to color values in the print color space, which is the color space for printing. The print color space is a color space represented by color components corresponding to the color materials used by the printing device 900 (in this embodiment, the CMYK color space). The correspondence between the color values in the color space before conversion and the color values in the print color space is predetermined.
[0033] In S23, the processor 210 generates image data for printing by performing halftone processing using the color-converted raster data. The image data for printing represents a pattern of dots to be formed on the printing medium PM (FIG. 1). The halftone processing may be performed using various methods, such as error diffusion or a method using a dither matrix.
[0034] In S26, the processor 210 generates print job data using the image data for printing. The print job data is in a data format that can be interpreted by the printing device 900. The processor 210 supplies the print job data to the printing device 900. The control unit 970 of the printing device 900 controls the conveying device 910 and the heads 940C, 940M, 940Y, and 940K in accordance with the print job data to print the target image on the printing medium PM. Then, image processing ends.
[0035] A3. Overview of image compression processing (resolution conversion processing): 4 is a flowchart showing an example of the image compression process executed in S16 (FIG. 2). In S33, the processor 210 selects an unprocessed block as a block of interest from a plurality of blocks in the target image IM1 (FIG. 3(A)), which will be described later.
[0036] 5A is a diagram showing a target image IM1 and blocks. In this embodiment, the blocks are areas associated with the partial area A1. In the figure, nine types of partial areas A1TL, A1T, A1TR, A1R, A1BR, A1B, A1BL, A1L, and A1M are indicated by thick lines.
[0037] The upper left, upper right, lower right and lower left partial regions A1TL, A1TR, A1BR and A1BL are partial regions that include corners cTL1, cTR1, cBR1 and cBL1, respectively (referred to as corner partial regions A1TL, A1TR, A1BR and A1BL).
[0038] The top, right, bottom, and left partial regions A1T, A1R, A1B, and A1L are partial regions that contact one side eT1, eR1, eB1, and eL1, respectively (called side partial regions A1T, A1R, A1B, and A1L). The side partial regions A1T, A1R, A1B, and A1L are separated from the corresponding side. In addition, the side partial regions A1T, A1R, A1B, and A1L are separated from the corners cTL1, cTR1, cBL1, and cBR1.
[0039] The centrally located partial region A1M is an inner partial region (called an inner partial region A1M) that is away from the edges of the target image IM1 (that is, the sides eT1, eR1, eB1, and eL1).
[0040] In the drawing, blocks bTL, bT, bTR, bR, bBR, bB, bBL, bL, and bM corresponding to these partial regions A1TL, A1T, A1TR, A1R, A1BR, A1B, A1BL, A1L, and A1M are indicated by double lines. A block is an area that includes one partial region and a part that is adjacent to the outside of the partial region and is within a range of one pixel from the side of the partial region (called a peripheral part).
[0041] The inner block bM corresponding to the inner partial region A1M is a 6 pixel*6 pixel region that includes the inner partial region A1M and a peripheral portion (here, a portion with a width of one pixel that surrounds the inner partial region A1M).
[0042] The corner blocks bTL, bTR, bBR, and bBL corresponding to the corner regions A1TL, A1TR, A1BR, and A1BL are 5 pixel by 5 pixel regions that include the corner region and a peripheral portion that borders the outside of the corner region. The peripheral portion is the portion within the target image IM1 that surrounds the region and is 1 pixel wide. The portion surrounding the corner region that is outside the target image IM1 is omitted. For example, the upper left corner block bTL includes the corner region A1TL and the right and bottom portions of the corner region A1TL. The left and top portions of the corner region A1TL are omitted.
[0043] The side blocks bL and bR corresponding to the left and right side partial regions A1L and A1R are 6 pixel by 5 pixel regions that include the side partial region and the peripheral portion that borders the outside of the side partial region. For example, the left side block bL includes the side partial region A1L and the upper, right, and lower portions of the side partial region A1L. The left portion of the side partial region A1L is omitted.
[0044] The side blocks bT and bB corresponding to the upper and lower side partial regions A1T and A1B are 5 pixel by 6 pixel regions that include the side partial regions and the peripheral portions that contact the outside of the side partial regions. For example, the upper first side block bT includes the side partial region A1T and the right, bottom, and left portions of the side partial region A1T. The upper portion of the side partial region A1T is omitted.
[0045] The target image IM1 includes a plurality of blocks associated with a plurality of partial regions A1 (FIG. 3(A)). In S33 (FIG. 4), the processor 210 selects an unprocessed block from the plurality of blocks as a block of interest. In S36, the processor 210 calculates the color values of each of the 12 pixels p2 in the partial region A2 (FIG. 3(B)) associated with the partial region A1 (FIG. 3(A)) included in the block of interest by filtering the block of interest. The processor 210 uses a filter associated with the position of the block of interest. The positions of the plurality of blocks are classified into any of the nine types of positions of the nine types of blocks bTL, bT, bTR, bR, bBR, bB, bBL, bL, and bM described above.
[0046] FIG. 5(B) is a diagram showing the correspondence between block positions and filters. Nine types of blocks bTL, bT, bTR, bR, bBR, bB, bBL, bL, and bM are shown in the diagram, corresponding to nine positions in the target image IM1. Filter codes (starting with the letter "k") are shown within each of the blocks bTL, bT, bTR, bR, bBR, bB, bBL, bL, and bM. For example, the upper left corner block bTL is associated with filters k34, k23TL, k24T, and k33L. The codes starting with the letter "s" in parentheses below the block codes indicate the compression processes associated with the blocks. Details of the filters and compression processes will be described later.
[0047] In S40 (FIG. 4), processor 210 determines whether all blocks in target image IM1 have been processed. If unprocessed blocks remain (S40: No), processor 210 proceeds to S33 and processes a new block. If all blocks have been processed (S40: Yes), processor 210 ends the image compression process of FIG. 4. As a result, processor 210 calculates the color values of all pixels p2 in filtered image IM2.
[0048] A4. Filter (Kernel): Filters k34, k23TL, k23TR, k23BL, k23BR, k24T, k24B, k33L, and k33R (FIG. 5(B)) represent the weights of each of the multiple pixels within the range defined by each filter. Such filters are also called kernels (hereinafter, filters are also referred to as kernels). In this embodiment, each filter is a rectangular filter. The two-digit number included in the filter symbol indicates the number of rows and the number of columns within the range of the filter. For example, filter k34 is a filter with 3 rows and 4 columns. Each filter will be described below.
[0049] 6(A) and 6(B) are explanatory diagrams of the inner filter k34. FIG. 6(A) shows an example of the inner filter k34. The inner filter k34 represents the weights of 12 pixels arranged in 3 rows and 4 columns. In this embodiment, a Gaussian filter is used as the inner filter k34. The weights become smaller the farther from the center k34c of the inner filter k34. The two hatched pixels k34p indicate the pixels closest to the center k34c (referred to as reference pixels k34p). In this embodiment, the two reference pixels k34p have the same maximum weight within the inner filter k34.
[0050] 6(B) shows the position of inner filter k34 on target image IM1 and the position of target pixel p2i on filtered image IM2. Target pixel p2i is pixel p2, the color value of which is calculated by filtering. Inner filter k34 is applied when target pixel p2i is an inner pixel p2 away from the edge of filtered image IM2.
[0051] The position of the inner filter k34 on the target image IM1 is determined as follows. A target position psi is indicated in the target image IM1. The target position psi is the same as the position psi of the target pixel p2i on the filtered image IM2. The inner filter k34 is positioned so that the two reference pixels k34p of the inner filter k34 overlap with the two pixels p1 closest to the target position psi. In the example of FIG. 6(B), the position psi is located on the boundary between two adjacent pixels p1n. In this case, the inner filter k34 is positioned so that the two reference pixels k34p overlap with the two pixels p1n.
[0052] Note that the target position of the target pixel can be located at various positions on the target image IM1. Position psi2 on the filtered image IM2 indicates the position of pixel p2i2, which is adjacent to the target pixel p2i on the right. On the target image IM1, position psi2 is located at a position shifted from the center of one pixel p1 within the region of that pixel p1. The two pixels p1n2 are the two pixels p1 closest to position psi2. Although not shown, when pixel p2i2 is the target pixel, the inner filter k34 is located so that the two reference pixels k34p overlap the two pixels p1n2.
[0053] As shown in the figure, inner filter k34 overlaps a portion p34 formed by pixels arranged in three rows and four columns in the target image IM1. The processor 210 calculates the weighted average of the 12 gradation values of the 12 pixels in portion p34, weighted by the 12 weights represented by the inner filter k34, as the gradation value of the target pixel p2i. The gradation value calculation is performed for each RGB color component. Because the inner filter k34 assigns a larger weight to pixels closer to the target position psi, the processor 210 can appropriately calculate the gradation value of the target pixel p2i. Hereinafter, the portion p34 of the target image IM1 to which the inner filter k34 is applied is also referred to as the inner portion p34. The filtered image IM2 includes multiple pixels p2 that are away from the edge of the filtered image IM2 (these pixels p2 are arranged in a grid pattern along the first direction Dx and the second direction Dy). The target image IM1 includes a plurality of internal portions p34 associated with a plurality of pixels p2, that is, a plurality of internal portions p34 located at mutually different positions.
[0054] 7(A) to 7(I) are explanatory diagrams of corner filters k23TL, k23TR, k23BL, and k23BR. Corner filters k23TL, k23TR, k23BL, and k23BR are applied when target pixel p2i borders one of the four corners cTL2, cTR2, cBL2, and cBR2 of filtered image IM2. Note that pixel p2, which borders one of the four corners cTL2, cTR2, cBL2, and cBR2, borders two of the four edges eT2, eR2, eB2, and eL2.
[0055] FIG. 7A shows a Gaussian filter k23g. The Gaussian filter k23g is a 2-row, 3-column filter. The two hatched pixels k23gp indicate the pixels closest to the center k23gc of the Gaussian filter k23g (referred to as reference pixels k23gp). In this embodiment, the two reference pixels k23gp have the same maximum weight within the Gaussian filter k23g. The remaining four pixels have the same smaller weight. As will be described later, the corner filters k23TL, k23TR, k23BL, and k23BR are formed by changing the arrangement of the weights of the Gaussian filter k23g.
[0056] 7(B) and 7(C) are explanatory diagrams of the first corner filter k23TL. FIG. 7(B) shows the position of the first corner filter k23TL on the target image IM1 and the position of the target pixel p2i on the filtered image IM2. The target pixel p2i is located in the upper left corner of the filtered image IM2 and is adjacent to the upper left corner cTL2. The target position psi is shown in the target image IM1. In the figure, the outline of the inner filter k34 is shown by a dotted line when it is assumed that the inner filter k34 is positioned based on the target position psi. As shown in the figure, a portion of the inner filter k34, which is located at row 2, column 3, overlaps with a portion p23TL of row 2, column 3 that includes the upper left corner cTL1 of the target image IM1. The first corner filter k23TL is positioned so as to overlap with this portion p23TL of row 2, column 3 (the portion p23TL of row 2, column 3 is referred to as the first corner edge portion p23TL). The upper left corner of the first corner filter k23TL overlaps with the upper left corner cTL1 of the target image IM1.
[0057] FIG. 7C shows an example of the first corner filter k23TL. The target position psi is shown in the figure. The two hatched pixels TLp indicate the two pixels closest to the target position psi (referred to as reference pixels TLp). The two reference pixels TLp correspond to the first row and the first and second columns. In this embodiment, the weighting arrangement of the Gaussian filter k23g is changed so that the two reference pixels TLp have the same maximum weight. The remaining four pixels have the same smaller weights. The processor 210 calculates the weighted average of the six gradation values of the six pixels in the first corner edge portion p23TL (FIG. 7B), weighted by the six weights represented by the first corner filter k23TL, as the gradation value of the target pixel p2i (the gradation value is calculated for each color component). Because the first corner filter k23TL assigns a larger weight to pixels closer to the target position psi, the processor 210 can appropriately calculate the gradation value of the target pixel p2i.
[0058] 7(D) and 7(E) are explanatory diagrams of the second corner filter k23TR. Similar to FIG. 7(B), FIG. 7(D) shows the position of the second corner filter k23TR and the position of the target pixel p2i. The positions of the second corner filter k23TR and the target pixel p2i are the same as those obtained by horizontally flipping the positions of the first corner filter k23TL and the target pixel p2i in FIG. 7(B). The target pixel p2i is located in the upper right corner of the filtered image IM2 and is adjacent to the upper right corner cTR2. The second corner filter k23TR is positioned so as to overlap the portion p23TR of 2 rows and 3 columns that is adjacent to the upper right corner cTR1 of the target image IM1 (the portion p23TR of 2 rows and 3 columns is referred to as the second corner edge portion p23TR). The upper right corner of the second corner filter k23TR overlaps the upper right corner cTR1 of the target image IM1.
[0059] FIG. 7(E) shows an example of the second angular filter k23TR, similar to FIG. 7(C). The weighting arrangement in the second angular filter k23TR is the same as that obtained by flipping the weighting arrangement in the first angular filter k23TL (FIG. 7(C)) horizontally. Therefore, like the first angular filter k23TL, the second angular filter k23TR assigns a large weight to pixels close to the target position psi. As a result, the processor 210 can appropriately calculate the gradation value of the target pixel p2i.
[0060] 7(F) and 7(G) are explanatory diagrams of the third angular filter k23BL. Similar to FIG. 7(B), FIG. 7(F) shows the position of the third angular filter k23BL and the position of the target pixel p2i. The positions of the third angular filter k23BL and the target pixel p2i are the same as those obtained by vertically flipping the positions of the first angular filter k23TL and the target pixel p2i in FIG. 7(B). The target pixel p2i is located in the lower left corner of the filtered image IM2 and is adjacent to the lower left corner cBL2. The third angular filter k23BL is positioned so as to overlap the portion p23BL at 2 rows and 3 columns that is adjacent to the lower left corner cBL1 of the target image IM1 (the portion p23BL at 2 rows and 3 columns is referred to as the third corner edge portion p23BL). The lower left corner of the third angular filter k23BL overlaps the lower left corner cBL1 of the target image IM1.
[0061] FIG. 7(G) shows an example of a third angular filter k23BL, similar to FIG. 7(C). The weighting arrangement in the third angular filter k23BL is the same as that obtained by inverting the weighting arrangement in the first angular filter k23TL (FIG. 7(C)). Therefore, similar to the first angular filter k23TL, the third angular filter k23BL assigns a large weight to pixels close to the target position psi. As a result, the processor 210 can appropriately calculate the gradation value of the target pixel p2i.
[0062] 7(H) and 7(I) are explanatory diagrams of the fourth corner filter k23BR. Similar to FIG. 7(F), FIG. 7(H) shows the position of the fourth corner filter k23BR and the position of the target pixel p2i. The positions of the fourth corner filter k23BR and the target pixel p2i are the same as those obtained by horizontally flipping the positions of the third corner filter k23BL and the target pixel p2i in FIG. 7(F). The target pixel p2i is located in the lower right corner of the filtered image IM2 and is adjacent to the lower right corner cBR2. The fourth corner filter k23BR is positioned so as to overlap the portion p23BR at row 2, column 3 that is adjacent to the lower right corner cBR1 of the target image IM1 (the portion p23BR at row 2, column 3 is referred to as the fourth corner edge portion p23BR). The lower right corner of the fourth corner filter k23BR overlaps the lower right corner cBR1 of the target image IM1.
[0063] FIG. 7(I) shows an example of the fourth angular filter k23BR, similar to FIG. 7(G). The weighting arrangement in the fourth angular filter k23BR is the same as that obtained by horizontally inverting the weighting arrangement in the third angular filter k23BL (FIG. 7(G)). Therefore, like the third angular filter k23BL, the fourth angular filter k23BR assigns a large weight to pixels close to the target position psi. As a result, the processor 210 can appropriately calculate the gradation value of the target pixel p2i.
[0064] 8(A) to 8(E) are explanatory diagrams of the edge filters k24T and k24B. The edge filters k24T and k24B are applied when the target pixel p2i is in contact with one of two second-type edges eT2 and eB2 parallel to the first direction Dx of the filtered image IM2 (FIG. 3(B)) and when the target pixel p2i is away from the corners cTL2, cTR2, cBR2, and cBL2 of the filtered image IM2.
[0065] FIG. 8(A) shows a Gaussian filter k24g. The Gaussian filter k24g is a 2-row, 4-column filter. The four hatched pixels k24gp indicate pixels closest to the center k24gc of the Gaussian filter k24g (referred to as reference pixels k24gp). In this embodiment, the four reference pixels k24gp have the same maximum weight within the Gaussian filter k24g. The remaining four pixels have the same, smaller weight. As will be described later, the edge filters k24T and k24B are the same as the Gaussian filter k24g.
[0066] 8(B) and 8(C) are explanatory diagrams of the first edge filter k24T. FIG. 8(B) shows the position of the first edge filter k24T on the target image IM1 and the position of the target pixel p2i on the filtered image IM2. The target pixel p2i is located at the top edge of the filtered image IM2 and is adjacent to the top edge eT2. The target position psi is shown in the target image IM1. In the figure, the outline of the inner filter k34, assuming that the inner filter k34 is positioned based on the target position psi, is shown by a dotted line. As shown in the figure, a portion of the inner filter k34, which is located at 2 rows and 4 columns, overlaps with a portion p24T located at 2 rows and 4 columns that is adjacent to the top edge eT1 of the target image IM1. The first edge filter k24T is positioned so as to overlap with this portion p24T located at 2 rows and 4 columns (the portion p24T located at 2 rows and 4 columns is referred to as the first edge portion p24T). The upper side of the first side filter k24T overlaps with the upper side eT1 of the target image IM1. The filtered image IM2 includes a plurality of pixels p2 that contact the side eT2 (these pixels p2 are aligned in the first direction Dx). The target image IM1 includes a plurality of first side end portions p24T that correspond to the plurality of pixels p2, i.e., a plurality of first side end portions p24T that are located at different positions from each other.
[0067] FIG. 8(C) shows an example of the first edge filter k24T. The target position psi is shown in the figure. The four hatched pixels Tp indicate the four pixels closest to the target position psi (referred to as reference pixels Tp). The four reference pixels Tp correspond to the second and third columns of the first row and the second and third columns of the second row. In this embodiment, the weight arrangement of the Gaussian filter k24g (FIG. 8(A)) is changed so that the four reference pixels Tp have the same maximum weight. The remaining four pixels have the same, smaller weights. The resulting first edge filter k24T is the same as the Gaussian filter k24g. The processor 210 calculates the weighted average of the eight gradation values of the eight pixels in the first side end portion p24T (FIG. 8(B)), weighted by the eight weights represented by the first side filter k24T, as the gradation value of the target pixel p2i (the gradation value is calculated for each color component). The first side filter k24T assigns a large weight to pixels closer to the target position psi, so the processor 210 can appropriately calculate the gradation value of the target pixel p2i.
[0068] 8(D) and 8(E) are explanatory diagrams of the second side filter k24B. Similar to FIG. 8(B), FIG. 8(D) shows the position of the second side filter k24B and the position of the target pixel p2i. The positions of the second side filter k24B and the target pixel p2i are the same as those obtained by vertically flipping the positions of the first side filter k24T and the target pixel p2i in FIG. 8(B). The target pixel p2i is located at the bottom edge of the filtered image IM2 and is adjacent to the bottom side eB2. The second side filter k24B is positioned so as to overlap the portion p24B at 2 rows and 4 columns that is adjacent to the bottom side eB1 of the target image IM1 (the portion p24B at 2 rows and 4 columns is referred to as the second side edge portion p24B). The bottom side of the second side filter k24B overlaps the bottom side eB1 of the target image IM1. The filtered image IM2 includes a plurality of pixels p2 adjacent to the side eB2 (these pixels p2 are aligned in the first direction Dx). The target image IM1 includes a plurality of second side end portions p24B associated with the plurality of pixels p2, i.e., a plurality of second side end portions p24B located at different positions from each other.
[0069] FIG. 8(E) shows an example of the second edge filter k24B, similar to FIG. 8(C). The weight arrangement in the second edge filter k24B is the same as the arrangement obtained by inverting the weight arrangement in the first edge filter k24T (FIG. 8(C)) vertically. In this embodiment, the second edge filter k24B is the same as the Gaussian filter k24g. Like the first edge filter k24T, the second edge filter k24B assigns a large weight to pixels close to the target position psi. Therefore, the processor 210 can appropriately calculate the gradation value of the target pixel p2i.
[0070] 9(A) to 9(E) are explanatory diagrams of the edge filters k33L and k33R. The edge filters k33L and k33R are applied when the target pixel p2i is in contact with one of two first-type edges eL2 and eR2 perpendicular to the first direction Dx of the filtered image IM2 (FIG. 3(B)) and when the target pixel p2i is away from the corners cTL2, cTR2, cBR2, and cBL2 of the filtered image IM2.
[0071] FIG. 9(A) shows a Gaussian filter k33g. The Gaussian filter k33g is a 3-row, 3-column filter. The hatched pixel k33gp indicates the pixel located at the center of the Gaussian filter k33g (referred to as the reference pixel k33gp). In this embodiment, the reference pixel k33gp has the largest weight within the Gaussian filter k33g. The weight decreases as the pixel is farther from the center k33gc of the Gaussian filter k33g. The side filters k33L and k33R are formed by changing the arrangement of the weights of the Gaussian filter k33g.
[0072] 9(B) and 9(C) are explanatory diagrams of the third-side filter k33L. FIG. 9(B) shows the position of the third-side filter k33L on the target image IM1 and the position of the target pixel p2i on the filtered image IM2. The target pixel p2i is located at the left edge of the filtered image IM2 and is adjacent to the left side eL2. The target position psi is shown in the target image IM1. In the figure, the outline of the inner filter k34, assuming that the inner filter k34 is positioned based on the target position psi, is shown by a dotted line. As shown in the figure, a portion of the inner filter k34, located at row 3, column 3, overlaps with a portion p33L located at row 3, column 3 that is adjacent to the top side eL1 of the target image IM1. The third-side filter k33L is positioned so as to overlap with this portion p33L located at row 3, column 3 (the portion p33L located at row 3, column 3 is referred to as the third-side edge portion p33L). The left side of the third side filter k33L overlaps with the left side eL1 of the target image IM1. The filtered image IM2 includes multiple pixels p2 that contact the side eL2 (these pixels p2 are aligned in the second direction Dy). The target image IM1 includes multiple third side end portions p33L that correspond to the multiple pixels p2, i.e., multiple third side end portions p33L that are located at different positions from each other.
[0073] FIG. 9C shows an example of the third-side filter k33L. The target position psi is shown in the figure. The hatched pixel Lp indicates the pixel that includes the target position psi (referred to as the reference pixel Lp). The reference pixel Lp corresponds to the second row and first column. In this embodiment, the weight arrangement of the Gaussian filter k33g is changed so that the reference pixel Lp has the largest weight. Specifically, the weights are swapped between the reference pixel k33gp of the Gaussian filter k33g and the reference pixel TLp of the third-side filter k33L. The weights of the other pixels are maintained. The processor 210 calculates the weighted average of the nine gradation values of the nine pixels in the third-side end portion p33L (FIG. 9B), weighted by the nine weights represented by the third-side filter k33L, as the gradation value of the target pixel p2i (the gradation value is calculated for each color component). The first corner filter k23TL assigns a large weight to the pixel that includes the target position psi, so the processor 210 can appropriately calculate the gradation value of the target pixel p2i.
[0074] 9(D) and 9(E) are explanatory diagrams of the fourth-side filter k33R. Similar to FIG. 9(B), FIG. 9(D) shows the position of the fourth-side filter k33R and the position of the target pixel p2i. The positions of the fourth-side filter k33R and the target pixel p2i are the same as those obtained by horizontally flipping the positions of the third-side filter k33L and the target pixel p2i in FIG. 9(B). The target pixel p2i is located at the right edge of the filtered image IM2 and is adjacent to the right edge eR2. The third-side filter k33L is positioned so as to overlap the portion p33R at 3 rows and 3 columns that is adjacent to the right edge eR1 of the target image IM1 (the portion p33R at 3 rows and 3 columns is referred to as the fourth-side edge portion p33R). The right edge of the fourth-side filter k33R overlaps the right edge eR1 of the target image IM1. The filtered image IM2 includes a plurality of pixels p2 adjacent to the side eR2 (these pixels p2 are aligned in the second direction Dy). The target image IM1 includes a plurality of fourth side end portions p33R associated with the plurality of pixels p2, i.e., a plurality of fourth side end portions p33R located at different positions from each other.
[0075] FIG. 9(E) shows an example of the fourth-side filter k33R, similar to FIG. 9(C). The weighting arrangement in the fourth-side filter k33R is the same as the arrangement obtained by flipping the weighting arrangement in the third-side filter k33L (FIG. 9(C)) horizontally. Therefore, like the third-side filter k33L, the fourth-side filter k33R assigns a large weight to the pixel including the target position psi. As a result, the processor 210 can appropriately calculate the gradation value of the target pixel p2i.
[0076] A5. Image compression processing (resolution conversion): In S36 (FIG. 4), the processor 210 executes a compression process associated with the position of the target block from nine types of compression processes sTL, sT, sTR, sL, sM, sR, sBL, sB, and sBR, which will be described later. Each of the compression processes sTL, sT, sTR, sL, sM, sR, sBL, sB, and sBR will be described below.
[0077] A5-1: First compression process sTL: FIG. 10 is a flowchart illustrating an example of the first compression process sTL associated with the first corner block bTL (FIGS. 5A and 5B). When the position of the target block corresponds to the first corner block bTL, the processor 210 executes the first compression process sTL. As described above, in the compression process, the processor 210 calculates the color values of each of the 12 pixels p2 in the partial area A2 (FIG. 3B) in the filtered image IM2 associated with the partial area A1 included in the target block (here, the first corner block bTL). The processor 210 calculates the gradation value of each pixel p2 using the filter described above. FIGS. 11A to 11L are diagrams illustrating a filter disposed on the first corner block bTL and a target pixel p2i in the partial area A2 to be processed by the filter. In each diagram, the outline of the filter is indicated by a double line (this also applies to other diagrams, described later, that illustrate the filter and the target pixel p2i). The processor 210 performs the process in the order of FIGS. 11(A) to 11(L). As shown in the figures, the processor 210 performs color value calculation processing for each pixel in the first direction Dx, starting from pixel p2 at the upper left corner of the partial area A2 (FIGS. 11(A) to 11(C)). After processing one row, the processor 210 processes the adjacent row in the second direction Dy (FIGS. 11(D) to 11(F)). The processor 210 performs color value calculation processing for each pixel in the first direction Dx, starting from pixel p2 at the left end of the new row (FIGS. 11(D) to 11(F)). By repeating this process, the processor 210 calculates the color values of each of the 12 pixels in the partial area A2 (FIGS. 11(G) to 11(L)). The process of FIG. 10 will be described in detail below.
[0078] In S110, processor 210 reads color value data for each of the 25 pixels of the first corner block bTL (FIGS. 5A and 5B), which is the block of interest, from the target image data stored in non-volatile memory device 230. Processor 210 stores the read data in volatile memory device 220. Processor 210 obtains the color values of the pixels in first corner block bTL by referring to this data in the filtering process described below.
[0079] In S113, the processor 210 sets the pixel p2 at the upper left corner of the partial area A2 (FIG. 11(A)) as the target pixel p2i. In S116, the processor 210 acquires data of the first corner filter k23TL (FIG. 7(C)) from the non-volatile storage device 230 (FIG. 1). In S120, the processor 210 calculates the color value of the target pixel p2i by performing a filter process using the first corner filter k23TL on the first corner end portion p23TL in the first corner block bTL (FIG. 11(A)). The processor 210 performs a color value storage process, which is a process of storing the calculated color value data in the storage device 215 (for example, the non-volatile storage device 230). The processor 210 determines the arrangement of the first corner filter k23TL on the target image IM1 according to the position of the target pixel p2i, similar to the arrangement described in FIG. 7(B).
[0080] In S123, the processor 210 sets the pixel p2 adjacent to the right as the new target pixel p2i (FIG. 11(B)). In S126, the processor 210 acquires data of the first side filter k24T (FIG. 8(B)) from the non-volatile storage device 230. In S130, the processor 210 calculates the color value of the target pixel p2i by performing a filter process using the first side filter k24T on the first side end portion p24T in the first corner block bTL (FIG. 11(B)). The processor 210 also performs a color value storage process. The processor 210 determines the arrangement of the first side filter k24T on the target image IM1 according to the position of the target pixel p2i, similar to the arrangement described in FIG. 8(B).
[0081] In S133, the processor 210 determines whether the current target pixel p2i is the pixel p2 at the right end of the partial area A2. In S133 following S130 for FIG. 11(B), the determination result is No. In this case, the processor 210 proceeds to S123 and sets the next target pixel p2i (FIG. 11(C)). Then, the processor 210 executes S126 and S130 for the new target pixel p2i. Thereafter, in S133, the determination result is Yes. In this case, the process proceeds to S136.
[0082] In S136, the processor 210 sets the leftmost pixel p2 in the next row in the second direction Dy as the target pixel p2i (FIG. 11(D)). In S140, the processor 210 acquires data of the third side filter k33L (FIG. 9(C)) from the non-volatile storage device 230. In S143, the processor 210 calculates the color value of the target pixel p2i by performing a filter process using the third side filter k33L on the third side end portion p33L in the first corner block bTL (FIG. 11(D)). The processor 210 also performs a color value storage process. The processor 210 determines the arrangement of the third side filter k33L on the target image IM1 according to the position of the target pixel p2i, similar to the arrangement described in FIG. 9(B).
[0083] At S146, processor 210 sets pixel p2, adjacent to the right, as the new target pixel p2i (FIG. 11(E)). At S150, processor 210 acquires data for inner filter k34 (FIG. 6(A)) from non-volatile storage device 230. At S153, processor 210 calculates the color value of target pixel p2i by performing filter processing using inner filter k34 on the inner portion p34 in the first corner block bTL (FIG. 11(E)). Processor 210 also performs color value storage processing. Processor 210 determines the arrangement of inner filter k34 on target image IM1 according to the position of target pixel p2i, similar to the arrangement described in FIG. 6(B).
[0084] In S156, the processor 210 determines whether all pixels p2 in the partial area A2 have been processed. If an unprocessed pixel p2 remains (S156: No), in S160, the processor 210 determines whether the current target pixel p2i is the pixel p2 at the right end of the partial area A2. In S160 following S156 (No) following S153 for FIG. 11(E), the determination result is No. In this case, the processor 210 proceeds to S146 and sets the next target pixel p2i (FIG. 11(F)). Then, the processor 210 executes S150 and S153 for the new target pixel p2i. Thereafter, the determination result in S156 is No, and the determination result in S160 is Yes. In this case, the processing proceeds to S136.
[0085] In S136, the processor 210 sets the pixel p2 at the left end of the next row in the second direction Dy as the target pixel p2i (FIG. 11(G)). The processor 210 then repeats the above process until the determination result in S156 is Yes. As a result, the processor 210 calculates the color value of the target pixel p2i in the order of FIG. 11(G) to FIG. 11(L).
[0086] If all pixels p2 in partial area A2 have been processed (S156: Yes), in S163, processor 210 releases the area in volatile memory device 220 that stores the pixel data of the first corner block bTL. This increases the amount of free space in the storage area of volatile memory device 220. Then, processor 210 ends the processing of Fig. 10. As described above, in the first compression processing sTL corresponding to the first corner block bTL, processor 210 uses filters k23TL, k24T, k33L, and k34.
[0087] A5-2: Second compression process sT: FIG. 12 is a flowchart showing an example of the second compression process sT associated with the first side block bT (FIGS. 5(A) and 5(B)). When the position of the target block corresponds to the first side block bT, the processor 210 executes the second compression process sT. FIGS. 13(A) to 13(L) are diagrams showing a filter placed on the first side block bT and the target pixel p2i in the partial area A2 to be processed by the filter. The order of processing pixel p2 in the partial area A2 is the same as the order explained in FIGS. 11(A) to 11(L). The processor 210 proceeds with the processing in the order of FIGS. 13(A) to 13(L). The processing of FIG. 12 will now be explained in detail.
[0088] In S210, the processor 210 reads color value data for each of the 30 pixels of the first side block bT (FIGS. 5A and 5B), which is the block of interest, from the target image data stored in the non-volatile storage device 230. The processor 210 stores the read data in the volatile storage device 220.
[0089] In S213, the processor 210 sets the pixel p2 in the upper left corner of the partial area A2 (FIG. 13(A)) as the target pixel p2i. In S216, the processor 210 acquires data of the first side filter k24T (FIG. 8(C)) from the non-volatile storage device 230 (FIG. 1). In S220, similar to S130 (FIG. 10), the processor 210 calculates the color value of the target pixel p2i using the first side filter k24T (FIG. 13(A)) and executes the color value storage process.
[0090] In S223, the processor 210 sets the pixel p2 adjacent to the right as the new target pixel p2i (FIG. 13(B)). In S226, the processor 210 determines whether the current target pixel p2i is the pixel p2 at the right end of the partial area A2. In S226 following S223 for FIG. 13(B), the determination result is No. In this case, the processor 210 proceeds to S220 and executes S220 for the new target pixel p2i (FIG. 13(B)). In S223, the processor 210 sets the next target pixel p2i (FIG. 13(C)). Thereafter, in S226, the determination result is Yes. In this case, in S230, the processor 210 calculates the color value of the new target pixel p2i (FIG. 13(C)), as in S220, and executes the color value storage process.
[0091] At S233, processor 210 obtains data for inner filter k34 (FIG. 6A) from non-volatile storage device 230 (FIG. 1). At S236, processor 210 sets pixel p2 at the left end of the next row in the second direction Dy as target pixel p2i (FIG. 13D). At S243, similar to S153 (FIG. 10), processor 210 calculates the color value of target pixel p2i using inner filter k34 (FIG. 13D), and executes color value storage processing.
[0092] In S256, the processor 210 determines whether all pixels p2 in the partial region A2 have been processed. If an unprocessed pixel p2 remains (S256: No), in S258, the processor 210 sets the pixel p2 adjacent to the right as a new target pixel p2i (FIG. 13(E)). In S260, the processor 210 determines whether the current target pixel p2i is the pixel p2 at the right end of the partial region A2. In S260 following S258 for FIG. 13(E), the determination result is No. In this case, the processor 210 executes S243 for the new target pixel p2i. Thereafter, the determination result in S256 is No, and in S258, the processor 210 sets the pixel p2 adjacent to the right as a new target pixel p2i (FIG. 13(F)). In S260 following S258 for FIG. 13(F), the determination result is Yes. In this case, in S261, the processor 210 calculates the color value of the target pixel p2i in the same way as in S243, and executes the color value storage process. After S261, the processor 210 proceeds to S236.
[0093] In S236, the processor 210 sets the leftmost pixel p2 in the next row in the second direction Dy as the target pixel p2i (FIG. 13(G)). The processor 210 executes S243 for the new target pixel p2i. The processor 210 then repeats the above process until the determination result in S256 is Yes. As a result, the processor 210 calculates the color value of the target pixel p2i in the order of FIG. 13(G) to FIG. 13(L).
[0094] If all pixels p2 in partial area A2 have been processed (S256: Yes), the process proceeds to S263. The process of S263 is the same as the process of S163 (FIG. 10). The processor 210 releases the area in the volatile storage device 220 that stores the pixel data of the first side block bT. Then, the processor 210 ends the process of FIG. 12. As described above, in the second compression process sT corresponding to the first side block bT, the processor 210 uses filters k24T and k34.
[0095] A5-3: Third compression process sTR: FIG. 14 is a flowchart showing an example of the third compression process sTR associated with the second corner block bTR (FIGS. 5(A) and 5(B)). When the position of the target block corresponds to the second corner block bTR, the processor 210 executes the third compression process sTR. FIGS. 15(A) to 15(L) are diagrams showing a filter arranged on the second corner block bTR and the target pixel p2i in the partial area A2 to be processed by the filter. The order of processing the pixel p2 in the partial area A2 is the same as the order explained in FIGS. 11(A) to 11(L). The processor 210 proceeds with the processing in the order of FIGS. 15(A) to 15(L). The processing of FIG. 14 will now be explained in detail.
[0096] In S310, the processor 210 reads color value data for each of the 25 pixels of the second corner block bTR (FIGS. 5A and 5B), which is the block of interest, from the target image data stored in the non-volatile memory device 230. The processor 210 stores the read data in the volatile memory device 220.
[0097] S313, S316, S320, S323, and S326 are similar to S213, S216, S220, S223, and S226 in Fig. 12, respectively, and the processing flow is similar between these two groups. In the initial steps S313, S316, and S320, processor 210 calculates the color value of target pixel p2i by performing filtering using first edge filter k24T on first edge end portion p24T in second corner block bTR (Fig. 15(A)). Thereafter, in S323, S326 (No), and S320, processor 210 calculates the color value of target pixel p2i in Fig. 15(B).
[0098] Thereafter, in S323, the processor 210 sets the next target pixel p2i (FIG. 15(C)). In S326, the determination result is Yes. In this case, in S330, the processor 210 acquires data of the second corner filter k23TR (FIG. 7(E)) from the non-volatile storage device 230 (FIG. 1). In S333, the processor 210 calculates the color value of the target pixel p2i by performing a filter process using the second corner filter k23TR on the second corner edge portion p23TR in the second corner block bTR (FIG. 15(C)). The processor 210 also performs a color value storage process. The processor 210 determines the arrangement of the second corner filter k23TR on the target image IM1 according to the position of the target pixel p2i, similar to the arrangement described in FIG. 7(D).
[0099] In S336, processor 210 determines whether all pixels p2 in partial area A2 have been processed. If unprocessed pixels p2 remain (S336: No), in S340, processor 210 sets the leftmost pixel p2 in the next row in the second direction Dy as the target pixel p2i (FIG. 15(D)). In S343, processor 210 obtains data for inner filter k34 (FIG. 6(A)) from non-volatile storage device 230. In S346, similar to S153 (FIG. 10), processor 210 calculates the color value of target pixel p2i using inner filter k34 (FIG. 15(D)) and executes color value storage processing.
[0100] In S350, the processor 210 sets the pixel p2 adjacent to the right as the new target pixel p2i (FIG. 15(E)). In S353, the processor 210 determines whether the current target pixel p2i is the pixel p2 at the right end of the partial area A2. In S353 following S350 for FIG. 15(E), the determination result is No. In this case, the processing proceeds to S346. The processor 210 executes S346 for the new target pixel p2i and sets the next target pixel p2i in S350 (FIG. 15(F)).
[0101] In S353 following S350 for FIG. 15(F), the determination result is Yes. In this case, in S356, the processor 210 obtains data of the fourth-side filter k33R (FIG. 9(E)) from the non-volatile storage device 230. In S360, the processor 210 calculates the color value of the target pixel p2i by performing a filter process using the fourth-side filter k33R on the fourth-side end portion p33R in the second corner block bTR (FIG. 15(F)). The processor 210 also performs a color value storage process. The processor 210 determines the arrangement of the fourth-side filter k33R on the target image IM1 according to the position of the target pixel p2i, similar to the arrangement described in FIG. 9(D). After S360, the process proceeds to S336.
[0102] The processor 210 repeats the above process until the determination result in S336 becomes Yes. As a result, the processor 210 calculates the color value of the target pixel p2i in the order of Figures 15(G) to 15(L).
[0103] If all pixels p2 in partial area A2 have been processed (S336: Yes), the process proceeds to S363. The process of S363 is the same as the process of S163 (FIG. 10). Processor 210 releases the area in volatile memory device 220 that stores the pixel data of second corner block bTR. Then, processor 210 ends the process of FIG. 14. As described above, in the third compression process sTR corresponding to second corner block bTR, processor 210 uses filters k24T, k23TR, k34, and k33R.
[0104] A5-4: Fourth compression process sL: FIG. 16 is a flowchart showing an example of the fourth compression process sL associated with the third side block bL (FIGS. 5(A) and 5(B)). When the position of the target block corresponds to the third side block bL, the processor 210 executes the fourth compression process sL. FIGS. 17(A) to 17(L) are diagrams showing a filter arranged on the third side block bL and the target pixel p2i in the partial area A2 to be processed by the filter. The order of processing pixel p2 in the partial area A2 is the same as the order explained in FIGS. 11(A) to 11(L). The processor 210 proceeds with the processing in the order of FIGS. 17(A) to 17(L). The processing of FIG. 16 will be explained in detail below.
[0105] In S410, the processor 210 reads color value data for each of the 30 pixels of the third side block bL (FIGS. 5A and 5B), which is the block of interest, from the target image data stored in the non-volatile storage device 230. The processor 210 stores the read data in the volatile storage device 220.
[0106] S413, S416, S420, S423, S426, S430, and S433 are similar to S113, S116, S120, S123, S126, S130, and S133 in FIG. 10, respectively, except for the following four differences, and the processing flow is similar between these two groups. The first difference is that in S416, processor 210 acquires data of third-side filter k33L. The second difference is that in S420, processor 210 calculates the color value of target pixel p2i using third-side filter k33L (FIG. 17(A)). S420 is performed in the same manner as S143 in FIG. 10. The third difference is that in S426, processor 210 acquires data of inner filter k34. The fourth difference is that in S430, the processor 210 calculates the color value of the target pixel p2i using the inner filter k34 (FIG. 17(B)). S430 is performed in the same manner as S153 in FIG.
[0107] In S433 following S430 for FIG. 17(B), the determination result is No. In this case, the processor 210 proceeds to S423 and sets the next target pixel p2i (FIG. 17(C)). The processor 210 calculates the color value of the new target pixel p2i through S426 and S430. In S433 following S430 for FIG. 17(C), the determination result is Yes. In this case, the processing proceeds to S436.
[0108] S436, S440, S443, S446, S450, S453, S456, S460, and S463 are similar to S136, S140, S143, S146, S150, S153, S156, S160, and S163 in FIG. 10, respectively, and the processing flow is similar between these two groups. Through these steps, similar to the processing of FIGS. 11(D) to 11(L), the processor 210 proceeds with the processing of FIGS. 17(D) to 17(L). In the processing of FIGS. 17(D) to 17(L), similar to the processing of FIGS. 11(D) to 11(L), the processor 210 determines the type and position of each filter. In S463, the processor 210 frees an area in the volatile storage device 220 for storing pixel data of the third side block bL. Then, the processor 210 ends the processing of Fig. 16. As described above, in the fourth compression processing sL corresponding to the third side block bL, the processor 210 uses the filters k33L and k34.
[0109] A5-5: Fifth compression process sM: FIG. 18 is a flowchart showing an example of the fifth compression process sM associated with the inner block bM (FIGS. 5(A) and 5(B)). When the position of the target block corresponds to the inner block bM, the processor 210 executes the fifth compression process sM. FIGS. 19(A) to 19(L) are diagrams showing a filter arranged on the inner block bM and the target pixel p2i in the partial area A2 to be processed by the filter. The order of processing the pixel p2 in the partial area A2 is the same as the order explained in FIGS. 11(A) to 11(L). The processor 210 proceeds with the processing in the order of FIGS. 19(A) to 19(L). The processing of FIG. 18 will be explained in detail below.
[0110] In S510, the processor 210 reads color value data for each of the 36 pixels of the target block, inner block bM (FIGS. 5A and 5B), from the target image data stored in the non-volatile storage device 230. The processor 210 stores the read data in the volatile storage device 220.
[0111] Steps S513, S516, S520, S523, S530, and S533 are similar to steps S113, S116, S120, S123, S130, and S133 in FIG. 10, respectively, except for the following three differences, and the processing flow is similar between these two groups (in FIG. 18, the step corresponding to step S126 is omitted). The first difference is that in step S516, processor 210 acquires data for inner filter k34. The second difference is that in step S520, processor 210 calculates the color value of target pixel p2i using inner filter k34 (FIG. 19(A)). Similar to the arrangement described in FIG. 6(B), processor 210 determines the arrangement of inner filter k34 on target image IM1 in accordance with the position of target pixel p2i. The third difference is that in S530, the processor 210 calculates the color value of the target pixel p2i using the inner filter k34 (FIG. 19(B)). S530 is performed in the same manner as S520.
[0112] In addition, the determination result in 533 following S530 for FIG. 19(B) is No. In this case, the processor 210 proceeds to S523 and sets the next target pixel p2i (FIG. 19(C)). The processor 210 calculates the color value of the new target pixel p2i in S530. In 533 following S530 for FIG. 19(C), the determination result is Yes. In this case, the processing proceeds to S536.
[0113] Steps S536, S543, S546, S553, S556, S560, and S563 are similar to steps S136, S143, S146, S153, S156, S160, and S163 in FIG. 10, respectively, except that inner filter k34 is used in step S543. The processing flow is similar between these two groups (steps corresponding to steps S140 and S150 are omitted in FIG. 18). The type of filter in each of FIGS. 19(D)-19(L) is inner filter k34. Steps S543 and S553 are performed in the same manner as step S520. In each of FIGS. 19(D)-19(L), processor 210 determines the placement of inner filter k34 on target image IM1 according to the position of target pixel p2i, similar to the placement described in FIG. 6(B). In S563, the processor 210 releases the area in the volatile storage device 220 that stores the pixel data of the inner block bM. Then, the processor 210 ends the processing in Fig. 18. As described above, in the fifth compression processing sM corresponding to the inner block bM, the processor 210 uses the filter k34.
[0114] A5-6: 6th compression process sR: FIG. 20 is a flowchart showing an example of the sixth compression process sR associated with the fourth side block bR (FIGS. 5(A) and 5(B)). When the position of the target block corresponds to the fourth side block bR, the processor 210 executes the sixth compression process sR. FIGS. 21(A) to 21(L) are diagrams showing a filter placed on the fourth side block bR and the target pixel p2i in the partial area A2 to be processed by the filter. The order of processing pixel p2 in the partial area A2 is the same as the order explained in FIGS. 11(A) to 11(L). The processor 210 proceeds with the processing in the order of FIGS. 21(A) to 21(L). The processing of FIG. 20 will be explained in detail below.
[0115] In S610, the processor 210 reads color value data for each of the 30 pixels of the fourth side block bR (FIGS. 5A and 5B), which is the block of interest, from the target image data already stored in the non-volatile storage device 230. The processor 210 stores the read data in the volatile storage device 220.
[0116] S613, S616, S620, S623, and S626 are similar to S313, S316, S320, S323, and S326 in FIG. 14, respectively, except for the following two differences, and the processing flow is similar between these two groups. The first difference is that in S616, processor 210 acquires data of inner filter k34. The second difference is that in S620, processor 210 calculates the color value of target pixel p2i using inner filter k34 (FIG. 21(A)). S620 is performed in the same manner as S153 in FIG. 10. In S623, processor 210 sets pixel p2, which is adjacent to the right, as the new target pixel p2i (FIG. 21(B)). In S626 following S623 for FIG. 21(B), the determination result is No. In this case, the processor 210 proceeds to S620 and executes S620 for the new target pixel p2i (FIG. 21(B)). In S623, the processor 210 sets the next target pixel p2i (FIG. 21(C)). Thereafter, in S626, the determination result is Yes. In this case, in S630, the processor 210 acquires data of the fourth-side filter k33R. In S633, the processor 210 calculates the color value of the target pixel p2i using the fourth-side filter k33R (FIG. 21(C)). S633 is performed in the same manner as S360 in FIG. 14.
[0117] S640, S643, S646, S650, S653, S656, and S660 are similar to S340, S343, S346, S350, S353, S356, and S360 in Fig. 14, respectively, and the processing flow is similar between these two groups. If the determination result in 662 following S660 is No (i.e., if unprocessed pixel p2 remains), the processing proceeds to S640. This is similar to the processing proceeding to S340 if the determination result in 336 following S360 in Fig. 14 is No. In the processing of Figs. 21(D)-21(L), similar to the processing of Figs. 15(D)-15(L), processor 210 determines the document and position of each filter. 15(D)-15(L), the processor 210 proceeds with the processing in the order of FIG. 21(D)-FIG. 21(L). If all pixels p2 have been processed (S662: Yes), in S663 the processor 210 releases the area in the volatile storage device 220 that stores the pixel data of the fourth side block bR. The processor 210 then ends the processing of FIG. 20. As described above, in the sixth compression process sR corresponding to the fourth side block bR, the processor 210 uses filters k34 and k33R.
[0118] A5-7: 7th compression process sBL: FIG. 22 is a flowchart showing an example of the seventh compression process sBL associated with the third corner block bBL (FIGS. 5(A) and 5(B)). When the position of the target block corresponds to the third corner block bBL, the processor 210 executes the seventh compression process sBL. FIGS. 23(A) to 23(L) are diagrams showing a filter arranged on the third corner block bBL and the target pixel p2i in the partial area A2 to be processed by the filter. The order of processing pixel p2 in the partial area A2 is the same as the order explained in FIGS. 11(A) to 11(L). The processor 210 proceeds with the processing in the order of FIGS. 23(A) to 23(L). The processing of FIG. 22 will be explained in detail below.
[0119] In S710, the processor 210 reads color value data for each of the 25 pixels of the third corner block bBL (FIGS. 5A and 5B), which is the block of interest, from the target image data stored in the non-volatile memory device 230. The processor 210 stores the read data in the volatile memory device 220.
[0120] S713, S716, S720, S723, S726, S730, and S733 are the same as S413, S416, S420, S423, S426, S430, and S433 in Fig. 16, respectively, and the processing flow is the same between these two groups. Through these steps, processor 210 proceeds with the processing of Figs. 23(A) to 23(C), similar to the processing of Figs. 17(A) to 17(C). In the processing of Figs. 23(A) to 23(C), processor 210 determines the type and position of each filter, similar to the processing of Figs. 17(A) to 17(C).
[0121] In step S733 following step S730 for FIG. 23(C), the determination result is Yes. In this case, the process proceeds to step S736. Steps S736, S740, S743, S746, S750, S753, and S760 are similar to steps S436, S440, S443, S446, S450, S453, and S460 in FIG. 16, respectively, and the process flow is similar between these two groups. As will be described below, if the determination result in step S738 (FIG. 22) between steps S736 and S740 is Yes, the process proceeds in the same manner as if the determination result in step S456 (FIG. 16) is No. In step S738, the processor 210 determines whether a row following the target pixel p2i remains in the partial area A2 to be processed. If the determination result in S738 is Yes, processor 210 proceeds with the processing in the order of Figures 23(D) to 23(I) through S736 to S760. If the determination result in S456 (Figure 16) is No, processor 210 proceeds with the processing in the order of Figures 17(D) to 17(I) through S436 to S460. The processing in Figures 23(D) to 23(I) proceeds in the same way as the processing in Figures 17(D) to 17(I).
[0122] After the processing of FIG. 23(I), in S736 (FIG. 22), the processor 210 sets the target pixel p2i of FIG. 23(J). In this case, the determination result of S738 is No, and the processing proceeds to S770. In S770, the processor 210 acquires data of the third corner filter k23BL (FIG. 7(G)) from the non-volatile storage device 230 (FIG. 1). In S773, the processor 210 calculates the color value of the target pixel p2i by performing a filter process using the third corner filter k23BL on the third corner edge portion p23BL in the third corner block bBL (FIG. 23(J)). The processor 210 also performs a color value storage process. The processor 210 determines the arrangement of the third corner filter k23BL on the target image IM1 according to the position of the target pixel p2i, similar to the arrangement described in FIG. 7(F).
[0123] At S776, the processor 210 obtains data of the second side filter k24B (FIG. 8(E)) from the non-volatile storage device 230. At S780, the processor 210 sets the pixel p2 adjacent to the right as the new target pixel p2i (FIG. 23(K)). At S783, the processor 210 calculates the color value of the target pixel p2i by performing a filter process using the second side filter k24B on the second side end portion p24B in the third corner block bBL (FIG. 23(K)). The processor 210 also performs a color value storage process. The processor 210 determines the arrangement of the second side filter k24B on the target image IM1 according to the position of the target pixel p2i, similar to the arrangement described in FIG. 8(D).
[0124] In S786, the processor 210 determines whether the current target pixel p2i is the pixel p2 at the right end of the partial area A2. The determination result in S786 following S783 for FIG. 23(K) is No. In this case, the processor 210 proceeds to S780 to set the next target pixel p2i (FIG. 23(L)). The processor 210 then executes S783 for the new target pixel p2i. Thereafter, the determination result in S786 is Yes. In this case, the process proceeds to S790. The process of S790 is the same as the process of S163 (FIG. 10). The processor 210 releases the area in the volatile storage device 220 for storing pixel data of the third corner block bBL. The processor 210 then terminates the process of FIG. 22. As described above, in the seventh compression process sBL corresponding to the third corner block bBL, the processor 210 uses the filters k33L, k34, k23BL, and k24B.
[0125] A5-8: 8th compression process sB: FIG. 24 is a flowchart showing an example of the eighth compression process sB associated with the second side block bB (FIGS. 5(A) and 5(B)). When the position of the target block corresponds to the second side block bB, the processor 210 executes the eighth compression process sB. FIGS. 25(A) to 25(L) are diagrams showing a filter arranged on the second side block bB and the target pixel p2i in the partial area A2 to be processed by the filter. The order of processing pixel p2 in the partial area A2 is the same as the order explained in FIGS. 11(A) to 11(L). The processor 210 proceeds with the processing in the order of FIGS. 25(A) to 25(L). The processing of FIG. 24 will be explained in detail below.
[0126] In S810, the processor 210 reads color value data for each of the 30 pixels of the second side block bB (FIGS. 5A and 5B), which is the block of interest, from the target image data already stored in the non-volatile storage device 230. The processor 210 stores the read data in the volatile storage device 220.
[0127] Steps S813, S816, S820, S823, S830, and S833 are similar to steps S713, S716, S720, S723, S730, and S733 in FIG. 22, respectively, except for the following two differences, and the processing flow is similar between these two groups (in FIG. 24, the step corresponding to step S726 is omitted). The first difference is that in step S816, processor 210 acquires data for inner filter k34. The second difference is that in step S820, processor 210 calculates the color value of target pixel p2i using inner filter k34. Processor 210 determines the placement of inner filter k34 on target image IM1 in accordance with the position of target pixel p2i, similar to the placement described in FIG. 6(B). Through steps S813 to S833, the processor 210 performs the process in the order of FIG. 25(A) to FIG. 25(C).
[0128] In S833 following S830 for FIG. 25(C), the determination result is Yes. In this case, the process proceeds to S836. In S836, the processor 210 sets the leftmost pixel p2 of the next row in the second direction Dy as the target pixel p2i (FIG. 25(D)). In S838, the processor 210 determines whether or not a row following the target pixel p2i remains in the partial area A2 to be processed. In S838 following S836 for FIG. 25(D), the determination result is Yes. In this case, the process proceeds to S820. Then, the processor 210 repeats S823 and S830 until the determination result of S833 becomes No. In this way, the processor 210 proceeds with the process in the order of FIG. 25(D) to FIG. 25(F).
[0129] In S833 following S830 for Figure 25(F), the determination result is Yes. In S836, processor 210 sets target pixel p2i of Figure 25(G). The determination result in S838 is Yes. Processor 210 proceeds with the processing of Figures 25(G) to 25(I) through S820 to S833 in the same manner as the processing of Figures 25(D) to 25(F).
[0130] In S833 following S830 for FIG. 25(I), the determination result is Yes. In S836, the processor 210 sets the target pixel p2i of FIG. 25(J). The determination result in S383 is No. In this case, the process proceeds to S840. In S840, the processor 210 acquires data of the second side filter k24B (FIG. 8(E)) from the non-volatile storage device 230. In S843, similar to S783 (FIG. 22), the processor 210 calculates the color value of the target pixel p2i using the second side filter k24B (FIG. 25(J)), and executes color value storage processing.
[0131] S880, S883, and S886 are the same as S780, S783, and S786 in FIG. 22, respectively, and the processing flow is the same between these two groups. Through these steps, the processor 210 proceeds with the processing of FIGS. 25(K) to 25(L), similar to the processing of FIGS. 23(K) to 23(L). In the processing of FIGS. 25(K) to 25(L), the processor 210 determines the type and position of each filter, similar to the processing of FIGS. 23(K) to 23(L). In S890, the processor 210 releases an area in the volatile storage device 220 for storing pixel data of the second side block bB. Then, the processor 210 ends the processing of FIG. 24. As described above, in the eighth compression processing sB corresponding to the second side block bB, the processor 210 uses filters k34 and k24B.
[0132] A5-9: 9th compression process sBR: FIG. 26 is a flowchart showing an example of the ninth compression process sBR associated with the fourth corner block bBR (FIGS. 5(A) and 5(B)). When the position of the target block corresponds to the fourth corner block bBR, the processor 210 executes the ninth compression process sBR. FIGS. 27(A) to 27(L) are diagrams showing a filter arranged on the fourth corner block bBR and the target pixel p2i in the partial area A2 to be processed by the filter. The order of processing pixel p2 in the partial area A2 is the same as the order explained in FIGS. 11(A) to 11(L). The processor 210 proceeds with the processing in the order of FIGS. 23(A) to 23(L). The processing of FIG. 22 will now be explained in detail.
[0133] In S910, the processor 210 reads color value data for each of the 25 pixels of the fourth corner block bBR (FIGS. 5A and 5B), which is the block of interest, from the target image data already stored in the non-volatile memory device 230. The processor 210 stores the read data in the volatile memory device 220.
[0134] S913, S916, S920, S923, S926, S930, and S933 are similar to S613, S616, S620, S623, S626, S630, and S633 in Fig. 20, respectively, and the processing flow is similar between these two groups. Through these steps, processor 210 proceeds with the processing of Figs. 27(A) to 27(C), similar to the processing of Figs. 21(A) to 21(C). In the processing of Figs. 27(A) to 27(C), processor 210 determines the type and position of each filter, similar to the processing of Figs. 21(A) to 21(A).
[0135] In S934, the processor 210 sets the leftmost pixel p2 of the next row in the second direction Dy as the target pixel p2i. In S934 following S933 for FIG. 27(C), the processor 210 sets the target pixel p2i of FIG. 27(D). In S935, the processor 210 determines whether a row following the target pixel p2i remains in the partial area A2 to be processed. When each target pixel p2i of FIGS. 27(D) to 27(I) is processed, the determination result of S935 is No. S936, S940, S943, S946, S950, and S953 are the same as S916, S920, S923, S926, S930, and S933, respectively. When the determination result of S935 is No, the processing flow is the same between these two groups. After S953, the process proceeds to S934.
[0136] Processor 210 repeats steps S934-S953 to perform the processes of Figures 27(D)-27(F) and Figures 27(G)-27(I) in the same manner as the processes of Figures 27(A)-27(C). The types and positions of filters in Figures 27(D)-27(F) are determined in the same manner as those in Figures 27(A)-27(C). The types and positions of filters in Figures 27(G)-27(I) are determined in the same manner as those in Figures 27(A)-27(C).
[0137] In S934 following S953 for FIG. 27(I), the processor 210 sets the target pixel p2i of FIG. 27(J). The determination result in the following S935 is No. In this case, in S960, the processor 210 acquires data of the second side filter k24B (FIG. 8(E)) from the non-volatile storage device 230. In S963, similar to S883 (FIG. 24), the processor 210 calculates the color value of the target pixel p2i using the second side filter k24B (FIG. 27(J)) and executes color value storage processing.
[0138] In S970, the processor 210 sets the pixel p2 adjacent to the right as the new target pixel p2i (FIG. 27(K)). In S976, the processor 210 determines whether the current target pixel p2i is the pixel p2 at the right end of the partial area A2. In S976 following S970 for FIG. 27(K), the determination result is No. In this case, the processing proceeds to S963. The processor 210 executes S963 for the new target pixel p2i and sets the next target pixel p2i in S970 (FIG. 27(L)).
[0139] In S976 following S970 for FIG. 27(L), the determination result is Yes. In this case, in S980, the processor 210 acquires data of the fourth corner filter k23BR (FIG. 7(I)) from the non-volatile storage device 230. In S983, the processor 210 calculates the color value of the target pixel p2i by performing filter processing using the fourth corner filter k23BR on the fourth corner edge portion p23BR in the fourth corner block bBR (FIG. 27(L)). The processor 210 also performs color value storage processing. The processor 210 determines the arrangement of the fourth corner filter k23BR on the target image IM1 according to the position of the target pixel p2i, similar to the arrangement described in FIG. 7(H).
[0140] The processing of S986 is the same as the processing of S163 (FIG. 10). The processor 210 releases the area in the volatile storage device 220 that stores the pixel data of the fourth corner block bBR. The processor 210 then ends the processing of FIG. 26. As described above, in the ninth compression process sBR corresponding to the fourth corner block bBR, the processor 210 uses filters k34, k33R, k24B, and k23BR.
[0141] As described above, in this embodiment, the processor 210 of the image processing device 200 (FIG. 1) executes the following processes in accordance with the program 231. In S13 (FIG. 2), the processor 210 acquires raster data representing the target image IM1 (FIG. 3A). In S16, the processor 210 generates data for a filtered image IM2 (FIG. 3B) through a compression process using a filter. The filtered image IM2 represents the target image IM1 at a resolution in the first direction Dx that is lower than the resolution in the first direction Dx of the target image IM1 (FIG. 3A). As shown in FIGS. 11A-11L, etc., the processor 210 calculates color values for each of the multiple pixels p2 in the filtered image IM2 by applying a filter included in multiple filters (including filters k23TL and k24T) to each of the multiple portions (including portions p23TL and p24T) included in the target image IM1.
[0142] As will be described below, the filter used in the filtering process is associated with a position in the target image IM1. As shown in FIG. 10, 11(A)-11(L), etc., the processor 210 determines the type of filter and the position of the filter on the target image IM1 (i.e., the portion on the target image IM1 to which the filter is applied (e.g., portion p23TL)) according to the position of the target pixel p2i in the filtered image IM2. As shown in FIGS. 11(A)-11(L), etc., the position of the portion on the target image IM1 to which the filter is applied moves in the same direction as the movement of the position psi of the target pixel p2i in the filtered image IM2. In this way, the filter is associated with a position in the target image IM1. Specifically, the filter is associated with the position of the portion on the target image IM1 to which the filter is applied (e.g., portion p23TL). In other words, the filter is associated with the position psi of the target pixel p2i in the target image IM1.
[0143] 6(B), the multiple portions included in the target image IM1 include an inner portion p34. The inner portion p34 is an example of an inner portion that is used to calculate the color value of an inner pixel p2 away from the edge of the filtered image IM2.
[0144] As shown in Figures 7(B), 7(D), 7(F), 7(H), 8(B), 8(D), 9(B), and 9(D), the target image IM1 includes corner edge portions p23TL, p23TR, p23BL, and p23BR, and side edge portions p24T, p24B, p33L, and p33R. These portions are examples of edge portions used to calculate the color value of pixel p2, which is adjacent to the edge of filtered image IM2 (in this embodiment, edges eT2, eB2, eL2, and eR2). Hereinafter, these portions will also be referred to as edge portions.
[0145] As shown in Figures 6(B), 7(B), 7(D), 7(F), 7(H), 8(B), 8(D), 9(B), and 9(D), the multiple filters used in the filter processing (S36 (Figure 4)) include inner filter k34, corner filters k23TL, k23TR, k23BL, and k23BR, and side filters k24T, k24B, k33L, and k33R.
[0146] Here, the size of two filters is compared independently of their orientation as follows: If the first filter can be overlapped on the second filter so that it does not extend beyond the second filter, the size of the first filter is equal to or smaller than the size of the second filter. If the two filters overlap in this manner and the second filter includes a portion that does not overlap with the first filter, the size of the first filter is smaller than the size of the second filter. In either case, the first filter may be rotated 90 degrees. Regardless of the relative positions of the first and second filters, if a portion of the first filter extends beyond the second filter and a portion of the second filter extends beyond the first filter, the size comparison between the first and second filters is invalid. If the first and second filters are rectangular, their sizes can be compared using the lengths of their long and short sides (the length is expressed in pixels). That is, if the length of the long side of the first filter is equal to or less than the length of the long side of the second filter and the length of the short side of the first filter is equal to or less than the length of the short side of the second filter, the size of the first filter is equal to or less than the size of the second filter. Furthermore, if one or both of the long and short sides of the first filter are shorter than the corresponding sides of the second filter, the size of the first filter is smaller than the size of the second filter. If the relationship between the lengths of the long sides is the opposite of the relationship between the lengths of the short sides, the size comparison between the first filter and the second filter is not valid.
[0147] When comparing the filter sizes as described above, the size of inner filter k34 is larger than the sizes of the other filters k23TL, k23TR, k23BL, k23BR, k24T, k24B, k33L, and k33R. Inner filter k34 is an example of a type 1 filter. The other filters k23TL, k23TR, k23BL, k23BR, k24T, k24B, k33L, and k33R are examples of type 2 filters that have sizes smaller than the type 1 filters. Hereinafter, inner filter k34 will also be referred to as type 1 filter k34. Filters k23TL, k23TR, k23BL, k23BR, k24T, k24B, k33L, and k33R will also be referred to as type 2 filters.
[0148] As shown in Figure 6(B), the processor 210 applies a first type filter k34 to an inner portion p34 of the target image IM1. As shown in Figures 7(B), 7(D), 7(F), 7(H), 8(B), 8(D), 9(B), and 9(D), the processor 210 applies second type filters k23TL, k23TR, k23BL, k23BR, k24T, k24B, k33L, and k33R to edge portions p23TL, p23TR, p23BL, p23BR, p24T, p24B, p33L, and p33R of the target image IM1. As a result, the processor 210 can appropriately generate a filtered image IM2 that represents the target image IM1 at a resolution in the first direction Dx that is lower than the resolution of the target image IM1 in the first direction Dx. Let us assume that the size of the filter used for the target pixel p2i (FIG. 7B) adjacent to the edge is the same as the size of the first-type filter k34. The area of such a filter on the target image IM1 may be, for example, an area obtained by shifting the area of the first-type filter k34 indicated by the dotted line in the figure by one pixel in each of the first direction Dx and the second direction Dy. In this case, a pixel far from the target position psi on the target image IM1 (e.g., pixel p1f outside the first corner portion p23TL) is referenced to calculate the color value of the target pixel p2i. As a result, the color value of the target pixel p2i adjacent to the edge may be set to a color value that represents a blurred image compared to the color value of the pixel p2 located inside and away from the edge. In this embodiment, the possibility of such a problem is reduced.
[0149] In this embodiment, the target image IM1 (FIG. 3(A)) is a rectangular image including four corners cTL1, cTR1, cBL1, and cBR1. The filtered image IM2 (FIG. 3(B)) is a rectangular image including four corners cTL2, cTR2, cBL2, and cBR2. The edge portions of the target image IM1 include the four corner edge portions p23TL, p23TR, p23BL, and p23BR described in FIGS. 7(B) to 7(I). The four corner edge portions p23TL, p23TR, p23BL, and p23BR correspond to the four pixels p2 that are adjacent to the four corners cTL2, cTR2, cBL2, and cBR2 of the filtered image IM2, respectively. The second type filter includes one or more corner filters for the four corner edge portions p23TL, p23TR, p23BL, and p23BR (in this embodiment, four corner filters k23TL, k23TR, k23BL, and k23BR). Each of the one or more corner filters (here, corner filters k23TL, k23TR, k23BL, and k23BR) has the smallest size among the multiple filters used in the filter processing (S36 (FIG. 4)). Processor 210 applies a corner filter included in the one or more corner filters to each corner edge portion p23TL, p23TR, p23BL, and p23BR. In this embodiment, corner filters k23TL, k23TR, k23BL, and k23BR are applied to the corner edge portions p23TL, p23TR, p23BL, and p23BR, respectively. With this configuration, the processor 210 can reduce the possibility that the color value of the pixel p2 adjacent to the corner is set to a color value that represents a blurred image compared to the color value of the pixel p2 inside and away from the corner.
[0150] In this embodiment, as described above, the target image IM1 and the filtered image IM2 are each rectangular images including four corners (FIGS. 3A and 3B). The edge portion of the target image IM1 includes four corner edge portions p23TL, p23TR, p23BL, and p23BR (FIGS. 7B-7I). The second-type filter includes four corner filters k23TL, k23TR, k23BL, and k23BR that correspond to the four corner edge portions p23TL, p23TR, p23BL, and p23BR, respectively. As shown in FIGS. 7C, 7E, 7G, and 7I, the four corner filters k23TL, k23TR, k23BL, and k23BR have weighting arrangements that are different from each other. The processor 210 applies the four corner filters k23TL, k23TR, k23BL, and k23BR to the four corner edge portions p23TL, p23TR, p23BL, and p23BR, respectively. With this configuration, the processor 210 can set the color values of the four pixels p2 that contact the four corners, respectively, to appropriate color values.
[0151] In this embodiment, the target image IM1 (FIG. 3A) is a rectangular image including four corners, two first-type sides eL1 and eR1 perpendicular to the first direction Dx, and two second-type sides eT1 and eB1 parallel to the first direction Dx. The filtered image IM2 (FIG. 3B) is a rectangular image including four corners, two first-type sides eL2 and eR2 perpendicular to the first direction Dx, and two second-type sides eT2 and eB2 parallel to the first direction Dx. The edge portion of the target image IM1 includes two types of side edge portions p33L and p33R described in FIGS. 9B and 9D. The side edge portions p33L and p33R are associated with two types of pixels p2 that are adjacent to the two first-type sides eL2 and eR2 of the filtered image IM2, respectively. Each of the edge portions p33L and p33R is an example of a first-type edge portion associated with a pixel p2 adjacent to the first-type edge (also referred to as the first-type edge portion p33L and p33R). The second-type filter includes one or more first-type edge filters for the two types of edge portions p33L and p33R (two edge filters k33L and k33R in this embodiment). Each of the one or more first-type edge filters (here, edge filters k33L and k33R) is a square filter in which the ratio of the number of pixels in the first direction Dx to the number of pixels in the second direction Dy is 1:1. The processor 210 applies a first-type edge filter included in the one or more first-type edge filters to each of the first-type edge portions p33L and p33R. In this embodiment, the edge filters k33L and k33R are applied to the first-type edge portions p33L and p33R, respectively.
[0152] As shown in Figures 9(B) and 9(D), the target position psi of the target pixel p2i is located at a position shifted in the first direction Dx or the opposite direction from the center of the edge filters k33L and k33R. If the edge filters k33L and k33R are long in the first direction Dx, pixels far away from the target position psi in the first direction Dx or the opposite direction are referenced when calculating the color value of the target pixel p2i. As a result, the color value of the target pixel p2i may be set to a color value representing a blurred image. If the edge filters k33L and k33R are short in the first direction Dx, pixels far away from the target position psi in the first direction Dx or the opposite direction are not referenced when calculating the color value of the target pixel p2i. As a result, the color value of the target pixel p2i may not adequately represent the characteristics of the image in the first direction Dx. In this embodiment, each of the edge filters k33L and k33R is a square filter with an aspect ratio of 1:1, thereby achieving a balance between the above two cases.
[0153] In this embodiment, as described above, the target image IM1 and the filtered image IM2 are each rectangular images including four corners, two first-type sides perpendicular to the first direction Dx, and two second-type sides parallel to the first direction Dx (FIGS. 3A and 3B). The edge portion of the target image IM1 includes two types of first-type edge end portions p33L and p33R that correspond to two types of pixels p2 that contact the two first-type sides eL2 and eR2 of the filtered image IM2, respectively (FIGS. 9B and 9D). The second-type filter includes two first-type edge filters (two edge filters k33L and k33R in this embodiment) that correspond to the two types of first-type edge end portions p33L and p33R, respectively. As shown in FIGS. 9C and 9E, the two edge filters k33L and k33R have weights that are different from each other. The processor 210 applies two edge filters k33L and k33R to the two types of first-type edge end portions p33L and p33R, respectively. With this configuration, the processor 210 can set appropriate color values to the color values of the two types of pixels p2 that contact the two first-type sides eL2 and eR2, respectively.
[0154] Furthermore, in this embodiment, as described above, the target image IM1 and the filtered image IM2 are each rectangular images including four corners, two first-type sides perpendicular to the first direction Dx, and two second-type sides parallel to the first direction Dx (FIGS. 3A and 3B). The edge portion of the target image IM1 includes the two types of side edge portions p24T and p24B described in FIGS. 8B and 8D. The side edge portions p24T and p24B correspond to two types of pixels p2 that contact the two second-type sides eT2 and eB2 of the filtered image IM2, respectively. The side edge portions p24T and p24B are examples of second-type side edge portions that are associated with pixels p2 that contact the second-type sides (also referred to as second-type side edge portions p24T and p24B). The type 2 filters include one or more type 2 edge filters for two types of type 2 edge end portions p24T and p24B (two edge filters k24T and k24B in this embodiment). Each of the one or more type 2 edge filters (two edge filters k24T and k24B in this embodiment) is a rectangular filter having an aspect ratio other than 1:1. The processor 210 applies a type 2 edge filter included in the one or more type 2 edge filters to each of the type 2 edge end portions p24T and p24B. In this embodiment, the edge filters k24T and k24B are applied to the type 2 edge end portions p24T and p24B, respectively. With this configuration, the processor 210 can appropriately calculate the color value of the pixel p2 adjacent to the type 2 edges eT2 and eB2 parallel to the first direction Dx. For example, in this embodiment, the resolution compression ratio, i.e., the ratio of the resolution of the target image IM1 to the resolution of the filtered image IM2, differs between the first direction Dx and the second direction Dy. The resolution compression ratio in the first direction Dx is 1200 / 900 = 4 / 3. The resolution compression ratio in the second direction Dy is 1200 / 1200 = 1. Thus, the resolution compression ratio in the first direction Dx is greater than the resolution ratio in the second direction Dy. If a square filter with an aspect ratio of 1:1 is used under these conditions, as in the case of reducing resolution by simply thinning out pixel lines, pixels away from the target position psi of the target pixel p2i in the first direction Dx or the opposite direction are not referenced when calculating the color value of the target pixel p2i. As a result, the color value of the target pixel p2i may not adequately represent the characteristics of the image in the first direction Dx.In this embodiment, the possibility of such an error is reduced. For example, in this embodiment, edge filters k24T and k24B are long in the first direction Dx, along which the resolution is reduced. Therefore, processor 210 can calculate color values that appropriately represent the characteristics of the image in the first direction Dx.
[0155] In this embodiment, as described above, the target image IM1 and the filtered image IM2 are each rectangular images including four corners, two first-type sides perpendicular to the first direction Dx, and two second-type sides parallel to the first direction Dx (FIGS. 3A and 3B). The edge portion of the target image IM1 includes two types of second-type edge portions p24T and p24B that correspond to two types of pixels p2 that contact the two second-type sides eT2 and eB2 of the filtered image IM2, respectively (FIGS. 8B and 8D). In this embodiment, the edge filter k24T associated with the edge portion p24T is the same as the edge filter k24B associated with the edge portion p24B. That is, the type 2 filters include a type 2 edge filter common to the two types of type 2 edge end portions p24T and p24B (the edge filters k24T and k24B are also referred to as type 2 edge filters k24T and k24B). The processor 210 applies the common type 2 edge filters k24T and k24B to each type 2 edge end portion p24T. In this case, too, the processor 210 can appropriately calculate the color value of the pixel p2 that contacts the type 2 sides eT2 and eB2 that are parallel to the first direction Dx.
[0156] Furthermore, in this embodiment, the processor 210 reduces the resolution of the target image IM1 in the first direction Dx from the first resolution (1200 dpi in this embodiment) to a second resolution (900 dpi in this embodiment) lower than the first resolution, without changing the resolution of the target image IM1 in the second direction Dx perpendicular to the first direction Dx. As shown in FIG. 6A, the first type filter k34 is a rectangular filter. The ratio of the number of pixels in the second direction Dy (3 pixels in this embodiment) to the number of pixels in the first direction Dx (4 pixels in this embodiment) of the first type filter k34 is the same as the ratio of the second resolution (900 dpi) to the first resolution (1200 dpi). Such a first type filter k34 can reduce the possibility of a difference (e.g., blurring in the first direction Dx) occurring between the features in the first direction Dx and the features in the second direction Dy of the image represented by the filtered image IM2.
[0157] In this embodiment, as described with reference to FIG. 4, the processor 210 executes the process of S36 for each block included in the target image IM1. In S36, as described with reference to FIGS. 10, 11(A)-11(L), etc., the processor 210 applies a filter associated with a position in the target image IM1 to each of multiple portions included in the block of interest (e.g., portions p23TL, p24T, etc.). In this manner, the processor 210 executes the process of applying a filter to each of multiple portions included in a block in the target image IM1 for each of multiple blocks included in the target image IM1. With this configuration, the processor 210 can process the block of interest without additionally reading data from the data of the target image IM1 by reading data of the color values of each of multiple pixels referenced in the processing of the block of interest from the data of the target image IM1. For example, in the processing of FIG. 10, the processor 210 can process the block bTL using the data read in S110. In this way, this embodiment can save the amount of storage space (eg, volatile storage device 220) used to generate filtered image IM2.
[0158] In this embodiment, the first-type filter k34 (FIG. 6A) is a rectangular filter. The partial region A1 described in FIGS. 3A and 5A is an example of a square portion formed of four sides, each having the same number of pixels as the number of pixels on the long side of the first-type filter k34 (four pixels in this case). (The number of pixels on a side indicates the length of the side in terms of the number of pixels.) As described in FIG. 5A, the block includes a square portion (here, the partial region A1) and a portion that contacts the outside of the square portion and is within a range of one pixel from the side of the square portion. As described above, the processor 210 can process the block of interest without additionally reading data from the data of the target image IM1 by reading data on the color values of each of the multiple pixels included in the block of interest from the data of the target image IM1. In this way, this embodiment can save the capacity of a storage area (e.g., the volatile storage device 220) used to generate the filtered image IM2.
[0159] Furthermore, in this embodiment, the first type filter k34 has the largest size among the multiple filters k34, k23TL, k23TR, k23BL, k23BR, k24T, k24B, k33L, and k33R used in the filtering process (S36 (FIG. 4)). That is, a filter having a size larger than the size of the first type filter k34 is not applied to the edge portion of the target image IM1 (i.e., the portion used to calculate the color value of pixel p2 that contacts the edge of the filtered image IM2). Suppose that a filter having a size larger than the size of the first type filter k34 is used to calculate the color value of pixel p2 that contacts the edge of the filtered image IM2. In this case, a pixel far away from the position of pixel p2 on the target image IM1 is referenced to calculate the color value of this pixel p2. As a result, the color value of pixel p2 may be set to a color value that represents a blurred image. In this embodiment, the possibility of such a problem is reduced. However, a filter having a size larger than the size of the first type filter k34 may be used to calculate the color value of the pixel p2 that contacts the edge of the filtered image IM2.
[0160] In this embodiment, the image processing device 200 also includes a nonvolatile storage device 230 that stores data representing the plurality of filters k34, k23TL, k23TR, k23BL, k23BR, k24T, k24B, k33L, and k33R used in the filter process (S36 (FIG. 4)). Therefore, the processor 210 can quickly proceed with the process using each filter. In this embodiment, data representing the plurality of filters k34, k23TL, k23TR, k23BL, k23BR, k24T, k24B, k33L, and k33R is prepared in advance.
[0161] B. Variations: (1) The filter configuration may be various other configurations instead of the above configuration. For example, the filtered image IM2 (FIG. 3(B)) includes four pixels p2 (referred to as corner pixels p2) that are adjacent to four corners cTL2, cTR2, cBL2, and cBR2, respectively. The corner filters for the four corner pixels p2 are not limited to the four corner filters k23TL, k23TR, k23BL, and k23BR (FIGS. 7(B)-7(I)), and may include one or more filters having various configurations. For example, the filter size may be various, such as 3 rows and 3 columns, or 2 rows and 4 columns. The weights may be arranged in various arrangements, such as an arrangement that is line-symmetric with respect to an axis of symmetry parallel to the first direction Dx.
[0162] A common left corner filter may be applied to two corner pixels p2 adjacent to the left first-type side eL2. A common right corner filter may be applied to two corner pixels p2 adjacent to the right first-type side eR2. Alternatively, a common upper corner filter may be applied to two corner pixels p2 adjacent to the upper second-type side eT2. A common lower corner filter may be applied to two corner pixels p2 adjacent to the lower second-type side eB2. In either case, the filter may have various configurations. For example, the filter may have various sizes, such as 2 rows and 3 columns, or 3 rows and 3 columns. The weights of the left corner filters and the right corner filters may be arranged in various ways, such as being line-symmetric with respect to an axis of symmetry parallel to the first direction Dx. The weights of the upper corner filters and the lower corner filters may be arranged in various ways, such as being line-symmetric with respect to an axis of symmetry parallel to the second direction Dy. Thus, the filter for the four corner pixels p2 may include two corner filters.
[0163] Furthermore, a common corner filter may be applied to each of the four corner pixels p2. The size of the corner filter may be various, such as 2 rows and 3 columns, or 3 rows and 3 columns. The weight arrangement may be various, such as the same arrangement as that of a Gaussian filter. In this way, the filter for the four corner pixels p2 may include one corner filter.
[0164] Thus, the filter for the four corner pixels p2 may include one, two, or four corner filters, in any case, the corner filters may have a size larger than the smallest size of the filters used in the filtering process.
[0165] (2) The filtered image IM2 (FIG. 3(B)) includes two types of pixels p2 (referred to as first-type side pixels p2) that are adjacent to the first-type sides eL2 and eR2, respectively. The first-type side pixels p2 are pixels p2 that are distant from the corners cTL2, cTR2, cBL2, and cBR2. The first-type edge filters for the two types of first-type side pixels p2 are not limited to the two edge filters k33L and k33R (FIGS. 9(B)-9(E)), but may include one or more filters having various configurations. For example, a common filter may be applied to the first-type side pixels p2 that are adjacent to the left first-type side eL2 and the first-type side pixels p2 that are adjacent to the right first-type side eR2. In either case, the size of the filter may be various, such as 3 rows and 4 columns, or 4 rows and 4 columns. In this way, the number of pixels in the first direction Dx may differ from the number of pixels in the direction perpendicular to the first direction Dx. The weights may be arranged in various ways, such as the same arrangement as a Gaussian filter.
[0166] (3) The filtered image IM2 (FIG. 3(B)) includes two types of pixels p2 (referred to as second-type side pixels p2) that are adjacent to the second-type sides eT2 and eB2, respectively. The second-type side pixels p2 are pixels p2 that are distant from the corners cTL2, cTR2, cBL2, and cBR2. The second-type edge filters for the two types of second-type side pixels p2 are not limited to the common second-type edge filters k24T and k24B (FIGS. 8(B)-8(E)), but may include one or more filters having various configurations. For example, the weight arrangement may be different between the filter for the second-type side pixels p2 that are adjacent to the upper second-type side eT2 and the filter for the second-type side pixels p2 that are adjacent to the lower second-type side eB2. In either case, the size of the filter may be various, such as 3 rows and 3 columns or 3 rows and 4 columns. When the compression ratio of the resolution in the first direction Dx is greater than the compression ratio of the resolution in the second direction Dy, the second type edge filter is preferably long in the first direction Dx.
[0167] (4) The filtered image IM2 (FIG. 3(B)) includes an inner pixel p2 (referred to as an inner pixel p2) that is away from the edge of the filtered image IM2. The configuration of the first type filter for the inner pixel p2 is not limited to the configuration of the first type filter k34 (FIGS. 6(A) and 6(B)), and various configurations may be used. For example, the size of the first type filter may be various sizes, such as 3 rows and 5 columns, or 5 rows and 6 columns. The resolution may be changed to various resolutions by filtering. For example, the resolution in the first direction Dx may be reduced from the first resolution to a second resolution lower than the first resolution, without changing the resolution in the second direction Dy. In this case, it is preferable that the first type filter is a rectangular filter, and the ratio of the number of pixels in the second direction to the number of pixels in the first direction Dx of the first type filter is the same as the ratio of the second resolution to the first resolution. However, the ratio of the number of pixels in the second direction to the number of pixels in the first direction Dx of the first type filter may be different from the above-mentioned resolution ratio.
[0168] (5) The filters for the pixels p2 that contact the edge of the filtered image IM2 (FIG. 3B) are not limited to the filters described in the above embodiment and modified examples, and may include one or more filters having various configurations. For example, a single second-type filter having a size smaller than the size of the first-type filter (e.g., the first-type filter k34 (FIG. 6A)) may be applied to all pixels p2 that contact the edge of the filtered image IM2 (FIG. 3B).
[0169] (6) The configuration of the blocks referenced in the image compression process of FIG. 4 is not limited to the configuration of the blocks described in FIG. 5(A) and may be various configurations. For example, the size of each block may be larger. The order of processing the multiple pixels p2 in the partial area A2 (FIG. 3(B)) corresponding to the block is not limited to the order described in FIG. 10, 11(A)-11(L), etc. and may be any order. Furthermore, the processor 210 may proceed with calculating the color values of the multiple pixels p2 in the filtered image IM2 (FIG. 3(B)) without using blocks. For example, the processor 210 performs the color value calculation process for each pixel in order, starting from the pixel p2 in the upper left corner of the filtered image IM2 in the first direction Dx. After processing one row, the processor 210 similarly processes the adjacent row in the second direction Dy. The processor 210 may calculate the color values of each of the multiple pixels p2 in the filtered image IM2 by repeating this process.
[0170] (7) In the resolution compression process, the compression ratio of the resolution in the first direction Dx and the compression ratio of the resolution in the second direction Dy may each be various ratios. For example, the compression ratio of the resolution in the second direction Dy may be greater than 1. In either case, the first direction Dx may be the direction corresponding to the larger compression ratio of the resolution, between the vertical direction and the horizontal direction in which the multiple pixels p1 of the target image IM1 are arranged. When the compression ratio of the resolution in the first direction Dx is greater than the compression ratio of the resolution in the second direction Dy, it is preferable that the first type filter (e.g., the first type filter k34 (FIG. 6(A))) is long in the first direction Dx. In other words, it is preferable that the number of pixels of the first type filter in the first direction Dx is greater than the number of pixels in the second direction Dy.
[0171] (8) The weight distribution of each of the multiple filters may be various. For example, each filter may be prepared by rearranging the weights of a Gaussian filter. The variance of the Gaussian distribution defining the Gaussian filter may be various. The variance may be experimentally determined in advance so as to obtain an appropriate filtered image.
[0172] Furthermore, the size of each of the multiple filters may be predetermined, and the processor 210 may calculate the weight of each pixel of the filter when using the filter. For example, the processor 210 may calculate the weight of each of the multiple pixels according to a Gaussian distribution. Then, the processor 210 may generate the filter by changing the arrangement of the weights.
[0173] In either case, in order for the filtered image IM2 to properly represent the same image as the target image IM1, it is preferable that the weighting arrangement be determined as follows: As explained in FIG. 6(B) and other figures, it is preferable that within the filter, the pixel closest to the target position psi of the target pixel p2i has the largest weight; it is preferable that the pixel farthest from the target position psi has the smallest weight; it is preferable that within the filter, the closer to the target position psi, the larger the weight.
[0174] (9) The configuration of the printing device may be various other configurations instead of the configuration of the printing device 900 in FIG. 1. For example, the printing device may have multiple heads that are associated with the same ink but have different positions in the second direction Dy. The printing device may also have multiple control devices (e.g., personal computers) that respectively control the multiple heads. The image processing device 200 may control the multiple control devices according to a print job.
[0175] Furthermore, the printing device may include a transport device that transports the print medium PM, as well as a movement device that moves the print head relative to the print medium PM in a direction different from the transport direction. The printing device may then form dots on the print medium PM by ejecting ink from the moving print head. Furthermore, instead of being an inkjet printing device, the printing device may be a printing device of another type (for example, a laser type).
[0176] (10) The format of image data representing a target image may be in various formats that represent the color values of each of a plurality of pixels (such formats are called raster formats). The color components that represent the color value of each pixel may include various color components, such as one luminance component or four components of cyan, magenta, yellow, and black, instead of the three components of red (R), green (G), and blue (B). Furthermore, the process of reducing resolution using a filter may be applied not only to image data for printing, but also to various image data such as image data for display.
[0177] (11) The image processing device 200 in FIG. 1 may be a device of a type different from a personal computer (for example, a digital camera, a scanner, or a smartphone). The image processing device may also be part of a printing device. Multiple devices (for example, computers) that can communicate with each other via a network may share some of the image processing functions of the image processing device and collectively provide the image processing functions (a system including these devices corresponds to an image processing device).
[0178] In each of the above embodiments, a part of the configuration realized by hardware may be replaced by software, and conversely, a part or all of the configuration realized by software may be replaced by hardware. For example, the process of S36 in Fig. 4 may be executed by a dedicated hardware circuit such as an Application Specific Integrated Circuit (ASIC).
[0179] Furthermore, when some or all of the functions of the present disclosure are realized by a computer program, the program can be provided in a form stored on a computer-readable recording medium (e.g., a non-transitory recording medium). The program can be used in a state stored on the same or a different recording medium (computer-readable recording medium) from when it was provided. The "computer-readable recording medium" is not limited to portable recording media such as memory cards and CD-ROMs, but can also include internal storage devices within a computer, such as various ROMs, and external storage devices connected to a computer, such as a hard disk drive.
[0180] The above-described examples and modifications can be combined as appropriate. The above-described examples and modifications are provided to facilitate understanding of the present disclosure and are not intended to limit the present invention. The present invention may be modified or improved without departing from the spirit thereof, and the present invention includes equivalents thereof. [Explanation of symbols]
[0181] 200...image processing device, 210...processor, 215...storage device, 220...volatile storage device, 230...nonvolatile storage device, 231...program, 240...display unit, 250...operation unit, 270...communication interface, 900...printing device, 910...conveying device, 910a...first roller, 910b...second roller, 940C, 940M, 940Y, 940K...head, Nz...nozzle, 970...control unit, Dx...first direction, Dy...second direction, IM1...target image, IM2...filtered image
Claims
1. An image processing device, an acquisition unit for acquiring raster data representing a target image; a filter processing unit that calculates color values of each of a plurality of pixels in a filtered image by applying a filter from a plurality of filters that corresponds to a position in the target image to each of a plurality of portions included in the target image, the filtered image representing the target image at a resolution in the first direction that is lower than a resolution in the first direction of the target image; Equipped with the plurality of portions included in the target image include an inner portion that is a portion used to calculate color values of pixels on the inside away from an edge of the filtered image, and an edge portion that is a portion used to calculate color values of pixels in contact with the edge of the filtered image; the plurality of filters include a first type filter and a second type filter having a size smaller than that of the first type filter, The filter processing unit calculating color values of pixels in the interior portion of the target image using the first type filter; calculating color values of pixels at the edge portion of the target image using the second type of filter; Image processing device.
2. 2. The image processing device according to claim 1, the target image and the filtered image are each a rectangular image having four corners, the edge portions of the target image include four corner edge portions respectively corresponding to four pixels respectively adjacent to the four corners of the filtered image; the second type of filter includes one or more corner filters for the four corner end portions; each of the one or more angular filters has a smallest size of the plurality of filters; the filter processing unit calculates a color value of a pixel at each corner edge portion using a corner filter included in the one or more corner filters; Image processing device.
3. 3. The image processing device according to claim 1, the target image and the filtered image are each a rectangular image having four corners, the edge portions of the target image include four corner edge portions respectively corresponding to four pixels respectively adjacent to the four corners of the filtered image; the second type filter includes four corner filters respectively associated with the four corner end portions, The four angular filters have different arrangements of weights; the filter processing unit calculates a color value of a pixel at each of the four corner edge portions using the four corner filters, respectively; Image processing device.
4. 3. The image processing device according to claim 1, the target image and the filtered image are each a rectangular image including four corners, two first-type sides perpendicular to the first direction, and two second-type sides parallel to the first direction, the edge portion of the target image includes two types of first-type edge portions respectively associated with two types of pixels respectively contacting the two first-type edges of the filtered image, the second type filters include one or more first type edge filters for the two types of first type edge portions; each of the one or more first type edge filters is a square filter in which the ratio of the number of pixels in a first direction to the number of pixels in a direction perpendicular to the first direction is 1:1; the filter processing unit calculates a color value of a pixel in each of the two types of first-type edge portion portions by using a first-type edge filter included in the one or more first-type edge filters; Image processing device.
5. 3. The image processing device according to claim 1, the target image and the filtered image are each a rectangular image including four corners, two first-type sides perpendicular to the first direction, and two second-type sides parallel to the first direction, the edge portion of the target image includes two types of first-type edge portions respectively associated with two types of pixels respectively contacting the two first-type edges of the filtered image, the second type filter includes two first type edge filters respectively associated with the two types of first type edge portions, The two first-type edge filters have different weight arrangements, the filter processing unit calculates color values of pixels in the two types of first-type edge portions by using the two first-type edge filters, respectively; Image processing device.
6. 3. The image processing device according to claim 1, the target image and the filtered image are each a rectangular image including four corners, two first-type sides perpendicular to the first direction, and two second-type sides parallel to the first direction, the edge portion of the target image includes two types of second-type edge portions respectively associated with two types of pixels respectively contacting the two second-type edges of the filtered image, the second type filters include one or more second type edge filters for the two types of second type edge portions; each of the one or more second type filters is a rectangular filter having an aspect ratio different from 1:1; the filter processing unit calculates a color value of a pixel in each of the two types of second-type edge portions by using a second-type edge filter included in the one or more second-type edge filters; Image processing device.
7. 3. The image processing device according to claim 1, the target image and the filtered image are each a rectangular image including four corners, two first-type sides perpendicular to the first direction, and two second-type sides parallel to the first direction, the edge portion of the target image includes two types of second-type edge portions respectively associated with two types of pixels respectively contacting the two second-type edges of the filtered image, the second type filters include a second type edge filter common to the two types of second type edge portions, the filter processing unit calculates a color value of a pixel in each of the two types of second-type edge portions using the second-type edge filter; Image processing device.
8. 3. The image processing device according to claim 1, the filtering processing unit reduces the resolution of the target image in the first direction from a first resolution to a second resolution lower than the first resolution without changing the resolution of the target image in a second direction perpendicular to the first direction; the first type filter is a rectangular filter, a ratio of the number of pixels in the second direction to the number of pixels in the first direction of the first type filter is the same as a ratio of the second resolution to the first resolution; Image processing device.
9. 3. The image processing device according to claim 1, the filter processing unit executes, for each of a plurality of blocks included in the target image, a process of calculating a color value of a pixel using a filter associated with a position in the target image, in each of a plurality of portions included in the block in the target image; Image processing device.
10. 10. The image processing device according to claim 9, the first type filter is a rectangular filter, the block includes a square portion having four sides with the same number of pixels as the number of pixels on the long side of the first type filter, and a portion that is in contact with the outside of the square portion and is within a range of one pixel from the side of the square portion. Image processing device.
11. 3. The image processing device according to claim 1, the first type filter has the largest size among the plurality of filters; Image processing device.
12. 3. The image processing device according to claim 1, a non-volatile storage device for storing data representative of the plurality of filters; Image processing device.
13. 1. An image processing method, comprising: Obtain raster data representing the target image; calculating color values of each of a plurality of pixels in a filtered image by applying a filter from a plurality of filters to each of a plurality of portions included in the target image, the filter corresponding to a position in the target image, the filtered image representing the target image at a resolution in the first direction that is lower than a resolution in the first direction of the target image; the plurality of portions included in the target image include an inner portion that is a portion used to calculate color values of pixels on the inside away from an edge of the filtered image, and an edge portion that is a portion used to calculate color values of pixels in contact with the edge of the filtered image; the plurality of filters include a first type filter and a second type filter having a size smaller than that of the first type filter, Applying a filter from the plurality of filters to each of the plurality of portions, the filter being associated with the position in the target image, calculating color values of pixels in the interior portion of the target image using the first type filter; calculating color values of pixels at the edge portion of the target image using the second type of filter; An image processing method comprising:
14. A program, The function of obtaining raster data representing the target image; a function for calculating color values of each of a plurality of pixels in a filtered image by applying a filter from a plurality of filters to each of a plurality of portions included in the target image, the filter corresponding to a position in the target image, wherein the filtered image represents the target image at a resolution in the first direction that is lower than a resolution in the first direction of the target image; This is realized on a computer, the plurality of portions included in the target image include an inner portion that is a portion used to calculate color values of pixels on the inside away from an edge of the filtered image, and an edge portion that is a portion used to calculate color values of pixels in contact with the edge of the filtered image; the plurality of filters include a first type filter and a second type filter having a size smaller than that of the first type filter, Applying a filter from the plurality of filters to each of the plurality of portions, the filter being associated with the position in the target image, calculating color values of pixels in the interior portion of the target image using the first type filter; calculating color values of pixels at the edge portion of the target image using the second type of filter; Including, the program.
Citation Information
Patent Citations
Manufacturing method of printed matter
JP2020062784A