Filtering system and operation method for very high-speed image processing

Abstract: In an image processing system for performing parallel processing for each pixel by line parallel local computation an endless type slit memory (4) of finite length capable of storing as much data as required in a row, in which a terminal address is connected to a top address, is addressed by a base pointer (1) and a reference pointer (2). Each time the line is changed, the content of the base pointer is changed one by one by an external controller (50), and it is cleared to a top address after a terminal address, the content of the base pointer is written in the reference point at the same time, and the address of the slit memory (4) is specified by the reference pointer (2) and the content of the reference pointer is changed by one at the same time, and a region of the slit memory corresponding to the mask size of a filter is sequentially accessed by the reference pointer. In a novel filtering method for such system using a filter having weight with left-to-right symmetry, each processing element (PE) multiplies the pixel data of a row, for which it is in charge of processing, by the weight of the central row of a filter and the results are added, and the pixel data of a row, for which it is in charge of processing, is multiplied by the weight of the other rows on one side of the central row of the filter and the results are added. Each element receives the results of computation maintained by the processing elements of the other rows by transfer and executes a filtering operation.

Description: The present invention relates to a filtering system and operation method for very high-speed image processing as claimed in claim 1 and 2 respectively, or RIPE (real-time image processing engine) for performing large-scale pre-processing of an image in real time. There are now increasing demands on image processing using computers, in the fields of medical electronics and industrial production. The primary aim of the development in these applications in the near future is to achieve real-time processing of 2-dimensional or multi-dimensional large-scale images (high quality image). To improve the recognition ability of the system, it is essential to increase the resolution of the image itself. For this purpose, it is necessary to increase the number of pixels and to enlarge the mask size of filters in pre-processing. The actual requirements for image processing for the next several years are likely to be that: (1) Multi-valued and color images having more than 2048 x 2048 pixels per image can be processed; (2) Local parallel processing such as filtering can be accomplished at high speed for the above image; and (3) The filtering operation can be achieved using a mask of 50 x 50 size. In the image processing, pre-processing such as filtering is often performed. As the scales of image and filter become larger, the calculation time required for pre-processing rapidly increase. In the image processing system applied practically in medical electronics and industrial applications, processing is primarily performed for an image having about 512 x 512 pixels. For the pre-processing of an image with complicated density such as X-ray film for medical use with resolution of 2048 x 2048 pixels, real-time processing is in practice difficult to perform even when a general-purpose large computer such as a supercomputer is used. In order to actualize a special-purpose system for efficient pre-processing of such large-scale image, it seems to be essential to perform processing in parallel and in pipeline. In particular, most of the algorithms for a filtering operation frequently use parallel type multiplication and addition, and it appears that spatial parallel processing for each pixel is effective. Such an arrangement is described in EP-A-0068358. To store data in so-called line parallel local computation where parallel processing for each pixel is performed by preparing as many computing elements as the pixels in a line of an image, a memory of finite length having a linear address has been used in the past. However, when it is attempted to execute line parallel local computation by a program using such memory, it is necessary to sequentially change (move) the storage site of original data and intermediate results in the memory. One of the effective methods is to move a base pointer of the storage site of original data and intermediate results in the memory. When this method is used, it is necessary to provide access to the original data and the intermediate results always through the base pointer. For this purpose, the memory must be accessed twice, i.e. it is essential to change the content of the base pointer and to read the content of the memory specified by the base pointer. Also, much time is required because of overhead for processing to operate the pointer at the memory boundary. In the filtering operation of line parallel local computation for performing parallel processing for each pixel by preparing as many computation elements as the pixels in a line of an image, each processing element performs computation on the pixel data of a row, for which it is in charge of processing, and receives pixel data of the other rows. The data is multiplied by the weight of a filter and processings are performed such as addition. Thus, the numbers of transfers, the number of multiplications and additions between the rows are increased. Especially, when the mask size of the filter is increased, much time is required for a filtering operation. The present invention is intended to solve the above problems. It is an object of the present invention to provide a method for filtering operation of a very high-speed image processing system. It is another object of the present invention to extensively shorten the time for filtering operation. It is still another object of the invention to actualize memory access by hardware configuration. It is yet another object of the present invention to extensively reduce the number of data transfers between rows, the number of multiplications and the number of additions in line parallel local computation. A filtering system for very high-speed image processing performing image processing in parallel for each unit sequentially in each line according to the present invention comprises an input unit having a plurality of input elements for taking up all or a part of the image data of each line in the order of raster scan, a processing unit having a plurality of processing elements for performing image processing computation in parallel for each pixel as image data from each input element is transferred simultaneously, an output unit having a plurality of output elements where processing data from each processing element is simultaneously transferred, and a controller for controlling the input unit, the processing unit and the output unit, and it is characterized in that there are provided in each processing element an endless memory of finite length having memory capacity for storing as much data as required of a row being processed and having a terminal address connected to a top address, a base pointer for writing the top address next to the terminal address whereby each content is changed for each line by a command from said controller, and a reference pointer for writing the content of the base pointer for each line and for specifying the address of said endless memory of finite length by changing each content of the data read from the endless memory of finite length, whereby a region of the endless memory corresponding to the mask size of the filter is sequentially accessed by the reference pointer. The present invention provides an image processing system by line parallel local computation for parallel processing for each pixel by preparing computation elements as many as or less than the pixels in a line of an image, whereby a terminal address is connected to a top address, and an endless memory of finite length (hereinafter referred to as "slit memory") capable of storing as many data as required of a row in charge of processing is addressed by a base pointer and a reference pointer. Each time the line to be processed changes, the content of each base pointer is changed by an external controller, and it is reset to the top address 0 next to the terminal address. At the same time, the content of the base pointer is written on the reference pointer. The address of the slit memory is specified by the reference pointer, and the content of the reference pointer is changed once at the same time. A region of the slit memory corresponding to mask size of the filter is sequentially accessed by the reference pointer. Accordingly, it is possible to perform processing at very high speed with each processing element not being aware of which line is currently being processed. Also, the very high-speed image processing system according to the present invention is able to perform a method for image processing by a weighted filter having left-to-right symmetry locally and in parallel for each pixel sequentially in each line, characterized in that each processing element multiplies each pixel data of the row, for which it is in charge of processing, by the weight of each row at the center of the filter, the results of multiplication are added together and maintained, each pixel data of the row in charge of processing are multiplied by the weight of other rows on one side of the row at the center of the filter, the results of multiplication are added together and maintained, and each processing element executes a filtering operation by receiving the transferred data maintained by the processing elements of the other rows. According to the present invention, the image processing system uses a filter having left-to-right symmetry by line parallel local computation for performing parallel processing for each pixel by preparing a number of processing elements as many as or less than the pixels in a line of the image. Each processing element multiplies the pixel data of a row, for which it is in charge of processing, by the weight of the row at the center of the filter, and the results are added. The pixel data of the row in charge of processing are multiplied by weight of the other rows on one side from the row at the center of the filter and the results are added. Each processing element receives the results of computation maintained by the processing elements of the other rows by transfer and executes a filtering operation. Thus, it is possible to perform processing at very high speed by extensively reducing the number of multiplications, the number of additions and the number of transfers in the filtering operation. First, description will be given of a very high-speed image processing system (RIPE) used in the present invention. By a RIPE used in the present invention, the processing of each line corresponding to variable density image data of 65536 gradations (16 bits) is divided into three stages of input, computation and output. By pipeline processing, input/output of image data and computation are carried out in parallel. In the computation stage, as many PEs (processing elements) as the pixels in a line of an image are used. The same instruction is given to each PE by an external controller, and the same processing is performed on each image data. By this parallel processing of SIMD (single instruction multiple data stream) type, the image data can be processed simultaneously for each line. The hardware configuration of RIPE according to the present invention is such that the system works as a back-end processor of a host system, and it comprises an external controller, an input unit having a plurality of input elements, a computation or processing unit having a plurality of processing elements, and an output unit having a plurality of output elements. Synchronizing with a host computer the external controller controls the input unit, the computation unit and the output unit. It has a RAM for storing a processing program prepared by a user and a ROM where a basic processing program is stored, and it sends an instruction stored in the RAM or ROM in accordance with the instruction from the host computer sequentially to each processing element of the computation unit in each step, and each processing element functions as a processing machine to execute only what has been instructed. Prior to the processing, the processing program prepared by the user is down-loaded to the RAM of the controller from the host computer. The input elements are controlled by the input stage and comprise 'n' latch circuits of 16-bit width and operate as a shift register. Image data stored in another memory or image data read by a camera is inputted in the order of raster scan, shifting each pixel data. When all pixel data for a line of the image are obtained, the pixel data for a line are simultaneously transferred from the input elements in parallel to each of the processing elements of the computation unit. There are 'n' processing elements controlled by the computation stage. They consist of modules each of which reads the data from a latch circuit sequentially into a slit memory. This data is computed by an arithmetic unit through a bus and intermediate results are stored in a register. The results are outputted to a latch circuit through a selector. Each processing element receives instruction from the external controller in each step and performs the same processing simultaneously. No program is stored in its own memory, and each processing element operates simply as a processing machine by an instruction from outside. The slit memory possesses an address space with k-bit width and it is an endless type memory of finite length (2 k ) with its top address and the terminal address connected with each other. It is to store the data necessary for a filtering operation. That is, in order to determine the output value of a pixel in local processing for image data, pixel data near such a pixel is also required. It is supposed that each processing element has its necessary data in it in this case, the data are overlapped in the entire system, and this is not very economical. To solve this problem, it is designed that the slit memory in each processing element stores as much data as necessary of a row, for which the processing element is in charge of processing, i.e. each processing element stores pixels in the longitudinal direction in a mask. The remaining neighbouring data are kept in the slit memory of the other processing element, and these are obtained by data transfer between the adjacent processing elements through a communication controller. In the present example, each slit memory consists of 64 cells of 16-bit width, and spatial parallel processing using a mask with length of 64 or less in the row direction can be achieved. The arithmetic unit of each processing element is to perform arithmetic logic operation of 16-bit width to each pixel. The content of the processing depends upon which filtering operation is to be performed. The arithmetic unit executes the instructions as given one by one from an external controller. A register file is provided, which is a file with a register where data such as intermediate results are stored. It comprises 16 general registers of 16-bit width, communication registers to store the data transferred between the adjacent processing element through the communication controller, and so on. A flag register stores the contents of flags such as sign, zero, overflow, carry, etc. When local processing is performed, neighbouring data are not completely obtained on the outer periphery of the image, and the results of computation become invalid. According to a conventional algorithm for image processing, the output value is forcibly turned to 0, or an adequate constant or a neighbouring value is set depending on the processing content. By a selector, it is set in such manner that the output value on the outer periphery of the image is turned to a constant or a computed value is used even though it is invalid. Each processing element reads sequentially the necessary data read on the slit memory, and receives the data from the adjacent processing element through the communication controller. Then, a filtering operation is performed, and the data are outputted to the latch circuit. The output elements comprise 'n' latch circuits of 16-bit width and are controlled by the output stage. The data computed by the processing unit is transferred to the output unit for each line at the same time, and is then sequentially shifted so that the data is outputted in the order of raster scan by each pixel. In a RIPE system with such arrangement, description is now given of an example of a local averaging filter. Let it be supposed that the center of a mask is (i, j); the data in the row direction of each pixel are kept in each processing element. The addition for the row j is performed by processing element j, i.e. the computation (2) + (5) + (8) is performed. Then, the results of addition [(1) + (4) + (7)] of the adjacent row (j - 1) at processing element - (j - 1) in charge of the row (j - 1) are received and added to the results of the addition in the row j. Next, the results of the addition of the other adjacent row (j + 1) by processing element - (j + 1) in charge of the row (j + 1) i.e. [(3) + (6) + (9)}, are received and are added to the results of the addition in the row j and the row (j - 1). Finally, the results are divided by 9, and local averaging is achieved. In this case, if it is supposed that the same process is to be performed for a mask size 5 x 5, the data of the rows (j - 2) and (j + 2) next to the adjacent rows (j - 1) and (j + 1) must be transferred twice. Specifically, to receive the data from a row next to the adjacent row, it is necessary to transfer twice. However, if the data are transferred to the adjoining row from each row, the data of the row (j - 2) and the row (j + 2) can be received as the data are received from the data of the row (j - 1) and the row (j + 1) because the data of the row (j - 2) and the row (j + 2) are transferred to the adjacent row (j - 1) and the row (j + 1) and are maintained. Thus, all processing elements can obtain the necessary data by simply transferring the data to the processing elements in the adjacent row. In such a filtering operation, the content is changed one by one sequentially by the external controller each time the line changes, and the content is cleared when it reaches the terminal of the Flit memory in a base pointer. By such a base pointer, a base point of the slit memory necessary for filtering operation is specified, and the content of the base pointer is written to a reference pointer at the same time. Depending upon the mask size of the filter, the reference point writes the content to a memory address register based on the value 'n' of the base pointer when the content of the base pointer is "n" in case of a mask of 5 x 5, for example, and 1 is added to or subtracted from its own value. By performing this procedure sequentially, it is possible to specify the addresses up to n to n + 4 (or n - 4) automatically, and to read the data. When the value of the base pointer reaches (2 k - 1), the value is reset to 0 in case of line feed and returns to the top address. Therefore, the slit memory has the structure of an endless ring. The content of this base pointer is updated one by one by the controller each time a line is changed, and each processing element simply executes a filtering operation without being aware in which line it is currently processing. In this way, by a base pointer, whose content is changed sequentially one by one from outside, and by a reference pointer, which uses the value specified by the base pointer as origin and is incremented or decremented each time a memory address is specified, the content of the slit memory is read out, and the data necessary for the filtering operation is read out by the hardware configuration. Thus, it is possible to reduce the processing time to a value more than several times smaller than the time in the processing by software with an ordinary memory. The filtering operation according to the present invention can be applied not only to a local averaging filter but also to various filters such as a Laplacian filter, Gaussian type smoothing filter, median filter, pseudo-median filter, applicational averaging filter, etc. In the following, description will be given of the other embodiments of the present invention. As already mentioned, the output unit comprises 'n' latch circuits of 16-bit width and is controlled by the output stage. The data computed by the processing unit is transferred to the output unit simultaneously for each line, and is sequentially shifted and outputted in the order of raster scan by each pixel. In a RIPE system with such arrangement, let us imagine a case where processing is performed by a left-to-right symmetrical filter using a 3 x 3 matrix of weights a,b,c:d, e,f: a,b,c upon pixel data of a 3 x 3 matrix having the center (i, j), and it is supposed that the result of the computation performed is a sum of elements of the following matrices obtained from the product for each element of the said 3 x 3 matrices. It is assumed that the processing element of the row 'i' for this computation is PEi, PEi reads pixel data from a slit memory, executes computation, and stores the results to a register. This computation is performed as follows: (1) Multiplication of each weight and pixel data of the row i (dx ij-1 , ex ij , fx ij+1 ) (2) Addition (dx ij-1 , + ex ij , fx ij+1 ) (3) Transfer processing of pixel data of the row (i - 1) (x i-1j-1 , x i-1j , x i-1j+1 ) (4) Multiplication of pixel data and weight in the row (i - 1) and addition of the results of multiplication (ax i-1j-1 + bx i-1j + cx i-1j+1 ) (5) Addition [(2) + (4)] (6) Transfer of pixel data in the row (i + 1) (x i-1j-1 , x i+1j , x i+1j+1 ) (7) Multiplication of pixel data and weight in the row (i + 1) and addition cf the results of multiplication (ax i+1j-1 + bx i+1j + cx i+1j+1 ) (8) Addition [(5) + (7)] The number of multiplications in this computation is: 3 x 3 = 9. The number of additions is 8, and the number of transfers is 6. When the mask size is M x M, the number of multiplications is M 2 , and the number of additions is M 2 - 1. The number of transfers is (M - 1). The increase of M means that more processing time is required. Eased on the fact the weight cf filter is symmetrical (left to right), it is intended according to the present invention to reduce the share of processing by each PEi. Thus, a processing element PEi-1 reads pixel data of a row under charge of processing from a slit memory. It is further multiplied by weights d, e and f respectively and the results are added. The pixel data of the same row is multiplied by weights a, b and c and similar addition is performed, and the results of the computation: dx i-1j-1 + ex i-1j + fx i-1j+1 ax i-1j-1 + bx i-1j + cx i-1j+1 are stored to registers respectively. The processing element PEi reads pixel data of a row under charge of processing from a slit memory. The data is multiplied by weights d, e and f respectively and the results are added. The pixel data of the same row is multiplied by weights a, b and c and the results are added, and the results of the computation: dx ij-1 + ex ij + fx ij+1 ax ij-1 + bx ij + cx ij+1 are stored to registers. Processing element PEi + 1 reads pixel data of a row under charge of processing from a slit memory. The data are multiplied by weights d, e and f, and the results are added. The pixel data of the same row are multiplied by weights a, b and c and the results are added, and the results of the computation: dx i+1j-1 + ex i+1j + fx i+1j+1 ax i+1j-1 + bx i+1j + cx i+1j+1 are stored to registers. In this way, the processing element of each row multiplies each pixel data of a row, for which it is in charge, by the weights'of a row at the center of the filter. It also multiplies by weights of the row on one side of the central row of the filter and the results are added. In the computation by each processing element, pixel data of the row are multiplied by weights a, b and c, and the resultant data are transferred from the adjacent row, and computation is performed. For example, in the processing element PEi the results of the computation: ax i-1j-1 + bx i-1j + cx i-1j+1 are received from the adjacent PEi - 1 and the results of computation: ax i-j-1 + bx ij + cx ij+1 are received from the adjacent PEi + 1. Thus, the computation of filter operation can be carried out. As the result, the number of multiplications by the processing element PEi can be reduced to 6. The number of additions can be reduced to 6, and the number of transfers to 2. When this procedure is applied to a larger mask size, only the number of rows other than the central row of the filter increases. Thus, the data of a row in charge can be multiplied by weight of each of these rows. When this procedure is applied to the mask size M x M, the number of multiplications is M (M + 1)/2, the number of additions is (M - 1)(M + 3)/2, and the number of transfers is (M 2 - 1)/4. Thus, the processing time can be reduced. In case of a Laplacian filter, which is a specific symmetrical (left-to-right) example, e.g. in case of a Laplacian filter having weight such as: -1 2 -1 2 -4 2 -1 2 -1 the weight of the center can be obtained by doubling the weight on the right side: -1, 2 and -1. Each processing element PE multiplies each pixel data of the row, for which it is in charge of processing, by weights of -1, 2 and -1 respectively, and the results are added. PE itself multiplies the resultant sum by -2, and the result of the addition is transferred to the adjacent row. This makes it possible to reduce the number of multiplications and the number of additions. In case the mask size is M x M, it is possible to reduce the number of multiplications M 2 to (M + 1), the number of additions M 2 - 1 to 2 (M - 1), and the number of transfers M (M - 1) to 4M/3 - 2. Further, in case the weights of the mask are all the same, e.g. in case they are even such as: a a a a a a a a a the procedure described above is applied for the row direction. For the line direction, previous data can be used for 2 lines when displaced by one line. Thus, it is possible to omit a computation. In case the mask 5 size is M x M, it is possible to reduce the number of additions (M 2 - 1) to 2 (M - 1), and the number of transfers M (M - 1) to (M - 1). As the result, the number of transfers is M (M - 1). There is thus a significant reduction in filtering operation time with increasing mask size when the present invention is applied to filters such as local averaging, pseudo-median, and local maximum filters. For example, in case of a local maximum filter and mask size of 63 x 63, internal processing time by the conventional method is 837.35 ms, while the processing time in the present invention is 7.68 ms, being shortened to about 1%, and this is suitable for very high-speed processing. As described above, it is possible according to the present embodiment that the processing element corresponding to each row can multiply pixel data of the row, for which it is in charge, by the weight of the central row of filter and the results are added, and the pixel data of the row, for which it is in charge, is multiplied by weights of the row on one side of the central row of the filter and the results are added, and the results of the computation are transferred by processing element of each row. Thus, it is possible to reduce the number of multiplications, the number of additions and the number of transfers, and the filtering operation time can be extensively shortened. In the image processing of the present invention as described above, image data directly read by a camera may be processed by AID conversion and may be read directly on a RIPE system or the date read in a memory once is read out and is read in the RIPE system, or either of these procedures may be followed. The results can be outputted to a monitor or the results may be written to the memory again by the instruction from a host computer In the above embodiment, description has been given on a case where the element PE is prepared for the pixels in a line of an image and image processing for a line is executed simultaneously in parallel.

Claims: A filtering system for very high-speed image processing performing image processing in parallel for each unit sequentially in each line, comprising an input unit having a plurality of input elements for taking up all or part of image data or each line in the order of raster scan; a processing unit having a plurality of processing elements for performing image processing computation in parallel for each pixel as image data from each input element is transferred simultaneously; an output unit having a plurality of output elements where processing data from each processing element is simultaneously transferred; and a controller for controlling the input unit, the processing unit and the output unit, characterised in that there are provided in each processing element an endless memory of finite length having memory capacity for storing as much data as required of a row being processed and having a terminal address connected to a top address, a base pointer for writing the top address next to the terminal address whereby each content is changed for each line by a command from said controller, and a reference pointer for writing the content of the base pointer for each line and for specifying the address of said endless memory of finite length by changing each content of the data read from the endless memory, whereby a region of the endless memory of finite length corresponding to the mask size of a filter is sequentially accessed by the reference pointer. A filtering operation method to be carried out with the system claimed in Claim 1, for performing image processing by a weighted filter having left-to-right symmetry locally and in parallel for each pixel sequentially in each line, characterised in that each processing element multiplies each pixel data of the row, for which it is in charge of processing, by the weight of each row at the center of the filter, the results of multiplication are added together and maintained, each pixel data of the row, for which it is in charge of processing, are multiplied by weight of other rows on one side of the central row of the filter, the results of multiplication are added together and maintained, and each processing element executes a filtering operation by receiving the transferred data maintained by the processing elements of the other rows.

Inventors: HONSAWA KUNIO, IMAI MASAHARU, TOMITA JOTA, HONSAWA, KUNIO, IMAI, MASAHARU, TOMITA, JOTA
Applicants: JAPAN SCIENCE & TECH CORP, JAPAN SCIENCE AND TECHNOLOGY CORPORATION
Application year: 1992
Main classification: G06T5
IPC codes: G06T5