1. Field of the Invention
The present invention relates to an image processing apparatus and method.
2. Description of the Related Art
Local (neighborhood) image processing such as spatial filtering has been performed when an image is generated and output. Local image processing is image processing in which some computation is performed using all pixels in a spatial filter area containing the pixels to be processed (hereinafter simply referred to as processing object pixels).
For example, spatial filtering such as edge enhancement or blurring is applied to digital image data 300 shown in
The strip-like areas are called band areas, a memory area in which the band areas are loaded is called band memory, and the act of dividing a picture is called band division. A band memory may be provided in any memory area on a system. For simplicity of explanation, an example will be described herein in which the band memory is provided in a main memory.
As a coordinate system (main scanning direction, sub scanning direction) for digital image data, a new coordinate system (band area coordinate system) having the length and height directions is defined, and a band area is represented by length times height, as shown in
The band processing will be described in further detail. A first band area 301 shown in
As is apparent from
In these techniques, a scheme is used for overlapping adjacent band areas at the boundaries between them so that local image processing can be performed with no space between the adjacent band areas. In Japanese Patent Application No. 2006-139606, pixels are scanned one by one in the direction of height of each band area so that the size of a delay memory holding processing object pixels required for local image processing is defined by the height of the band area, thereby reducing the size of the delay memory.
With the aim of differentiating devices, the resolutions of digital image data are being increased to improve image quality. As the resolutions increase, the amount of data to be processed in image processing is also increasing. It is desirable to avoid increasing the size of circuitry with increasing amount of data to be processed in image processing. To keep the feeling users experience optimal while using devices, image processing time cannot be increased. Therefore there is also a demand for a method for increasing the speed of image processing with increasing resolution of digital image data.
While the related art techniques specify that pixels are scanned one by one in the direction of height of band areas in local image processing and make mention of reducing the size of delay memories, the related art techniques did not sufficiently increase the speed of image processing.
Objects of the present invention are to reduce the size of circuitry for image processing and to increase the speed of the image processing.
Another object of the present invention is to provide an image processing method including: a first readout step of reading first image data of a plurality of pixels as a unit from a first memory storing image data in a band area, the first image data corresponding to a first region; a second readout step of reading second image data to be used for processing a plurality of processing object pixels corresponding to the first region from a second memory; a processing step of processing each of the plurality of processing object pixels by using a pixel in a second region containing each of the plurality of processing object pixels extracted from the first and second image data; and a memory step of storing pixel data contained in the first image data to be used for processing a plurality of other pixels in the second memory.
Yet another object of the present invention is to provide an image processing apparatus including: a first readout unit configured to read first image data of a plurality of pixels as a unit from a first memory storing image data in a band area, the first image data corresponding to a first region; a second readout unit configured to read second image data to be used for processing a plurality of processing object pixels corresponding to the first region from a second memory; a processing unit configured to process each of the plurality of processing object pixels by using a pixel in a second region containing each of the plurality of processing object pixels extracted from the first and second image data; and
a memory unit configured to store pixel data contained in the first image data to be used for processing a plurality of other pixels in the second memory.
Further features of the present invention will become apparent from the following description of exemplary embodiments with reference to the attached drawings.
The analog electrical signals converted from the image information are input into the analog signal processing unit 126, where processing such as correction is applied to the R, G, and B signals separately, and then the resulting signals are converted to digital signals (A/D conversion). Thus, a digital full-color signals (hereinafter referred to as the digital image signals) is generated. The generated digital image signals are input into an image processing unit 130. The image processing unit 130 applies input correction processing, spatial filtering, color space conversion, density correction, and halftone processing, which will be described later, to the digital image signals and outputs the resulting digital image signals to a printer unit 140. The printer unit 140 includes a printout unit (not shown) such as a raster plotter that uses inkjet heads or thermal heads, for example, and records an image based on input digital image signals on paper.
A CPU circuit unit 110 includes a CPU 112 for processing and controlling, a ROM 114 for storing fixed data and programs, a RAM 116 used for temporarily storing data and loading a program, and an external storage 118. The CPU circuit unit 110 controls components such as the image reading unit 120, the image processing unit 130, and the printer unit 140 and centrally controls a process sequence of the image processing apparatus of the present embodiment.
The external storage 118 is a storage medium such as a disk storing parameters and programs used by the image processing apparatus of the present embodiment. Data and programs may be loaded from the external storage 118 into the RAM 116.
The image processing unit 130 in
The image processing controller 200 includes an input interface 210, an input correction circuit 220, a spatial filtering circuit 230, a color space conversion circuit 240, a density correction circuit 250, a halftone processing circuit 260, and an output interface 270. The input correction circuit 220, the spatial filtering circuit 230, the color space conversion circuit 240, the density correction circuit 250, and the halftone processing circuit 260 will be described in detail below.
[Input Correction Circuit 220]
Digital image signals 215 from the image reading unit 120 are input into the input correction circuit 220 through the input interface 210. The digital image signal 215 includes luminance signals R, G, and B. The input correction circuit 220 applies processing to the input digital image signals for correcting variations in characteristics of a sensor that reads an original 100 and light distribution characteristics of lamps for illuminating the original.
[Spatial Filtering Circuit 230]
Digital image signals (luminance signals R, G, and B) 225 output from the input correction circuit 220 are input into the spatial filtering circuit 230. The spatial filtering circuit 230 applies local image processing such as smoothing and edge enhancement to the digital image signals (luminance signals R, G, and B) 225.
[Color Space Conversion Circuit 240]
Digital image signals (luminance signals R, G, and B) 235 output from the spatial filtering circuit 230 are input into the color space conversion circuit 240. The color space conversion circuit 240 converts the luminance signals R, G, and B of the digital image signals 235 to density signals C (Cyan), M (Magenta), Y (Yellow), and K (Black).
[Density Correction Circuit 250]
Digital image signals (density signals C, M, Y, and K) 245 output from the color space conversion circuit 240 are input into the density correction circuit 250. The density correction circuit 250 applies density correction to the digital image signals (density signals C, M, Y, and K) 245. The density correction circuit 250 preliminarily performs the density correction by taking into consideration the characteristics of halftone processing in order to prevent a change in density when the signal are binarized in the halftone processing circuit 260 in the subsequent stage.
[Halftone Processing Circuit 260]
Digital image signals (density signals C, M, Y, and K) 255 output from the density correction circuit 250 are input into the halftone processing circuit 260. The halftone processing circuit 260 applies screening processing to the digital image signals (density signals C, M, Y, and K) 255 to convert them to binary halftone representation.
In this way, the binary digital image signals (printing signal C, M, Y, and K) 265 are output to the printer unit 140 through the output interface 270 and a bus 275.
In the present embodiment, image processing specialized to band processing is performed to reduce the size of a delay memory. Furthermore, multiple pixels are treated as a processing unit to reduce the circuitry size and increase the processing speed of the image processing apparatus. In the present embodiment, in order to achieve these objects, image processing is performed in a band area coordinate system different from the coordinate system (main scanning direction, sub scanning direction) for digital image data).
First, the number of pixels N in a set of pixels 430 treated at a time along the length of the band area starting from the upper left corner of the band area 402 is set. Here, N is an integer greater than or equal to 2. In the example in
That is, reading of N (four) contiguous pixels along a first direction, that is, the direction of length of the band area 402, as a unit is repeated in a second direction, that is, the direction of the height of the band area 402, one pixel down each time, until the bottom edge of the band area 402 is reached. Such reading of a set of N pixels is sequentially performed to scan the band area 402. The first and second directions are orthogonal to each other and the size (four pixels) in the first direction (length direction) is set to be greater than the size (one pixel) in the second direction (height direction).
The sequence of scanning and image processing is continued until the lower right pixel of the band area is reached and then band processing of one band area ends. In this way, according to the present embodiment, sets of N pixels are processed one after another in the direction of length of a band area while shifting in the direction of height of the band area by one pixel.
The nine pixels in a spatial filter area 410 of 3 times 3 pixels shown in
It is assumed in the present embodiment that the area of processing object pixels in the spatial filtering circuit 230 is of a size fw [pixels] in the direction of length of a band area and fh [pixels] in the direction of height of the band area. That is, the area of a set of processing object pixels can be expressed by fw times fh pixels. In the example, the area is a 3 times 3 pixel region. If the number of pixels in a set that is a unit of processing in the direction of length of the band area is set to N [pixels], {(fw−1)+N}*fh [pixels] are held in the spatial filtering circuit 230. In the example shown in
In particular, the 18 pixels are:
processing object pixels o, p, q, and r in a pixel set 430 input from the band memory by a reading operation,
processing object pixels c, d, e, f, i, j, k, and l in an area 420 in
processing object pixels a, b, g, h, m, and n read from a delay memory 575 shown in
Here, pixels o, p, q, and r correspond to pixel p (i+1, j+1) in
Pixels i, j, k, and l are pixels input from the band memory immediately before pixels o, p, q, and r.
Pixels c, d, e, and f are pixels input from the band memory immediately before pixels i, j, k, and l.
Pixels m and n are read from the delay memory 575 by a delay circuit 570 in response to the input of pixels o, p, q, and r from the band memory. Pixels g and h are read from the delay memory 575 in response to the input of pixels i, j, k, and l from the band memory. Pixels a and b are read from the delay memory 575 in response to the input of pixels c, d, e, and f from the band memory.
In this way, pixel data in an area to be processed having a predetermined size (6 times 3 pixels a to r in
An operation of the spatial filtering circuit 230 will be described with reference to the block diagram of the spatial filtering circuit 230 shown in
First, a processing object pixel o in a pixel set 430 is input from an external source. The spatial filtering circuit 230 accesses the delay memory 575 through the delay circuit 570 to read processing object pixels m and n that are on the same line as processing object pixel o that reside in location 490 in
Nine weight values are placed in the sum of products operation circuit 565 from a weight matrix register 560 shown in
Processing object pixels o, p, q, and r in the pixels set 430 are sequentially input and image processing is performed on processing object pixels, h, i, j, and k, in this order.
Finally, the image processing apparatus (spatial filtering circuit 230) shown in
As a result of the ringwise FIFO (First-In First-Out) operation by the delay circuit 570, pixel regions 450a and 450b stored in the delay memory 575 shown in
As the processing of sets of pixels progresses, the set of pixels 430 input moves in the direction 460 (the direction of length of the band area) perpendicular to the scanning direction 470 (the direction of height of the band area). Similarly, the pixel regions 450a and 450b to be stored in the delay memory 575 moves in the direction perpendicular to the scanning direction 470. In
Here, only two data accesses to the delay memory 575 are required for processing the set of N pixels, one read access and one write access. That is, in this example of the present embodiment, only two accesses to the delay memory 575 are required for processing one set of four pixels (N=4): access for reading pixels m and n and access for writing pixels e and f. Accordingly, the delay memory 575 can be implemented by one single-port (1-port) memory. It is assumed in the present embodiment that the bit length of one word read or written by one access to the delay memory 575 is equivalent to two pixels.
In a typical spatial filtering circuit, processing of one pixel always involves two accesses to a delay memory. Accordingly, in order to implement a fast spatial filtering circuit that processes one pixel per clock cycle, two data accesses per pixel need to be made in one clock cycle. Therefore, interleaved access needs to be performed by using one dual-port (2-port) memory or two single-port (1-port) memories.
In the present embodiment, image processing is performed using a set of two or more pixels as a unit and data access is made to the set of pixels in the delay memory, therefore data access does not concentrate in one clock cycle. The pixel scanning method according to the present embodiment is designed for achieving such data access.
While the sequence of image processing shown in
If a set of pixels 430 which is a unit of image processing is set in the direction of height of a band area in contrast to the example of the embodiment described above, the pixel region 490 required to be read from the delay memory 575 at a time in order to process the set of pixels 430 would contain more pixels than the pixel region 490 shown in
In the method according to the present embodiment in which band division is used to sequentially perform image processing, the height of a band area needs to be changed in accordance with the size of the image as shown in
In summary, according to the first embodiment,
one picture of digital image data 300 is divided into band areas 301 to 304 and the band areas 301 to 304 are sequentially assigned to a band memory,
a set of N contiguous pixels 430 in the direction of length of a band area is set as a basic unit for image processing,
pixel set 430 reading is shifted pixel by pixel in the direction (height direction) perpendicular to the direction of length of the band area,
pixel data of a predetermined number of sets of contiguous pixels along the height direction is held in a delay register 572 as they are read,
after each read operation, pixel data in the delay memory 575 that is no longer needed is replaced with pixel data to be subsequently used among pixel data deleted from the delay registers 572, thereby updating the delay memory 575 ringwise, and
after each read operation, the pixel data in an area of predetermined size ({fw−1}+N)*fh) to be processed that includes a newly read set of pixels is provided for image processing through use of the delay register 572 and the delay memory 575, thereby performing image processing.
In particular, image processing is performed while holding some pixels of a scanned set of pixels in the delay memory 575 that is updated ringwise and has a size equivalent to a predetermined number of pixels that depends on the product of the height of a band area and (the width fw of a spatial filter area 401 minus 1). A delay memory in a conventional image processing circuit has a size equal to the line length multiplied by the height fh of a spatial filter area, or the line length multiplied by (the height fh of a spatial filter area minus 1). In the present embodiment, on the other hand, the size of the delay memory 575 is equal to the height of a band area multiplied by “the width fw of a spatial filter area 401 minus 1”. Because the height of a band area in general is smaller than the line length of the band area, the size of the delay memory 575 is small and therefore the size of circuitry is small.
According to the inventive method for scanning pixels described above, data in the delay memory 575 shifts in the scanning direction 480 of the delay memory 575 by a set of N pixels as a unit as described above. Consequently, the number of data accesses to the delay memory 575 is two for N pixels (one set of pixels 430) in the present embodiment. Thus, the frequency of data accesses to the delay memory per pixel is reduced. Therefore, the delay memory 575 can be shared among pixels constituting a pixel set and the circuitry size can be reduced even if the speed of spatial filtering circuit 230 is increased.
While the embodiment has been described with respect to an example in which image data obtained by dividing one picture into band areas is processed, the embodiment is also applicable to processing of image data obtained from one picture.
A second embodiment of the present invention will be described. In the second embodiment, N pixels in a pixel set are processed in a parallel distributed manner and therefore image processing faster than that in the first embodiment can be performed. By a method for increasing the speed of the processing described below, the speed of image processing can be increased in keeping with increase of the resolution of digital image data. In the description of the second embodiment, the same elements as those in the first embodiment described above are labeled with the same reference numerals or symbols as those in
If one sum of products operation circuit 565 is capable of processing one pixel per clock cycle, N (=pl) pixels can be processed in one clock cycle in the spatial filtering circuit 230 shown in
In the second embodiment, as with the first embodiment, two data accesses are made to a delay memory 575 for a set of N pixels. However, the two data accesses must be accomplished in one clock cycle because the processing speed is increased. That is, the second embodiment requires interleaved access using one dual-port (2-port) memory or two single-port (1-port) memories. However, the increase of processing speed by a factor of N (=pl) by parallel distributed processing of N (=pl) pixels does not need increase of the size of the circuitry of a delay memory as compared with the image processing method in which scanning is performed pixel by pixel as described above.
As has been described, the image processing method according to the second embodiment allows the speed of image processing to be increased by parallel distributed processing even when the resolution of digital image data 300 increases. That is, image data is divided into band areas 301 to 304 in the height direction of band area as shown in
The first and second embodiments can be combined to perform image processing at a parallelism level pl=2 for N=4 pixels, for example.
As has been described above, according to the embodiments described above, the size of a delay memory required for image processing can be reduced because the size of the delay memory depends on the height of a band area. Furthermore, the number of data accesses per pixel can be reduced because the memory is shared among a set of N pixels specified.
Thus, the size of circuitry can be reduced when local (neighborhood) image processing is serially performed as described above whereas the processing speed can be increased when the image processing is performed in a parallel manner as described above.
While the present invention has been described in detail with respect to embodiments, the present invention can be implemented as a system, apparatus, method, program or storage medium, for example. In particular, the present invention may be applied to a system incorporating multiple devices or may be applied to an apparatus formed by a single device.
The present invention includes an implementation in which a software program is directly or remotely provided to a system or an apparatus and a computer of the system or the apparatus reads and executes the provided program code to accomplish the functions of any of the embodiments described above. The program provided is a computer program corresponding to any of the flowcharts shown in the embodiments.
Therefore, the program code itself installed in a computer in order to implement functions and processing of the present invention by the computer also implements the present invention. That is, the present invention also includes the computer program itself for implementing functions and processing of the present invention.
In that case, the program may be in any form that has functionality of a program, such as an object code, a program executed by an interpreter, or script data to be provided to an operating system.
Examples of computer-readable storage medium for providing the computer program include a floppy disk, hard disk, optical disk, magneto-optical disk, MO, CD-ROM, CD-R, CD-RW, magnetic tape, non-volatile memory card, ROM, and DVD (DVD-ROM and DVD-R).
Alternatively, a browser of a client computer may be used to access a Web page on the Internet to download the computer program of the present invention to a recording medium such as a hard disk. The program downloaded may be a compressed file that includes an automatic installing function. Furthermore, the present invention can also be implemented by dividing a program code constituting the program of the present invention into files and downloading the files from different Web pages. In other words, the present invention also includes a WWW server that allows multiple users to download the program files for implementing functions and processing of the present invention on computers.
The program according to the present invention can be encrypted, stored on a storage medium such as a CD-ROM, and delivered to users. Users who meet predetermined requirements may be allowed to download key information for decrypting the encrypted program from a Web page through the Internet, then the users may use the key information to execute the encrypted program and install the program on a computer.
The functions of any of the embodiments described above can be implemented by a computer reading and executing a program or may be implemented by a computer in cooperation with an OS running on the computer according to instructions of the program. In that case, the OS performs part or all of actual processing and the processing implements functions of any of the embodiments described above.
The program read from a recording medium may be written in a memory provided in a function extension board inserted in a computer or a function extension unit attached to a computer and part or all of functions of any of the embodiments described above may be implemented. In that case, after the program is written in the memory in the function extension board or unit, a CPU provided in the function extension board or unit executes part or all of actual processing in accordance with instructions of the program.
While the present invention has been described with reference to exemplary embodiments, it is to be understood that the invention is not limited to the disclosed exemplary embodiments. The scope of the following claims is to be accorded the broadest interpretation so as to encompass all such modifications and equivalent structures and functions.
This application claims the benefit of Japanese Patent Application No. 2007-199896, filed on Jul. 31, 2007, which is hereby incorporated by reference herein in its entirety.
Number | Date | Country | Kind |
---|---|---|---|
2007-199896 | Jul 2007 | JP | national |
Number | Name | Date | Kind |
---|---|---|---|
4829380 | Iadipaolo | May 1989 | A |
4860118 | Arimoto | Aug 1989 | A |
5072291 | Sekizawa | Dec 1991 | A |
5251023 | Arimoto et al. | Oct 1993 | A |
5345517 | Katayama et al. | Sep 1994 | A |
5459589 | Ohnishi et al. | Oct 1995 | A |
5940089 | Dilliplane et al. | Aug 1999 | A |
5945972 | Okumura et al. | Aug 1999 | A |
5953426 | Windel et al. | Sep 1999 | A |
5960109 | Shiau | Sep 1999 | A |
5973742 | Gardyne et al. | Oct 1999 | A |
6005609 | Cheong | Dec 1999 | A |
6108014 | Dye | Aug 2000 | A |
6181438 | Bracco et al. | Jan 2001 | B1 |
6222935 | Okamoto | Apr 2001 | B1 |
6282325 | Han | Aug 2001 | B1 |
6332045 | Sawada et al. | Dec 2001 | B1 |
6587158 | Adams et al. | Jul 2003 | B1 |
6597362 | Norman | Jul 2003 | B1 |
6950559 | Kobayashi | Sep 2005 | B2 |
20050168770 | Kurose et al. | Aug 2005 | A1 |
20060056738 | Keithley et al. | Mar 2006 | A1 |
20060119895 | Takata et al. | Jun 2006 | A1 |
20060222269 | Ohno | Oct 2006 | A1 |
20060232620 | Kitamura et al. | Oct 2006 | A1 |
20070229907 | Suzuki | Oct 2007 | A1 |
Number | Date | Country |
---|---|---|
04-034865 | Jun 1992 | JP |
63-263577 | Oct 1998 | JP |
2000-312327 | Nov 2000 | JP |
2004-147165 | May 2004 | JP |
2006-139606 | Jun 2006 | JP |
Entry |
---|
Translation of JP 2006139606 provided by AIPN machine translation. |
Office Action which issued on Feb. 14, 2012, in counterpart Japanese application No. 2007-199896. |
Japanese Office Action issued Jun. 25, 2012, in counterpart Japanese application No. 2007-199896. |
Number | Date | Country | |
---|---|---|---|
20090033766 A1 | Feb 2009 | US |