Digital image processor comprising a neural network

Abstract: Taking into consideration the disadvantage that a large-scale analog neural network cannot be constructed as an LSI and, even if this were possible, the cost would be prohibitive and the network would lack universality, a digital image processor for processing input image data based upon a cellular neural network is provided with a first multiply-and-accumulate arithmetic unit for digitally processing multiplication and accumulation of input image data of a plurality of pixels and input weighting values in a predetermined area, a second multiply-and-accumulate arithmetic unit for digitally processing multiplication and accumulation of output image data of a plurality of pixels and output weighting values in a predetermined area, and a non-linear acting unit for deciding output image data in accordance with results of calculation from the first and second multiply-and-accumulate arithmetic unit and non-linear characteristic parameters. This makes it possible to realize an image processor which excels in universality, ease of control and ease of integration.

Description: This invention relates to a digital image processor for subjecting input image data to digital image processing. More particularly, the invention relates to a digital image processor, which has a digital cellular neural network architecture (CNN) based upon a discrete-time cellular neural network (DTCNN), capable of subjecting input image data to a variety of image processing. Converting an analog signal of a natural image to a digital signal of a digital halftone image usually is carried out by discretization in the time direction (sampling) and in the size direction (quantization). Such processing results in loss of information. However, if note is taken of the fact that a natural image contains many low-frequency components and exhibits strong correlation in a spatiotemporal neighborhood, a digital halftone image approximating the natural image can be obtained by quantization image processing involving a small number of bits. Quantization image processing involving a small number of bits is processing through which a digital halftone image expressed by a smaller number of bits is formed, by utilizing information in the spatio-temporal neighborhood area, from an analog natural image or from a quantized image consisting of a large number of bits obtained by A/D-converting each gray-level value of the analog natural image independently using an A/D converter that operates on a large number of bits. The divided pixel digital halftoning (digital halftoning) method has long been used to form a pseudo-digital halftone image. This method entails reproducing grays by changing the percentage of black in a neighborhood image in order to reproduce a gray-level image by a black-and-white bi-level printer or display. Examples of such methods in practical use include the dither method, in which a gray level u(x,y) of the original image is compared with a threshold value T calculated in accordance with a set rule, and the extrapolative error diffusion method (the ordinary error diffusion method) in which the error between an input gray-level image value and an output halftone image is diffused to pixels that have not yet been scanned. In a filtering operation in which each gray-level value of a neighboring pixel centered on a pixel of interest is multiplied by a suitable weighting value at the position of each pixel of interest and a weighted sum in the neighborhood area is outputted, a matrix in which the weighting value is an element is referred to as a spatial filter. The reaction at a point (i,j) of a pixel brought about by an image input u k1 (t) in a processor N(k,l) (referred to as a "cell" below) of a point (k,l) belonging to the neighborhood N r (i,j) of the point (i,j) of the pixel is expressed as follows: This is referred to as a convolution of w(i,j;k,l) by u k1 (t) or a multiply-and-accumulate operation applied to a weighting value w and variable u in the neighboring image area, and may be abbreviated to R ij (t) = (w*u) ij . The dither method is expressed as follows, where U represents a unit function: The extrapolative error diffusion method is a non-linear recursive system with respect to an input u ij (t) and output y(t) = S ij (t) at an (i,j)th raster scan. Equation with respect to this method is given as follows: Here k ≤ i, j < i for k = i are the extrapolative conditions. Further, g(x) = S(x) - x holds. In case of binarization, y = S(x) becomes a sign function. Further, weighting w k is a weighting value, which is a parameter that influences the ensuing quantization. This decides the propagation of the quantization error or the way the quantization error is diffused. The weighting w k is negative and the total sum thereof must be -1. In order to obtain a halftone image close to an analog natural image with a density pattern method or the dither method, a problem encountered is that the number of bits per pixel must be made fairly large. On the other hand, with the error diffusion method used in binarizing a digital image, a problem encountered is blurring of image having fine edges, as in the case of a minutely sampled character image. If the number of bits per pixel is increased, a problem that arises is the occurrence of a false contour which undergoes absolutely no change in a certain neighborhood only. This problem is brought about by the fact that error diffusion is made to scan in one direction. Processing for quantizing an image involves a tradeoff among sampling rate, size of the quantization steps and quantization distortion. Accordingly, attention has been directed toward one type of optimization problem, namely the quantization of a digital halftone image in such a manner that it will approximate an input gray-level image, and parallel analog neural networks that solve this optimization problem have been proposed. One of these is an analog symmetrical error diffusion neural network. The non-linear dynamics are described by an equation the same as that of Equation (34), referred to later, if the extrapolation conditions k ≤ i, j < i for k = i are removed. The hardware is realized by an analog neural network. In this case the quantization error of each pixel is diffused in analog fashion two-dimensionally to the surrounding neighborhood system. An analog system referred to as a cellular neural network (CNN) also has been proposed. This is a method which employs a non-linear analog circuit in which cells are locally connected in systematic fashion. Each cell is composed of a capacitor, a resistor and apartitioning linear cell. Since the CNN performs analog processing in parallel fashion continuously in time, it is possible to implement real-time signal processing, which is held to be difficult with digital processing. Furthermore, in analog processing, it is possible to realize a technique in which a conversion is made to digital information in parallel fashion by the dynamic quantizing operation of a plurality of cells without using the sequential operation of a highly sophisticated A/D converter, and the digital information can be stored or transmitted in a parallel manner. The advantages of analog processing by a CNN are good coupling to sensors, voltage and current distributions of high speed, the rapid acquisition of overall information, and the fact that the multiply-and-accumulate operation can be carried out simply in parallel-processing fashion using the sum of currents. Though the cells in a CNN are connected only to neighboring cells, even cells that are not directly connected influence one another indirectly owing to the effects of propagation resulting from the dynamics of the system. In general, an M × N CNN has M × N cells arrayed in M rows and N columns. Let a cell of an ith row and jth column be represented by C(i,j). An r - neighborhood system of the cell C(i,j) is defined by the following equation: Nr(i,j) = {C(k,l)|max{|k-i|;|1-j} ≤ r, 1 ≤k <M; 1 ≤ 1 ≤ N} where r represents a positive integer. In general, the neighborhood system of r = 1 is referred to as a "3 × 3 neighborhood system," the neighborhood system of r = 2 as a "5 × 5 neighborhood system, and the neighborhood system of r = 3 as a "7 × 7 neighborhood system." If C(i,j) ∈ N r (k,l) holds for all C(i,j) and C(k,l) in these neighborhood systems owing to symmetry, then we will have C(k,l) e N r (i,j). Each cell is composed of a capacitor, a resistor and a non-linear element which is partitioning linear. The equation of state of the cell C(i,j) is expressed as follows with regard to a state variable x ij , an input variable u kl , an output variable y ij , an offset I, a capacitor C, a resistor R x and an image 1 ≤ i ≤ M; 1 ≤ j ≤ N: Equation of State: Output: y ij (t) = 1 2 ( x ij +1 - x ij -1 ) x ij (0) ≤ 1 u ij ≤ 1 The parameters are assumed to be as follows: A(i,j; k,l) = A(k,l; i,j), C > 0, R x > 0 All of the cells in a CNN have the same circuit structure and element values. The number of cells in a neighborhood is (2r+1) 2 . In terms of dynamics, a CNN possesses both an output feedback mechanism and a feed forward mechanism. The former depends upon an A - template, A (i,j; k,l), and the latter depends upon a B - template, B (i,j; k,l). These templates are programmable parameters. In order that all steady-state outputs of a cell will be fixed at ±1 in a CNN, the following theorem is used: If the circuit parameter A (i,j; i,j) at the center of the A - template satisfies the condition A(i,j; i,j) > 1/R x then the cell will converge to a single stable equilibrium point. In addition, the following equations will hold: This theorem makes the binarization of an image possible and is an analog error-minimization dynamics method. The problem encountered with the analog symmetrical error-diffusion neural network and analog CNN according to the prior art is that an analog chip for large-scale image processing cannot be constructed merely by promulgating analog principles and theory in the form of technical papers. Even if a CNN is premised on neighborhood connection, cells are provided in a number equivalent to the number of pixels and a plurality of neighborhood connections are made in terms of the overall image. This means that the wiring would occupy almost the entire area of the silicon area of the chip. In actuality, however, a large-scale analog neural network in which cells are deployed for all pixels cannot be constructed as an LSI and, even if it could, the cost would be prohibitive and render the idea impractical. In a case where the values of templates are changed, the circuit must be re-designed, thereby detracting from universality. In a case where an image processing technique using a CNN is applied to a display device such as a ferroelectric liquid crystal display (FLCD), i.e., where a moving image that has been subjected to binarization or grayscaling by a CNN is displayed on such an FLCD, the display develops flicker in still areas of the moving image when the pixel levels outputted by grayscaling constantly change. An example of prior art devices is disclosed in XP-2056105 article by H. Harrer in International Journal of Circuit Theory and Applications, Vol. 20, No. 5, September-October 1992, pages 453-467. This discloses a discrete-time cellular neural network comprising first multiply-and-accumulate arithmetic means for digitally processing multiplication and accumulation of input image data of a number of pixels and input weighting values in a predetermined area, second multiply-and-accumulate arithmetic means for digitally processing multiplication and accumulation of output image data of a number of pixels and output weighting values in said predetermined area, and a non-linear acting means for deciding the output image data in accordance with results of processing from said first and second multiply-and-accumulate arithmetic means and non-linear characteristic parameters. Accordingly, an object of the present invention is to provide an improved digital image processor using digital circuit architecture to construct a neural network. According to the present invention there is disclosed a digital image processor a digital image processor for processing input image data based upon a discrete-time cellular neural network, comprising: first multiply-and-accumulate arithmetic means for digitally processing multiplication and accumulation of input image data of a plurality of pixels and input weighting values in a predetermined area; second multiply-and-accumulate arithmetic means for digitally processing multiplication and accumulation of output image data of said plurality of pixels and output weighting values in said predetermined area; and non-linear acting means; characterized by further comprising; third multiply-and-accumulate arithmetic means for digitally processing multiplication and accumulation of state values of said plurality of pixels and state weighting values in said predetermined area; and wherein the non-linear acting means is operable to decide output image data in accordance with results of processing from said first, second and third multiply-and-accumulate arithmetic means and non-linear characteristic parameters. Further embodiments of the invention disclosed herein disclose a method of image processing input image data based upon a discrete-time cellular neural network, comprising: digitally processing multiplication and accumulation of input image data of a plurality of pixels and input weighting values in a predetermined area in a first multiply-and-accumulate arithmetic means; digitally processing multiplication and accumulation of output image data of said plurality of pixels and output weighting values in said predetermined area in a second multiply-and-accumulate arithmetic means; and providing non-linear acting means; characterized by further comprising; digitally processing multiplication and accumulation of state values of said plurality of pixels and state weighting values in said predetermined area in a third multiply-and-accumulate arithmetic means; and deciding output using the non-linear acting means image data in accordance with results of processing from said first, second and third multiply-and-accumulate arithmetic means and non-linear characteristic parameters. A described embodiment provides a digital image processor through which an image substantially faithful to an input image and quantized using a small number of bits can be obtained by taking into account the multiplication and accumulation of state values and state weighting values in an operation performed by a neural network. BRIEF DESCRIPTION OF THE DRAWINGS Fig. 1 is a diagram for describing the concept of image processing using a DTCNN; Fig. 2 is a block diagram illustrating the configuration of a display system internally incorporating a digital image processor; Fig. 3 is a diagram showing an image processing unit from Fig. 2 in greater detail, the unit consisting of a plurality of processor elements connected in pipeline fashion; Fig. 4 is a block diagram showing the details of a processor element; Fig. 5 is a diagram showing an example of a non-linear function; Fig. 6 is a diagram showing an example of a processed image; Fig. 7 is a diagram for describing a neighborhood system of a processed image; Fig. 8 is a processing time chart associated with a processor element; Fig. 9 is a processing flowchart associated with a processor element; Fig. 10 is a block diagram showing the details of a processor element; and Fig. 11 is a processing flowchart associated with the processor element of Fig. 10. DESCRIPTION OF THE PREFERRED EMBODIMENTS An embodiment of the present invention will now be described in detail. The principle of the embodiment will be described first. The binarization of a gray-level image is extremely important in a bi-level printer or display. Simple binarization wherein an input gray-level pixel value is simply compared with a threshold value is suitable for a case where a character image or edge image is expressed but is inappropriate for expressing natural images. In the case of a natural image, therefore, use is made of the area gradation method such as the error diffusion method which, by utilizing the fact that correlation of a natural image is strong in a spatio-temporal neighborhood, reproduces tones by changing the percentage of black in the neighborhood image. This is extrapolative image processing through which an output halftone image of a small number of bits of each pixel is decided explicitly in accordance with raster scanning. Though a characterizing feature is high-speed, simple operation, problems in terms of image quality, such as poor edge preservation, are encountered. This means that finding a new quantization processing method to replace the conventional divided pixel digital halftoning also is important. Explicit extrapolative image processing mentioned here is conventional processing which decides output data by a single application of threshold-value processing to input data, as in the dither method and error diffusion method. In general, the conversion of an analog signal to a digital signal is carried out by discretization in the time direction (sampling) and in the size direction (quantization). Considerable information is lost by executing both sampling processing and quantization processing in this fashion. Discretization along the time axis is performed by sampling and results in loss of frequency components that exceed the Nyquist frequency. Discretization in the size direction is carried out using a non-linear function y = f(x) in which x is the size of each sample. As for a characteristic of y = f(x) when performing multivalue processing, which is for example, greater than two-values, levels the number of which is equivalent to the number of quantization levels have the form of a staircase. If the number of quantization levels is small, generally the grayscale information is lost. Accordingly, the accuracy of digital half-tone representation must be evaluated based upon the error (distortion) between continuous values and discrete values. Processing for quantizing an image signal should be considered as involving an optimization problem. For the sake of simplicity, let the size of an image be taken in one dimension. Sampled analog signals u i (i = 1, ···, N) are approximated by signals y i (i = 1, ···, N) of discontinuous values. Here u and y are N-dimensional vectors representing input and output signals, respectively. When a signal u is given, a level must be selected from quantization levels, which are given in advance, in such a manner that a distortion function d(u,y) is minimized. If it is assumed that the size Δ of a quantization step is Δ → 0, then complete decoding (y → u) is possible. However, it is desired that the error be small and, moreover, that a large quantization step size Δ be obtained. If the distortion function is a mean squared error (MSE), we have In order to perform optimum quantization, the design must be such that the mean squared error is minimized, that the quantization level be closest to each sample u i , and that the number of levels be as small as possible. In general, however, the optimum quantized signal y i depends upon the selection of the distortion function d(u,y). Moreover, since quantization inevitably gives rise to distortion, it is required that the selection of the distortion function d(u,y) be made to conform to the mechanism of human sense of sight. More specifically, quantization processing for obtaining a halftone image of small number of bits is executed so as to minimize the error between a multivalued image, which has been passed through a sensor filter, and the original image. This filter is derived from a frequency transfer characteristic (MTF) in visual system. This characteristic expresses the fact that the sensitivity of human sight approaches zero asymptotically as frequency approaches a high frequency spatially or temporally. The MTF is given by the following approximate expression: MTF(f r ) = 2.6(0.0192+0.114f r )e -(0.114f r ) (1.1) The MTF is a bandpass filter which peaks when the characteristic gives 8 periods per 1% sight angle. It is known that if some gain of the low-frequency characteristic in the MTF is anticipated, the human visual filter closely resemble a Gaussian distribution. A human visual filter is assumed to follow the Gaussian distribution upon taking into consideration the handling ease of the filter. Liquid crystal displays have recently become very popular as an alternative to CRTs. In comparison with a CRT, a liquid crystal display can be made thinner and can be made to consume less power. Among these, ferroelectric liquid crystal displays (FLCDs), which are at the forefront of recent research, are of particular interest. An FLCD has outstanding features such as quick response and the fact that it lends itself to fabrication of a large-area panel and low cost. Basically, an FLCD constructs each output pixel using only two states, namely light and dark, by two molecular orientations. Accordingly, to express color tones, it is required that each output pixel value be reproduced at the area ratios of the respective RGB bits. This means that the number of colors that can be displayed is limited. In this case, the limited colors capable of being represented in a display are representative colors obtained by partitioning RGB color space uniformly. When an image is displayed on such an FLCD, the number of displayable colors will be small if each pixel value of the original image is subjected to simple quantization. The result is a displayed image of poor quality. It is necessary, therefore, that the original image be subjected to a quantization conversion that is suitable for display on this display device. Such a quantization conversion expresses gradation by changing the proportion of pixel values quantized in a certain neighborhood area. More specifically, if it is so arranged that a weighted sum total of pixel values quantized in a certain neighborhood will be equal to the pixel values of the original image, then, even if this is displayed on a limited-color display, an image close to the original can be made sensible by a human being through use of a human vision filter. The dither method and error diffusion method have been used heretofore to perform this quantization conversion. Fig. 1 is a diagram for describing the concept of image processing (bi-level or multivalued processing) using a DTCNN. Image processing by a DTCNN applied to a stationary image will be described. In Fig. 1, the product sum ΣBijmnUmn obtained by multiplying and accumulating input gray-level images in a 3 × 3 neighborhood image area of an input image and input weighting values and the product sum ΣAijmnYmn obtained by multiplying and accumulating output image values of a small number of pixels in a 3 × 3 neighborhood image area of an output image and output weighting values are added, and the resulting sum is converted to output data by a linear output function f(x). The input image is a gray-level image of a large number of bits, e.g., more than eight bits per pixel. Fig. 1 illustrates the basic concept. Image processing is executed in accordance with Equations (17), (18) and (19) (where the latter is used at the time of binarization) indicated below. When an image is composed of M × N pixels, the actual hardware is such that time-division processing is executed with a number of cells that is one or considerably less than the number of pixels. Virtually speaking, however, there are M× N cells, which are virtually arrayed on a grid plane. Each virtual cell operates in accordance with the following equations: Y ij (t+1) = f[X ij (t+1)] Here X ij represents the state variable of a cell C(i,j), U ij the input variable of cell C(i,j), Y ij the output variable of cell C(i,j) and T ij the threshold-value constant of cell C(i,j). The non-linear output function f(x) generally is a multivalued function. In binarization of an image, however, f(x) is expressed by the following sign function: Equation (17) represents a first multiply-and-accumulate arithmetic portion for entering or calculating the sum of an offset and the sum of the products of input weighting values and input gray-level images in a neighborhood image area, a second multiply-and-accumulate arithmetic portion for calculating the product sum of output weighting values in a neighborhood image area and output halftone image values of a small number of bits already decided spatio-temporally, a third multiply-and-accumulate portion for calculating the product sum of state weighting values in a neighborhood image area and previous state values already decided spatio-temporally, and a state calculating portion, which is connected to the first, second and third multiply-and-accumulate arithmetic portions, for calculating present state values x ij (t+1) by adding the product sums from each of these multiply-and-accumulate arithmetic portions. Equation (19) represents a non-linear acting portion f(x), which is connected to the state calculating portion, for acting on the present state value non-linearly to decide a present output halftone image value, having a small number of bits, of each pixel. In these equations, a desired series of image processing operations can be executed selectively by selection of the input weighting values, output weighting values, offsets and state weighting values in the neighborhood image area, and by selection of parameters of the non-linear characteristic of the non-linear acting portion. In other words, by virtue of very simple processing for selecting parameters of templates A(i,j; k,l), B(i,j; k,l), C(i,j; k,l) and parameters of the offset T ij , it is possible to universally select both extrapolative image processing for explicitly deciding an output halftone image, having a small number of bits, of each pixel in accordance with raster scanning, and interpolative image processing for implicitly deciding an output halftone image of a small number of bits when the image dynamically changes from an initial value, and a certain value is obtained. Explicit extrapolative image processing is processing, such as the generally known dither method and error diffusion method, for deciding output data by a single threshold-value processing operation applied to input data. Implicit interpolative image processing is processing for changing the value of an output halftone image of a small number of bits and repeatedly executing processing, which performs the operations based upon Equations (17), (18), (19), each time until the ideal image is obtained, i.e., until a halftone image of a small number of bits comparatively faithful to the input gray-scale image is obtained. Accordingly, as the result of processing in accordance with the interpolative error diffusion method, it is possible to prevent the problems which arise with conventional extrapolative error diffusion, namely the characteristic striped patterns and false contours, as well as the occurrence of granular noise in the highlight portions of an image. The result is that an output image that is faithful to the original can be obtained. Extrapolative image processing and interpolative image processing can be selected by selection of templates. In particular, with the dither method based upon extrapolative image processing, template A (i,j; k,l) = 0, C(i,j; k,l) = 0, and only B(i,j; k,l) is used. With interpolative error diffusion, the settings are such that templates A(i,j; k,l), B(i,j; k,l), C(i,j; k,l) = -A(i,j; k,l). In this case, it is so arranged that the templates contain only elements corresponding to scanned portions in such a manner that an output halftone image of a small number of bits of each pixel is explicitly decided in accordance with raster scanning. Further, it is so arranged that the templates A(i,j; k,l), B(i,j; k,l), C(i,j; k,l) = -A(i,j; k,l) contain only elements corresponding to portions not yet scanned (for which output values have not yet been decided) in such a manner that an output halftone image of a small number of bits of each pixel is implicitly decided. Further, in a case where quantization image processing of a small number of bits based upon the error-minimization dynamics method is performed, C(i,j; k,l) = 0 and A(i,j; k,l), B(i,j; k,l) are used, and it is so arranged that the template A(i,j; k,l) also contains elements corresponding to portions not yet scanned (for which output values have not yet been decided) in such a manner that an output halftone image of a small number of bits of each pixel is implicitly decided. Furthermore, in a case where interpolative image processing for an implicit determination is executed, an output halftone image, having a small number of bits, updated last in a general-purpose digital image processor is transmitted to another adjacent general-purpose digital image processor, unit (cell) for processing a pixel of interest in this adjacent general-purpose image processor regards the received updated output halftone image of the small number of bits as information from an adjacent area, and interpolative image processing is speeded up by pipeline means for multiplying and accumulating this image and the output weighting value. Described first will be an example in which quantization image processing of a small number of bits is executed using A(i,j; k,l) and B(i,j; k,l) and not C(i,j; k,l). In this case, the operation of each virtual cell is expressed in simple fashion by the following equation: Here A(i,j; k,l) and B(i,j; k,l) are weightings from (k,l) to (i,j) programmable by the target image processing. Further, y ij , u ij are an output and input of cell (i,j). The DTCNN of Equation (20) includes a first multiply-and-accumulate arithmetic portion for at least entering or calculating the product sum B(i,j; k,l)u kl of input weighting values and input gray-level images in a neighborhood image area, a second multiply-and-accumulate arithmetic portion for executing the operation of product sum A(i,j; k,l)y kl (t) of input weighting values in a neighborhood image area and output halftone image values, of a small number of bits, already decided spatio-temporally, and a non-linear acting portion (x ij ), which is connected to the first and second multiply-and-accumulate arithmetic portions, for deciding a present-time output halftone image value of a small number of bits of each pixel. A desired series of image processing operations can be executed selectively by selection of the input weighting values, output weighting values and by selection of parameters of the non-linear characteristic of the non-linear acting portion. If a sign function or unit function is used as a non-linear function of a cell output in this DTCNN, the output is limited to binary values. In such case, a comparator for comparing A(i,j; k,l)y kl (t) and B(i,j; k,l)u kl is adopted as the basic component. In general, the non-linear acting portion enlarges the output function to a staircase function, whereby it is possible to make the output multivalued. A RAM, ROM or PLA for storing the non-linear characteristic is adopted as a basic component in such a manner that the quantization step size can be varied. Further, for the sake of stability, self-feedback is made zero, i.e., it is arranged so that element A(i,j; i,j) = 0 holds, and each cell should be made to operate asynchronously. However, these are not necessarily essential conditions. At times a non-zero A(i,j; i,j) may be used or all cells may be operated synchronously. Fig. 2 is a block diagram illustrating the configuration of a display system internally incorporating a digital image processor. Shown in Fig. 2 is an image input unit 1 for entering a gray-level image comprising a plurality of bits per pixel. By way of example, the image input unit is constituted by a camera, scanner and computer. An input frame buffer 2 temporarily stores at least a plurality of lines of image data. An image processing unit 3 executes processing to quantize the multivalued gray-level image data, which comprises a plurality of bits per pixel, to image data having a smaller number of levels (bits). In accordance with the selection of template and non-linear characteristic described above, the image processing unit 3 is capable of selecting the desired image processing from a plurality of types of image processing. An output frame buffer 4 stores the quantized output data and delivers its output to a ferroelectric liquid crystal display (FLCD) unit 5. A CPU 6, which is connected to the input frame buffer 2, image processing unit 3 and output frame buffer 4, performs address control for data transfer and control of image processing. The CPU 6 is provided with a ROM storing a control program and a RAM serving as a work area. An image processing selector 7 allows the operator to freely select image processing to be executed by the image processing unit 3. In accordance with the selection made by the selector 7, the CPU 6 instructs the image processing unit 3 of the template and non-linear characteristic which will be used by the image processing unit 3. Selection of offset also is possible by a processor element in Fig. 10, described below, in which the selector 7 is capable of selecting an offset value as well. Fig. 3 illustrates the details of the image processing unit 3. The image processing unit 3 comprises processor elements (PEs) 51 ∼ 53 and a gateway processor (GE) 50. The PEs 51, 52 and 53 are identically constructed processors and are pipeline-connected. Each processes a different position of the input image. Fig. 4 is a block diagram showing the details of a processor element PE. The PEs 51, 52 and 53 each consist of the hardware shown in Fig. 4. Here one of the PEs is designated at 100. The PE 100 includes a memory 30 for storing a gray-level image that resides in a neighborhood image area composed of a plurality of pixels sent from an input frame buffer, a memory 28 for storing each weighing value in the neighborhood image area, a memory 31 for storing an output halftone image of a small number of bits in a neighborhood image area, a memory 29 for storing an output characteristic, and an address calculating unit 41 which calculates address values for accessing the memories 28, 29, 30 and 31. The address calculating unit 41 comprises an ALU 42, an NPC register 43 and a PC register 44. The memories 28, 29, 30 and 31 are located within the processor but may be provided externally of the processor. A plurality of weighting values are stored in each of the memories 28, 29. A weighting value is selected in accordance with a command from the CPU 6 indicating the type of image processing. The processor 100 further includes a first multiply-and-accumulate arithmetic unit 11 for calculating the product sum B(i,j; k,l)u kl of data in the memory 28 storing the input weighting values in the neighborhood image area and the data in the memory 30 storing the input gray-level image. The first multiply-and-accumulate arithmetic unit 11 comprises a multiplier 13, an accumulator 14 and registers 15, 16. The registers 15, 16 latch the input gray-level image u kl and the weighting value B(i,j; k,l) fetched from the memories 28, 30, respectively. The accumulator 14 includes an adder 17 and an ACC register 18. The processor 100 further includes a second multiply-and-accumulate arithmetic unit 12 for calculating the product sum A(i,j; k,l)y kl (t) of data in the memory 29 storing the output weighting values and the output halftone image values in the memory 31. The second multiply-and-accumulate arithmetic unit 12 comprises a multiplier 19, an accumulator 20 and registers 21, 22. The registers 22, 21 latch the output halftone image Y kl (t) and weighting value A(i,j; k,l) fetched from the memories 31, 29, respectively. The accumulator 20 includes an adder 23 and an ACC register 24. The registers 18, 24, 27, 43 and 44 in processor 100 perform the functions described below. The PC register 44 stores the address of a pixel to be processed. The NPC register 43 stores the image position of a neighborhood system. As for the values stored in the NPC 43, values from (-3,-3) to (3,3) are stored, as shown in Fig. 7, assuming that the neighborhood system used in processing has a maximum size of 7 × 7. For this reason the register incorporates an incrementer that is capable of updating these values. When the operation for summing the products of weighting values in the neighborhood system and output halftone images of a low number of bits is performed, the addresses of the neighborhood pixels are calculated from the values in the NPC register 43 and PC register 44, and these pixel values are fetched. The ACC register 18 accumulates the results of calculating the product sum of the pixel of interest and its neighborhood system in the first multiply-and-accumulate arithmetic unit. The ACC register 24 accumulates the results of calculating the product sum of the pixel of interest and its neighborhood system in the second multiply-and-accumulate arithmetic unit. The multiply-and-accumulate calculation in cell operation is performed using the values in these registers 15, 16, 18, 21, 22, 24, 43 and 44. Accordingly, at the stage of the multiply-and-accumulate calculation, a two-stage pipeline stage, which consists of data fetching and multiplication/accumulation, is formed. A register 27 and an N-ADRS register 45 are necessary for pipeline processing, described below, and make possible an exchange of data between processors. More specifically, the register 27 holds an output value (P-REG) obtained by the final calculation, and the register 45 holds an address (N-ADRS) used when this result is written in memory. For example, in a case where the small number of output bits of the output halftone image value are two in number, the weighting should be seven bits + one sign bit, and the output should be two bits without a sign. Since the arithmetic multiplier is composed of two bits in this case, the multiply-and-accumulate operation can also be performed by constructing an array of adders. The address calculating unit 41 calculates an address from the NPC register 43 and the PC register 44. The instructions executed are as follows: neigh: an instruction for obtaining the address of a neighborhood designated by the NPC; lineinc: an instruction for incrementing the value of a pixel of interest in the x direction; colinc: an instruction for incrementing the value of a pixel of interest in the y direction. The processor 100 includes an adder 25 for adding together the operational results from the first multiply-and-accumulate arithmetic unit 11 and the operational results from the second multiply-and-accumulate arithmetic unit 12, and a non-linear acting unit 26 for deciding an output halftone image value of a small number of bits based upon the results from the adder 25. The product sum B(i,j; k,l)u kl is calculated by the first multiply-and-accumulate arithmetic unit 11, the product sum A(i,j; k,l)y kl is calculated by the second multiply-and-accumulate arithmetic unit 12, and the sum of B(i,j; k,l)u kl and A(i,j; k,l)y kl is obtained by the adder 25. The non-linear acting unit 26 for deciding the present-time output halftone image value of a small number of bits of each pixel basically is constituted by a RAM, ROM and PLA for programmably storing a non-linear characteristic. However, in a case where an output is fixed at two bits or the like, the basic component is a comparator. In this case, whether the result of the multiply-and-accumulate operation is positive or negative is distinguished by the most significant bit so that it may be determined at which position along the x axis of the non-linear function this value is located. Fig. 5 is a diagram showing an example of the non-linear function used by the non-linear acting unit 26. The output is assumed to be two bits. Here the result from the adder 25 is decided as being the x axis and the value of f(x) thus determined is decided as being an output halftone image value composed of a small number of bits. The non-linear function used by the non-linear acting unit 26 also can be selected by the CPU 6 in accordance with the command from the image processing selector 7. The number of output bits can be selected by this selection of function. When dynamic digital processing is executed through a sequential operation by a single processor, a large number of recursion computations are required and a large quantity of computations and a long period of time are needed for the output halftone image to converge to an optimum value. Accordingly, each processor is provided with a unidirectional data bus and a linked-structure processor network is adopted to accelerate the convergence of the output of the DTCNN. By virtue of this architecture, it is possible for a pipeline operation between processors. The architecture of this network is shown in Fig. 3. In Fig. 3, the PE1, PE2 and PE3 51, 52 and 53, respectively, are identical to the general-purpose image processor 100. These are referred to as processor elements here. The GE (gateway processor) 50 is hardware for managing various commands to the PEs 51, 52, 53 and for managing the distribution of the input image. Each of PEs 51, 52, 53 locally possesses the input gray-level image memory 30 in Fig. 4, the output halftone image memory 31, the memory 29 for storing the parameters of the output weighting A (i,j; k,l) necessary for processing, and the memory 28 for storing the parameter of the input weighting B (i,j; k,l). Each PE subjects the input gray-level image to image processing which is basically the multiply-and-accumulate operation and the non-linear action. Each preceding PE stores the latest updated output halftone image value y kl in the register 27 and stores the address indicating this pixel position in the special-purpose register 45. The stored values are sent to the PE connected as the next stage and the PE of this succeeding stage uses the address value to write the latest updated output halftone image value y kl at the designated address of its own memory. This operation is performed by each processor connected in the link, thereby making it possible to accelerate the convergence of the output halftone image. For example, in a case where the small 5 × 5 image of Fig. 6 is subjected to pipeline processing by the PE1 and PE2, each PE processes a 3 × 3 image neighborhood area, which is centered on the pixel (i,j), through the following sequences: PE1: (1,1), (1,2), ··· (1,5), (2,1), (2,2), ···, (5,5); and PE2: (2,3), (2,4), (2,5), (3,1), (3,2), ···, (5,5), (1,1), (1,2) ··· (2,2). TIME PIXEL RECEIVE 1 (1,1) (2,2) 2 (1,2) (2,3) 3 (1,3) (2,4) 4 (1,4) (2,5) 5 (1,5) (3,1) 6 (2,1) (3,2) updating by PE2 Table 1 illustrates the concept of pipeline processing. The PE1 "receives" the output halftone image value of the small number of bits updated last by the PE2, and executes the multiply-and-accumulate operation and non-linear processing using this image value as the output halftone image value of the small number of bits from the neighborhood. With this network, each processor need only be provided with a unidirectional data bus. This makes it possible to hold down the cost of hardware for data communication. It is also possible to gather a larger number of processors on a chip. The computation algorithm of the general-purpose image processor (PE) is as set forth below. Here the processing will be described with reference to Fig. 8. Fig. 8 mainly illustrates a time chart of data processing executed by one PE. The PE1 and PE2 are pipeline-connected in Fig. 8. 1. Starting and initial setting The PE is started up by an externally performed start-up control operation. At this time the following indications are applied: an indication of the extent of the neighborhood area in processing, an indication of the size of the input image of interest, and an indication of various templates. The registers are initialized first. In initialization, the address at which processing starts is applied to the PC, and values made to conform to the extent of the neighborhood system to undergo processing are applied to the NPC. In addition, the ACC register is initialized to zero. 2. Data transmission stage This is a stage in which the value y kl is read in from the preceding PE and the value is written in the PE's memory in the processor array. The latest output halftone image value y kl and the address value corresponding to it are accepted and the value y kl is written at the address having this address value. This corresponds to 1 ○ in Fig. 8. 3. Data fetching and multiply-and-accumulate stage The address of the required neighborhood is calculated from the values in the PC and NPC, the output halftone image value of this address is read in from the memory 31 and latched in the latch 22. The weighting value A (i,j; k,l) corresponding to this neighborhood is read in from the memory 29 and latched in the register 21. Further, the input image value is read in from the memory 30 and latched in the register 16. The weighting is read in from the memory 28 and latched in the register 15. This corresponds to 2 ○ in Fig. 8. The multiply-and-accumulate operation P + A(i,j; k,l)y kl (t) and P + B(i,j; k,l)u kl with regard to the present content P of the accumulator is performed in the next clock cycle [3 ○ in Fig. 8] with respect to the value latched in the ACC register 24. The fetching of data and calculation of sum of the products are carried out through pipeline operation. 4. Output stage The newly updated output value y ij is obtained from the result of the multiply-and-accumulate operation ΣA(i,j; k,l)y kl and the result of the multiply-and-accumulate operation ΣB(i,j; k,l)u kl , and this value is written in memory [4 ○ in Fig. 8]. Fig. 9 illustrates the operation control flowchart of the processor 100 conforming to the selection of the parameters A, B in Fig. 4. This control will be described. The flowchart of Fig. 9 is executed by the CPU 6. Step 200 (S200) Operation is started. Step 201 (S201) In accordance with the selection from the selector 7 of Fig. 2, the CPU 6 instructs the image processing unit 3 of the template values A, B and non-linear function f(xi,j) to be used by the image processing unit 3. Step 202 (S202) The image processing method (extrapolative or interpolative) is discriminated based upon the specified template values. Extrapolative image processing (e.g., dithering) is discriminated whenA = 0 holds. In a case where both A and B are used, interpolative processing is discriminated. Step 203 (S203) A command is sent to the processor 100 and the operation based upon Equation (20) is performed. The ykl(t) which prevails at this time is adopted as the output value. Since extrapolative processing is executed here, the output value is decided by a single processing operation. Step 204 (S204) An initial value is set in the output frame buffer 4 at step S204. Here random bi-level data are set in the output frame buffer. Further, when the multiply-and-accumulate operation is executed with regard to all pixel input data of one screen, the sequence of this operation is set at step S204. The sequence of this operation is given an order such that all pixels will be scanned randomly. Step 205 (S205) At step S205, a command is issued to the processor element 100 based upon the order decided at step S204, the operation of Equation (20) is executed and an output value is obtained. This result is sent to the output frame buffer 6. In a case where this is different from an already stored value, the value is rewritten. Step 206 (S206) It is determined at step S206 whether the processing of all entered pixels has ended. If this processing has not ended, the program proceeds to step S205. Here the pixel of interest is changed based upon the sequence of operation set randomly at step S204, and the multiply-and-accumulate operation is executed. Step 207 (S207) If it is determined at step S206 that the processing of all pixels has ended, then the program proceeds to step S207, where the number of pixels rewritten in the output frame buffer 4 is discriminated. Step 208 (S208), Step 209 (S209) It is determined whether the number of pixels discriminated at step S207 is less than a predetermined value. If the number is less than the predetermined value, then it is judged that the operation based upon the neural network has converged, and the program proceeds to step S209. Here one screen of data in the output frame buffer 4 are sent to the FLCD display. Further, if it is found at step S208 that the number of pixels discriminated at step S207 is greater than the predetermined value, then the processing of steps S205 ~ S207 is repeated. In this flowchart, the image processing method is discriminated based upon the template values. However, an arrangement may be adopted in which the image processing method can be selected separately of the template values at step S201. Described next will optimization design method related to selection of the weighting values in the neighborhood image area and the parameters of the non-linear characteristic. First, the principle of the method will be described. The size of the input image is assumed to be M × N. In the DTCNN, discrete values can be directly expressed by applying a plurality of equally spaced output levels to one cell. Since each cell in the DTCNN has outputs of a plurality of levels, the cell is referred to as a multivalued cell. The non-linear output function f(x) in the case of a multivalued cell is a linear function which converts x to n-number of discrete value levels, i.e., The function g(x) is a uniform (linear) quantization function in which Δ is the quantization step. Here [ ] is a Gaussian symbol. Fig. 5 described above illustrates f(x) in a case where n = 4 holds. Accordingly, the output y of the multivalued cell represents discrete values of n-number (n≥2) of equally spaced levels in an interval (-1,1). y ∈ { 2k-(n-1) n-1 |k = 0,1, ···,n-1} For example, when n = 4 holds, y becomes as follows, as illustrated in Fig. 5: y ∈ {-1, - 1 3 , 1 3 ,1} The energy function E(t) of a DTCNN which contains multivalued cells is defined as follows, where S' hereinbelow is assumed to be the same as T': In a case where a DTCNN including multivalued cells is applied to the optimization problem, the parameters of the network can be decided by comparing coefficients between the energy function and distortion function of the DTCNN. The distortion function in image quantization processing generally is defined by the following equation: dist(y,u) = (Q'y - R'u) T (Q'y - R'u) Here Q' = [Q(i,j; k,l)], R' = [R(i,j; k,l)] are suitably given coefficient matrices (filters) and both are assumed to be symmetrical. If the input u is defined, the quantity of dist(y,u) to be minimized is as follows: dist(y,u) = 1 2 y' T Q' T Q'y-y T Q' T R'u Further, if the energy function of the DTCNN of Equation (25) is written in similar fashion using a matrix, we have E(t) = - 1 2 y T A'y-y T B'u-S' T y+ 1 2 y T y Here the matrix S' is a vector in which S is an element. Each parameter of the network can be decided as follows by comparing Equations 27 and 28: where δ is the value of a diagonal component of matrix Q' T Q'. With a DTCNN in which the outputs are limited to two values, the distortion function will always decrease monotonously merely by forcibly making the diagonal component of the matrix A' equal to 0. However, with a DTCNN that includes multivalued cells, it is necessary to effect normalization in such a manner that the coefficients of y ij 2 in the cost function dist(y,u) become 1. At this time the energy function E(t) and the distortion function dist(y,u) are identical values. When the network has converged to a stable state, the minimal solution of the distortion function dist(y,u) can be obtained. In particular, in a case where the aim is output of a halftone image having a small number of bits, a Gaussian filter H' approximating a filter of human vision is used. In order to decide the parameters of the DTCNN, therefore, the cost function dist(y,u) is defined by the following equation: where H' represents a filter of human vision, y a halftone-processed output multivalued image, u' an input image and C 1 (y,u) a term so configured that an output multivalued image y' visually sensed by a human being will approximate the input image u'. Further, C 2 (y,u) represents a limiting term so configured that the output level of a cell when an image is made multivalued will approximate the pixel level of the original image. If the limiting term were absent, the multivalued image would appear to be noisy when visually sensed by a human being. Making the limiting term too strong results in the appearance of false contours. In a case where binarization is carried out, this term would be unnecessary and we would have β = 0. Equation (30) means that C 1 (y,u) indicates the difference between the input image data uij and a value obtained by multiplying the output image data y kl by the filter H', and that C 2 (y,u) indicates the difference between the output image data and the input image data. Templates are designed in such a manner that C 1 (y,u) and C 2 (y,u) both become small. In a case where the DTCNN uses multivalued cells, it is required that normalization be performed in such a manner that the coefficient of yij 2 in the cost function dist(y,u) becomes 1. If the value of the diagonal component of the matrix H' T H' is δ, then the possible value of the coefficient of y ij 2 in the cost function dist(y,u) is αδ in the case of C 1 (y,u) and β in the case of C 2 (y,u). Therefore, we have αδ + β = 1 Accordingly, we have α = 1-β δ The network parameters are decided as follows by comparing the cost function dist (y, u) and the energy function of the DTCNN: If the input image is color, the image is resolved into an orthogonal coordinate system of RGB or the like and each plane is made multivalued independently. After convergence, the multivalued images of the respective planes are combined. If β = 0 holds, the multivalued image will appear to be noisy when visually sensed by a human being. If β is made too large, false contours appear. For example, the best multivalued image is obtained when β = 0.15 holds. The evaluation of image quality is in the end required to be a objective one based upon human sight. Owing to the uniformity of processing, a texture corresponding to the size of the dither matrix obtained by the dither method is not produced. In addition, features at portions such as character areas or the like where there is a pronounced change, are preserved to a greater extent in comparison with the error diffusion method. Next, an example in which the multiplication and accumulation of state weightings and state values indicated in Equation (17) is incorporated in the operations of the DTCNN will be described. In the dynamics of interpolative error diffusion method in which an output halftone image of a small number of bits of each pixel changes dynamically from an initial value and the output halftone image of small number of bits when change has stopped is implicitly decided, use is made of obtained by discretization of the non-linear equation with respect to the input u ij (t) and output y(t) = S uj (t) in the (i,j)th raster scan. Fig. 10 illustrates the DTCNN of Equation (35) constituted by a digital image processing circuit. This will be described later in detail. In Equation (35), it is possible to select the templates A, B, C, the offset T and the non-linear function f[x i,j (t+1)]. Equation (35) is obtained by adding the term of the sum of the products of the state values x kl and state distortion values C(i,j; k,l) and the offset T to Equation (20). Here a state value is a value prior to quantization using the non-linear function, i.e., a value of multivalued image data prior to binarization provided that data are to be quantized to bi-level data. By incorporating the multiplication and accumulation of state values and state distortion values, an output image faithful to the input image can be decided. By selecting the value of the offset T, especially in the case of dither processing where the templates A, C are both zero and only the template B with regard to the input image is used, various threshold-value configurations of the dither matrix can be selected. Thus, in this embodiment, it is possible to universally select, by selection of parameters referred to as templates A(i,j; k,l), B(i,j; k,l), C(i,j; k,l) in a neighborhood image area, both extrapolative image processing for explicitly deciding an output halftone image of a small number of bits of each pixel in accordance with raster scanning, and interpolative image processing in which an output of a halftone image of a small number of bits of each pixel is changed dynamically from an initial value and an output halftone image of a small number of bits prevailing when a certain value (a mid-course value or convergence value in dynamics) is implicitly decided. In particular, with the dither method serving as extrapolative image processing, the templates A(i,j; k,l) = 0, C(i,j; k,l) = 0 and only B(i,j; k,l) is used. Here the dither matrix can be selected by selection of the offset T, and the output level can be selected by selection of the non-linear function. In the extrapolative error diffusion method, templates A(i,j; k,l), B(i,j; k,l), C(i,j; k,l) = -A(i,j; k,l). In this case, it is so arranged that the templates include only elements corresponding to scanned portions in such a manner that an output halftone image of a small number of bits of each pixel will be explicitly decided in accordance with the raster scan. Further, it is so arranged that the templates A(i,j; k,l), B(i,j; k,l), C(i,j; k,l) = -A(i,j; k,l) also include elements corresponding to as yet unscanned portions in such a manner that an output halftone image of a small number of bits of each pixel will be implicitly decided. In a case where quantization image processing of a small number of bits based upon the error-minimization dynamics method is carried out, only A(i,j; k,l), B(i,j; k,l), B(i,j; k,l) are used and C(i,j; k,l) = 0, and it is so arranged that the template A(i,j; k,l) also contains elements corresponding to portions not yet scanned in such a manner that an output halftone image of a small number of bits of each pixel is implicitly decided. In any case, the number of output bits can be selected by selecting the non-linear function. Fig. 10 is a block diagram illustrating the architecture of a digital image processing unit for implementing the DTCNN of Equation (35) The processor 300 illustrated in Fig. 10 is shown to include one of the PEs 51, 52 and 53 depicted in Fig. 3, in the same manner as the processor 100 of Fig. 4, and the processor 300 is stored in each PEs 51, 52 and 53, and PEs 51, 52 and 53 are pipeline-connected. Blocks in Fig. 10 which have the same construction and perform the same processing as those shown in Fig. 4 are designated by like reference numerals. Fig. 10 is a block diagram showing the details of a processor element PE. The PEs 51, 52 and 53 each consist of the hardware shown in Fig. 10. Here one of the processor elements (PEs) is designated at 300. The PE 300 includes the memory 30 for storing a gray-level image that resides in a neighborhood image area composed of a plurality of pixels sent from the input frame buffer 2 (Fig. 2), the memory 31 for storing an output halftone image of a small number of bits in a neighborhood image area, the memory 29 for storing an output weighting value, a memory 39 for storing a state weighting value, a memory 40 for storing a state value, and the address calculating unit 41 which calculates address values for accessing the memories 28, 29, 30, 31, 39 and 40. The address calculating unit 41 comprises the ALU 42, the NPC register 43 and the PC register 44. The memories 28, 29, 30, 31, 39 and 40 are located within the processor but may be provided externally of the processor. A plurality of weightings are stored in each of the memories 28, 29 and 39. A weighting value is selected in accordance with a command from the CPU 6 indicating the type of image processing. The processor 300 further includes the first multiply-and-accumulate arithmetic unit 11 for calculating the product sum B(i,j; k,l)u kl of data in the memory 28 storing the input weighting values in the neighborhood image area and the data in the memory 30 storing the input gray-level image. The first multiply-and-accumulate arithmetic unit 11 comprises the multiplier 13, the accumulator 14 and the registers 15, 16. The registers 15, 16 latch the input gray-level image u kl and the weighting value B(i,j; k,l) fetched from the memories 28, 30, respectively. The accumulator 14 includes the adder 17 and the ACC register 18. The processor 300 further includes the second multiply-and-accumulate arithmetic unit 12 for calculating the product sum A(i,j; k,l)y kl (t) of data in the memory 29 storing the output weighting values and the output halftone image values in the memory 31. The second multiply-and-accumulate arithmetic unit 12 comprises the multiplier 19, the accumulator 20 and the registers 21, 22. The registers 22, 21 latch the output halftone image Y kl (t) and weighting value A(i,j; k,l) fetched from the memories 31, 29, respectively. The accumulator 20 includes the adder 23 and the ACC register 24. The processor 300 further includes a third multiply-and-accumulate arithmetic unit 32 for calculating the product sum C(i,j; k,l)x kl (t) of data in the memory 39 storing the state weighting values and the state values in the memory 40. The third multiply-and-accumulate arithmetic unit 32 comprises a multiplier 33, an accumulator 34 and registers 35, 36. The registers 35, 36 latch the state weighting value C(i,j; k,l) and state value X kl (t) fetched from the memories 39, 40, respectively. The accumulator 34 includes an adder 37 and the ACC register 38. The registers 18, 24, 38, 43, 44, 27, 45 and 50 in the processor 300 perform the functions described below. The PC register 44 stores the address of a pixel to be processed. The NPC register 43 stores the image position of a neighborhood system. As for the values stored in the NPC 43, values from (-3,-3) to (3,3) are stored, as shown in Fig. 7, assuming that the neighborhood system used in processing has a maximum size of 7 × 7. For this reason the register incorporates an incrementer that is capable of updating these values. When the operation for multiplying and accumulating weighting values in the neighborhood system and output halftone images of a low number of bits is performed, the addresses of the neighborhood pixels are calculated from the values in the NPC register 43 and PC register 44 and these pixel values are fetched. The ACC register 18 accumulates the results of calculating the product sum of the pixel of interest and its neighborhood system in the first multiply-and-accumulate arithmetic unit. The ACC register 24 accumulates the results of calculating the product sum of the pixel of interest and its neighborhood system in the second multiply-and-accumulate arithmetic unit. The ACC register 38 accumulates the results of calculating the product sum of the pixel of interest and its neighborhood system in the third multiply-and-accumulate arithmetic unit. The multiply-and-accumulate calculation in cell operation is performed using the values in these registers 15, 16, 18, 21, 22, 24, 35, 36, 38, 43 and 44. Accordingly, at the stage of product-sum calculation, a two-stage pipeline stage, which consists of data fetching and multipliction/accumulation, is formed. The register 27, the register 45 and a register 50 are necessary for pipeline processing, described below, and make possible an exchange of data between processors. More specifically, the register 27 holds an output value obtained by the final calculation, the register 50 holds a state value obtained by the final calculation, and the register 45 holds an address used when this result is written in memory. For example, in a case where the small number of output bits of the output halftone image value are two in number, the weighting should be seven bits + one sign bit, and the output should be two bits without a sign. Since the arithmetic multiplier is composed of two bits in this case, the multiply-and-accumulate operation can also be performed by constructing an array of adders. The address calculating unit 41 calculates an address from the PC register 43 and the PC register 44. The instructions executed are as follows: neigh: an instruction for obtaining the address of a neighborhood designated by the NPC; lineinc: an instruction for incrementing the value of a pixel of interest in the x direction; colinc: an instruction for incrementing the value of a pixel of interest in the y direction. The processor 300 includes an adder 25 for adding together the operational results from the first multiply-and-accumulate arithmetic unit 11, the operational results from the second multiply-and-accumulate arithmetic unit 12, the operational results from the third multiply-and-accumulate arithmetic unit 12 and an offset T from constant 46, and the non-linear acting unit 26 for deciding an output halftone image value of a small number of bits based upon the results from the adder 25. Note that the offset T46 is set by the CPU 6 in accordance with an image processing method. The product sum B(i,j; k,l)u kl is calculated by the first multiply-and-accumulate arithmetic unit 11, the product sum A(i,j; k,l)y kl is calculated by the second multiply-and-accumulate arithmetic unit 12, the product sum C(i,j; k,l)x kl is calculated by the third multiply-and-accumulate arithmetic unit 32, and the sum B(i,j; k,l)u kl + A(i,j; k,l)y kl + C(i,j; k,l)x kl + T kl is obtained by the adder 25, where T kl is a value represented by the offset T46. The non-linear acting unit 26 for deciding the present-time output halftone image value of a small number of bits of each pixel basically is constituted by a RAM, ROM and PLA for programmably storing a non-linear characteristic. However, in a case where an output is fixed at two bits or the like, the basic component is a comparator. In this case, whether the result of the multiply-and-accumulate operation is positive or negative is distinguished by the most significant bit so that it may be determined at which position along the x axis of the non-linear function this value is located. Fig. 5 is a diagram showing an example of the non-linear function used by the non-linear acting unit 26. The output is assumed to be two bits. Here the result from the adder 25 is decided as being the x axis and the value of f(x) thus determined is decided as being an output halftone image value composed of a small number of bits. The non-linear function used by the non-linear acting unit 26 also can be selected by the CPU 6 in accordance with the command from the image processing selector 7. The number of output bits can be selected by this selection of function. When, in a manner similar to that of the processor 100 described above, dynamic digital processing is executed through a sequential operation by the single processor 300, a large number of recursion computations are required and a large quantity of computations and a long period of time are needed for the output halftone image to converge to an optimum value. Accordingly, in this embodiment, each processor is provided with a unidirectional data bus and a linked-structure processor network is adopted to accelerate the convergence of the output of the DTCNN. By virtue of this architecture, it is possible for a pipeline operation between processors. The architecture of this network is the same as that shown in Fig. 3. Since descriptions rendered above in connection with Figs. 6 and 8 regarding the processor 100 hold also with regard to the processor 300, these descriptions are deleted here. Fig. 11 illustrates the operation control flowchart of the processor 300 conforming to the selection of the parameters A, B, C and T, and the non-linear function. Step 300 (S300) Operation is started. Step 301 (S301) In accordance with the selection from the selector 7 of Fig. 2, the CPU 6 instructs the image processing unit 3 of the template values A, B, C, constant T of the offset function and non-linear function f[xi,j(t+1)] to be used by the image processing unit 3. Step 302 (S302) The image processing method (extrapolative or interpolative) is discriminated based upon the specified template values. Extrapolative dither processing is discriminated when A = C = 0 holds. In a case where A = B = C = -A, extrapolative error diffusion processing is discriminated. In a case where C = 0 holds and A, B are used, the error minimization dynamics method, which is interpolative processing, is discriminated. Step 303 (S303) A command is sent to the processor 300 and the operation based upon Equation (35) is performed. The ykl(t) which prevails at this time is adopted as the output value. Since extrapolative processing is executed here, the output value is decided by a single processing operation. Step 304 (S304) An initial value is set in the output frame buffer 4 at step S304. Here random bi-level data are set in the output frame buffer. Further, when the multiply-and-accumulate operation is executed with regard to all pixel input data of one screen, the sequence of this operation is set at step S304. The sequence of this operation is given an order such that all pixels will be scanned randomly. Step 305 (S305) At step S305, a command is issued to the processor element 300 at step S305 based upon the order decided at step S304, the operation of Equation (35) is executed and an output value is obtained. This result is sent to the output frame buffer 6. In a case where this is different from an already stored value, the value is rewritten. Step 306 (S306) It is determined at step S306 whether the processing of all entered pixels has ended. If this processing has not ended, the program proceeds to step S305. Here the pixel of interest is processing based upon the sequence of pixel processing set randomly at step S304, and the multiply-and-accumulate operation is executed. Step 307 (S307) If it is determined at step S306 that the processing of all pixels has ended, then the program proceeds to step S307, where the number of pixels rewritten in the output frame buffer 4 is discriminated. Step 308 (S308), Step 309 (S309) It is determined whether the number of pixels discriminated at step S307 is less than a predetermined value. If the number is less than the predetermined value, then it is judged that the operation based upon the neural network has converged, and the program proceeds to step S309. Here one screen of data in the output frame buffer 4 are sent to the FLCD display. If it is found at step S308 that the number of pixels discriminated at step S307 is greater than the predetermined value, then the processing of steps S305 ~ S307 is repeated. In this flowchart, the image processing method is discriminated based upon the template values. However, an arrangement may be adopted in which the image processing method can be selected separately of the template values at step S301. In accordance with the first embodiment, a digital CNN is constructed based upon a discrete-time cellular neural network (DTCNN). As a result, it is possible to provide a general-purpose digital image processor which preserves the features of digital processing, namely universality, memory property, ease of control, ease of integration and ease of establishing the pipeline architecture, while at the same time making it possible to execute almost all image processing by the spatio-temporal dynamics achievable with a CNN. In particular, it is possible to execute not only the conventional dither method, which is non-dynamic processing, and quantization image processing using a small number of bits based upon the extrapolative error diffusion method, but also the interpolative error diffusion method which discretely diffuses error to the surrounding two-dimensional neighborhood system, as well as the error minimization dynamic methods, by pipeline operation. Moreover, it is possible to provide a universal digital image processor capable of executing various types of image processing merely by setting templates. In this embodiment, an example in which an FLCD serves as the output unit is described. However, the present invention is not limited to an FLCD but can also be applied a display unit or to an inkjet or electrophotographic printer. Thus, in accordance with the present embodiment, as described above, an image processing apparatus that excels in universality, ease of control and ease of integration can be provided by constructing a neural network from digital circuitry. Further, by taking into account the multiplication and accumulation of state values and state weighting values in the operation of the neural network, a quantized image which has a small number of bits and is substantially faithful to the input image can be obtained. As many apparently widely different embodiments of the present invention can be made without departing from the scope thereof, it is to be understood that the invention is not limited to the specific embodiments thereof except as defined in the appended claims.

Claims: A digital image processor (300) for processing input image data based upon a discrete-time cellular neural network, comprising: first multiply-and-accumulate arithmetic means (11) for digitally processing multiplication and accumulation of input image data of a plurality of pixels and input weighting values in a predetermined area; second multiply-and-accumulate arithmetic means (12) for digitally processing multiplication and accumulation of output image data of said plurality of pixels and output weighting values in said predetermined area; and non-linear acting means (26); characterized by further comprising; third multiply-and-accumulate arithmetic means (32) for digitally processing multiplication and accumulation of state values of said plurality of pixels and state weighting values in said predetermined area; and wherein the non-linear acting means (26) is operable to decide output image data in accordance with results of processing from said first, second and third multiply-and-accumulate arithmetic means and non-linear characteristic parameters. The processor (300) according to claim 1, further comprising parameter selecting means (3) for selecting input weighting values used by said first multiply-and-accumulate arithmetic means (11), output weighting values used by said second multiply-and-accumulate arithmetic means (12), state weighting values used by said third multiply-and-accumulate arithmetic means (32), and non-linear characteristic parameters used by said non-linear acting means (26); wherein various types of image processing can be executed selectively in accordance with the selected input weighting values, output weighting values, state weighting values and non-linear characteristic parameters. The processor (300) according to claim 2, further comprising offset input means for entering a predetermined offset value; wherein said non-linear acting means (26) decides output image data in accordance with results of processing from said first, second and third multiply-and-accumulate arithmetic means, said entered offset value and the non-linear characteristic parameters. The processor according to claim 2 or 3, wherein said parameter selecting means (3) is capable of selecting the offset value. The processor according to any one of claims 2 to 4, wherein extrapolative image processing for explicitly deciding output image data of each pixel in accordance with raster scanning, and interpolative image processing for repeating calculations while changing a value of output image data dynamically and implicitly deciding output image data when a certain value is attained, can be selected by selecting parameters by said parameter selecting means (3). The processor (300) according to claim 5, wherein the extrapolative image processing includes quantization image processing based upon a dither method and extrapolative error diffusion method, and the interpolative image processing includes quantization image processing based upon an interpolative error diffusion method and error minimization dynamics method. The processor (300) according to any one of claims 1 to 6, wherein use is made of a plurality of processor elements each of which is composed of said first multiply-and-accumulate arithmetic means (11), said second multiply-and-accumulate arithmetic means (12), said third multiply-and-accumulate arithmetic means (32) and said non-linear acting means (26), said plurality of processor elements are pipelined and input image data subjected to image processing in parallel. A method of processing input image data based upon a discrete-time cellular neural network, comprising: digitally processing multiplication and accumulation of input image data of a plurality of pixels and input weighting values in a predetermined area in a first multiply-and-accumulate arithmetic means (11); digitally processing multiplication and accumulation of output image data of said plurality of pixels and output weighting values in said predetermined area in a second multiply-and-accumulate arithmetic means (12); and providing non-linear acting means (26); characterized by further comprising; digitally processing multiplication and accumulation of state values of said plurality of pixels and state weighting values in said predetermined area in a third multiply-and-accumulate arithmetic means (32); and deciding output using the non-linear acting means (26) image data in accordance with results of processing from said first, second and third multiply-and-accumulate arithmetic means and non-linear characteristic parameters. A method of processing input image data according to claim 8, further comprising selecting input weighting values used by said first multiply-and-accumulate arithmetic means (11), output weighting values used by said second multiply-and-accumulate arithmetic means (12), state weighting values used by said third multiply-and-accumulate arithmetic means (32), and non-linear characteristic parameters used by said non-linear acting means (26); wherein various types of image processing can be executed selectively in accordance with the selected input weighting values, output weighting values, state weighting values and non-linear characteristic parameters (107). A method of image processing according to claim 8 or 9 entering a predetermined offset value; wherein said non-linear acting means (26) decides output image data in accordance with results of processing from said first, second and third multiply-and-accumulate arithmetic means, said entered offset value and the non-linear characteristic parameters. A method of image processing according to claim 9 or 10, wherein said parameter selecting means (3) is capable of selecting the offset value. A method of image processing according to any one of claims 9 to 11, wherein extrapolative image processing for explicitly deciding output image data of each pixel in accordance with raster scanning, and interpolative image processing for repeating calculations while changing a value of output image data dynamically and implicitly deciding output image data when a certain value is attained, can be selected by selecting parameters by said parameter selecting means (3). A method of image processing according to claim 12 wherein the extrapolative image processing includes quantization image processing based upon a dither method and extrapolative error diffusion method, and the interpolative image processing includes quantization image processing based upon an interpolative error diffusion method and error minimization dynamics method. A method of image processing according to any one of claims 8 to 13, wherein use is made of a plurality of processor elements each of which is composed of said first multiply-and-accumulate arithmetic means (11), said second multiply-and-accumulate arithmetic means (12), said third multiply-and-accumulate arithmetic means (32) and said non-linear acting means (26), said plurality of processor elements are pipelined and input image data subjected to image processing in parallel.

Inventors: IMAIZUMI MASAAKI, INOUE HIROSHI, SHINGU TOSHIAKI, TANAKA MAMORU, IMAIZUMI, MASAAKI, INOUE, HIROSHI, SHINGU, TOSHIAKI, TANAKA, MAMORU
Applicants: CANON KK, CANON KABUSHIKI KAISHA
Application year: 1996
Main classification: G06T1
IPC codes: G06T1, H04N1, G06F15, G06N3, G06T7