Method for realizing high-speed statistic operation processing and image data processing apparatus for embodying the method

Information

  • Patent Grant
  • 4837841
  • Patent Number
    4,837,841
  • Date Filed
    Friday, June 12, 1987
    37 years ago
  • Date Issued
    Tuesday, June 6, 1989
    35 years ago
  • Inventors
  • Original Assignees
  • Examiners
    • Boudreau; Leo H.
    • Couso; Jose L.
    Agents
    • Foley & Lardner, Schwartz, Jeffery, Schwaab, Mack, Blumenthal & Evans
Abstract
According to this invention, in image data A and B which are respectively constituted by pixel groups .SIGMA.A.sub.ij and .SIGMA.B.sub.ij consisting of N pixels A.sub.ij and B.sub.ij (N is a positive integer; i and j respectively indicate a row position and a column position), and in which density data A.sub.dij and B.sub.dij of the pixels are expressed by n(2m)-bit data (n and m are positive integers), designated 2m-bit portion a.sub.ij of each density data A.sub.dij of image data A is divided into upper m-bit portion a.sub.uij and lower m-bit portion a.sub.Lij. A histogram processor calculates .SIGMA.a.sub.ij .multidot.b.sub.ij between 2m-bit portions a.sub.ij and b.sub.ij using a histogram obtained by the upper or lower m-bit portion a.sub.uij or a.sub.Lij and designated 2m-bit portion b.sub.ij of each density data B.sub.dij of pixel group .SIGMA.B.sub.ij. An average can also be calculated by a calculation section using the histogram. Therefore, a covariance can be calculated at high speed.
Description

BACKGROUND OF THE INVENTION
The present invention relates to a method for realizing high-speed statistic operation processing such as covariance operation processing between two image data, and an image data processing apparatus for embodying the method.
Covariance .sigma..sub.AB between pixel groups .SIGMA.A.sub.ij and .SIGMA.B.sub.ij (where i and j respectively indicate a row position and a column position) respectively corresponding to two image data A and B in which density data A.sub.dij and B.sub.dij of pixels A.sub.ij and B.sub.ij can be expressed by 8-bit data, can be expressed by the following equation (1) if the number of pixels of image data A and B is given as N and density averages of image data A and B are respectively given as .mu..sub.A and .mu..sub.B : ##EQU1## where since ##EQU2##
The first term in equation (1) can be obtained from the following equation: ##EQU3## where histogram h(2.sup.8 K.sub.A +k.sub.B) represents a histogram wherein the value of density data A.sub.dij of pixel A.sub.ij is k.sub.A (k.sub.A =0 to 255) and the value of density data B.sub.dij of pixel B.sub.ij at the same position as pixel A.sub.ij is k.sub.B (k.sub.B =0 to 255). This histogram can be obtained using a 16-bit histogram processor.
Since the histogram processor is used for various image data processing operations as is known, it is inevitable hardware for the image data processing apparatus. Therefore, a method for obtaining ##EQU4## using the histogram processor is advantageous in view of an effective operation of hardware of the image data processing apparatus. However, the 16-bit histogram processor used in this method has a complicated hardware arrangement, and requires 2.sup.8 .times.2.sup.8, i.e., 64 K data entry in order to store a histogram operation result of 8-bit image data A and B. Therefore, an arithmetic operation volume is considerable, and a high-speed operation cannot be performed.
SUMMARY OF THE INVENTION
The present invention has been made in consideration of the above situation and has as its object to provide a method for carrying out a statistic operation between first and second image data at high speed. The first image data is constituted by pixel group .SIGMA.A.sub.ij consisting of N pixels A.sub.ij (N is a positive integer; i and j respectively indicate a row position and a column position), and density data A.sub.dij of each pixel A.sub.ij is expressed by n(2m)-bit data (n and m are positive integers). The second image data is constituted by pixel group .SIGMA.Bij consisting of N pixels Bij (N is a positive integer; i and j respectively indicate a row position and a column position), and density data Bdij of each pixel Bij is expressed by n(2m)-bit data (n and m are positive integers).
The method is characterized by comprising:
carrying out, in accordance with an input .SIGMA.AB processing command, a 3m-bit histogram operation for obtaining histogram h.sub.U (2.sup.2m k.sub.U +k.sub.b) representing the number of sets of pixels A.sub.ij and B.sub.ij, in which a value of upper m-bit portion a.sub.Uij of designated 2m-bit portion a.sub.ij is k.sub.U and a value of designated 2m-bit portion of pixel B.sub.ij at the same position as pixel A.sub.ij is k.sub.B, from designated 2m-bit portion a.sub.ij of each density data A.sub.dij of input pixel group .SIGMA.A.sub.ij and designated 2m-bit portion b.sub.ij of each density data B.sub.dij of pixel group .SIGMA.B.sub.ij, and calculating upper correlation weight T.sub.U from following equation (1) using resultant histogram h.sub.U (2.sup.2m k.sub.U +k.sub.B). ##EQU5## carrying out, in accordance with the input .SIGMA.AB processing command, the 3m-bit histogram operation for obtaining h.sub.L ( 2.sup.2m k.sub.L +k.sub.B) representing the number of sets of pixels A.sub.ij and B.sub.ij, in which a value of lower m-bit portion a.sub.Lij of designated 2m-bit portion a.sub.ij is k.sub.L and a value of designated 2m-bit portion of pixel B.sub.ij at the same position as pixel A.sub.ij is k.sub.B, from designated 2m-bit portion a.sub.ij of each density data A.sub.dij of input pixel group .SIGMA.A.sub.ij designated 2m-bit portion b.sub.ij of each density data B.sub.dij of pixel group .SIGMA.B.sub.ij, and calculating lower correlation weight T.sub.L from following equation (2) using resultant histogram h.sub.L (2.sup.2m k.sub.L +k.sub.B): ##EQU6## and, calculating, in accordance with the input AB processing command, correlation weight T.sub.ab from resultant upper and lower correlation weights T.sub.U and T.sub.L using following equation (3):
T.sub.ab =2.sup.m T.sub.U +T.sub.L ( 3)
It is another object of the present invention to provide an image data processing apparatus for carrying out a statistic operation between first and second image data at high speed. The apparatus comprises:
a first image memory for storing first image data, wherein the first image data is constituted by pixel group .SIGMA.A.sub.ij consisting of N pixels A.sub.ij (N is a positive j integer; i and j respectively indicate a row position and a column position), and density data A.sub.dij of each pixel A.sub.ij is expressed by n(2m)-bit data (n and m are positive integers):
a second image memory for storing second image data, wherein the second image data is constituted by pixel group .SIGMA.B.sub.ij consisting of N pixels B.sub.ij (N is a positive integer; i and j respectively indicate a row position and a column position), and density data B.sub.dij of each pixel B.sub.ij is expressed by n(2m)-bit data (n and are positive integers);
histogram processor for carrying out, in accordance with a .SIGMA.AB processing command input thereto, a 3m-bit histogram operation for obtaining h.sub.U (2.sup.2m.sub.k +k.sub.B) or hL(2.sup.2m k+k.sub.B) representing the number of sets of pixels A.sub.ij and B.sub.ij, in which a value of upper or lower m-bit portion a.sub.Uij or a.sub.Lij of designated 2m-bit portion a.sub.ij is k and a value of designated 2m-bit portion of pixel B.sub.ij at the same position as pixel A.sub.ij is k.sub.B, from upper or lower m-bit portion a.sub.Uij or a.sub.Lij of the designated 2m-bit portion a.sub.ij of each density data A.sub.dij read out from the first image memory and the designated 2m-bit portion b.sub.ij of each density data B.sub.dij read out from the second image memory;
calculation section for calculating, in accordance with the .SIGMA.AB processing command input thereto, upper correlation weight T.sub.U from equation (1) using the histogram h.sub.U (2.sup.2m k+k.sub.B), and lower correlation weight T.sub.L from equation (2) using the histogram h.sub.L (2.sup.2m k+k.sub.B), and for calculating, in accordance with the input .SIGMA.AB processing command, correlation weight T.sub.ab using equation (3) from the upper and lower correlation weights T.sub.U and T.sub.L : ##EQU7##
T.sub.ab =2.sup.m T.sub.U +T.sub.L ( 3)
and,
controller for controlling the histogram processor and the calculation section.
As described above, according to the image data processing apparatus of the present invention, in 2m-bit density data A.sub.dij of each pixel A.sub.ij of pixel group .SIGMA.A.sub.ij constituting image data A and 2m-bit density data B.sub.dij of each pixel Bij of pixel group .SIGMA.Bij constituting image data B, since a 3m-bit histogram processor can be used in order to obtain total sum ##EQU8## of a product of density data Adij and Bdij, the hardware arrangement of the apparatus can be simplified. As compared to a case wherein a 4m-bit histogram processor is used, the number of results of histogram operation can be decreased to 2{2.sup.3m /2.sup.4m }=1/2.sup.m-1. More specifically, a data volume necessary for calculating total sum ##EQU9## can be considerably decreased. Therefore, arithmetic operation processing can be performed at high speed. The apparatus of the present invention can be applied to a statistic operation (average, variance, and covariance) associated with image data exceeding 2m bits, and can contribute to the high-speed operation of this type.





BRIEF DESCRIPTION OF THE DRAWINGS
FIG. 1 is a block diagram showing an arrangement of an image data processing apparatus according to a first embodiment of the present invention;
FIG. 2 is a memory map showing a histogram storage area in a main memory shown in FIG. 1;
FIG. 3 is a flow chart for explaining the operation of the first embodiment;
FIG. 4 is a flow chart for explaining the operation of a second embodiment;
FIG. 5 is a block diagram showing an arrangement of a third embodiment; and
FIG. 6 is a flow chart for explaining the operation of the third embodiment.





DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
An embodiment of an image data processing apparatus according to the present invention will now be described with reference to the accompanying drawings.
FIG. 1 is a block diagram showing an arrangement of an image data processing apparatus according to a first embodiment of the present invention. Referring to FIG. 1, calculation control section 11 connected to system bus 19 controls the overall operation, and executes calculation processing. Image memories 14 and 15, and histogram processor 16 are connected to each other through image bus 20. They are also connected to control section 11 through system bus 19 as well as main memory 12. Image memories 14 and 15 respectively store image data A and B consisting of pixels A.sub.ij and B.sub.ij whose density data is expressed by n(2m) bits. A data length of histogram processor 16 corresponds to 3m bits. In the first embodiment, n=1 and m=4. Therefore, the data lengths of image memories 14 and 15 and processor 16 are respectively 8, 8, and 12 bits. The data length of image bus 20 is also 8 bits.
Main memory 12 has histogram storage area 21 for storing the histogram operation results of processor 16 and register area 22 for holding the intermediate results of the operation. Storage area 21 consists of 16 blocks as shown in FIG. 2, and in each block, the number of entries is 256. The number of entries corresponds to the number of bits of density data.
Control section 11 comprises controller 31 and calculation section 32 for arithmetic operation unit 41 and .SIGMA. operation unit 42. Controller 31 generates various processing commands in accordance with an input statistic operation command. When an average operation command is input, controller 31 generates a 2m weight processing command including a 2m histogram processing command. When a covariance operation command is input, controller 31 generates a .SIGMA.AB processing command, an average processing command, and a .sigma. arithmetic operation command. The .SIGMA.AB processing command consists of an upper correlation weight processing command including an upper histogram processing command, a lower correlation weight processing command including a lower histogram processing command, and an addition command. The average processing command causes controller 31 to generate the 2m weight processing command including the 2m histogram processing command, as in the average operation command.
Processor 16 reads out density data of each pixel from a designated image memory in accordance with the histogram operation command, i.e., the upper histogram processing command, the lower histogram processing command, or the 2m histogram processing command, and executes the histogram operation. The obtained histogram operation result is stored in histogram storage area 21 of main memory 12. Processor 16 reads out image data A or B from designated image memory 14 or 15 in accordance with the 2m histogram processing command, and executes an 8-bit histogram operation. Processor 16 also executes a histogram operation between an upper or lower 4-bit portion of image data A stored in image memory A and image data B stored in image memory 15 in accordance with the upper or lower histogram processing command.
Prior to the description of the first operation of the first embodiment with reference to the flow chart shown in FIG. 3, the basic principle of the present invention will be explained with reference to covariance operation processing between 8-bit image data A and B.
Assume that image data A and B are respectively stored in image memories 14 and 15. Image data A is constituted by pixel group .SIGMA.A.sub.ij (i and j respectively indicate a row position and a column position). Density data A.sub.dij of each pixel A.sub.ij is expressed by 8-bit data, and its value is k.sub.A (k.sub.A =0 to 255). This also applies to image data B. Density data A.sub.dij of each pixel A.sub.ij is divided into upper and lower 4-bit portions. If an upper 4-bit portion is given as a.sub.Uij and a lower 4-bit portion is given as a.sub.Lij, density data A.sub.dij of pixel A.sub.ij can be expressed by:
A.sub.dij =16a.sub.Uij +a.sub.Lij (3)
Therefore, covariance .sigma..sub.AB expressed by equation (1) can be rewritten as: ##EQU10##
When sets of pixels A.sub.ij and B.sub.ij are classified in accordance with a value of upper 4-bit portion a.sub.Uij of density data A.sub.dij of pixel A.sub.ij and a value of density data B.sub.dij of pixel B.sub.ij at the same position as pixel A.sub.ij, histogram h.sub.U (2.sup.8 k.sub.U +k.sub.B) presents the number of sets of pixels A.sub.ij and B.sub.ij in which the value of upper 4-bit portion a.sub.Uij is k.sub.U (k.sub.U =0 to 15) and a value of density data B.sub.dij is k.sub.B (k.sub.B =0 to 255). The total sums (to be referred to as upper and lower correlation weights hereinafter) in parentheses of equation (4) is anything but obtaining weight between density data of pixel groups .SIGMA..sub.Aij and .SIGMA..sub.Bij. Therefore, if the upper and lower correlation weights are respectively given as T.sub.U and T.sub.L, they can be expressed as follows by utilizing histograms h.sub.U (2.sup.8 k.sub.U +k.sub.B) and h.sub.L (2.sup.8 k.sub.L +k.sub.B): ##EQU11## If values of density data A.sub.dij and B.sub.dij are resepctively given as k.sub.A and k.sub.B (k.sub.A, k.sub.B =0 to 255), averages .mu..sub.A and .mu..sub.B can be expressed as follows by utilizing 8-bit histogram operation results h.sub.A (k.sub.A) and h.sub.B (k.sub.B): ##EQU12## Therefore, covariance .sigma..sub.AB can be expressed as follows on the basis of equations (1), (4), (5), and (6):
.sigma..sub.AB =(1/N)(2.sup.4 T.sub.U +T.sub.L)-.mu..sub.A .mu..sub.B (7)
(24T.sub.U +T.sub.L) is called correlation weight T.sub.AB.
The first operation of the first embodiment of the image data processing apparatus according to the present invention which can obtain a covariance at high speed by utilizing the above relations will be described with reference to FIG. 3.
Assume that a covariance operation command for calculating covariance .sigma..sub.AB between image data A and B is input. In step S2, an average processing command is generated. The 2m histogram processing command of the average processing command for image data A is output to histogram processor 16. The 2m histogram processing command is designated to use density data A.sub.dij of image data A and to set bit "0" for the remaining 4-bit portion. In response to this command, density data A.sub.dij for image data A is transferred from image memory 14 to processor 16 via image bus 20. Processor 16 classifies pixels of transferred image data A in accordance with density data A.sub.dij, and determines histogram h.sub.A (k.sub.A) (k.sub.A =0 to 255) indicating the number of pixels for each density. Resultant histogram h.sub.A (k.sub.A) is stored in histogram storage areas 21 of main memory 12 via system bus 19.
Thereafter, in accordance with the 2m weight processing command generated according to the covariance operation command, .SIGMA. operation unit 42 calcualtes average .mu..sub.A for image data A from equation (6) using transferred histogram h.sub.A (k.sub.A). Calculated .mu..sub.A is stored in register area 22 of main memory 12.
After the execution of the average processing command for image data A, in step S4, the average processing command for image data B is output to processor 16 in the same manner as for image data A. In accordance with the 2m histogram processing command of the average processing command for image data B, image data B is transferred from image memory 15 to processor 16 in the same manner as image data A, and histogram h.sub.B (k.sub.B) is calculated. Calculated histogram h.sub.B (k.sub.B) is transferred to histogram storage area 21 of memory 12 via system bus 19. In accordance with the 2m weight processing command of the average processing command generated according to the covariance operation command, average .mu..sub.B is calculated from equation (6) by utilizing transferred histogram h.sub.B (k.sub.B). Calculated average .mu..sub.B is stored in register area 22 as in average .mu..sub.A.
In the above description, after average .mu..sub.A is calculated, image data B is transferred to processor 16. If the 2m histogram processing command for image data B is generated while average .mu..sub.A is calculated, covariance .sigma..sub.AB can be calculated at a higher speed.
When averages .mu..sub.A and .mu..sub.B are calculated, in step S6, the upper correlation weight processing command is output to 12-bit histogram processor 16 in order to calculate a weight for upper 4-bit portion a.sub.Uij of density data A.sub.dij of pixel A.sub.ij and density data B.sub.dij of pixel B.sub.ij. In order to calculate its histogram h.sub.U (2.sup.8 k.sub.U +k.sub.B), the upper histogram processing command of the upper correlation weight processing command is instructed via system bus 19. In response to this command, density data A.sub.dij of image data A and density data B.sub.dij of image data B are fetched by processor 16 from image memories 14 and 15. Processor 16 executes a histogram operation for obtaining histogram h.sub.U (2.sup.8 k.sub.U +k.sub.B) from transferred upper 4-bit portion a.sub.Uij of image data A and image data B. Resultant histogram h.sub.U (2.sup.8 k.sub.U +k.sub.B) is stored in storage area 21 of memory 12. An mth entry of an sth block of storage area 21 stores the number of pixels whose density is k.sub.B of pixels B.sub.ij at the same position as pixels A.sub.ij which have value k.sub.U of upper 4 bits of density data A.sub.dij.
When histogram h.sub.U (2.sup.8 k.sub.U +k.sub.B) for upper 4 bits of density data A.sub.dij of pixel A.sub.ij is obtained, in step S8, .SIGMA. operation unit 42 calculates upper correlation weight T.sub.U from equation (5) by utilizing stored histogram h.sub.U (2.sup.8 k.sub.U +k.sub.B) in accordance with the upper correlation weight processing command. Obtained value T.sub.U is stored in register area 22.
Thereafter, in step S10, the lower histogram processing command of the lower correlation weight processing command generated according to the covariance operation command is generated in the same manner as upper 4-bit portion a.sub.Uij so as to calculate histogram h.sub.L (2.sup.8 k.sub.L +k.sub.B) of lower 4-bit portion a.sub.Lij of density data A.sub.dij of image data A and image data B. Thus, density data A.sub.dij of pixels A.sub.ij of pixel group .SIGMA.A.sub.ij and density data B.sub.dij of pixels B.sub.ij of pixel group .SIGMA.B.sub.ij stored in image memory 15 are sequentially transferred to processor 16 via image bus 20, and histogram h.sub.L (2.sup.8 k.sub.L +k.sub.B) is calculated. Calculated histogram h.sub.L (2.sup.8 k.sub.L +k.sub.B) is stored in storage area 21 of memory 12. Thereafter, in step S12, lower correlation weight T.sub.L is calculated from equation (5) in accordance with the lower correlation weight processing command. Calculated value T.sub.L is stored in register area 22.
In the above description, after value T.sub.U for upper 4-bit portion a.sub.Uij of pixel A.sub.ij is obtained, image data A and B are transferred to processor 16 so as to obtain a histogram for lower 4-bit portion a.sub.Lij. If the histogram processing command is generated while value T.sub.U is being calculated, covariance .sigma..sub.AB can be calculated at a higher speed. At this time, even if the histogram operation is completed, if the operation for obtaining value T.sub.U is not completed, the histogram operation result can be stored in histogram storage area 21 after completion of the operation of value T.sub..mu..
In step S14, arithmetic operation unit 41 calculates covariance .sigma..sub.AB by utilizing equation (7) using data .mu..sub.A, .mu..sub.B, T.sub.U, and T.sub.L stored in register area 22 in accordance with the .sigma. arithmetic processing command generated according to the covariance operation command. In this case, a command for executing an operation of 2.sup.4 TU+TL is referred to as an addition processing command. The upper correlation weight processing command including the upper histogram processing command, the lower correlation weight processing command including the lower histogram processing command, and the addition processing command are referred to as the .SIGMA.AB processing command as a whole.
Covariance .sigma..sub.AB of 8-bit image data A and B can be obtained using the 2-bit processor, as described above.
In the description of the first embodiment, averages .mu..sub.A and .mu..sub.B for image data A and B are calculated in accordance with the 2 m weight processing command. However, averages .mu..sub.A and .mu..sub.B can be calculated by utilizing the histogram operation results of 12-bit histogram processor 16. A second embodiment for realizing it will be described below.
The second embodiment has the same arrangement as in that of the first embodiment except for the following point. In the second embodiment, an average processing command includes an upper weight processing command, and a lower weight processing command.
The operation of the second embodiment of the image data processing apparatus which can calculate averages of 8-bit image data A and B, and hence, a convariance, from the histogram operation results of 12-bit histogram processor 16 will be described below.
As can be seen from equation (6), average .mu..sub.A of image data A.sub.ij can be calculated by dividing the total sum of density data of pixels A.sub.ij by total number N of pixels. Therefore, by utilizing the histogram, the weights of pixels are multiplied, and the product is divided by pixel number N, thereby calculating average .mu.. More specifically, if density data A.sub.dij of image data A is expressed by equation (3), average .mu..sub.A can be: ##EQU13##
Similarly, average .mu..sub.B can be: ##EQU14##
More specifically, in the case of average .mu..sub.B, the number of pixels for certain density k.sub.B is obtained, and average .mu..sub.B is calculated based on the number of pixels. Therefore, the order of the total sum is reversed as compared with a case of equation (8). If an upper A weight, an upper B weight, a lower A weight, and a lower B weight are respectively given as U.sub.UA, U.sub.UB, U.sub.LA, and U.sub.LB, they can be expressed by: ##EQU15##
Therefore, equation (7) can be rewritten as: ##EQU16##
The operation of the second embodiment will now be described with reference to FIG. 4.
In step S20, the upper correlation weight processing command is generated in accordance with the input covariance operation command in the same manner as in the first embodiment. Histogram processor 16 reads out upper 4-bit portion a.sub.Uij of image data A stored in image memory 14 and density data B.sub.dij of inage data B stored in image memory 15 in accordance with an upper histogram processing command of the upper correlation weight processing command, and executes a histogram operation. Calculated histogram h.sub.U (2.sup.8 k.sub.U +k.sub.B) is stored in histogram storage area 21 of main memory 12. Thereafter, in step S22, .SIGMA. operation unit 42 calculates upper correlation weight T.sub.U in accordance with the generated upper correlation weight processing command, and calculates upper A weight U.sub.UA and upper B weight U.sub.UB in accordance with the generated upper weight processing command.
In step S24, a lower correlation weight processing command is output to processor 16 in the same manner as for upper 4-bit portion a.sub.Uij. Processor 16 calculates histogram h.sub.L (2.sup.8 k.sub.L +k.sub.B) for a.sub.Lij and B.sub.dij in accordance with the lower histogram processing command of the lower correlation weight processing command. Resultant histogram h.sub.L (2.sup.8 k.sub.L +k.sub.B) is stored in area 21. In step S26, by utilizing the stored histogram, lower correlation weight T.sub.L is calculated in accordance with the generated lower correlation weight processing command, and lower A weight U.sub.LA and lower B weight U.sub.LB is calculated in accordance with the lower weight processing command of the generated average processing command. Calculated values T.sub.L, U.sub.LA, and U.sub.LB are stored in register area 22.
In step S28, arithmetic operation unit 41 calculates covariance .sigma..sub.AB based on equation (11) from values T.sub.U, U.sub.UA, and U.sub.UB obtained in step S22 and values T.sub.L, U.sub.LA, and U.sub.LB obtained in step S26, in accordance with the .sigma. arithmetic operation command generated according to the covariance operation command.
In this manner, the covariance can be calculated faster than the operation of the first embodiment. In the above description, the covariance is calculated. When variance .sigma..sub.A 2 is to be obtained, density data for pixels A.sub.ij can be read out twice from image memory 14 or 15. Resultant .sigma..sub.AB is made as .sigma..sub.A 2.
A third embodiment of an image data processing apparatus according to the present invention which can execute a statistic operation associated with image data A and B whose density data is expressed by 16 bits or more, e.g., an operation for calculating an average, variance, and a covariance, will be described hereinafter.
In the third embodiment, calculation control section 111 controls the overall operation, and executes calculation processing. n(2m)-bit image memories 114 and 115, histogram processor section 116 including 3m-bit histogram processors 116-1 and 116-2, and main memory 112 are connected to section 111 via system bus 119. Image memories 114 and 115 and histogram processors 116-1 and 116-2 are connected to each other through image bus 120 having a 16-bit data length. Memory 112 has histogram storage areas 121-1 and 121-2 for respectively storing histogram operation results from processors 116-1 and 116-2. Memory 112 has register area 122 for storing data necessary for controlling intermediate operation results, and the like.
Section 111 comprises controller 131 for generating various processing commands in accordance with an input statistic operation command, and calculation unit 132 for executing calculation processing. Calculation unit 132 comprises arithmetic operation unit 141 and .SIGMA. operation section 142 including .SIGMA. operation units 142-1 and 142-2. When controller 131 receives an average operation command, it generates a total 2m-bit average processing command including a 2m histogram processing command and a total .mu. arithmetic operation command. When controller 131 receives a covariance operation command, it generates a total .SIGMA.AB processing command, a total 2m-bit weight processing command, and a total .sigma. arithmetic operation command.
Prior to the description of the operation of the third embodiment, 16- and 24-bit average, covariance and variance operations will be described below.
Assume that n(2m)-bit image data A and B (in this embodiment 2m=8) are respectively stored in image memories 114 and 115. Density data A.sub.dij and B.sub.dij of pixels A.sub.ij and B.sub.ij of image data A and B whose density is expressed by n(2m) bits are classified in units of 8 bits. If lower pth 8-bit portions of the density data are respectively given as a.sub.pij and b.sub.pij, density data A.sub.dij and B.sub.dij can be expressed by: ##EQU17## Therefore, if image data A and B are 16-bit data, i.e., if n=2, average .mu..sub.A can be expressed by: ##EQU18## Average .mu..sub.B can be expressed as follows in the same manner as in average .mu..sub.A :
.mu..sub.B =2.sup.8 .mu..sub.2B +.mu..sub.1B (14)
where .mu..sub.2A, .mu..sub.1A, and .mu..sub.1B are average values obtained from equation (6).
Covariance .sigma..sub.AB of image data A and B is: ##EQU19##
If upper and lower correlation weights between a pth 8-bit portion of image data A and a qth 8-bit portion of image data B obtained from equation (5) are respectively given as T.sub.Upq and T.sub.Lpq and if an upper A weight, an upper B weight, a lower A weight, and a lower B weight for image data A and B obtained from equation (10) when p=q are respectively given as U.sub.UAp, U.sub.UBp, U.sub.LAp, and U.sub.LBp, equation (15) can be rewritten as: ##EQU20##
Variance .sigma..sub.A 2 of image data A can be expressed by: ##EQU21## This also applies to image data B.
The above method applies to image data of 16 bits or more, e.g., 24-bit data, that is, image data A of n=3. Pixels A.sub.ij and B.sub.ij of 24-bit image data A and B can be expressed by: ##EQU22## Therefore, if image data A and B are 24-bit data, average .mu..sub.A can be expressed by: ##EQU23## Average .mu..sub.B can be expressed as follows in the same manner as average .mu..sub.A :
.mu..sub.B =2.sup.16 .mu..sub.3B +2.sup.8 .mu..sub.2B +.mu..sub.1B (20)
where .mu..sub.3A, .mu..sub.2A, .mu..sub.1A, .mu..sub.3B, .mu..sub.2B, and .mu..sub.1B are averages obtained from equation (6).
Covariance .sigma..sub.AB of image data A and B can be given as: ##EQU24## If upper and lower correlation weights between a pth 8-bit portion of image data A and qth 8-bit portion of image data B obtained from equation (5) are respectively given as T.sub.Upq and T.sub.Lpq and if an upper A weight, an upper B weight, a lower A weight, and a lower B weight for image data A and B obtained from equation (10) when p=q are respectively given as U.sub.UAp, U.sub.UBp, U.sub.LAp, and U.sub.LBp, equation (15) can be rewritten as: ##EQU25## Variance .sigma..sub.A 2 of image data A can be expressed by: ##EQU26##
The operation of the third embodiment will now be described with reference to FIG. 6. Assume that density data of image data stored in image memories 114 and 115 are expressed by 24-bit data.
A case will first be described wherein the average operation command for image data A is input as the statistic operation command. When the average operation command for image data A is input, a total 2m-bit average processing command is generated in step S30. The total 2m-bit average processing command includes the 2m-bit average processing command including the 2m histogram processing command for each of the 2m-bit portion a.sub.pij. The 2m-bit average processing command is output to histogram processor 116-1.
Variable p is set to be n.sub.1 (=1 in this example), and variable q is set to be n.sub.2 (=3 in this example). It is checked in step S32 if an input command is an average or covariance operation command. If N in step S32, step S54 is executed. If Y in step S32, step S34 is executed. In this case, since the input command is the average operation command, step S34 is executed. In step S34, 8-bit portion a.sub.3ij designated by variables p and q is read out by processor 116-1. Readout 8-bit portion a.sub.3ij is subjected to processing in step S36. This step executes various processing operations of 8-bit image data in the first or second embodiment, and is called an 8-bit image data processing module.
Processor 116-1 executes a histogram operation associated with 8-bit data a.sub.qij whose remaining 4 bits are fetched as bit "0" in accordance with the 2m histogram processing command of the 2m-bit average processing command. If a value of 8-bit data a.sub.qij is given as k, histogram operation result h.sub.q (k) (k=0 to 255) is stored in histogram storage area 121-1 of main memory 112. Unit 142-1 calculates .mu..sub.3A for 8-bit portion a.sub.3ij from resultant histogram h.sub.3 (k) using equation (6). .mu..sub.3A is stored in register area 122.
Subsequently, it is checked in step S38 if q=1. If Y in step S38, step S42 is executed. If N in step S38, step S40 is executed. In this case, since q=3, step S40 is executed. In step S40, value q is decremented by 1. Thereafter, step S32 is again executed. In this manner, .mu..sub.2A for 8-bit portion a.sub.2ij and .mu..sub.1A for 8-bit portion a.sub.1ij are calculated in the same manner as for 8-bit portion a.sub.3ij. .mu..sub.2A and .mu.1A are stored in register area 122.
When .mu..sub.1A is calculated, q=1, and Y is determined in step S38. It is checked in step S42 if p=1. If N in step S42, step S44 is executed. If Y in step S42, step S46 is executed. In this case, since p is left to be 1, Y is determined in step S42, and the flow advances to step S46. It is checked in step S46 if the input command is the average operation command. If N in step S46, step S50 is executed; otherwise, step S48 is executed. In this case, since Y is obtained in step S46, step S48 is executed, and average .mu..sub.A for image data A is calculated by arithmetic operation unit 141 using equation (19) in accordance with the .mu. arithmetic processing command.
A case will be described wherein the covariance operation command is input as the statistic operation command. When the covariance operation command is input, the total .SIGMA.AB processing command, the total 2m-bit weight processing command, and the total .sigma. arithmetic processing command are generted in step S30. The upper histogram processing command included in the upper correlation weight processing command of the .SIGMA.AB processing command for 2m-bit portions a.sub.pij and b.sub.qij of the total .SIGMA.AB processing command and the lower histogram processing command included in the lower correlation weight processing command thereof are respectively output to histogram processors 116-1 and 116-2. n.sub.1 and n.sub.2 are set to be 3. More specifically, initial values of variables p and q are 3. Since the covariance operation command has already been input, Y is determined in step S32. 8-bit portions a.sub.3ij and b.sub.3ij designated by variables p and q are read out, and are supplied to histogram processors 116-1 and 116-2, respectively.
In step S36, histogram h.sub.U (2.sup.8 k.sub.U +k.sub.B) is calculated from an upper 4-bit portion of data a.sub.3ij and data b.sub.3ij by processor 116-1, and histogram h.sub.L (2.sup.8 k.sub.L +k.sub.B) is calculated from a lower 4-bit portion of data a.sub.3ij and data b.sub.3ij by processor 116-2, and they are stored in storage areas 121-1 and 121-2, respectively. Units 142-1 and 142-2 respectively calculated upper and lower correlation weights T.sub.U33 and T.sub.L33 based on equation (5) using the histograms stored in storage areas 121-1 and 121-2, in accordance with the upper or lower correlation weight processing command. Calculated upper and lower correlation weights T.sub.U33 and T.sub.L33 are stored in register area 122. Since p=q, units 142-1 and 142-2 calculate upper A weight U.sub.UA3, upper B weight U.sub.UB3, lower A weight U.sub.LA3, and lower B weight U.sub.LB3 according to equation (10) using the histogram stored in storage areas 121-1 and 121-2. Calculated U.sub.UA3, U.sub. UB3, U.sub.LA3, and U.sub.LB3 are also stored in register area 122.
Since variable q is 3, variable q is decremented by 1 in step S40, and steps S32 to S36 are repeated. More specifically, in the second cycle, upper and lower correlation weights T.sub.U32 and T.sub.L32 for 8-bit portions a.sub.3ij and b.sub.2ij are calculated. Since variables p and q are respectively 3 and 2, p=q. Therefore, no weight can be calcuated. Similarly, in the third cycle, upper and lower correlation weights T.sub.U31 and T.sub.L31 for 8-bit portions a.sub.3ij and b.sub.1ij are calculated. Calculated upper and lower correlation weights T.sub.U32, T.sub.L32, T.sub.U31, and T.sub.L31 are stored in register area 122.
After all the combinations of variable q for variable p=3 are completely calculated, N is determined in step S42, and step S44 is executed. In step S44, variable p is decremented by 1 to be 2. Variable q is set to be n.sub.2, i.e., 3. Thereafter, the same processing as above is executed, so that upper and lower correlation weights T.sub.U23, T.sub.L23, T.sub.U22, T.sub.L22, T.sub.U21, and T.sub.L21 for 8-bit portions a.sub.2ij and b.sub.3ij, 8-bit portions a.sub.2ij and b.sub.2ij, and 8-bit portions a.sub.2ij and b.sub.1ij are calculated. Values U.sub.UA2, U.sub.UB2, U.sub.LA2, and U.sub.LB2 are calculated when p=q, i.e., p=2 and q=2. Variable is decremented in step S44. When p=1, upper and lower correlation weights T.sub.U13, T.sub.L13, T.sub.U12, T.sub.L12, T.sub.U11, and T.sub.L11 for 8-bit portions a.sub.1ij and b.sub.3ij, 8 -bit portions a.sub.1ij and b.sub.2ij, and 8-bit portions a.sub.1ij and b.sub.1ij are calculated. In addition, values U.sub.UA1, U.sub.UB1, U.sub.LA1, and U.sub.LB1 are calculated when p=1 and q=1.
Since variables p and q are 1, Y is determined in step S38 and S42, and step S46 is executed. Since the input command is the covariance operation command, N is determined in step S46, and Y is determined in step S50 for the same reason. Therefore, the flow advances to step S52. In step S52, arithmetic operation unit 141 calculates covariance .sigma..sub.AB from equation (21) in accordance with the total .sigma. arithmetic processing command.
When the variance operation command for image data A is input as the statistic operation command, image data A is used as image data B, and the same processing as for the covariance operation command is performed. In this case, since N is determined in step S32 and Y is determined in step S54, step S56 is executed. It is checked in step S56 if p.gtoreq.q. If N in step S56, the flow advances to step S38. If Y in step S56, the 8-bit image data processing module is executed. In this case, the order of 8-bit portions a.sub.pij and a.sub.qij designated by variables p and q does not influence the operation result. Finally, N is determined in step S50, and step S54 is executed. Then, variance .sigma..sub.A 2 is calculated from equation (22).
Claims
  • 1. A method for executing a statistic operation between image data A and B at high speed, where the image data A is constituted by pixel group .SIGMA.A.sub.ij consisting of N pixels A.sub.ij where N is a positive integer more than 2; i and j respectively indicate a row position and a column position, and density data A.sub.dij of each pixel A.sub.ij is expressed by n(2m)-bit data where n and m are positive integers, and the image data B is constituted by pixel group .SIGMA.B.sub.ij consisting of N pixels B.sub.ij, and density data B.sub.dij of each pixel B.sub.ij is expressed by n(2m)-bit data, comprising:
  • carrying out, in accordance with an input .SIGMA.AB processing command generated by a control unit and input to a calculation unit, a 3m-bit histogram operation for obtaining histogram h.sub.U (2.sup.2m k.sub.U +k.sub.B) representing a number of sets of pixels A.sub.ij and B.sub.ij, in which a value of upper m-bit portion a.sub.Uij of designated 2m-bit portion a.sub.ij is k.sub.U and a value of designated 2m-bit portion b.sub.ij of the pixel B.sub.ij at a same position as the pixel A.sub.ij is k.sub.B, from a designated 2m-bit portion a.sub.ij of the pixel group .SIGMA.A.sub.ij and a designated 2m-bit portion b.sub.ij of the pixel group .SIGMA.B.sub.ij, and calculating an upper correlation weight T.sub.U from equation (1) using the histogram h.sub.U (2.sup.2m k.sub.U +k.sub.B): ##EQU27## carrying out, in accordance with the input .SIGMA.AB processing command, the 3m-bit histogram operation for obtaining histogram h.sub.L (2.sup.2m k.sub.L +k.sub.B) representing the number of sets of pixels A.sub.ij and B.sub.ij, in which a value of lower m-bit portion a.sub.Lij of the designated 2m-bit portion a.sub.ij is k.sub.L and the value of the designated 2m-bit portion b.sub.ij of pixel B.sub.ij at the same position as the pixel A.sub.ij is k.sub.B, from the designated 2m-bit portion a.sub.ij of the pixel group .SIGMA.A.sub.ij and the designated 2m-bit portion b.sub.ij of the pixel group .SIGMA.B.sub.ij, and calculating a lower correlation weight T.sub.L from equation (2) using the histogram h.sub.L (2.sup.2m k.sub.L +k.sub.B): ##EQU28## and, calculating, in accordance with the input .SIGMA.AB processing command input to said calculation unit and generated by said control unit, correlation weight T.sub.ab from the calculated upper and lower correlation weights T.sub.U and T.sub.L using equation (3):
  • T.sub.ab =2.sup.m T.sub.U +T.sub.L ( 3).
  • 2. The method according to claim 1, wherein n is 1, and
  • the method further comprises:
  • generating the .SIGMA.AB processing command from said control unit in accordance with a 2m-bit covariance operation command as an input statistic operation command to said control unit,
  • calculating averages .mu..sub.A and .mu..sub.B for a designated 2m-bit portion a.sub.ij of the pixel group .SIGMA.A.sub.ij and a designated 2m-bit portion b.sub.ij of their pixel group .SIGMA.B.sub.ij in accordance with the input 2m-bit covariance operation command, and
  • calculating covariance .sigma..sub.AB2m for the designated 2m-bit portions a.sub.ij and b.sub.ij from the calculated correlation weight T.sub.ab and the calculated averages .mu..sub.A and .mu..sub.B using equation (4) in the input 2m-bit covariance operation command:
  • .sigma..sub.AB2m =(1/N)T.sub.ab -.mu..sub.A .multidot..mu..sub.B ( 4).
  • 3. The method according to claim 2, wherein
  • said calculating the averages .mu..sub.A and .mu..sub.B includes:
  • calculating, in accordance with the input 2m-bit covariance operation command, an upper A weight U.sub.UA for the pixel group .SIGMA.A.sub.ij from equation (5) and an upper B weight U.sub.UB for the pixel group .SIGMA.B.sub.ij from equation (6) using the histogram h.sub.U (2.sup.2m k.sub.U +k.sub.B) obtained by calculating the upper correlation weight T.sub.U : ##EQU29## calculating, in accordance with the input 2m-bit covariance operation command, lower A weight U.sub.LA for the pixel group .SIGMA.A.sub.ij from equation (7) and lower B weight U.sub.LB for the pixel group .SIGMA.B.sub.ij from equation (8) using the histogram h.sub.L (2.sup.m k.sub.L +k.sub.B) obtained by calculating the lower correlation weight T.sub.L : ##EQU30## and determining, in accordance with the input 2m-bit covariance operation command, the averages .mu..sub.A and .mu..sub.B from the upper A weight U.sub.UA, the upper B weight U.sub.UB, the lower A weight U.sub.LA, and the lower B weight U.sub.LB using equations (9) and (10):
  • .mu..sub.A =(1/N)(2.sup.m U.sub.UA +U.sub.LA) (9)
  • .mu..sub.B =(1/N)(U.sub.UB +U.sub.LB) (10).
  • 4. The method according to claim 2, further comprising:
  • executing a 3m histogram operation for obtaining histogram h.sub.A (k.sub.A) while setting m-bit portion to be "O" and using the pixel group .SIGMA.A.sub.ij as pixel group .SIGMA.B.sub.ij, and calculating average .mu..sub.A from the histogram h.sub.A (k.sub.A) using equation (11), in accordance with a 2m-bit average operation command for the pixel group .SIGMA.A.sub.ij which operates as an input statistic operation command to said control unit: ##EQU31##
  • 5. The method according to claim 2, further comprising:
  • using the pixel group .SIGMA.A.sub.ij as the pixel group .SIGMA.B.sub.ij in accordance with a 2m-bit variance operation command for pixel group .SIGMA.A.sub.ij which operates as an input statistic operation command to said control unit, and
  • determining the covariance .sigma..sub.AB2m obtained for the designated 2m-bit portions a.sub.ij and b.sub.ij in the 2m-bit covariance operation command, to be variance .sigma..sub.A 2.
  • 6. The method according to claim 1, wherein n is an integer equal to or larger than 2, and the method further comprises:
  • generating, in accordance with an input total .SIGMA.AB processing command generated by said control unit to said calculation unit, the .SIGMA.AB processing command for all the combinations of designated 2m-bit portions a.sub.pij (p=1 to n) and b.sub.qij (q=1 to n) using the designated 2m-bit portion a.sub.pij as the designated 2m-bit portion a.sub.ij and the designated 2m-bit portion b.sub.qij as the designated 2m-bit portion b.sub.ij, in association with combinations of the designated 2m-bit portions a.sub.pij and b.sub.qij arbitrarily designated from n 2m-bit portions a.sub.pij (p=1 to n) associated with pixel group .SIGMA.A.sub.ij and n 2m-bit portions b.sub.qij (q=1 to n) associated with pixel group .SIGMA.B.sub.ij, and
  • calculating ##EQU32## from equation (12) using the correlation weight T.sub.ab obtained for each of all the combinations of the designated 2m-bit portions a.sub.pij and b.sub.qij as pq correlation weight T.sub.pq in accordance with the total .SIGMA.AB processing command: ##EQU33##
  • 7. The method according to claim 6, further comprising:
  • generating the total .SIGMA.AB processing command by said control unit in accordance with an input n(2m)-bit covariance operation command which operates as the input statistic operation command to said control unit,
  • determining averages .mu..sub.AT and .mu..sub.BT for the pixel groups .SIGMA.A.sub.ij and .SIGMA.B.sub.ij in accordance with the n(2m)-bit covariance operation command, and
  • calculating, in accordance with the n(2m)-bit covariance operation command, covariance .sigma..sub.ABT using equation (13) from the .SIGMA.A.sub.dij .multidot.B.sub.dij and the averages .mu..sub.AT and .mu..sub.BT : ##EQU34##
  • 8. The method according to claim 7, wherein
  • said determining the averages .mu..sub.A and .mu..sub.B comprises:
  • calculating, in accordance with the input n(2m)-bit covariance operation command, upper A weight U.sub.UAp for the pixel group .SIGMA.A.sub.ij from equation (14) and upper B weight U.sub.UBp for the pixel group .SIGMA.B.sub.ij from equation (15) using histogram h.sub.Up (2.sup.2m k.sub.U +k.sub.B) as the histogram h.sub.U (2.sup.2m k.sub.U +k.sub.B) for a combination of p=q in the combinations of the designated 2m-bit portions a.sub.pij and b.sub.qij : ##EQU35## calculating, in accordance with the input n(2m)-bit covariance operation command, lower A weight U.sub.LAp for the pixel group .SIGMA.A.sub.ij from equation (16) and lower B weight U.sub.LBp for the pixel group .SIGMA.B.sub.ij from equation (17) using the histogram h.sub.Lp (2.sup.2m k.sub.U +k.sub.B) as the histogram h.sub.L (2.sup.2m K.sub.L +k.sub.B) for a combination of p=q in the combinations of the designated 2m-bit portions a.sub.pij and b.sub.qij : and ##EQU36## and calculating, in accordance with the input n(2m)-bit covariance operation command, the averages .mu..sub.AT and .mu..sub.BT using equations (18) and (19) from the upper A weight U.sub.UAp and the upper B weight U.sub.UBp and the lower A weight U.sub.LAp and the lower B weight U.sub.LBp from equations (18) and (19): ##EQU37##
  • 9. The method according to claim 7, further comprising:
  • generating the n(2m)-bit covariance operation command by said control unit using the pixel group .SIGMA.A.sub.ij as the pixel group .SIGMA.B.sub.ij in accordance with an n(2m)-bit variance operation command for the pixel group .SIGMA.A.sub.ij which operates as the input statistic operation command to said control unit,
  • generating the .SIGMA.AB processing command for combinations of the designated 2m-bit portions a.sub.pij and b.sub.qij which can satisfy p.ltoreq.q, and
  • determining the covariance .sigma..sub.AB as variance .sigma..sub.A 2.
  • 10. The method according to claim 7, further comprising:
  • generating the 2m-bit average processing command by said control unit for all the designated 2m-bit portions a.sub.pij in accordance with the n(2m)-bit average operation command for the pixel group .SIGMA.A.sub.ij which operates as the input statistic operation command to said control unit,
  • calculating average m.sub.AT from equation (20) using an average m.sub.pA as the average mA obtained for the designated 2m-bit portion a.sub.pij in accordance with the n(2m)-bit average operation command: ##EQU38##
  • 11. An image data processing apparatus for executing a statistic operation between image data A and B at high speed, comprising:
  • a first image memory for storing the image data A, wherein the image data A is constituted by pixel group SA.sub.ij consisting of N pixels A.sub.ij (N is a positive integer; i and j respectively indicate a row position and a column position), and density data A.sub.dij of each pixel A.sub.ij is expressed by n(2m)-bit data (n and m are positive integers);
  • a second image memory for storing the image data B, wherein the image data B is constituted by pixel group SB.sub.ij consisting of N pixels B.sub.ij (N is a positive integer; i and j respectively indicate a row position and a column position), and density data B.sub.dij of each pixel B.sub.ij is expressed by (2m)-bit data (n and m are positive integers);
  • histogram operation means for carrying out, in accordance with a SAB processing command, generated by a control unit, input thereto, a 3m-bit histogram operation for obtaining h.sub.U (2.sup.2m k+k.sub.B) or h.sub.L (2.sup.2m k+k.sub.B) representing a number of sets of pixels A.sub.ij and B.sub.ij, in which a value of upper or lower m-bit portion a.sub.Uij or a.sub.Lij of designated 2m-bit portion a.sub.ij is k (k=0 to 2.sup.m -1), and a value of a designated 2m-bit portion of pixel B.sub.ij at a same position as the pixel A.sub.ij is k.sub.B (k.sub.B =0 to 2.sup.2m -1), from upper or lower m-bit portion a.sub.Uij or a.sub.Lij of a designated 2m-bit portion a.sub.ij of each density data A.sub.dij read out from said first image memory and a designated 2m-bit portion b.sub.ij of each density data B.sub.dij read out from the second image memory; and
  • calculation means for calculating, in accordance with the .SIGMA.AB processing command, generated by said control unit, input thereto, upper correlation weight T.sub.U from equation (1) using the histogram h.sub.U (2.sup.2m k+k.sub.B), and lower correlation weight T.sub.L, from equation (2) using the histogram h.sub.L (2.sup.2m k+k.sub.B) and for calculating, in accordance with the .SIGMA.AB processing command, correlation weight T.sub.ab using equation (3) from the upper and lower correlation weight T.sub.U and T.sub.L : ##EQU39## said control unit provided for controlling said histogram operation means and said calculation means.
  • 12. The apparatus according to claim 11, wherein said calculation means comprises:
  • .SIGMA. operation means for calculating, in accordance with the .SIGMA.AB processing command generated by said control unit, the upper correlation weight T.sub.U using equation (1) from the histogram h.sub.U (2.sup.2m k+k.sub.B) and the lower correlation weight T.sub.L using equation (2) from the histogram h.sub.L (2.sup.2m k+k.sub.B); and
  • arithmetic operation means for calculating a correlation weight T.sub.ab from the upper and lower correlation weights T.sub.U and T.sub.L using equation (3) in accordance with the .SIGMA.AB processing command generated by said control unit,
  • said control means includes means for sequentially controlling said histogram operation means and .SIGMA. operation means to obtain the upper correlation weight T.sub.U and the lower correlation weight T.sub.L, and thereafter, said arithmetic operation means to obtain the correlation weight T.sub.ab.
  • 13. The apparatus according to claim 12, wherein
  • said histogram operation means comprises:
  • first histogram processing means for executing the 3m-bit histogram operation associated with the upper m-bit portion a.sub.Uij of the designated 2m-bit portion a.sub.ij and the designated 2m-bit portion b.sub.ij in accordance with the .SIGMA.AB processing command; and
  • second histogram processing means for executing the 3m-bit histogram operation associated with the lower m-bit portion a.sub.Lij of the designated 2m-bit portion aij and the designated 2m-bit portion b.sub.ij in accordance with the .SIGMA.AB processing command,
  • said .SIGMA. operation means comprises:
  • first .SIGMA. processing means for calculating, in accordance with the .SIGMA.AB processing command, the upper correlation weight T.sub.U using equation (1) from the 3m-bit histogram obtained from said first histogram processing means; and
  • second .SIGMA. processing means for calculating, in accordance with the .SIGMA.AB processing command, the lower correlation weight T.sub.L using equation (2) from the 3m-bit histogram obtained from said second histogram processing means, and
  • said control means includes unit for simultaneously controlling said first and second histogram processing means and said first and second .SIGMA. processing means to obtain the upper and lower correlation weight T.sub.U and T.sub.L, and for subsequently controlling said arithmetic operation means to obtain the correlation weight T.sub.ab.
  • 14. The apparatus according to claim 12, wherein n is 1, and an input statistic operation command to said control unit is a 2m-bit covariance operation command which is input to said control unit,
  • said control unit further comprises means for generating the .SIGMA.AB processing command and a 2m-bit weight processing command, in accordance with the 2m-bit covariance operation command input thereto,
  • said calculation means further comprises means for calculating upper A weight U.sub.UA and upper B weight U.sub.UB from equations (4) and (5) using the histogram h.sub.U (2.sup.2m k+k.sub.B) in accordance with the 2m-bit weight processing command when the upper correlation weight T.sub.U is calculated in accordance with the .SIGMA.AB processing command, for calculating lower A weight U.sub.LA and lower B weight U.sub.LB from equations (6) and (7) using the histogram h.sub.L (2.sup.2m k+k.sub.B) in accordance with the 2m-bit weight processing command when the lower correlation weight T.sub.L is calculated in accordance with the .SIGMA.AB processing command, and for calculating covariance .SIGMA.AB using equation (8) from the correlation weight T.sub.ab, the upper A weight U.sub.UA, the upper B weight U.sub.UB, the lower A weight U.sub.LA, and the lower B weight U.sub.LB in accordance with the 2m-bit covariance operation command: ##EQU40##
  • 15. The apparatus according to claim 14, wherein said control unit further comprises means for generating a 2m-bit average processing command in accordance with an average operation command for the pixel group .SIGMA.A.sub.ij which operates as the input statistic operation command input to said control unit,
  • said histogram operation means further comprises means for executing the 3m-bit histogram processing while setting the m-bit portion a.sub.Uij or a.sub.Lij as "0" and using pixel group .SIGMA.A.sub.ij designated by the average operation command as pixel group .SIGMA.B.sub.ij in accordance with the 2m-bit average processing command,
  • said calculation means further comprises means for calculating average .mu..sub.A from the calculated 3m-bit histogram h.sub.A (k.sub.A) (k.sub.A =0 to 2.sup.2m -1) using equation (9) in accordance with an input 2m weight processing command: ##EQU41##
  • 16. The apparatus according to claim 15, wherein
  • said control unit further comprises means for generating the .SIGMA.AB processing command and the 2m-bit weight processing command in which pixel group .SIGMA.A.sub.ij is used as pixel group .SIGMA.B.sub.ij, in accordance with a variance operation command for pixel group .SIGMA.A.sub.ij which operates as the input statistic operation command thereto, and for making the obtained covariance .sigma..sub.AB become variance .sigma..sub.A 2.
  • 17. The apparatus according to claim 11, wherein n is an interger of not less than 2, said control unit further comprises means for generating, in accordance with an input total .SIGMA.AB processing command input to said control unit, the .SIGMA.AB processing command for all the combinations of the designated 2m-bit portions a.sub.pij and b.sub.qij using the designated 2m-bit portion a.sub.pij as the 2m-bit portion a.sub.ij and designated 2m-bit portion b.sub.qij as the 2m-bit portion b.sub.ij in association with combinations of the designated 2m-bit portions a.sub.pij and b.sub.qij arbitrarily designated from n 2m-bit portions a.sub.pij (p=1 to n) associated with pixel group .SIGMA.A.sub.ij and n 2m-bit portions b.sub.qij (q=1 to n) associated with pixel group .SIGMA.B.sub.ij,
  • said arithmetic operation means further comprises means for calculating, in accordance with an input total addition processing command generated by said control unit to said arithmetic operation means, .SIGMA.A.sub.dij .multidot.B.sub.dij from equation (10) using correlation weight Tab obtained for each of the combinations of the designated 2m-bit portions a.sub.pij and b.sub.qij as pq correlation weight T.sub.pq : ##EQU42##
  • 18. The apparatus according to claim 17, wherein said control unit further comprises:
  • means for generating the total .SIGMA.AB processing command, a total 2m-bit weight processing command, and a total .sigma. arithmetic operation command in accordance with an input covariance operation command input to said control unit, and
  • means for generating a 2m-bit weight processing command for the combinations of the designated 2m-bit portions a.sub.pij and b.sub.qij when p=q, in accordance with a total 2m-bit weight processing command input to said control unit,
  • said arithmetic operation means further comprises means for determining upper A weight U.sub.UA, upper B weight U.sub.UB, lower A weight U.sub.LA, and lower B weight U.sub.LB obtained for each of the combinations of the designated 2m-bit portions a.sub.pij and b.sub.pij in accordance with the W2m-bit weight processing command when p=q, to be upper A weight U.sub.UAp, upper B weight U.sub.UBp, lower A weight U.sub.LAp, and lower B weight U.sub.LBp and for calculating, in accordance with the total .sigma. arithmetic operation command, covariance .sigma..sub.AB from equation (11): ##EQU43##
  • 19. The apparatus according to claim 18, wherein said control unit further comprises means for generating the covariance operation command in which pixel group .SIGMA.B.sub.dij is used as pixel group .SIGMA.A.sub.ij, in accordance with a variance operation command which operates as the input statistic operation command input to said control unit, and for making the obtained covariance .sigma..sub.AB become a variance .sigma.A.sup.2.
Priority Claims (1)
Number Date Country Kind
61-139815 Jun 1986 JPX
US Referenced Citations (2)
Number Name Date Kind
4227177 Moshier Oct 1980
4535473 Sakata Aug 1985
Non-Patent Literature Citations (1)
Entry
A. Kasano, "Image Processing Techniques Through the Application of High-Speed Image Processors", Image Information I, Aug. 1986, pp. 118-123.