Method of and apparatus for modifying image

Abstract: The invention provides a method in which the distribution of a retouch coefficient in a subject region is specified by two data tables so that the retouch coefficient is readily changed at a high speed. A distance table (61) includes distance data (Dd) each representing a distance between a center pixel and each of the other pixels. A coefficient table (62) includes values of a retouch coefficient (Kb) dependent on the distance data (Dd). The retouch coefficient (Kb) is changed by only rewriting the coefficient table (62). The retouch coefficient (Kb) at each pixel is determined based on the distance table (61) and the coefficient table (62) and is added to image data (Di) to modify the image data (Dr).

Description: The present invention relates to an image processor for and a method of modifying an image. In printing processes, images are often modified by the technique called retouching. Retouching includes dot etching and color correction, which have been carried out manually by a skilled operator. Recent developments in computer technology have enabled various image processors to execute image modification including retouching by means of data processing. A computer-aided image modification processor with the features of the pre-amble is described in WO-A-8200903. Fig. 1 is a conceptive view illustrating a color image Im to be modified. The color image Im is defined by four color signals representing concentrations of four colors Y (for yellow), M (for magenta), C (for cyan), and K (for black) in 256 gradations. In conventional automatic image modification with the aid of an image processor, an operator specifies a subject region R to be modified with, for example, a digitizer and an electronic pen (or a stylus pen) on the color image Im which is displayed on a color display. Suppose an image of the Y (yellow) plate in the subject region R is processed by dot etching. Dot etching is image modification which changes a concentration level of pixels within a part of an image. As shown in Fig. 2, retouch coefficients K11 through Kmn each representing the intensity of a retouch effect (amount of dot etching) at each pixel in the subject region R are stored in advance in a coefficient table of the image processor. When the subject region R is specified by the operator, the retouch coefficients K11 through Kmn are added to the image data of the Y plate within the subject region. Here the subject region R includes m x n pixels, where m and n are integers and range from a few tens to several hundreds. The intensity of the retouch effect usually depends on the position of a pixel in the image Im. While observing the color display, the operator specifies the location of a subject region with a digitizer and changes the intensity of the retouch effect. Accordingly, the subject region of the image Im is appropriately retouched. In the conventional image processors described above, all retouch coefficients stored in a coefficient table (or in a memory) should be rewritten each time when the intensity of the retouch effect is changed. Such rewriting is laborious and time consuming; every time when the operator changes the intensity of the retouch effect, the retouch process is interrupted by rewriting of the retouch coefficients in the coefficient table. This rewriting causes a reduction in the efficiency of the image processors. An object of the invention is to change the image modification effect without rewriting modification coefficients for all pixels in a region to be modified. The present invention is directed to an image processor for modifying an image, with the features of claim 1. The present invention is also directed to a method of modifying an image, comprising the steps of claim 7. These and other objects, features, aspects and advantages. of the present invention will become more apparent from the following detailed description of the present invention when taken in conjunction with the accompanying drawings. Fig. 1 is a view showing a color image to be retouched; Fig. 2 is an explanatory view showing the intensity of retouch effect at each pixel in a subject region. Fig. 3 is a block diagram showing the basic structure of an image processor according to the invention; Fig. 4 is a block diagram showing the structure of an image processing system embodying the invention; Fig. 5 is a conceptive view showing a distance table and a coefficient table; Fig. 6 is a conceptive view showing the coefficient table storing retouch coefficients; Fig. 7 is a flowchart showing dot etching process by the image processing system of the embodiment; Fig. 8 is a conceptive view illustrating retouch process executed in the embodiment; Fig. 9 is an explanatory view showing general examples of the distance table and the coefficient table; Fig. 10 is a conceptive view illustrating one distribution pattern of the retouch coefficient; and Fig. 11 is a conceptive view illustrating another distribution pattern of the retouch coefficient. Fig. 3 is a general block diagram of an image processing apparatus according to the present invention. The image processing apparatus comprises the following eight units: Image memory M1 stores image data. Image display unit M2 displays an image based on the image data. Positioning unit M3 is used to specify a location of a subject region which is to be modified on the displayed image. Address unit M4 generates an address of the subject region in the image memory based on at least the location specified by the positioning unit, and reads out image data of the subject region from the image memory. Distance data generation unit M5 generates distance data each indicating a distance between a predetermined standard pixel in a predetermined retouchable region and each pixel in the retouchable region. The unit M5 also outputs the distance data for each pixel in the subject region according to the address given by the address unit. Parameter control unit M6 adjusts a distribution parameter defining the distribution of a retouch coefficient representing the intensity of a retouch effect at each pixel in the retouchable region. Coefficient setting unit M7 stores a reference value of the retouch coefficient corresponding to each of the distance data. The unit M7 also determines the distribution of the retouch coefficient in the subject region based on the distribution parameter and the distance data output from the distance data output unit. Arithmetic processing unit M8 processes the image data of the subject region output from the image memory and the distribution of the retouch coefficient determined by the coefficient setting unit, thereby modifying the image data. The distribution of the retouch coefficient is determined by a combination of the distance data stored in the distance data output unit and values of the retouch coefficient corresponding to the distance data by the coefficient setting unit. Each reference value of the retouch coefficient is stored in the coefficient setting unit. The distribution of the retouch coefficient in the subject region is determined based on the distribution parameter adjusted by the parameter control unit. Accordingly, the intensity of the retouch coefficient is readily changed corresponding to each distance data by the coefficient setting unit while the distance data is not changed. Fig. 4 is a block diagram illustrating the structure of an image processing system embodying the present invention. The image processing system includes a host computer 1 connected with a digitizer 2, retouch effect controller 3, and a keyboard 4. The retouch effect controller 3 controls a retouch effect, such as an amount of dot etching, dimensions of a subject region to be retouched, or a quantity of color correction. The retouch effect controller 3 is implemented with a variable resistor or a volume control. The digitizer 2 and the retouch effect controller 3 respectively act as the positioning unit M3 and the parameter setting unit M6 shown in Fig. 3. The host computer 1 is connected to a CPU bus CB and a data bus DB. An image memory unit 5, an arithmetic processing unit 6, and a display control unit 7 are connected to one another via the buses CB and DB. The host computer 1 controls the whole image processing system. The image memory unit 5 stores various image data and includes an address register 51, which generates an address of a subject region in the memory. The address register 51 is implemented by a software program carried out by a central processing unit or CPU (not shown) in the image memory unit 5. The arithmetic processing unit 6 includes a distance table 61 for storing distance data. Each distance data indicates a distance between a reference position in a predetermined retouchable region and each pixel in the retouchable region. The retouchable region is a region in which the image is able to be retouched, and which is defined in advance. The processing unit 6 also includes a coefficient table 62 for storing values of a retouch coefficient corresponding to distance data, and a coefficient rewriter 63 for rewriting values of the retouch coefficient stored in the coefficient table 62. The distance table 61 and the coefficient table 62 are stored in a RAM or random access memory (not shown) in the arithmetic processing unit 6. The coefficient rewriter 63 is implemented by a software program carried out by a CPU (not shown) in the arithmetic processing unit 6. The distance table 61 acts as the distance data generation unit M5 and the coefficient table 62 and the coefficient rewriter 63 act as the coefficient setting unit M7 shown in Fig. 3. The display control unit 7 includes a display memory 71 for storing image data converted to RBG data and displays a color image on a color cathode ray tube (CRT) 8. Fig. 5 is a conceptive view showing the contents of the distance table 61 and the coefficient table 62. Fig. 5(a) shows distance data Dd for each pixel in a retouchable region RR. Each distance data indicates a distance between each pixel and a reference position in the retouchable region RR. The reference position is the center of the retouchable region RR in this embodiment. The distance data ranges from zero to five as shown in Fig. 5(a). The retouchable region RR defines a possible area for retouch process and includes 11x11 pixels in this embodiment. The retouch region RR in a commercial image processing system will include, for example, 256x256 pixels. The retouchable region RR is divided into five pixel layers and the outer pixel layers have greater values in the distance data Dd; that is, values of the distance data Dd increase from zero to five according to the positions of the pixel layers. Each value of the distance data Dd in Fig. 5(a) indicates the ordinal number of each pixel layer when counted from the center of the retouchable region RR. Fig. 5(b) shows the content of the coefficient table 62, with distance data Dd as abscissa and retouch coefficient K as ordinate. The retouch coefficient K has a discrete value depending on the distance data Dd. A standard retouch coefficient Kb shown by a solid line has a peak or maximum value of 10 at the center pixel and gradually decreases with the distance from the center. Those pixels with the retouch coefficient K of zero are not retouched; that is, the subject region R is formed of the pixels which have the retouch coefficient K of at least one. The operator changes the retouch coefficient K with the retouch effect controller 3. Turning the retouch effect controller 3 counterclockwise by a certain amount, for example, causes the coefficient rewriter 63 to rewrite the content of the coefficient table 62 from the reference retouch coefficient Kb to a retouch coefficient Ka shown by a broken line, which has smaller values at pixels other than the center pixel. On the contrary, turning the retouch effect controller 3 clockwise by a certain amount causes the rewriter 63 to rewrite the content from the coefficient Kb to a retouch coefficient Kc shown by a one-dot chain line, which has greater values at pixels other than the center pixel. Namely, operation of the retouch effect controller 3 changes only the range to be retouched while the intensity of retouch effect (amount of retouch at the center pixel) remains unchanged. Fig. 6 illustrates the contents of the coefficient tables 62 corresponding to the retouch coefficients Ka, Kb, and Kc, respectively. In this embodiment, a cursor on the CRT 8 indicates the subject region to be retouched. Operation of the retouch effect controller 3 changes the size of the cursor according to the change of the coefficient K. For example, when the retouch coefficient Ka is set in the coefficient table 62, the cursor covers a 5x5 pixel block in the retouchable region RR wherein the distance data Dd ranges from zero to two. The retouch coefficient Kb makes the cursor to cover a 7x7 pixel block wherein the distance data Dd ranges from zero to three; the retouch coefficient Kc makes the cursor to cover a llxll pixel block wherein the distance data Dd ranges from zero to five. Values of the retouch coefficient K in the coefficient table 62 are rewritten based on the reference value Kb and the control amount of the retouch effect controller 3 by the coefficient rewriter 63 of the arithmetic processing unit 6. A retouch coefficient K(Dd) for each distance data Dd is given by the equation (1): K(Dd) = V*C1*Dd + C2 where V denotes the control amount of the retouch effect controller 3 (for example, the rotational angle of the variable resistor), C1 and C2 are predetermined constants, and the symbol * denotes multiplication. The value of the retouch coefficient K(Dd) is determined by rounding to the nearest whole number in the equation (1). The control amount V corresponds to the parameter in the present invention. Fig. 7 is a flowchart of a dot etching process by the image processing system described above. At step S1, image data stored in the image memory unit 5 is supplied to the display control unit 7 to be converted into RBG data therein, and a color image shown in Fig. 1 is displayed on the color CRT 8 as a function of the RBG data. Here the RBG data is stored in the display memory 71. A cursor or a window showing the position and dimensions of the subject region R is also shown on the color CRT 8. The cursor defines the subject region of 7x7 pixels corresponding to the standard retouch coefficient Kb. At step S2, an operator moves the cursor to a desired position with the electronic pen 21 on the digitizer 2. The program then proceeds to step S3 at which the amount of retouch is controlled with the retouch effect controller 3. Values of the retouch coefficient K in the coefficient table 62 are rewritten according to the above equation (1) by the coefficient rewriter 63, and the cursor on the color CRT 8 is changed to the same size as the subject region R to be retouched. The cursor having the same size as the subject region R enables the operator to easily identify the range to be retouched, and this improves the operation efficiency greatly. Pressing the electronic pen 21 against the digitizer 2 starts the retouch process at step S4 as follows. First, the address register 51 gives an address of each pixel in the subject region R based on the position of the cursor specified by the digitizer 2 and on the dimensions of the subject region R defined by the retouch effect controller 3. The address is that in the image memory unit 5. Second, the image data at each pixel specified by the address is read out of the image memory unit 5 and output to the arithmetic processing unit 6. The distance data Dd for each pixel of the subject region R is also read out of the distance table 61. Fig. 8 schematically illustrates details of the processing at step S4. Fig. 8(a) shows the distance data Dd read out of the distance table 61, and Fig. 8(b) shows the corresponding coefficient table 62. The arithmetic processing unit 6 calculates the retouch coefficient Kb shown in Fig. 8(c) from the above equation (1) based on the data shown in Figs. 8(a) and 8(b). The arithmetic processing unit 6 then adds the image data Di (see Fig. 8(d)) read out of the image memory unit 5 to the retouch coefficient Kb to generate retouched (dot etched) image data Dr (see Fig. 8(e)). The retouched data Dr is stored in the image memory unit 5 and output to the display control unit 7, whereby the retouched image is displayed on the color CRT 8. As described above, the amount of retouch is adjusted or controlled at a high speed because the process of the embodiment does not require rewriting of the distance table 61 of a relatively large data volume but only of the coefficient table 62 of a relatively small data volume. Accordingly, a retouched image is instantly displayed on the color CRT 8. This enables the operator to successively and efficiently execute retouch processing while observing a retouched image on the screen. When the operator finds another region to be retouched on the image at step S5, the program returns to step S2 and repeats steps S2 through S5 until it completes processing for the whole image. Some examples of modifications are given below. (a) Although the distance table 61 representing the retouchable region RR is a square consisting of 11x11 pixels, it can be a rectangle consisting of mxn pixels as shown in Fig. 9(a) or a circle. When the distance table 61 represents a retouchable region of mxn pixels as shown in Fig. 9(a), the distribution of the retouch coefficient K shown in Fig. 9(b) is changed in proportion to the control amount of the retouch effect controller 3. As seen in Fig. 9(b), while the retouch coefficient K at the center pixel is kept constant, those at the circumjacent pixels are decreased linearly. The distribution of the retouch efficient K is, however, discrete as shown in Fig. 5(b), and thus the straight lines shown in Fig. 9(b) are only approximate. (b) In the above embodiment, the reference pixel of the distance data Dd is located at the center of the retouchable region RR, but it can be located at any other predetermined positions such as the corner of the retouchable region RR or the subject region R. The distance data can be one representing a distance in a straight line between the standard pixel and each of the other pixels instead of the ordinal number of pixel layers. In general, the distance data can represents any value dependent on a distance between the predetermined reference pixel and each of the other pixels in the retouchable region. (c) The distribution of the retouch coefficient K can be set to give a predetermined curve with greater retouch effect on the center and smaller effect on the circumjacence as shown in Fig. 10 instead of a straight line of Fig. 9(b). Here the distribution of the retouch coefficient K is determined according to the above equation (1). (d) Alternatively, the magnitude of the retouch coefficient K may be changed while the range of the subject region is maintained as shown in Fig. 11. Here the retouch coefficient K may be calculated according to the following equation (2) instead of the equation (1): K(Dd) = V*(C3*Dd - C4) where C3 and C4 are constants. Although the retouch coefficients K are stored in the coefficient table 62 in the above embodiment, a predetermined function representing the distribution of the retouch coefficient K can be stored in a memory of the arithmetic processing unit 6 and the retouch coefficient K can be calculated according to the function. Alternatively, the operator can select one of preset plural distributions of the retouch coefficient K. The operator can also select a pattern of the coefficient change, such as the pattern according to which the subject region size changes as shown in Fig. 9(b), and the pattern according to which the magnitude of the retouch effect at the standard pixel changes as shown in Fig. 11. The distribution and the change manner is selected with the keyboard 4, for example. (e) The retouch coefficient K can be controlled with a specific type of electronic pen which changes the intensity of output signals according to the writing pressure. Such electronic pen is sold under the trademark "Electronic Hitsuatu Pen SP-300, or SP-310" by WACOM in Japan. With this type of electronic pen, the operator can simultaneously specify the position of the cursor or the subject region and determine the retouch coefficient K. This further improves the operation efficiency. (f) The system of the invention is not limited to the dot etching described above but is applicable to other image modification processes including image transplanting. Image transplanting is a processing where part of an image is eliminated and another part is transferred to the eliminated part. For example, an image part of electric poles and wires is replaced by an image part of the sky. When an original image part is combined with a replaced image part at a predetermined ratio, a resultant combined image does not have any observable joints but is naturally integrated. The sizes of the two image parts, that is, the original and the replaced, and the combination ratio are determined with the retouch effect controller 3. The combination ratio is large at the center pixel and small at the circumferential pixels; for example, 100% at the center pixel and 10% at the outer most pixels. When the system of the invention is applied to such image transplanting process, combination ratios are determined according to the distance data and are stored in the coefficient table. The replaced image can be an image part of a predetermined uniform color instead of part of the original image. According to the above embodiment, the retouch coefficient is readily changed by rewriting the coefficient table 62 of a relatively small data volume while the distance table 61 of a relatively large data volume is not changed. Thus the total retouch processing is executed at a high speed. Although the present invention has been described and illustrated in detail, it is clearly understood that the same is by way of illustration and example only and is not to be taken by way of limitation, the scope of the present invention being limited only by the terms of the appended claims.

Claims: An image processor for modifying an image, comprising: an image memory (M1) for storing image data; image display means (M2) for displaying an image represented by said image data; input means (M3, M6), including means (M3) for specifying a location of a subject region (R) to be modified on the displayed image and means (M6) for adjusting a parameter which determines a retouch coefficient, said retouch coefficient being used in an operation selected from a group consisting of operation (A) wherein image data is arithmetically operated with said retouch coefficient, and operation (B) wherein an original image part of the image data stored in said image memory (M1) is to be replaced with a replace image part at a ratio defined by said retouch coefficient; and means (M4) for reading out part of said image data from said image memory (M1), said part corresponding to the subject region (R); which processor is characterized by: means (M4) for generating an address of said subject region (R) based on at least the location specified by said input means (M3, M6) ; distance data generation means (M5) for generating distance data (Dd) for each pixel in at least said subject region (R), the distance data (Dd) indicating a distance between a predetermined reference pixel in the subject region (R) and each pixel in the subject region and for outputting said distance data (Dd) for each pixel according to the address of said subject region (R) to a first memory (61) for storing said distance data (Dd) for each pixel in a prescribed area which is larger than said subject region (R); a second memory (62) for storing a coefficient table defining a distribution of said retouch coefficient (Kb), determined on the basis of said parameter provided in said means for adjusting (M6), corresponding to said distance data (Dd); coefficient determination means (M7) for determining a coefficient on the basis of said parameter provided in said means for adjusting (M6) and including a coefficient rewriter (63) to rewrite the content of the second memory (62) when the retouch coefficient is changed; and arithmetic processing means (M8) for processing image data read out of the image memory (M1) with the retouch coefficient (Kb) to generate retouched image data (Dr) and for outputting the retouched data (Dr) to the image memory (M1). An image processor in accordance with claim 1, wherein said image display means (M2) displays said subject region (R) in said image, a size of said subject region (R) being determined from said parameter. An image processor in accordance with claim 2, wherein said coefficient determination means (M7) determines said retouch coefficient according to the following equation: K = V * C1 * Dd + C2 where K denotes said retouch coefficient, V denotes said parameter, Dd denotes said distance data, C1 and C2 are constants, and the symbol * denotes multiplication. An image processor in accordance with claim 2, wherein said coefficient determination means (M7) determines said retouch coefficient according to the following equation: K = V * (C3 * Dd - C4) where K denotes said retouch coefficient, V denotes said parameter, Dd denotes said distance data, C3 and C4 are constants, and the symbol * denotes multiplication. An image processor in accordance with one of the preceding claims, wherein said input means (M3, M6) comprises a pointing device (2) for specifying said location on the image display means (M2), and a control device (3) for adjusting said parameter. An image processor in accordance with one of the preceding claims, wherein said input means (M3, M6) comprises a pressure sensitive electronic pen (21) which outputs a first signal representing said location corresponding the position of said pen on said display means (M2) and a second signal representing said parameter according to the pressure given on said pen. A method of modifying an image, comprising the steps of (a) preparing image data; (b) displaying an image represented by said image data; (c) specifying a location of a subject region (R) to be modified on the displayed image and adjusting a parameter which is used to determine a retouch coefficient, said retouch coefficient being used in an operation selected from a group consisting of operation (A) wherein image data is arithmetically operated with said retouch coefficient, and operation (B) wherein an original image part of the stored image data is to be replaced with a replace image part at a ratio defined by said retouch coefficient; (d) reading out part of said image data from said image memory, said part corresponding to the subject region (R); characterized by: (e) generating an address allocated to said subject region (R); (f) generating distance data (Dd) for each pixel in said subject region (R), the distance data (Dd) indicating a distance between a predetermined reference pixel in the subject region (R) and each pixel in the subject region (R); (g) storing a coefficient table defining a distribution of said retouch coefficient (Kb), determined on the basis of said parameter, corresponding to said distance data (Dd) ; (h) storing distance data (Dd) for each pixel in a prescribed area which is larger than said subject region (R) where said distance data (Dd) indicates the distance between a predetermined reference location and each pixel in said prescribed area; (i) rewriting said coefficient table on the basis of said parameter when the retouch coeffiecient is changed; and (j) processing said part of the image data on the basis of said coefficient to thereby modify said image data. A method of modifying an image in accordance with claim 7, characterized by displaying said subject region (R) in said image, a size of said subject region being determined from said parameter. A method of modifying an image in accordance with claim 8, characterized by determining said retouch coefficient according to the following equation: K = V * C1 * Dd + C2 where K denotes said retouch coefficient, V denotes said parameter, Dd denotes said distance data, C1 and C2 are constants, and the symbol * denotes multiplication. A method of modifying an image in accordance with claim 8, characterized by determining said retouch coefficient according to the following equation: K = V * (C3 * Dd - C4) where K denotes said retouch coefficient, V denotes said parameter, Dd denotes said distance data, C3 and C4 are constants, and the symbol * denotes multiplication.

Inventors: TOSHIFUMI INOUE, TOSHIFUMI, INOUE, Toshifumi, Inoue, c/o Dainippon Screen Mfg. Co.Ltd
Applicants: DAINIPPON SCREEN MFG, DAINIPPON SCREEN MFG. CO., LTD.
Application year: 1991
Main classification: H04N1
IPC codes: G03F1, G03F3, H04N1, G03F5