WO2004068411A1 - 平均値フィルタ装置およびフィルタリング方法 - Google Patents

平均値フィルタ装置およびフィルタリング方法 Download PDF

Info

Publication number
WO2004068411A1
WO2004068411A1 PCT/JP2003/001009 JP0301009W WO2004068411A1 WO 2004068411 A1 WO2004068411 A1 WO 2004068411A1 JP 0301009 W JP0301009 W JP 0301009W WO 2004068411 A1 WO2004068411 A1 WO 2004068411A1
Authority
WO
WIPO (PCT)
Prior art keywords
pixel
pixel data
integrated
line
data
Prior art date
Application number
PCT/JP2003/001009
Other languages
English (en)
French (fr)
Inventor
Kohei Umeda
Atsushi Yamaji
Original Assignee
Fujitsu Limited
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fujitsu Limited filed Critical Fujitsu Limited
Priority to PCT/JP2003/001009 priority Critical patent/WO2004068411A1/ja
Priority to JP2004567552A priority patent/JPWO2004068411A1/ja
Publication of WO2004068411A1 publication Critical patent/WO2004068411A1/ja
Priority to US11/074,992 priority patent/US7149364B2/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/20Image enhancement or restoration using local operators

Definitions

  • the present invention relates to a data filtering technique.
  • the spatial frequency of the entire screen may be separated into low-frequency components and high-frequency components in order to greatly improve the visibility of the displayed image.
  • a technique is known in which a low-frequency component is suppressed and a high-frequency component is combined to compress a dynamic range while preserving contrast of details.
  • Moving averages are generally used to separate low-frequency components in such cases.
  • the moving average is, for example, a process of obtaining an average of a (2n + 1) X (2n + 1) matrix for all pixels NpXNp.
  • 2 n + 1 is an odd number equal to or less than Np.
  • FIG.1 shows an example of average value filter processing.
  • Fig. 2-5 shows how to construct a conventional average filter. These average filters are composed of software or hardware.
  • Fig. 2 shows an example of configuring an average filter by software.
  • the average filter includes a frame memory 302 for holding input image data, a DSP (Digital Signal Processor) 301 for executing software and processing the input image data, and an operation memory used for operation of the DSP.
  • DSP Digital Signal Processor
  • the input image data stored in the frame memory is used to calculate the 5 x 5 Image A and BY are read into DSP 301 one pixel at a time. Then, the average value of the matritas is calculated using the operation memory 303 according to the flow shown in FIG.
  • pixel data is read one by one and added to the sum (S) in order. This process is repeated for pixels A to Y and divided by 25. This process
  • the horizontal direction of the screen on the image data is called the pixel direction
  • the vertical direction is called the line direction.
  • the pixel direction is a direction in which the pixel moves with a clock in a pixel unit.
  • a line direction is a line perpendicular to the pixel direction (for example,
  • the input image data is delayed by one line (for example, 640 pixels) in the line memory, and the lines of the pixel data P to T are aligned with the position of the fifth line. Then, in the same manner as above, the phase of the pixel data ⁇ to ⁇ is adjusted to the position of the data ⁇ by using FF to calculate the total value of the data ⁇ to ⁇ .
  • one line for example, 640 pixels
  • the input image data is sequentially delayed one line at a time using the line memory, and each line is delayed up to the fifth line. Then, each pixel data is added to the position of pixel ⁇ by FF. By such processing, the total value for each line is obtained. Then, the total value of each line is further added in order to obtain a total value of 25 pixels. Furthermore, an average filter is constructed by dividing the total value by 25.
  • Fig. 4 shows the configuration of a filter with a filter size of 5 x 5 average value using such a circuit.
  • the average value filter circuit includes a line memory 31 1 to 314 for generating a delay in the line direction, a pixel direction calculator 320 to 324 for performing addition for 5 pixels for each line, and an addition data for each line. , And adders 365 for performing division by 25 (multiplication by 125).
  • the inside of the pixel direction calculation unit 320 is composed of FFs 331 to 334 and adders 341 to 344.
  • the FFs 331 to 334 sequentially delay input pixel data, for example, U, V, W, and X by one clock. In this way, for example, for the fifth line (line L5 including U, V, W, X, Y) shown in FIG. 5, the phase of the five pixel data U, V, W, X, Y Can be aligned, and it becomes possible to add. In the configuration of FIG. 4, these pixel data are added by adders 341 to 344.
  • the line memories 311 to 314 sequentially receive data of one pixel in one clock, and store data of one line.
  • one line is For example, assume that there are 640 pixels. Then, data of one line (called line L1) is stored in the line memory 311 in the first 640 clocks. At this time, the pixel data of line L1 is added by 5 pixels by the pixel direction calculation unit 320, but this addition is discarded because the phases are not matched.
  • the pixel data of the next line (referred to as line L2) is stored in the line memory 311.
  • the data of the line L2 is added by the pixel direction calculation unit 320 for every five pixels, but the addition is discarded because the phases are not matched.
  • the data of the line L1 is stored in the line memory 312.
  • the data of the line L1 is added by the pixel direction calculation unit 321 every five pixels, but this addition is also discarded because the phases are not matched.
  • the pixel data of the first line L1 is stored in the line memory 314, the pixel data of the next line L2 is stored in the line memory 313, and the pixel data of the next line L2 is stored in the line memory 312. Then, the pixel data of the next line L3 is stored, and the line memory 311 is further stored with the pixel data of the next line L4.
  • the pixel data of the next line L5 is input to the pixel direction calculation unit 320 as an input image from the next clock.
  • the pixel data of the lines L4 to L1 are input to the pixel direction calculation units 321 to 324, respectively.
  • the five lines are added at the same phase by the pixel direction calculation units 320 to 324 in the pixel direction by five pixels.
  • the outputs of the pixel direction calculation units 320 to 324 are integrated by adders 361 to 364 for 5 lines in the line direction. Is performed.
  • 5 ⁇ 5 pixel data is integrated in the pixel direction and the line direction, and input to the multiplier 365.
  • Multiplier 365 outputs the average value of 25 pixels by dividing the integration result by 25.
  • Fig. 5 shows a generalized configuration of the NXN average filter.
  • the hardware to implement the NXN average filter is A line memory [N-1] system that delays image data by one line, FF [(N-1) XN], adders [(NXN) -1], and one multiplier.
  • Fig. 6 shows an average value filter circuit with a variable filter size (3 X 3 to NXN). If the filter size is 3 X 3 to NXN, as in Fig. 6, always prepare the maximum filter size NXN configuration for the circuit configuration (FF, line memory, adder).
  • an FF output having a configuration corresponding to the specified filter size is selected, and an average value filter of any size can be configured by obtaining an added value.
  • the filter circuit of FIG. 6 has selectors 370, 371 and the like.
  • the selector 371 is a circuit that selects an arbitrary number (3 to N) of added values in the pixel direction calculation unit 320.
  • the number of added values to be selected is specified by the switching signal 381.
  • the other pixel direction calculation units 321, 322,... Have the same configuration.
  • the selector 370 selects an addition result for an arbitrary number of lines from among 361, 362,... For the line-direction adder to which the outputs of the pixel direction calculation unit 320 and the like are further added. Circuit. The selection of the number of additions in the line direction is specified by the switching signal 380. Disclosure of the invention
  • variable size of the filter is 3 X 3 to N XN filters
  • the hardware scale must be NX N size. Then, since the sum of the filter sizes corresponding to the specified filter size is calculated, the more redundant the filter size, the more unnecessary redundant circuits such as FFs, line memories, adders, etc. Will occur.
  • FI G.5 in the case of a 3 X 3 filter, there are 6 FFs and 8 adders, whereas in the 21 X 21 filter, FF 420 and an adder 440 You need pieces. Therefore, when the 3 ⁇ 3 filter is selected, 414 F Fs and 432 adders become unnecessary.
  • an object of the present invention is to provide an average filter capable of processing image data in real time without increasing the scale of hardware.
  • the real time means that the processing is completed within a time at which no frame delay occurs at the maximum.
  • the present invention employs the following means in order to solve the above problems. That is, the present invention is an average value filter device that integrates a predetermined number of pixel data located in the vicinity of each pixel in the first dimension with respect to a pixel data array forming a two-dimensional image. First integrating means for generating first integrated pixel data for each pixel,
  • a second accumulation means for accumulating the first accumulation pixel data corresponding to a predetermined number of pixels located in the vicinity of each pixel in the second dimension and generating second accumulation pixel data for each pixel;
  • This average value filter device is used for a pixel data array constituting a two-dimensional image.
  • a predetermined number of pixel data located in the vicinity of each pixel in the first dimension is integrated to generate first integrated pixel data of each pixel.
  • the first integrated pixel data corresponding to a predetermined number of pixels located in the vicinity of each pixel in the second dimension is integrated to generate second integrated pixel data of each pixel.
  • the average filter integrates a predetermined number of pixel data in the vicinity of each pixel of the two-dimensional image, and can realize an average filter.
  • the first integrating means includes a first sequential integrating means for sequentially integrating pixel data in a first dimension direction;
  • a first subtraction means for subtracting pixel data of pixels that are separated by a predetermined number or more in the first dimension from the integration target pixels to be sequentially integrated from the sequential integration result may be provided. That is, the average filter sequentially integrates pixel data in the first dimension, and subtracts pixel data of pixels separated by a predetermined number or more from the integration result to obtain a predetermined value near each pixel in the first dimension. The integration of the number of pixel data is realized.
  • the first sequential integration means includes: first addition means for adding input pixel data and pixel data which has been integrated before inputting the input pixel data; and addition means for holding the integrated pixel data. Holding means,
  • the first subtraction means input holding means for sequentially holding the input pixel data by a predetermined number, and input pixel data separated by a predetermined number from currently input pixel data from the output of the first addition means, A first subtraction unit that outputs the predetermined pixel integrated value to the addition and holding unit,
  • the addition holding means may return the predetermined pixel integrated value to the first addition means for the next addition.
  • the average filter realizes sequential addition in the first dimension by feeding back the addition result held by the addition holding means to the first addition means.
  • the average filter sequentially holds a predetermined number of input pixel data and subtracts a predetermined number of input pixel data separated from the result of the sequential addition.
  • the input holding means includes a shift register that shifts and stores data corresponding to each pixel, and a selector that selectively outputs one of pixel data stored at each shift position of the shift register. May be provided.
  • any of the pixel data stored in each shift position of the shift register By selectively outputting, the position of the data to be subtracted can be changed, and the range of pixels to be added can be changed.
  • the second integrating means includes a second sequential integrating means for sequentially integrating pixel data in a second dimension direction,
  • a second subtraction means for subtracting pixel data of pixels that are separated by a predetermined number or more in the second dimension from the integration target pixel to be sequentially integrated from the result of the sequential integration may be used.
  • this average filter sequentially integrates pixel data in the second dimension and subtracts pixel data of pixels separated by a predetermined number or more from the integration result to obtain a predetermined value near each pixel in the second dimension. The integration of the number of pixel data is realized.
  • the second sequential integrating means adds the first integrated pixel data input from the first integrating means to the pixel data already integrated in the second dimension before inputting the first integrated pixel data.
  • the second subtracting means includes a first-dimensional integrated data holding means for sequentially holding the first integrated pixel data input from the first integrating means for a predetermined number of lines, and a predetermined number of lines from the currently input first integrated pixel data. Second subtraction means for subtracting the first integrated pixel data of the distant line from the output of the second addition means and outputting it as a predetermined line integrated value to the line addition holding means,
  • the line addition holding means may return the predetermined line integrated value to the second addition means for the next addition.
  • this average filter realizes sequential addition in the second dimension by feedback-outputting the addition result held by the line addition holding means to the second addition means.
  • the average value filter sequentially holds the first integrated pixel data by a predetermined number of lines, and subtracts the first integrated pixel data separated by a predetermined number of lines from the result of the sequential addition.
  • the first-dimensional integrated data holding means includes a line memory corresponding to pixels in a first-dimensional direction of a two-dimensional image and holding such line data by shifting over a plurality of lines; And a line selector for selectively outputting any of the above.
  • the present invention may be an imaging device including the above average value filter device.
  • the present invention may be a filtering method for executing the above average value filtering.
  • F I G. 1 is a diagram showing the concept of an average filter
  • FIG.2 is a block diagram of a software filter on the DSP
  • FIG. 3 is a diagram showing a processing procedure of a DSP that provides an average value filter function.
  • FIG.4 is an example of the configuration of a 5 ⁇ 5 average filter using conventional hardware.
  • FIG.5 is an example of the configuration of a conventional hardware NXN average filter.
  • FIG.6 is a configuration example of a variable average filter (3 X 3 to NX N) using conventional hardware.
  • FIG. 7 is a configuration example of a 5 ⁇ 5 average filter according to the first embodiment of the present invention.
  • FIG. 8 is a configuration example of the NXN average filter according to the first embodiment of the present invention.
  • FIG. 9 is a configuration example of a variable average filter (3X3 to NXN) according to the first embodiment of the present invention.
  • FIG. 10 is an explanatory diagram of input image data in the embodiment of the present invention
  • FIG. 11 is an explanatory diagram of pixel direction calculation in the embodiment of the present invention
  • FIG. FIG. 13 is an explanatory diagram of a line direction calculation in an example of the present invention
  • FIG. 13 is a system diagram of an imaging device in a second embodiment of the present invention.
  • an average value filter operation circuit capable of realizing real-time operation and downsizing of hardware for real-time high-speed moving image processing based on such features will be described.
  • FIGS. 7 and 8 show configuration examples of the average filter according to the first embodiment of the present invention.
  • This average filter is composed of a pixel direction operation circuit 1 (corresponding to the first integration means), a line direction operation circuit 2 (corresponding to the second integration means), and a multiplier 45 (divide by) for performing multiplication of 1Z25 times. ).
  • the average value filter circuit of FIG. 7 will be described.
  • the pixel direction calculation circuit 1 adds the input image data and the pixel data stored in the FF 36 to a shift register 30 (corresponding to an input holding unit) that shifts and stores the input image data by one pixel every clock.
  • a shift register 30 (corresponding to an input holding unit) that shifts and stores the input image data by one pixel every clock.
  • an adder 41 (corresponding to the first adding means) which functions as a loop adder, a subtractor 42 (corresponding to the first subtractor) and a subtractor 42 for subtracting the output of the FF 35 from the addition result of the loop adder FF 36 (corresponding to the addition holding means) which outputs the output of the clock with one clock delay.
  • the shift register 30 is configured by sequentially connecting FFs (flip-flops) 31 to 35.
  • the same processing is repeated, and the pixel data C, D, and E are input to the adder 41, and then accumulated in the integration result (A + B + C + D + E) FF36.
  • the integration result of FF36 is output to the line direction operation circuit 2 as an output value of the pixel direction operation circuit 1.
  • the integration result of the FF 36 is output to the line direction calculation circuit 2 as an output value of the pixel direction calculation circuit 1.
  • integration is performed in the pixel direction with a width of 5 pixels by the subtraction operation of FF31-35 and the subtractor 42, and C + D + E + X + Y, D + E + X + Are output to the line direction operation circuit 2 as the output values of the pixel direction operation circuit 1, such as Y + Z,... (Where Y and ⁇ are the pixel data input after the pixel data X is there) .
  • the line direction operation circuit 2 shifts the image data one line at a time by one clock, and stores the five lines.
  • the line memory 11 (corresponding to the first-dimensional integrated data holding means) and the line memory 11 are shifted.
  • a subtracter 44 (corresponding to the second subtractor) for subtracting the output of the line memory 11 from the addition result of the loop adder, and a one-line delay of the output of the subtractor 44. It has a line memory 13 (corresponding to a line addition holding means) for outputting the data.
  • line L1 a line leading to the pixel data A-E shown in FIG. 1 (this line is now called line L1).
  • Each pixel data of the line L1 is sequentially accumulated in the line memory 13 via the adder 43 and the subtractor 44. These pixel data are sequentially stored in the line memory 11 for 3 ⁇ .
  • the pixel data corresponding to the next line is sequentially input to the line direction operation circuit 2.
  • the next line is, for example, a line starting with pixel data F-J in FIG. Yes, this is called line L2.
  • each pixel data of the line L2 is input to the adder 43.
  • the data of the line L 1 delayed by one line is also input to the adder 43 as the output of the line memory 13.
  • each pixel data of the line L1 is added to the pixel data of the same column (located in the same pixel direction) of the line L2.
  • the addition result is sequentially stored in the line memory 13.
  • the line memory 13 stores data (pixel direction operation circuit) corresponding to pixels A and F, B and G, C and H, D and I, and E and J, respectively.
  • the result of further adding (5 pixels added data in 1) is stored sequentially.
  • the adder 43 and the line memory 13 function as an integrator.
  • the data corresponding to the pixel of line L1 is shifted by one line in the line memory 11, and new data corresponding to the pixel of line L2 is sequentially input. Therefore, when the addition of the line L1 and the line L2 is completed, the data corresponding to the pixels of the lines L1 and L2 is stored in the line memory 11.
  • the line L 3 (the line including the pixels K, L, M, M, and ⁇ of FIG. 1)
  • the line L4 (the pixels P, Q, R, S, and
  • the line L5 (the line including the pixels U, V, W, X, and Y)
  • the integration result (one line of data based on the result of L 1 + L 2 + L 3 + L 4 + L 5) is stored in the line memory 13.
  • the integration result of the line memory 13 is output to the multiplier 45 as an output value of the line direction operation circuit 2.
  • the adder 43 reads the integration result (L 1 + L 2 + L 3 + L 4 + L 5) on the line memory 13 and the next line (line L 5
  • the subtractor 42 sequentially outputs the integration results of the five lines of pixel data (L2 + L3 + L4 + L5 + L6) for one pixel for 640 pixels.
  • the line memory 13 accumulates the integration result of the pixel data (L2 + L3 + L4 + L5 + L6) of five lines.
  • Each data stored in the line memory 13 is sequentially output to the multiplier 45 as an output value of the line direction operation circuit 2.
  • the accumulation is performed in the line direction with a width of 5 lines by the subtraction action of the line memory 11 and the subtractor 44, and L3 + L4 + L5 + L6 + L7, L4 + L5 + L6 + L7 + L8,... Are output to the multiplier 45 as the output value of the line direction operation circuit 2.
  • the result obtained by multiplying the area of 5 ⁇ 5 pixels around each pixel with respect to the pixel data of 640 pixels ⁇ 480 lines is sequentially input to the multiplier 45. Since the multiplier 45 multiplies each of these data by 1/25, the multiplier 45 outputs a result obtained by averaging 5 ⁇ 5 pixels.
  • FI G. 8 is an N XN mean filter.
  • FI G. 7 was a 5 ⁇ 5 mean filter.
  • the average filter shown in Fig. 8 generalizes the filtering range to NXN.
  • N flip-flops constituting the shift register 30A are used, such as FF31, FF32,... FF30-N.
  • the line memory 11 A can store N lines of memory. Have. However, its operation is the same as in the case of FIG. 7 and its description is omitted.
  • the line direction arithmetic circuit 2 or 2A sequentially performs a loop addition in the line direction on the pixel direction addition value. Then, the oldest data among the pixel direction addition values delayed by the line memory 11 or 11A is subtracted from the line direction loop addition value to obtain the N line addition value in the line direction. Therefore, the operation delay for the input image data occurs only in the number of lines depending on the filter size generated by the loop addition. That is, by this calculation, for example, even when processing one frame of an image of 640 pixels ⁇ 480 lines, the calculation delay can be reduced to within one frame.
  • the input image data is sequentially delayed by the shift register 30 or 30 A while adding loops in the pixel direction.
  • the sum of N pixels in the pixel direction is obtained by subtracting the input image data from the loop addition value in the pixel direction.
  • the oldest data in the pixel direction addition value delayed by the line memory 11 or 11A is sequentially added to the pixel direction addition value in the line direction while loop-adding. Is subtracted from the loop addition value in the line direction. In this way, the sum of N lines in the line direction is obtained.
  • the hardware scale can be significantly reduced. Even if an average filter with a large filter size is configured, only a small addition of FF and line memory is required, and the number of adders does not depend on the size of the filter.
  • FIG. 9 is a variable average filter (3X3 to NXN) according to the first embodiment of the present invention.
  • This variable average filter has a selector 15 and a selector 16 as compared with the average filter of FIG.
  • the line memory adjustment circuit 12 A reads data from the designated line position according to the filter size 3 ⁇ 3 to NXN, and outputs the data to the subtraction circuit 44. Components other than those described above in FI G. 9 are the same as those in FI G. 8.
  • the selector 15 receives a switching signal of 3X3 to NXN and selects a position (output of a flip-flop) on the shift register 3OA corresponding to the input. For example,
  • the selector 15 selects the output of the FF 33. In this way, a combination of FFs 31 to FF-N and selector 15 forms a shift register of any size in the range of 3 to N.
  • variable-size integration is performed in the pixel direction in the range of 3 to N. Construct an integrator.
  • the line memory 11A has a capacity of N lines (the maximum number of lines). Then, the line memory timing adjustment unit 12 A receives the switching signal of 3 ⁇ 3 to NXN, and starts the pixel data (the addition result of the pixel direction addition circuit 1 B) from the position of the line memory 11 A corresponding to the input. Is read.
  • variable size in the line direction is 3 to N. Construct an integrator that performs integration. The result of this integration is the same as in the case of FIG.7 or FIG.8.
  • the selector 16 is connected to the multiplier 45.
  • the selector 16 receives the switching signal of 3 ⁇ 3 to NXN and sets the multiplier 1 / (3 ⁇ 3) to 1 / (NXN) corresponding to the input to the multiplier 45. Therefore, the multiplier 45 executes the multiplication by freely switching the multiplication value in the range of 1 / (3 ⁇ 3) to 1 / (NXN). In this way, the subtraction value (the oldest data in the addition value) subtracted from the loop addition value of each of the pixel direction calculation circuit unit 1B and the line direction calculation circuit 2B is stored in the shift register 30A (FF 33 to FF). 3 O—N range) and store in line memory 11 A.
  • a selector 15 for adjusting the delay amount of the subtraction value and a line memory adjustment unit 12A are provided. Then, by selecting the FF 33 to FF 30-N and the output of the line memory 11A according to the designated filter size, a variable average value filter can be configured with a filter size of 3 ⁇ 3 to NXN.
  • FIG. 10 is an explanatory diagram of input image data in the embodiment of the present invention.
  • 640 ⁇ 480 image data having 640 pixels in the pixel direction and 480 lines in the line direction is processed.
  • the image data is 16 bits / pixel.
  • the pixel direction operation circuit 1 is composed of an adder 41, a subtractor 42, a shift register 30 (5 pixel delay: for subtraction of surplus data), FF 36 (1 pixel delay: phase of addition data). (For matching). Now, 640 ⁇ 480 pixels such as FIG. 10 are input to the pixel direction arithmetic circuit 1 as image data.
  • FIG. 11 shows the result of the pixel direction calculation.
  • FIG. 11 shows the signal waveforms of pixel clock 101, reset signal 102, input image data 103, loop adder output 104, shift register output 105, and pixel direction addition data 106. .
  • the pixel clock 101 is a clock when a display device (not shown) displays one pixel of image data.
  • the average value filter circuit shown in FIGS. 7 to 9 when inputting data for one pixel, when delaying data for one pixel by flip-flop, Alternatively, it is used for data processing of one pixel, such as when outputting the result of the average value filter for one pixel.
  • the reset signal 102 is a signal for initializing the average value filter circuit shown in FIGS. After the reset by this reset signal, the 640 ⁇ 480 image data shown in FIG. 10 is processed.
  • the input image data 103 is obtained by sequentially inputting 640 ⁇ 480 pixels shown in FIG. Numbers such as 1, 2, and 3 are given to exemplify the correspondence with each pixel.
  • the loop addition output 104 is the output of the adder 41 shown in FIG.
  • the addition result of pixel 1 and pixel 2 is indicated by output value 3.
  • the addition result of pixel 1, pixel 2, and pixel 3 is indicated by output value 6. The same applies to other outputs.
  • the shift register output 105 is the shift register 30 shown in FIG. Is the output of As shown in FIG. 11, the shift register output 105 has a value delayed by five pixel clocks from the input image data 103.
  • the pixel direction addition data 106 is an output of the FF 36 shown in FIG. In order to clarify the correspondence between the loop addition output 104 and the shift register output 105, this data is shown at the position where the value obtained by subtracting each value of the shift register output 105 from each value of the loop addition output 104 is delayed by one clock. ing.
  • the loop adder output 104 shown in FIG. 11 is the result of loop addition of the input image data one pixel at a time from the beginning of the data. That is, in order to sequentially add the second pixel, the third pixel, the fourth pixel, and the fifth pixel, the output of the FF 36 whose phase with the next pixel is adjusted is fed back to the adder 41.
  • the average filter is 5x5
  • the output (addition value for 5 pixels) of the FF 36 is fed back to the adder 41, and is added to the newly input image data to obtain an addition value for 6 pixels. Furthermore, since this value and the data five pixels before delayed by the output of the shift register 30 are subtracted, an added value for five pixels can always be obtained in the pixel direction.
  • the line direction operation circuit 2 is composed of an adder 43, a subtractor 44, a line memory 11 (5 line delay: for subtraction of surplus data), a line memory 13 (1 line delay: added data
  • the added value (640 X 480 pixels, 19 Bit / pixel) for the five pixels obtained above is input as image data in order.
  • Fig. 12 shows the result of the pixel direction calculation.
  • FI G. 1 2 has frame index 1 1 1, frame start pulse 1 1 2, pixel direction data 1 1 3, line memory 1 1 output 1 14, line direction total value 1 1 5, subtracter output 1 16
  • the signal waveforms of a line memory 13 output 1 17 and a 5 ⁇ 5 average filter 118 are shown.
  • the frame index 1 1 1 is a signal that switches from L output to H output once in one frame to synchronize the frames.
  • the frame start pulse 1 1 2 is a pulse indicating the start of the frame.
  • the pixel direction addition data 113 is the same signal as the pixel direction addition data 106 shown in FIG. However, in FIG. 12, for example, each of the signal portions P1 and P2 corresponds to one line of data corresponding to 640 clocks.
  • the line memory 11 output 114 is an output signal of the line memory 11 shown in FIG. 7 and is one input signal to the subtractor 44.
  • the line direction total value 1 15 is the output signal of the adder 43 shown in FIG. 7 and the other input signal to the subtractor 44.
  • the subtractor output 1 16 is a signal obtained by subtracting the line memory 11 output 1 14 from the line direction total value 1 15.
  • the line memory 13 output 1 17 is an output signal of the line memory 13 shown in FIG. 7 and is a signal input to the adder 43 with a delay of one line.
  • the 5 ⁇ 5 average filter 1 18 is the filtered image data output from the multiplier 45 shown in FIG.
  • the pixel direction addition data is loop-added from the beginning of the data in order of one pixel at a time in the line direction. That is, in order to sequentially add the pixels of the second, third, fourth, and fifth lines, the phase of the next line is adjusted by the line memory 13. Then, it delays one line and feeds it back to the adder. If the average value filter to be calculated is 5 x 5, calculate the added value for 6 lines in the line direction, construct the added value for 6 lines, and remove the data of the oldest line in the grid. There is a need.
  • pixel direction addition data in which the input image data is delayed by five lines by the line memory 11 in advance, such as the line memory 11 output 114 of FIG. 12 is prepared. Then, by subtracting the line memory 11 output 114 from the line direction total value 115, an added value for 25 pixels can be obtained, and that value is output to the multiplier 45.
  • the output (addition value for 25 pixels) of the line memory 13 is fed to the adder 43.
  • the data is read back and added to the newly input line (pixel direction addition data) to obtain an addition value for 6 lines. Then, since the added value of the six lines and the data delayed by five lines delayed by the output of the line memory 11 are subtracted, the added value of the 25 pixels can always be obtained in real time in order.
  • a 5 ⁇ 5 average filter can be configured with two lines of operation delay.
  • the filtering process on the line L3 including the pixel data K, L, M, 0, and P is completed.
  • the average filter can be executed with an operation delay of N / 2 integer partial lines.
  • the filter circuit according to the present embodiment has the following effects 1 to 3.
  • this filter circuit can configure an average filter by real-time processing (processing without frame delay). For example, for input image data, NZ 2 integer subline delay
  • FIG. 13 is a system diagram of the imaging device 50 according to the second embodiment of the present invention.
  • This imaging device includes a camera section 51, a mechanical control section 52 for controlling the camera section 51, an AZD converter 53 for converting video signals from the camera section 51 to digital data, and an A / D converter 5 3, an image processing unit 54 that performs image processing such as filtering on the output from the display control unit 55 that controls the display device 57 based on the output of the image processing unit 54. It has a D / A converter 55 that converts the output signal into analog data and supplies it to the display device 5T.
  • the camera unit 51 delivers a video signal of a video of a subject to the AZD converter 53 under the control of the mechanical control unit 52.
  • the 0 converter 53 generates pixel data from the video signal for each frame and inputs the pixel data to the image processing unit 54 at the pixel clock shown in FIG.
  • the image processing unit 54 has, for example, the average value filter circuit shown in FIGS. 7 to 9 and, like the processing for the input image data shown in FIG. 11, the A / D converter 5. Perform image processing on the image data from 3. In this case, as described in the first embodiment, the average value filter processing can be executed without a frame delay.
  • the image data to which the average filter has been applied in this way is output to the display device 57 in real time.
  • the present invention can be applied to the manufacturing industry of semiconductor devices that provide signal processing functions, the manufacturing industry of information equipment to which signal processing is applied, imaging equipment, image recording equipment, broadcasting equipment, and the service industry using these devices. .

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Image Processing (AREA)
  • Transforming Light Signals Into Electric Signals (AREA)
  • Facsimile Image Signal Circuits (AREA)

Abstract

平均値フィルタ装置であって、2次元画像を構成する画素データ配列に対して、第1次元方向に各画素の近傍に位置する所定数の画素データを積算して上記各画素の第1積算画素データを生成する第1積算手段1と、第2次元方向に各画素の近傍に位置する所定数の画素に対応する、上記第1積算画素データを積算して上記各画素の第2積算画素データを生成する第2積算手段2と、上記第1次元方向および第2次元方向に積算された画素数で上記第2積算画素データを除算する手段45とを備える。

Description

明 細 書 平均値フィルタ装置およびフィルタリング方法 技術分野
本発明は、 データのフィルタ技術に関する。 背景技術
画像処理等において、 表示画像の視認性を大幅に向上するために、 全画面の空 間周波数を、 低周波成分と、 高周波成分に分離する場合がある。 そして、 例えば、 低周波成分を抑圧して、 高周波成分と合成することで、 細部のコントラストを保 存した上でダイナミックレンジを圧縮する、 等の技術が知られている。
そのような場合の低周波成分の分離には、 移動平均が一般的である。 移動平均 は、 例えば、 (2 n+ 1) X (2 n+ 1) マトリクスの平均を全画素 N p X N p について求め 処理である。 ここで、 2 n+ lは、 Np以下の奇数である。
F I G. 1に平均値フィルタの処理例を示す。 F I G. 1に示すように、 平均 値フィルタは、 注目している画素 Mおよびその画素 M近傍の画素濃度値の平均値 を、 注目している画素 Mの新しい濃度値とする。 例えば、 n = 2を選択した場合、 画素 Mの左右おょぴ上下方向の 25個の画素データ (A、 B、 . . . 、 Y) を加 算し、 25で除算することでフィルタ処理された画素 Μを求める。
F I G. 2— 5に、 従来の平均値フィルタを構成する方法を示す。 これらの平 均値フィルタは、 ソフトウエアまたは、 ハードウェアにより構成される。
(1) ソフトウエアによる構成
F I G. 2に、 ソフトウェアにて平均値フィルタを構成する例を示す。 この平 均値フィルタは、 入力画像データを保持するフレームメモリ 302、 ソフトゥェ ァを実行し、 入力画像データを処理する D S P (Digital Signal Processor) 3 01、 および D S Pの演算用として使用される演算用メモリ 303を有している。
D S P 301上のソフトウヱァによって平均値フィルタを構成する場合、 フレ ームメモリに格納された入力画像データデータから、 F I G. 1に示した 5 X 5 の画像 A、 B Yを 1画素ずつ順に D S P 3 0 1に読込む。 そして、 演 算メモリ 3 0 3を用いて F I G . 3のようなフローによって、 マトリタスの平均 値を算出する。
F I G . 3では、 1画奉ずつ画素データを読み込み、 総和 (S ) に順に加算す る。 この処理を画素 A〜Yに対して繰り返し、 2 5で割算している。 この処理は、
5 X 5のマトリクスの処理に、 総和 (S ) の初期化 (1ステップ) 、 画素 A〜Y の加算 (2 5ステップ) 、 総和 (S ) の 2 5での除算 (1ステップ) および演算 メモリからの出力 ( 1ステップ) の合計 2 8ステップを要する。
今、 不図示の表示装置の画素当たりのクロックを 2 5 MH zとすると、 各画素 に対してリアルタイムで処理するためには、 上記各ステップを 1クロックで処理 したとしても、 2 5 MH z X 2 8 = 7 0 O MH z以上で処理する必要がある。 ( 2 ) ハードウエアによる構成
( 2 - 1 ) フィルタサイズ固定の場合
ハードウェアにて平均値フィルタを構成する場合、 入力画像データ (例えば、 6 4 0 X 4 8 0画素) の各画素に対して、 各画素の近傍の 5 X 5マトリクスを構成 する必要がある。 この 5 X 5マトリクスの合計値を各画素ごとに算出するために、 加算するタイミング (位相) を合わせる必要がる。
例えば、 F I G . 1に示すように、 画素 Mの近傍の 5 X 5のマトリクスを加算 する場合、 予め、 画素データ A、 B、 . . . 、 Xの位相 (加算のタイミング) を 画素データ γの位置に合わせる必要がある。
今、 F I G . 1 のように、 画像データ上で画面の横方向を画素方向と呼ぴ、 縦 方向をライン方向と呼ぶことにする。 画素方向とは、 画素単位のクロックで移動 する方向である。 また、 ライン方向とは、 画素方向に垂直に、 ライン (例えば、
6 4 0個の画素からなる 1行) を移動する方向である。 なお、 ラインを行とも呼 まず、 5ライン目 (画素データ U 〜Y) について考える。 5ライン目の各画素 データは、 画素データ Υと同一ラインにある。 このため、 5ライン目の各画素デ ータを画素データ Υに対してライン遅延をさせる必要がない。 このため、 データ Uを 4クロック、 画素データ Vを 3クロック、 画素データ Wを 2クロック、 画素 データ Xを 1クロック遅延させる。 この画素データの遅延のためには、 例えば、 FF (フリップフロップ) を用いればよい。 これにより、 各画素データの位相が 画素データ γの位置に合わせられる。 こうして位相が合った画素データを加算し て 5ライン目の合計値を求める。
次に、 ラインメモリで入力画像データを 1ライン分 (例えば、 640画素分) 遅延させ、 画素データ P〜Tのラインを 5ライン目の位置に合わせる。 そして、 上記と同様様に F Fを用いて、 画素データ Ρ〜 Τの位相をデータ Υの位置に合わ せて、 データ Ρ〜Τの合計値を算出する。
このように、 順に入力画像データをラインメモリを用いて 1ラインずつ遅延さ せ、 各ラインを 5ライン目まで遅延させる。 そして、 各画素データを FFにより 画素 Υの位置に合わせて加算する。 このような処理により、 各ラインごとの合計 値を求める。 そして、 さらに各ラインごとの合計値を順に加算し、 25画素の合 計値を求める。 さらに、 その合計値を 25で割算することにより、 平均値フィル タを構成する。
F I G. 4に、 このような回路によるフィルタサイズ 5 X 5平均値フィルタの 構成を示す。 この平均値フィルタ回路は、 ライン方向の遅延を発生させるライン メモリ 31 1〜 3 14と、 各ラインごとに 5画素分の加算を実行する画素方向演 算部 320〜 324と、 各ラインの加算データを順次加算する加算器 36 1〜3 6 5と、 25による除算 (1 25による乗算) を実行する乗算器 365とを有 する。
画素方向演算部 320の内部は、 FF 331〜334および加算器 341〜3 44で構成される。 FF 33 1〜334は、 入力される画素データ、 例えば、 U, V, W, Xを順次、 1クロック遅延させる。 このようにして、 例えば、 F I G. に示した 5番目のライン (U, V, W, X、 Yを含むライン L 5) について、 5 つの画素データ U, V, W, X、 Yの位相を揃えることができ、 加算可能な状態 となる。 F I G. 4の構成では、 これらの画素データは、 加算器 341から 34 4により加算される。
ラインメモリ 31 1〜 3 14には、 1クロックで 1画素のデータが順次入力さ れ、 1ライン分のデータが格納される。 ここで、 理解の容易のため、 1ラインが、 例えば、 640画素であると仮定する。 すると、 最初の 640クロックでライン メモリ 31 1に 1ライン分 (ライン L 1と呼ぶ) のデータが格納される。 このと き、 ライン L 1の画素データは、 画素方向演算部 320により、 5画素ずつ加算 されるが、 この加算は、 位相が合っていないため、 廃棄される。
また、 次の 640クロックで、 次のライン (ライン L 2と呼ぶ) の画素データ がラインメモリ 31 1に格納される。 このとき、 ライン L 2のデータは、 画素方 向演算部 320により、 5画素ずつ加算されるが、 この加算は、 位相が合ってい ないため、 廃棄される。 また、 ライン L 1のデータは、 ラインメモリ 3 1 2に格 納される。 このとき、 ライン L 1のデータは、 画素方向演算部 321により、 5 画素ずつ加算されるが、 この加算も、 位相が合っていないため、 廃棄される。 このような処理を繰り返すことで、 ラインメモリ 3 14に最初のライン L 1の 画素データが格納され、 ラインメモリ 31 3に次のライン L 2の画素データが格 納され、 ラインメモリ 3 1 2に、 さらに次のライン L 3の画素データが格納され、 ラインメモリ 3 1 1に、 さらに次のライン L 4の画素データが格納された状態に なる。
この状態では、 次のクロックから、 入力画像として次のライン L 5の画素デー タが画素方向演算部 320に入力される。 また、 ライン L 4〜; L 1の画素データ は、 各々画素方向演算部 321〜324に入力される。
これにより、 5ラインが同じ位相で画素方向演算部 320〜 324により、 画 素方向に 5画素ずつ加算されることになる。 さらに、 画素方向演算部 320〜3 24の出力 (各画素が画素方向に 5画素ずつ積算したデータで置き換えられた画 素データ) は、 加算器 36 1〜 364により、 ライン方向に 5ライン分積算され る。 これにより画素方向おょぴライン方向に 5 X 5の画素データが積算され、 乗 算器 365に入力される。 乗算器 36 5は、 その積算結果を 25で除算すること により、 25画素の平均値を出力する。
この F I G. 4より、 5 X 5の平均値フィルタに対して、 フリップフロップ 2 0個、 加算器 24個および乗算器 1個が必要である。
F I G. 5に、 NXNの平均値フィルタに一般化された構成を示す。 F I G. 5に示しように、 NXNの平均値フィルタを実現するためのハードウェアは、 画 像データを 1ラインずつ遅延させるラインメモリ [N— 1] 系統、 FF [ (N— 1) XN] 個、 加算器 [ (NXN) — 1] 個、 乗算器 1個となる。
(2-2) フィルタサイズ可変の場合
F I G. 6に、 フィルタサイズ可変 (3 X 3〜NXN) の平均値フィルタ回路 を示す。 F I G. 6のように、 フィルタサイズが 3 X 3〜NXNならば、 回路構 成 (FF、 ラインメモリ、 加算器) としては常に最大のフィルタサイズ NXNの 構成を準備しておく。
そして、 各ラインの合計値から、 指定されたフィルタサイズに相当する構成の FF出力を選択して、 加算値を求めることにより、 任意のサイズの平均値フィル タを構成できる。
このような F F出力選択のため、 F I G. 6のフィルタ回路では、 セレクタ 3 70, 371等を有している。 例えば、 セレクタ 371は、 画素方向演算部 32 0内において、 任意の個数 (3〜N) の加算値を選択する回路である。 何個の加 算値を選択するかは、 切替信号 38 1により指定される。 他の画素方向演算部 3 21、 322、 . . . 等も同様の構成である。
また、 セレクタ 3 70は、 画素方向演算部 320等の出力をさらに加算したラ イン方向の加算器に対して 36 1、 362、 . . . 等の内、 任意のライン数分の 加算結果を選択する回路である。 ライン方向の加算数の選択は、 切替信号 380 により、 指定される。 発明の開示
上記従来技術では、 下記のような課題がある。
(1) 演算遅延がライン単位でしか認められていないような画像処理装置の場合、 F I G. 2のようなソフトウェアによる従来技術での構成では、 フレームメモリ、 演算メモリを用いて 1画素ずつ DS Pに読込み、 演算する。 このため、 処理ステ ップ数が莫大になってしまい、 フレーム遅延が発生する。 この遅延は、 例えば、 1Z30秒 (1フレームの表示時間) 以上となり、 リアルタイム処理は非常に困 難である。 ここで、 リアルタイム処理とは、 ラインディレイ (数ライン程度の遅 延) で画像を処理することをいう。 (2) F I G. 5に示したハードウェアによる構成は、 ローコスト並びに、 装置 の小型化を実現する必要がある画像処理装置には適用できない。 すなわち、 従来 技術では、 F I G. 5のように、 平均値フィルタを構成する際のハードウェア規 模が大きくなる。 NXNの平均値フィルタを構成するためには、 FF [ (N— 1) XN] 個、 加算器 [ (NXN) - 1] 個が必要になってしまう。
(3) 可変平均値フィルタを構成する場合、 フィルタの可変サイズが 3 X 3〜N XNフィルタでは、 ハードウエア規模は必ず NX Nサイズのものを準備する必要 がある。 そして指定された任意のフィルタサイズに見合ったフィルタサイズの加 算値を求めるので、 小さいフィルタサイズのものを選択すればする程、 必要のない FF、 ラインメモリ、 加算器等の莫大な冗長回路が発生してしまう。 例として、 F I G. 5を用いて計算すると、 3 X 3フィルタの場合に、 F F 6 個、 加算器 8個であるのに対して、 21 X 2 1フィルタでは、 FF420個、 加 算器 440個が必要となる。 したがって、 3 X 3フィルタを選択した場合は、 F F 414個、 加算器 432個が不要となってしまう。
本発明はこのような従来の技術の問題点に鑑みてなされたものである。 すなわ ち、 本発明の課題は、 ハードウェアの規模を増大させることなく、 リアルタイム で画像データの処理が可能な平均値フィルタを提供することにある。 ここで、 リ アルタイムとは、 最大でもフレームの遅延が発生しない時間内で処理が完了する ことをいう。
本発明は前記課題を解決するために、 以下の手段を採用した。 すなわち、 本発 明は、 平均値フィルタ装置であって、 2次元画像を構成する画素データ配列に対 して、 第 1次元方向に各画素の近傍に位置する所定数の画素データを積算して上 記各画素の第 1積算画素データを生成する第 1積算手段と、
第 2次元方向に各画素の近傍に位置する所定数の画素に対応する、 上記第 1積 算画素データを積算して上記各画素の第 2積算画素データを生成する第 2積算手 段と、
上記第 1次元方向およぴ第 2次元方向に積算された画素数で上記第 2積算画素 データを除算する手段とを備えるものである。
この平均値フィルタ装置は、 2次元画像を構成する画素データ配列に対して、 第 1次元方向に各画素の近傍に位置する所定数の画素データを積算して上記各画 素の第 1積算画素データを生成する。 さらに、 第 2次元方向に各画素の近傍に位 置する所定数の画素に対応する、 上記第 1積算画素データを積算して上記各画素 の第 2積算画素データを生成する。 このように、 この平均値フィルタは、 2次元 画像の各画素近傍の所定数の画素データを積算し、 平均値フィルタを実現できる。 好ましくは、 上記第 1積算手段は、 第 1次元方向に画素データを順次積算する 第 1順次積算手段と、
順次積算される積算対象画素から第 1次元方向に所定数以上離れた画素の画素 データを、 上記順次積算結果から減算する第 1減算手段とを有するものでもよい。 すなわち、 この平均値フィルタは、 第 1次元方向に画素データを順次積算し、 その積算結果から所定数以上離れた画素の画素データを減算することで上記第 1 次元方向での各画素近傍の所定数の画素データの積算を実現する。
好ましくは、 上記第 1順次積算手段は、 入力された入力画素データと上記入力 画素データの入力前に積算済みの画素データとを加算する第 1加算手段と、 積算 済みの画素データを保持する加算保持手段と含み、
上記第 1減算手段は、 上記入力画素データを所定数順次保持する入力保持手段 と、 現在入力されている画素データから所定数離れた入力画素データを上記第 1 加算手段の出力から減算し、 上記加算保持手段に所定画素積算値として出力する 第 1減算手段とを含み、
上記加算保持手段は、 上記所定画素積算値を次の加算のために上記第 1加算手 段に帰還出力するものでもよい。
すなわち、 この平均値フィルタは、 加算保持手段が保持する加算結果を上記第 1加算手段に帰還出力することにより、 第 1次元方向への順次加算を実現する。 また、 この平均値フィルタは、 入力画素データを所定数順次保持し、 所定数離れ た入力画素データを上記順次加算の結果から減算する。
好ましくは、 上記入力保持手段は、 各画素に対応するデータをシフトして記憶 するシフトレジスタと、 このシフトレジスタの各シフト位置に記憶された画素デ ータのいずれかを選択的に出力するセレクタとを有するものでもよい。
このように、 シフトレジスタの各シフト位置に記憶された画素データのいずれ かを選択的に出力することで、 減算すべきデータの位置を変更し、 加算する画素 の範囲を変更できる。
好ましくは、 上記第 2積算手段は、 第 2次元方向に画素データを順次積算する 第 2順次積算手段と、
順次積算される積算対象画素から第 2次元方向に所定数以上離れた画素の画素 データを、 上記順次積算結果から減算する第 2減算手段とを有するものでもよレ、。 すなわち、 この平均値フィルタは、 第 2次元方向に画素データを順次積算し、 その積算結果から所定数以上離れた画素の画素データを減算することで上記第 2 次元方向での各画素近傍の所定数の画素データの積算を実現する。
好ましくは、 上記第 2順次積算手段は、 第 1積算手段から入力された第 1積算 画素データと上記第 1積算画素データの入力前に第 2次元方向に積算済みの画素 データとを加算する第 2加算手段と、 第 2次元方向に積算済みの画素データを第 1次元方向に 1ライン保持するライン加算保持手段と含み、
上記第 2減算手段は、 第 1積算手段から入力された第 1積算画素データを所定 ラィン数順次保持する第 1次元積算データ保持手段と、 現在入力されている第 1 積算画素データから所定ライン数離れたラインの第 1積算画素データを上記第 2 加算手段の出力から減算し、 上記ライン加算保持手段に所定ライン積算値として 出力する第 2減算手段とを含み、
上記ライン加算保持手段は、 上記所定ライン積算値を次の加算のために上記第 2加算手段に帰還出力するものでもよい。
すなわち、 この平均値フィルタは、 ライン加算保持手段が保持する加算結果を 上記第 2加算手段に帰還出力することにより、 第 2次元方向への順次加算を実現 する。 また、 この平均値フィルタは、 第 1積算画素データを所定ライン数順次保 持し、 所定ライン数離れた第 1積算画素データを上記順次加算の結果から減算す る。
好ましくは、 上記第 1次元積算データ保持手段は、 2次元画像の第 1次元方向 の画素に対応する、 そのようなラインデータを複数ラインに渡ってシフトさせて 保持するラインメモリと、 上記複数ラインのいずれかを選択的に出力するライン 選択部とを有するものでもよレ、。 このように、 複数ラインのラインメモリから選択的に出力することで、 減算す べきデータの位置を変更し、 ライン方向に加算する画素の範囲を変更できる。 また、 本発明は、 上記平均値フィルタ装置を含む撮像装置であってもよい。 ま た、 本発明は、 上記平均値フィルタ処理を実行するフィルタリング方法であって あよい。 図面の簡単な説明
F I G. 1は、 平均値フィルタの概念を示す図であり、
F I G. 2は、 D S P上のソフトウェアによるフィルタの構成図であり、
F I G. 3は、 平均値フィルタ機能を提供する D S Pの処理手順を示す図であ り、
F I G. 4は、 従来のハードウェアによる 5 X 5平均値フィルタの構成例であ り、
F I G. 5は、 従来のハードウェアによる NXN平均値フィルタの構成例であ り、
F I G. 6は、 従来のハードウェアによる可変平均値フィルタ (3 X 3〜NX N) の構成例であり、
F I G. 7は、 本発明の第 1実施形態に係る 5 X 5平均値フィルタの構成例で あり、
F I G. 8は、 本発明の第 1実施形態に係る NX N平均値フィルタの構成例で あり、
F I G. 9は、 本発明の第 1実施形態に係る可変平均値フィルタ (3 X 3〜N XN) の構成例であり、
F I G. 1 0は、 本発明の実施例における入力画像データの説明図であり、 F I G. 1 1は、 本発明の実施例における画素方向演算の説明図であり、 F I G. 1 2は、 本発明の実施例におけるライン方向演算の説明図であり、 F I G. 1 3は、 本発明の第 2実施形態における撮像装置の系統図である。 発明を実施するための最良の形態 以下、 図面を参照して、 本発明の好適な実施の形態を説明する。
《第 1実施形態》
以下、 本発明の第 1実施形態に係る平均値フィルタを F I G. 7から F I G. 1 2の図面に基づいて説明する。
リアルタイム高速動画像処理においては、 その処理時間の問題や、 回路規模が 現実的ではないという問題点があるが、 高速処理ということにおいては、 ソフト ウェアよりもハードウエアの方が有利な面もある。
本実施形態では、 このような特徴を踏まえ、 リアルタイム高速動画像処理のた めの、 ハードウェアの小型化、 リアルタイム演算が実現可能な平均値フィルタ演 算回路について説明する。
ぐ構成〉
F I G. 7および F I G. 8に、 本発明の第 1実施形態に係る平均値フィルタの 構成例を示す。 この平均値フィルタは、 画素方向演算回路 1 (第 1積算手段に相 当) 、 ライン方向演算回路 2 (第 2積算手段に相当) 、 および、 1Z25倍の乗 算を実行する乗算器 45 (除算する手段に相当) から構成される。 以下、 F I G. 7の平均値フィルタ回路について説明する。
画素方向演算回路 1は、 入力画像データを 1クロックごとに 1画素ずっシフト して記憶するシフトレジスタ 30 (入力保持手段に相当) と、 入力画像データと FF 36に記憶された画素データを加算することでループ加算器として機能する 加算器 41 (第 1加算手段に相当) と、 ループ加算器の加算結果から FF 35の 出力を減算する減算器 42 (第 1減算器に相当) および減算器 42の出力を 1ク ロック遅延させて出力する FF 36 (加算保持手段に相当) を有している。 また、 シフトレジスタ 30は、 F F (フリップフロップ) 31〜 35を順次、 接続して 構成される。
ここで、 まず、 加算器 41、 FF 36によるループ加算処理について説明する。 今、 例えば、 640画素 X 480行の入力画像データが外部から入力された場合 を想定する。 ここで、 外部とは、 F I G. 7に示した平均値フィルタの外部、 例 えば、 映像を撮影する撮像装置等である。 そして、 現在処理中のラインが、 例え ば、 F I G. 1に示した画素データ A— Eを先頭するラインであったとする。 画素データ Aは、 加算器 41、 減算器 42を経由して FF 36に蓄積される。 そして、 画素データ Aは、 1クロック遅延して加算器 41において画素データ B と加算される。 加算された結果 (A+B) は、 FF 36に蓄積される。 このよう に、 加算器 41および FF 36は、 積算器として機能する。
さらに、 同様の処理を繰り返して、 画素データ C、 D、 Eが加算器 41に入力 された後、 積算結果 (A+B + C+D + E) 力 FF 36に蓄積される。 この F F 36の積算結果は、 画素方向演算回路 1の出力値としてライン方向演算回路 2 に出力される。
このとき、 画素データ E、 D、 C、 Bおよび Aは、 シフトレジスタ 30におい て、 各々 FF 3 1、 32、 33、 34、 および 35に順次シフトして蓄積されて いる。 したがって、 次のクロックにおいて、 加算器 41が FF 36の積算結果
(A+B + C + D + E) と次の画素データ (画素データ Eの次に入力される画素 データ、 これを例えば画素データ Xとする) とを加算したとき、 減算器 42によ り、 画素データ Aが減算される。 その結果、 FF 36には、 5個の画素データ (B + C + D + E + X) の積算結果が保持される。
この FF 36の積算結果は、 画素方向演算回路 1の出力値としてライン方向演 算回路 2に出力される。 以降の各クロックにおいて、 FF 3 1—35および減算 器 42による減算作用により、 画素方向に 5画素分の幅で積算が実行され、 C + D + E + X + Y、 D + E + X + Y + Z, . . . のように、 画素方向演算回路 1の 出力値としてライン方向演算回路 2に出力される (ここで、 Y、 Ζは、 画素デー タ Xの後に入力される画素データである) 。
この場合、 640画素 X 480ラインの入力画像データの内、 最初の 2列と最 後の 2列を除くデータ ( 1ライン中の最初の 2画素およぴ最後の 2画素を除くデ ータ) 、 すなわち、 3列目〜 638列目までのデータに対しては、 5画素分の加 算を求めることができる。
一方、 最初の 2列と最後の 2列に関しては、 加算すべき画素が存在しない (1 ライン中の最初の 2画素より前に画素がなく、 最後の 2画素より後にも画素がな い (640画素 X 480ラインの画像領域外の領域に相当) ) 。
このため、 最初の 2列と最後の 2列に関しては、 完全な 5画素分の加算を実行 することはできない。 すなわち、 これらの画素データに関しては、 完全な平均値 フィルタを適用することはできない。 そこで、 これらの領域に関しては、 元の入 力データをそのまま 5倍にして使用する。 あるいは、 3列目と 4 7 8列目の画素 に対応する加算値を各々、 最初の 2列と最後の 2列の加算値として用いる等の手 法が採られる。
次に、 ライン方向演算回路 2の構成および作用を説明する。 ライン方向演算回 路 2は、 画像データを 1クロックごとに 1ラインずつシフトして、 5ライン分記 憶するラインメモリ 1 1 (第 1次元積算データ保持手段に相当) 、 ラインメモリ 1 1のシフト動作を制御するラインメモリタイミング調整回路 1 2、 このライン 方向演算回路 2に入力される画像データとラインメモリ 1 3に記憶された画素デ ータとを加算することでライン方向のループ加算器として機能する加算器 4 3
(第 2加算手段に相当) 、 ループ加算器の加算結果からラインメモリ 1 1の出力 を減算する減算器 4 4 (第 2減算器に相当) 、 および減算器 4 4の出力を 1ライ ン遅延させて出力するラインメモリ 1 3 (ライン加算保持手段に相当) を有して いる。
ここで、 加算器 4 3、 およびラインメモリ 1 3によるライン方向のループ加算 処理について説明する。 ここでも、 6 4 0画素 X 4 8 0ラインの入力画像データ が入力された場合を想定する。 上述のように、 この画素データは、 画素方向演算 回路 1により、 画素方向に 5画素ずつ積算した結果に置き換えられる。 ただし、 上述のように、 最初の 2列と最後の 2列の画素に対応する加算値は、 完全な加算 値ではない。
今、 現在処理中のラインが、 例えば、 F I G . 1に示した画素データ A— Eを 先頭するライン (今、 これをライン L 1と呼ぶ) であったとする。
ライン L 1の各画素データは、 加算器 4 3、 減算器 4 4を経由してラインメモ リ 1 3に順次蓄積される。 これら各画素データは、 ラインメモリ 1 1にも順次蓄 積さ 3τる。
ライン L 1の画素データがすべてラインメモリ 1 3に格納されると、 ライン方 向演算回路 2には、 次のラインに対応する画素データが順次入力される。 次のラ インは、 例えば、 F I G . 1において、 画素データ F— Jを先頭とするラインで あり、 これをライン L 2と呼ぶ。
そして、 このライン L 2の各画素データは、 加算器 43に入力される。 一方、 ラインメモリ 1 3の出力として、 1ライン遅延したライン L 1のデータも加算器 43に入力される。
その結果、 ライン L 1の各画素データがライン L 2の同一列の (同一の画素方 向に位置する) 画素データと加算される。 加算された結果は、 ラインメモリ 1 3 に順次蓄積される。 例えば、 F I G. 1のデータ例では、 ラインメモリ 1 3には、 画素 Aと F、 Bと G、 Cと H、 Dと I、 Eと Jの各画素に対応するデータ (画素 方向演算回路 1で 5画素加算済みのデータ) をさらに加算した結果が順次格納さ れる。 このように、 加算器 43およびラインメモリ 1 3は、 積算器として機能す る。
このライン方向の積算時、 ラインメモリ 1 1において、 ライン L 1の画素に対 応するデータは、 1ライン分シフトされ、 新たに、 ライン L 2の画素に対応する データが順次入力される。 したがって、 ライン L 1とライン L 2の加算が完了し たとき、 ラインメモリ 1 1には、 ライン L 1と L 2の画素に対応するデータが蓄 積される。
さらに、 同様の処理を繰り返して、 ライン L 3 (F I G. 1の画素 K、 L、 M、 M、 〇を含むライン) 、 ライン L4 (F I G. 1の画素 P、 Q、 R、 S、 Tを含 むライン) 、 ライン L 5 (F I G. 1の画素 U、 V、 W、 X、 Yを含むライン) の各画素に対応するデータが加算器 43に入力された後、 ライン方向の積算結果 (L 1 +L 2 + L 3 + L4 + L 5の結果による 1ライン分のデータ) が、 ライン メモリ 1 3に蓄積される。 このラインメモリ 1 3の積算結果は、 ライン方向演算 回路 2の出力値として乗算器 45に出力される。 この L 1 +L 2 + L 3 + L4 + L 5の結果による各画素のデータは、 画素方向演算回路 1およびライン方向演算 回路 2の積算結果から、 結局画素方向およびライン方向に 5画素分積算した値と なる。 例えば、 F I G. 1の画素 Mについては、 A+B+. . . +Yの加算値が 計算されることになる。
さらに、 このとき、 ライン L 5、 L4、 L 3、 L 2および L 1の各画素に対応 するデータは、 ラインメモリ 1 1に順次シフトして蓄積されている。 したがって、 次のサイクル (例えば、 次の 640クロック) において、 加算器 43がラインメ モリ 1 3上の積算結果 (L 1 +L 2 + L 3 +L 4 + L 5) と次のライン (ライン L 5の次に入力されるライン、 これを例えばライン L 6とする) とを加算してい くとき、 減算器 42により、 ライン L 1の画素に対応するデータが順次減算され る。 その結果、 減算器 42からは、 5ラインの画素データ (L 2 + L 3 + L4 + L 5 + L 6) の積算結果が 1画素ずつ 640画素分、 順次出力される。 そして、 ラインメモリ 1 3には、 5ラインの画素データ (L 2 + L 3 + L4 + L 5 + L 6) の積算結果が蓄積されることになる。
このラインメモリ 1 3に蓄積された各データは、 ライン方向演算回路 2の出力 値として乗算器 45に順次出力される。 以降の各クロックにおいて、 ラインメモ リ 1 1および減算器 44による減算作用により、 ライン方向に 5ライン分の幅で 積算が実行され、 L 3+L4+L 5+L 6+L 7、 L4+L 5+L 6+L 7+L 8, . . . のように、 ライン方向演算回路 2の出力値として乗算器 45に出力さ れる。
ただし、 画素方向演算回路 1においてすでに説明した場合と同様、 ライン方向 において、 最初の 2ライン分および最後の 2ライン分の各画素に対しては、 完全 な 25画素分の加算を実行することはできない。 その対策としては、 元の入力デ ータを 5倍して使用する力、 あるいは、 3ラインおよび 478ラインを上記最初 の 2ライン分および最後の 2ライン分のデータに代えて使用する等の対応を採れ ばよい。
このように、 乗算器 45には、 640画素 X 480ラインの画素データに対し て、 各画素の周囲 5 X 5画素の領域を積算した結果が順次入力される。 乗算器 4 5は、 これらの各データを 1/25倍するので、 乗算器 45からは、 5 X 5の画 素を平均した結果が出力されることになる。
F I G. 8は、 N XN平均値フィルタである。 F I G. 7は、 5 X 5の平均値 フィルタであった。 一方、 F I G. 8に示す平均値フィルタは、 フィルタ処理の 範囲を NX Nに一般化したものである。 F I G. 8においては、 シフトレジスタ 30 Aを構成するフリップフロップが、 FF 31、 F F 32, . . . FF 30— Nのように N個使用される。 また、 ラインメモリ 1 1 Aが Nライン分のメモリを 有している。 ただし、 その作用は、 F I G. 7の場合と同様であるので、 その説 明を省略する。
次に、 ライン方向演算回路 2あるいは 2 Aにおいて、 画素方向加算値に対して 順にライン方向にループ加算する。 そして、 ラインメモリ 1 1あるいは 1 1Aに て遅延させた画素方向加算値の内の最も古いデータをライン方向のループ加算値 から引くことによってライン方向における Nラインの加算値を求める。 このため、 入力画像データに対しての演算遅延はループ加算によって生じるフィルタサイズ に依存した数のライン数しか発生しない。 すなわち、 この演算により、 例えば、 1フレームが 640画素 X 480ラインの画像を処理する場合も、 演算遅延を 1 フレーム以内に納めることができる。
F I G. 7または F I G. 8のように、 画素方向演算回路 1または 1 Aにおい て、 入力画像データに対して順に画素方向にループ加算しながら、 シフ トレジス タ 30あるいは 30 Aによって遅延させた入力画像データを画素方向のループ加 算値から減算することによって画素方向における N画素の加算値を求める。
次に、 ライン方向演算回路 2において、 画素方向加算値に対して順にライン方 向にループ加算しながら、 ラインメモリ 1 1あるいは 1 1 Aにて遅延させた画素 方向加算値の内の最も古いデータをライン方向のループ加算値から減算する。 こ れよって、 ライン方向における Nラインの加算値を求める。 このような構成によ り、 従来技術のように画素ごとに遅延させて位相を合わせるためのフリップフ口 ップと加算器とを組み合わせる必要がない。 そのため、 ハードウェア規模を大幅 に縮小できる。 また、 フィルタサイズの大きい平均値フィルタを構成しても F F、 ラインメモリの小規模な追加だけで済み、 加算器の個数はフィルタの大きさに依 存しない。
F I G. 9は、 本発明の第 1実施形態に係る可変平均値フィルタ (3 X 3〜N XN) である。 この可変平均値フィルタは、 F I G. 8の平均値フィルタと比較 して、 セレクタ 1 5およびセレクタ 16が追加されている。 また、 ラインメモリ 調整回路 1 2 Aは、 フィルタサイズ 3 X 3〜NXNに応じて、 指定されるライン 位置からデータを読み出し、 減算回路 44に出力する。 F I G. 9の以上述べた 構成要素以外の構成要素は、 F I G. 8と同様である。 セレクタ 1 5は、 3 X 3〜NXNの切替信号を入力され、 その入力に対応する シフトレジスタ 3 OA上の位置 (フリップフロップの出力) を選択する。 例えば、
3 X 3の切替信号が入力された場合、 セレクタ 1 5は、 FF 33の出力を選択す る。 このようにして、 FF 31〜FF— Nと、 セレクタ 1 5との組み合わせによ り、 3〜Nの範囲で、 任意サイズのシフトレジスタを構成する。
したがって、 加算器 41および F F 36と、 FF 3 1〜FF 30— N、 セレク タ 15、 および減算器 42とを組み合わせることにより、 画素方向に 3〜Nの範 囲で可変サイズの積算を実行する積算器を構成する。
また、 ラインメモリ 1 1Aは、 Nライン分 (最大数のライン数分) の容量を有 する。 そして、 ラインメモリタイミング調整部 1 2 Aは、 3 X 3〜NXNの切替 信号を入力され、 その入力に対応するラインメモリ 1 1 Aの位置から画素データ (画素方向加算回路 1 Bの加算結果) を読み出す。
したがって、 加算器 43およびラインメモリ 1 3と、 ラインメモリ 1 1 A、 ラ インメモリタイミング調整部 1 2A、 および減算器 44とを組み合わせることに より、 ライン方向に 3〜Nの範囲で可変サイズの積算を実行する積算器を構成す る。 この積算結果は、 F I G. 7または F I G. 8に示した場合と同様、 乗算器
45に入力される。
乗算器 45には、 セレクタ 1 6が接続されている。 セレクタ 16は、 3 X 3〜 NXNの切替信号を入力され、 その入力に対応する乗算値 1/ (3 X 3) 〜1/ (NXN) を乗算器 45に設定する。 したがって、 乗算器 45は、 1/ (3 X 3) 〜1/ (NXN) の範囲で、 乗算値を自在に切り替えて乗算を実行する。 このように、 画素方向演算回路部 1 B、 ライン方向演算回路 2 Bのそれぞれの ループ加算値から引く減算値 (加算値を構成する内の最も古いデータ) をシフ ト レジスタ 30A (FF 33〜FF 3 O—Nの範囲) 、 および、 ラインメモリ 1 1 Aに格納する。 さらに、 上記減算値の遅延量を調整するセレクタ 15およびライ ンメモリ調整部 1 2 Aを設ける。 そして、 指定されたフィルタサイズに応じた F F 33〜FF 30— Nおよびラインメモリ 1 1 Aの出力を選択することによって、 3 X 3〜NXNのフィルタサイズで可変平均値フィルタを構成できる。
く実施例 > 以下、 フィルタサイズ固定による平均値フィルタを適用した実施例を説明する。
F I G. 10は、 本発明の実施例における入力画像データの説明図である。 こ こでは、 画素方向に 640画素、 ライン方向に 480ラインを有する 640 X 4 80の画像データを処理する。 ここでは、 理解を容易にするため、 ライン間の無 効データ期間はないと仮定する。 また、 画像データは、 1 6ビット/画素とする。
F I G. 7の様に、 画素方向演算回路 1は、 加算器 41、 減算器 42、 シフト レジスタ 30 (5画素遅延:余剰データ減算用) 、 F F 36 (1画素分遅延:加 算データの位相合わせ用) で構成される。 今、 この画素方向演算回路 1に、 F I G. 10の様な 640 X 480画素を画像データとして入力する。
F I G. 1 1に画素方向演算の結果を示す。 F I G. 1 1には、 画素クロック 1 01、 リセット信号 102、 入力画像データ 1 03、 ループ加算器出力 1 04、 シフトレジスタ出力 1 05および画素方向加算データ 106の各信号波形が示さ れている。
ここで、 画素クロック 101は、 不図示の表示装置が画像データを 1画素表示 するときのクロックである。 この画素ク口ックは、 また、 F I G. 7〜 9に示し た平均値フィルタ回路において、 1画素分のデータを入力するとき、 1画素分の データをフリップフ口ップで遅延させるとき、 あるいは、 平均値フィルタの結果 を 1画素分出力するとき等、 1画素分のデータ処理に使用される。
リセット信号 1 02は、 F I G. 7〜 9に示した平均値フィルタ回路を初期化 する信号である。 このリセット信号によるリセットの後、 F I G. 10に示した 640 X 480の画像データが処理される。
入力画像データ 1 03は、 F I G. 10に示した 640 X 480の各画素が順 次入力されたものである。 各画素との対応関係を例示するため、 1、 2、 3等の 番号が付されている。
ループ加算出力 1 04は、 F I G. 7に示した加算器 41の出力である。 ここ では、 加算結果と元の画素との対応関係を例示するため、 例えば、 画素 1と画素 2の加算結果は、 出力値 3で示されている。 また、 画素 1、 画素 2、 および画素 3の加算結果は、 出力値 6で示されている。 他の出力も同様である。
また、 シフトレジスタ出力 105は、 F I G. 7に示したシフトレジスタ 30 の出力である。 F I G. 1 1のように、 シフトレジスタ出力 105は、 入力画像 データ 103から 5画素クロック遅延した値となっている。
また、 画素方向加算データ 106は、 F I G. 7に示した FF 36の出力であ る。 このデータは、 ループ加算出力 104およびシフトレジスタ出力 105との 対応関係を明示するため、 ループ加算出力 104の各値からシフトレジスタ出力 105の各値を減算した値が 1クロック遅延した位置に示されている。
F I G. 1 1に示すループ加算器出力 104は、 入力画像データを 1画素ずつ 順にデータの先頭からループ加算した結果である。 すなわち、 2画素目、 3画素 目、 4画素目、 5画素目を順に加算するため、 次の画素との位相を合わせた F F 36の出力を加算器 41にフィードバックさせる。
平均値フィルタが 5 X 5であれば、 6画素分の加算値を求めた後、 この 6画素 分の加算値を構成している内の最も古レ、データを取り除く必要がある。 そこで、 F I G. 1 1のシフトレジスタ出力 105の様に、 予めシフトレジスタ 30によ つて入力画像データを 5クロック分遅延させた入力画像データを引算する。 これ よって、 5画素分の加算値を求め、 F I G. 1 1のシフトレジスタ出力 1 06の 様に FF 36で位相を合わせてライン方向演算回路 2に出力する。
この様に、 FF 36の出力 (5画素分加算値) を加算器 41にフィードバック させて、 新たに入力された画像データと加算して 6画素分加算値を求める。 さら に、 この値とシフトレジスタ 30の出力によって遅延させた 5画素前のデータを 引算するので、 常に画素方向に 5画素分の加算値を順に求めることができる。
F I G. 7の様に、 ライン方向演算回路 2は、 加算器 43、 減算器 44、 ライ ンメモリ 1 1 (5ライン遅延:余剰データ減算用) 、 ラインメモリ 1 3 (1ライ ン遅延:加算データの位相合わせ用) で構成され、 上記で求めた 5画素分の加算 値 (640 X 480画素, 19 Bit/画素) を順に画像データとして入力する。
F I G. 1 2に画素方向演算の結果を示す。 F I G. 1 2には、 フレームイン デッタス 1 1 1、 フレーム先頭パルス 1 1 2、 画素方向データ 1 1 3、 ラインメ モリ 1 1出力 1 14、 ライン方向合計値 1 1 5、 減算器出力 1 16、 ラインメモ リ 1 3出力 1 1 7および 5 X 5平均値フィルタ 1 18の各信号波形が示されてい る。 フレームインデックス 1 1 1は、 フレームの同期をとるため、 1フレーム内で 1回、 L出力から H出力に切り替わる信号である。 また、 フレーム先頭パルス 1 1 2は、 フレームの先頭を示すパルスである。
画素方向加算データ 1 1 3は、 F I G. 1 1に示した画素方向加算データ 10 6と同一の信号である。 ただし、 F I G. 12では、 例えば、 P 1、 P 2の各信 号部分が各々 640クロックに対応する 1ライン分のデータに相当する。
ラインメモリ 1 1出力 1 14は、 F I G. 7に示したラインメモリ 1 1の出力 信号であり、 減算器 44への一方の入力信号である。
ライン方向合計値 1 1 5は、 F I G. 7に示した加算器 43の出力信号であり、 減算器 44への他方の入力信号である。
減算器出力 1 1 6は、 ライン方向合計値 1 1 5からラインメモリ 1 1出力 1 1 4を減算した信号である。
ラインメモリ 1 3出力 1 1 7は、 F I G. 7に示したラインメモリ 1 3の出力 信号であり、 加算器 43に 1ライン遅れて入力される信号である。
5 X 5平均値フィルタ 1 1 8は、 F I G. 7に示した乗算器 45から出力され るフィルタ処理された画像データである。
F I G. 1 2のライン方向合計値 1 1 5の様に、 画素方向加算データをライン 方向に 1画素ずつ順にデータの先頭からループ加算を行う。 すなわち、 2ライン 目、 3ライン目、 4ライン目、 5ライン目の画素を順に加算するため、 ラインメ モリ 1 3によって次のラインとの位相を合わせる。 そして、 1ライン遅延させて、 加算器にフィードバックさせる。 求める平均値フィルタが 5 X 5であれば、 ライ ン方向に 6ライン分の加算値を求めた後、 この 6ライン分の加算値を構成してレ、 る内の最も古いラインのデータを取り除く必要がある。
そこで、 F I G. 1 2のラインメモリ 1 1出力 1 14の様に、 予めラインメモ リ 1 1によって入力画像データを 5ライン分遅延させた画素方向加算データを用 意する。 そして、 ライン方向合計値 1 1 5からラインメモリ 1 1出力 1 14を引 算することによって、 25画素分の加算値を求めることができ、 その値を乗算器 45に出力する。
このように、 ラインメモリ 1 3の出力 (25画素分加算値) を加算器 43にフ イードバックさせて、 新たに入力されたライン (画素方向加算データ) と加算し、 6ライン分加算値を求める。 そして、 この 6ライン分の加算値とラインメモリ 1 1の出力によって遅延させた 5ライン前のデータを引算するので、 常にリアルタ ィムで 25画素分の加算値を順に求めることができる。
また、 このとき F I G. 1 2のように、 5 X 5の平均値フィルタを 2ラインの 演算遅延で構成できる。 例えば、 F I G. 1のデータ例の場合、 画素データ Yを 含むライン L 5の加算が完了した時点で、 画素データ K、 L、 M、 0、 Pを含む ライン L 3に対するフィルタ処理が完了する。 これを N X Nの平均値フィルタに 一般化した場合、 N/ 2の整数部分ラインの演算遅延で平均値フィルタを実行で きる。
ぐ実施形態の効果 >
本実施形態に係るフィルタ回路では、 下記 1〜 3の様な効果がある。
(1) ソフトウェアで構成した場合 (F I G. 2および 3) に対して、 本フィル タ回路ではリアルタイム処理 (フレーム遅延のない処理) にて平均値フィルタを 構成できる。 例えば、 入力画像データに対して、 NZ 2の整数部分ラインの遅延
(N= 3、 5、 7、 . . . ) で平均値フィルタを適用できる。
(2) 例えば、 従来技術である F I G. 5と、 本提案である F I G. 8を比較す ると、 以下のハードウェア規模の大幅な縮小を見積もることができる。
従来技術 (ハードウェア処理) の場合、 ラインメモリ [N— 1]系統、 FF[(N — 1) XN]個、 加算器 [(NXN)— 1]個の構成となる (N= 3、 5、
7、 . . . ) 。
一方、 本実施形態の場合、 FF[N]個、 加算器 [4]個、 ラインメモリ N系統の 構成となる (N=3、 5、 7、 . . . ) 。
(3) 従来技術である F I G. 6と、 本提案である F I G. 7を比較して、 ブイ ルタサイズを変化させた際の冗長回路の大幅な縮小を見積もることができる。 例として、 N=3として、 冗長規模を比較すると、 従来技術 (ハードウェア処 理) の場合、 FF([(N— 1)XN]— 3)個、 加算器 [((NXN)— 1一 3)]個、 ラ インメモリ N— 3系統の冗長度である (N= 3、 5、 7、 . . . ) 。
一方、 本提案の場合 FF[N— 3]個、 加算器 [4]個、 およびラインメモリ N— 3系統の冗長度である (N= 3、 5、 7、 . . . ) 。
《第 2実施形態》
F I G. 1 3は、 本発明の第 2実施形態における撮像装置 5 0の系統図である。 この撮像装置は、 カメラ部 5 1、 カメラ部 5 1を制御するメカ制御部 5 2、 カメ ラ部 5 1からの映像信号をデジタルデータに変換する AZD変換器 5 3、 A/D 変換器 5 3からの出力に対して、 フィルタリング等の画像処理を実行する画像処 理部 54、 画像処理部 54の出力に基づき、 表示装置 5 7を制御する表示制御部 5 5および表示制御部 5 5の出力信号をアナログデータに変換して表示装置 5 T に供給する D/A変換器 5 5を有している。
カメラ部 5 1は、 メカ制御部 5 2の制御にしたがい、 被写体の映像を撮影した 映像信号を AZD変換器 5 3に引き渡す。 0変換器5 3は、 フレームごと映 像信号から画素データを生成し、 F I G. 1 1に示した画素クロックで画像処理 部 54に入力する。
画像処理部 54は、 例えば、 F I G. 7〜 9に示した平均値フィルタ回路を有 しており、 F I G. 1 1に示した入力画像データに対する処理と同様に、 A/D 変換器 5 3からの画像データに画像処理を実行する。 この場合、 すでに、 上記第 1実施形態で説明したように、 フレーム遅延なく平均値フィルタ処理を実行でき る。
このようにして平均値フィルタが適用された画像データは、 リアルタイムで表 示装置 5 7に出力される。 産業上の利用可能性
本発明は、 信号処理機能を提供する半導体デバイスの製造産業、 信号処理を適 用する情報機器、 撮影機器、 画像記録機器、 放送機器等の製造産業およびこれら の装置を使用するサービス産業に適用できる。

Claims

請求の範囲
1 . 2次元画像を構成する画素データ配列に対して、 第 1次元方向に各画素の 近傍に位置する所定数の画素データを積算して前記各画素の第 1積算画素データ を生成する第 1積算手段と、
第 2次元方向に各画素の近傍に位置する所定数の画素に対応する、 前記第 1積 算画素データを積算して前記各画素の第 2積算画素データを生成する第 2積算手 段と、
前記第 1次元方向および第 2次元方向に積算された画素数で前記第 2積算画素 データを除算する手段とを備える平均値フィルタ装置。 '
2 . 前記第 1積算手段は、 第 1次元方向に画素データを順次積算する第 1順次積 算手段と、
順次積算される積算対象画素から第 1次元方向に所定数以上離れた画素の画素 データを、 前記順次積算結果から減算する第 1減算手段とを有する請求項 1に記 載の平均値フィルタ装置。
3 . 前記第 1順次積算手段は、 入力された入力画素データと前記入力画素データ の入力前に積算済みの画素データとを加算する第 1加算手段と、 積算済みの画素 データを保持する加算保持手段と含み、
前記第 1減算手段は、 前記入力画素データを所定数順次保持する入力保持手段 と、 現在入力されている画素データから所定数離れた入力画素データを前記第 1 加算手段の出力から減算し、 前記加算保持手段に所定画素積算値として出力する 第 1減算器とを含み、
前記加算保持手段は、 前記所定画素積算値を次の加算のために前記第 1加算手 段に帰還出力する請求項 2に記載の平均値フィルタ装置。
4 . 前記入力保持手段は、 各画素に対応するデータをシフトして記憶するシフト レジスタと、
このシフトレジスタの各シフト位置に記憶された画素データのいずれかを選択 的に出力するセレクタとを有する請求項 3に記載の平均値フィルタ装置。
5 . 前記第 2積算手段は、 第 2次元方向に画素データを順次積算する第 2順次積 算手段と、
順次積算される積算対象画素から第 2次元方向に所定数以上離れた画素の画素 データを、 前記順次積算結果から減算する第 2減算手段とを有する請求項 1に記 載の平均値フィルタ装置。
6 . 前記第 2順次積算手段は、 第 1積算手段から入力された第 1積算画素データ と前記第 1積算画素データの入力前に第 2次元方向に積算済みの画素データとを 加算する第 2加算手段と、 第 2次元方向に積算済みの画素データを第 1次元方向 に 1ライン保持するライン加算保持手段と含み、
前記第 2減算手段は、 第 1積算手段から入力された第 1積算画素データを所定 ラィン数順次保持する第 1次元積算データ保持手段と、 現在入力されている第 1 積算画素データから所定ライン数離れたラインの第 1積算画素データを前記第 2 加算手段の出力から減算し、 前記ライン加算保持手段に所定ライン積算値として 出力する第 2減算器とを含み、
前記ライン加算保持手段は、 前記所定ライン積算値を次の加算のために前記第 2加算手段に帰還出力する請求項 5に記載の平均値フィルタ装置。
7 . 前記第 1次元積算データ保持手段は、 2次元画像の第 1次元方向の画素に対 応する、 そのようなラインデータを複数ラインに渡ってシフトさせて保持するラ インメモリと、 前記複数ラインのいずれかを選択的に出力するライン選択部とを 有する請求項 6に記載の平均値フィルタ装置。
8 . 2次元画像を構成する画素データ配列に対して、 第 1次元方向に各画素の近 傍に位置する所定数の画素データを積算して前記各画素の第 1積算画素データを 生成する第 1積算ステップと、
第 2次元方向に各画素の近傍に位置する所定数の画素に対応する、 前記第 1積 算画素データを積算して前記各画素の第 2積算画素データを生成する第 2積算ス テツプと、
前記第 1次元方向およぴ第 2次元方向に積算された画素数で前記第 2積算画素 データを除算するステップとを備えるフィルタリング方法。
9 . 前記第 1積算ステップは、 第 1次元方向に画素データを順次積算する第 1順 次積算ステップと、
順次積算される積算対象画素から第 1次元方向に所定数以上離れた画素の画素 データを、 前記順次積算結果から減算する第 1減算ステップとを有する請求項 8 に記載のフィルタリング方法。
1 0 . 前記第 1順次積算ステップは、 入力された入力画素データと前記入力画素 データの入力前に積算済みの画素データとを加算する第 1加算ステップと、 積算 済みの画素データを保持する加算保持ステップと含み、
前記第 1減算ステップは、 前記入力画素データを所定数順次保持する入力保持 ステップと、 現在入力されている画素データから所定数離れた入力画素データを 前記第 1加算手段の出力から減算するステップと、 前記加算保持手段に所定画素 積算値として出力するステップとを含み、
前記加算保持ステップは、 前記所定画素積算値を次の加算のために前記第 1加 算手段に帰還出力するステップを含む請求項 9に記載のフィルタリング方法。
1 1 . 前記入力保持ステップは、 各画素に対応するデータをシフトして記憶する ステップと、 このシフトレジスタの各シフト位置に記憶された画素データのいず れかを選択的に出力するステップとを有する請求項 1 0に記載のフィルタリング 方法。
1 2 . 前記第 2積算ステップは、 第 2次元方向に画素データを順次積算する第 2 順次積算ステップと、
順次積算される積算対象画素から第 2次元方向に所定数以上離れた画素の画素 データを、 前記順次積算結果から減算する第 2減算ステップとを有する請求項 8 に記載のフィルタリング方法。
1 3 . 前記第 2順次積算ステップは、 第 1積算ステップにおいて生成された第 1 積算画素データと前記第 1積算画素データの入力前に第 2次元方向に積算済みの 画素データとを加算する第 2加算ステップと、 第 2次元方向に積算済みの画素デ 一タを第 1次元方向に 1ライン保持するライン加算保持ステップと含み、 前記第 2減算ステップは、 前記第 1積算画素データを所定ライン数順次保持す る第 1次元積算データ保持ステツプと、 現在入力されている第 1積算画素データ から所定ライン数離れたラインの第 1積算画素データを前記第 2加算手段の出力 から減算するステップと、 前記ライン加算保持手段に所定ライン積算値として出 力するステップとを含み、
前記ライン加算保持ステップは、 前記所定ライン積算値を次の加算のために前 記第 2加算手段に帰還出力するステップを含む請求項 1 2に記載のフィルタリン グ方法。
1 4 . 前記第 1次元積算データ保持ステップは、 2次元画像の第 1次元方向の画 素に対応する、 そのようなラインデータを複数ラインに渡ってシフトさせて保持 するステップと、 前記複数ラインのいずれかを選択的に出力するステップとを有 する請求項 1 3に記載のフィルタリング方法。
1 5 . 平均値フィルタ装置を含む撮像装置であり、 撮像部と、 フィルタ部と、 表 示部とを備え、
前記フィルタ部は、
2次元画像を構成する画素データ配列に対して、 第 1次元方向に各画素の近傍 に位置する所定数の画素データを積算して前記各画素の第 1積算画素データを生 成する第 1積算手段と、
第 2次元方向に各画素の近傍に位置する所定数の画素に対応する、 前記第 1積 算画素データを積算して前記各画素の第 2積算画素データを生成する第 2積算手 26
段と、 前記第 1次元方向および第 2次元 に積算された聽数で前記第 2積算 ァータを除算する手段とを有する、 撮像装置。
PCT/JP2003/001009 2003-01-31 2003-01-31 平均値フィルタ装置およびフィルタリング方法 WO2004068411A1 (ja)

Priority Applications (3)

Application Number Priority Date Filing Date Title
PCT/JP2003/001009 WO2004068411A1 (ja) 2003-01-31 2003-01-31 平均値フィルタ装置およびフィルタリング方法
JP2004567552A JPWO2004068411A1 (ja) 2003-01-31 2003-01-31 平均値フィルタ装置およびフィルタリング方法
US11/074,992 US7149364B2 (en) 2003-01-31 2005-03-07 Mean filter device and filtering method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/JP2003/001009 WO2004068411A1 (ja) 2003-01-31 2003-01-31 平均値フィルタ装置およびフィルタリング方法

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US11/074,992 Continuation US7149364B2 (en) 2003-01-31 2005-03-07 Mean filter device and filtering method

Publications (1)

Publication Number Publication Date
WO2004068411A1 true WO2004068411A1 (ja) 2004-08-12

Family

ID=32800845

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2003/001009 WO2004068411A1 (ja) 2003-01-31 2003-01-31 平均値フィルタ装置およびフィルタリング方法

Country Status (3)

Country Link
US (1) US7149364B2 (ja)
JP (1) JPWO2004068411A1 (ja)
WO (1) WO2004068411A1 (ja)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2007046219A1 (ja) * 2005-10-19 2007-04-26 Konica Minolta Holdings, Inc. 画像処理装置及び画像処理方法

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB2493396B (en) * 2011-08-05 2018-08-08 Snell Advanced Media Ltd Multidimensional sampled-signal filter
US8842939B2 (en) * 2011-08-23 2014-09-23 National Taiwan University Direction-adaptive image upsampling system and method using double interpolation
GB2502047B (en) * 2012-04-04 2019-06-05 Snell Advanced Media Ltd Video sequence processing

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4682301A (en) * 1982-09-02 1987-07-21 Hitachi Medical Corp. Digital filter for processing two-dimensional digital image
JPH03245278A (ja) * 1990-02-23 1991-10-31 Nec Corp コントラスト抽出フィルタ
JP2000022958A (ja) * 1998-07-06 2000-01-21 Ricoh Co Ltd 画像処理装置

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5428397A (en) * 1993-05-07 1995-06-27 Goldstar Co., Ltd. Video format conversion apparatus for converting interlaced video format into progressive video format using motion-compensation
JP2713196B2 (ja) 1994-12-27 1998-02-16 日本電気株式会社 多素子撮像装置の信号処理方式
KR100200628B1 (ko) * 1996-09-30 1999-06-15 윤종용 화질 개선 회로 및 그 방법

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4682301A (en) * 1982-09-02 1987-07-21 Hitachi Medical Corp. Digital filter for processing two-dimensional digital image
JPH03245278A (ja) * 1990-02-23 1991-10-31 Nec Corp コントラスト抽出フィルタ
JP2000022958A (ja) * 1998-07-06 2000-01-21 Ricoh Co Ltd 画像処理装置

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2007046219A1 (ja) * 2005-10-19 2007-04-26 Konica Minolta Holdings, Inc. 画像処理装置及び画像処理方法

Also Published As

Publication number Publication date
JPWO2004068411A1 (ja) 2006-05-25
US20050147315A1 (en) 2005-07-07
US7149364B2 (en) 2006-12-12

Similar Documents

Publication Publication Date Title
EP0571607B1 (en) Pyramid processor integrated circuit
JP5000737B2 (ja) 多次元画像の画質向上のためのシステムおよび方法
WO2004109597A1 (ja) 画像処理装置
US6654492B1 (en) Image processing apparatus
US6636629B1 (en) Image processing apparatus
JP4326760B2 (ja) パノラマ/ウォータガラス機能実現のための映像処理装置およびその実現方法
EP0723688B1 (en) Digital image resizing apparatus and method of using the same
US6304133B1 (en) Moving average filter
WO2004068411A1 (ja) 平均値フィルタ装置およびフィルタリング方法
US5821884A (en) Sampling rate conversion method and apparatus utilizing an area effect correlation method
US20080208941A1 (en) Interpolation Process Circuit
US5838387A (en) Digital video scaling engine
JP5573901B2 (ja) 標本化レート変換装置
JP4323808B2 (ja) 二次元ピラミッド・フィルタ・アーキテクチャ
JP2004530206A (ja) 二次元ピラミッド・フィルタ・アーキテクチャ
Zeinolabedin et al. Low computational complexity hardware implementation of Laplacian Pyramid
KR100970517B1 (ko) 데이터 처리 회로, 이미지 처리 시스템, 수신기 디코더장치 및 통신 네트워크
JP2820222B2 (ja) 画像信号処理装置
JP2513218B2 (ja) Firデイジタルフイルタ
JP2004527025A (ja) 乗算器のないピラミッド・フィルタ
JP3177358B2 (ja) デジタルフィルタ
KR100656644B1 (ko) 영상압축에서의 움직임 보상을 위한 화면간 보간장치
KR950002073B1 (ko) 3차원적 필터방법 및 회로
JP4104526B2 (ja) 画像縮小装置及び撮像装置
JP2965624B2 (ja) ビデオ信号をデイジタル形式で濾波するための方法および回路装置

Legal Events

Date Code Title Description
AK Designated states

Kind code of ref document: A1

Designated state(s): JP US

WWE Wipo information: entry into national phase

Ref document number: 2004567552

Country of ref document: JP

WWE Wipo information: entry into national phase

Ref document number: 11074992

Country of ref document: US