WO2005010818A1 - 画像処理装置、画像処理方法及び歪補正方法 - Google Patents

画像処理装置、画像処理方法及び歪補正方法 Download PDF

Info

Publication number
WO2005010818A1
WO2005010818A1 PCT/JP2004/011010 JP2004011010W WO2005010818A1 WO 2005010818 A1 WO2005010818 A1 WO 2005010818A1 JP 2004011010 W JP2004011010 W JP 2004011010W WO 2005010818 A1 WO2005010818 A1 WO 2005010818A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
distortion correction
data
image processing
coordinates
Prior art date
Application number
PCT/JP2004/011010
Other languages
English (en)
French (fr)
Inventor
Masaki Higurashi
Hideaki Furukawa
Akira Ueno
Original Assignee
Olympus Corporation
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
Priority claimed from JP2003202493A external-priority patent/JP4772281B2/ja
Priority claimed from JP2003202664A external-priority patent/JP4334932B2/ja
Priority claimed from JP2003202663A external-priority patent/JP2005045513A/ja
Application filed by Olympus Corporation filed Critical Olympus Corporation
Priority to US10/566,408 priority Critical patent/US7813585B2/en
Priority to EP04771117.1A priority patent/EP1650705B1/en
Publication of WO2005010818A1 publication Critical patent/WO2005010818A1/ja

Links

Classifications

    • G06T5/80
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/80Camera processing pipelines; Components thereof
    • H04N23/81Camera processing pipelines; Components thereof for suppressing or minimising disturbance in the image signal generation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T1/00General purpose image data processing
    • G06T1/20Processor architectures; Processor configuration, e.g. pipelining
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N25/00Circuitry of solid-state image sensors [SSIS]; Control thereof
    • H04N25/60Noise processing, e.g. detecting, correcting, reducing or removing noise
    • H04N25/61Noise processing, e.g. detecting, correcting, reducing or removing noise the noise originating only from the lens unit, e.g. flare, shading, vignetting or "cos4"

Definitions

  • Image processing apparatus image processing method and distortion correction method
  • the present invention mainly relates to an image processing device and an image processing method used for an electronic imaging device such as a digital camera, and more particularly, realizes a distortion correction function without increasing a circuit scale and a data transfer amount,
  • the present invention relates to an image processing device, an image processing method, and a distortion correction method capable of calculating a spatial position of a small region when performing a distortion correction process in units of small regions (for example, block lines).
  • distortion occurs in the optical system of a camera, regardless of whether it is a digital camera or a silver halide camera.
  • most of the cameras currently on the market are capable of optical zoom, in which case the state of distortion changes from the wide-angle end to the telephoto end. There is much barrel distortion at the wide end, and pincushion distortion at the tele end.
  • the distortion is observed as a barrel distortion and a pincushion distortion when, for example, a lattice-shaped object is photographed.
  • FIG. 56 shows a grid-shaped object
  • FIG. 57 shows a photographed image with barrel distortion
  • FIG. 58 shows a photographed image with pincushion distortion.
  • the data compressed by a compression method such as JPEG is recorded on a recording medium such as a memory card. I do.
  • Figure 59 shows the concept of the image processing procedure performed by a general digital camera. Pre-process pixel defect processing, AZD conversion, etc. on the image signal captured by the CCD, and temporarily store the obtained image data in a frame memory such as an SDRAM. Next, image processing is performed on the image data read from the frame memory. Various image processing is performed by the process, and the image is compressed by JPEG processing and recorded on a memory card or the like as a recording medium.
  • Figure 60 is a block diagram of a conventional digital camera image processing device.
  • the conventional image processing apparatus includes a pre-processing circuit 102, a plurality of image processing circuits 106-1 to 106-n, a JPEG processing unit 107, a frame memory 105, and a recording medium on a path 103 together with a CPU 104.
  • Memory card 108 is connected. Then, under the control of the CPU 104, the imaging signal from the CCD 101 is subjected to pixel defect processing, A / D conversion, and the like by the pre-processing circuit 102, and then temporarily stored in the frame memory 105 through the node 103.
  • the image data is read out from the frame memory 105, input to the image processing circuit 106-1 through the path 103, performs predetermined image processing, and is rewritten into the frame memory 105 through the bus 103 again.
  • data is sequentially exchanged between the frame memory 105 and the image processing circuits' 106-2 to 106-n via the bus 103, and finally, the JPEG processing unit 107 performs JPEG processing.
  • the compression processing is performed, the image data is temporarily stored in the frame memory 105, and the processing data read from the frame memory 105 is recorded in the memory card 108 or the like.
  • image processing is performed in units of small areas (proclines).
  • FIGS. 61 and 62 illustrate the operation of correcting a captured image in which barrel distortion and pincushion distortion have occurred according to the above [Equation 5].
  • Fig. 61 shows a case where the original image (left in the figure) distorted in a barrel shape as shown by the dotted line is corrected by [Equation 5], and the corrected image (right in the figure) is out of the image output range and wasted. Has arisen.
  • Fig. 62 shows a case where the original image (left in the figure) distorted in a pincushion shape as shown by the dotted line is corrected by [Equation 5], and the corrected image (right in the figure) becomes smaller than the image output range and becomes smaller. —Some parts of the evening are short.
  • Japanese Patent Application Laid-Open No. 9-098340 which is a prior application, discloses that after distortion correction, electronic zooming is performed to correct the distortion. The reduced amount is returned to its original position, minimizing image 'information lost due to distortion correction.
  • Japanese Unexamined Patent Publication No. Hei 6-181530 discloses that, when the detecting means detects that the imaging position of the imaging zoom lens during imaging is within a position where distortion is large, the imaging zoom is used. It describes that geometric distortion of an image caused by a lens is corrected by reading out image data of a solid-state image sensor based on geometric deformation.
  • Japanese Patent Application Laid-Open No. H10-224648 discloses a solid-state imaging device that receives light passing through an optical system.
  • the data captured by the imaging device is stored in a random access video memory, and the random read timing generation circuit has an error correction data for correcting the aberration caused by the optical system. It describes that a signal generated by a solid-state imaging device is read out in a predetermined order to generate a video signal, thereby correcting distortion of an optical system.
  • Japanese Patent Application Laid-Open No. Hei 9-19963 only mentions correction of barrel distortion, and refers to the point closest to the imaging center, and in principle, corrects barrel distortion. Only correction. With respect to pincushion distortion, the corrected image is smaller than the image output range, and a portion of the image data is insufficient. Furthermore, to correct the Jinkasa type distortion as shown in Fig. 22, the distortion correction equation requires a fourth-order term or higher, but it is necessary to analytically determine the correction magnification M for maximizing the use of the original image data. Was difficult.
  • Japanese Patent Application Laid-Open No. 6-185030 discloses that distortion correction processing is performed. However, as shown in FIG. 36, pixels on the CCD imaging surface (vertical and horizontal grids indicated by black circles) are used. (Point 3) If the subject image, which should be a straight line, is curved due to the distortion of the optical lens and forms an image (indicated by reference numeral 32), a large-capacity buffer memory is stored in the line memory in the distortion correction circuit. Is required. In addition, the image size that can be processed is limited by the capacity of the buffer memory. Furthermore, there is no description on a method for determining the spatial position of data stored in the buffer memory. Furthermore, Japanese Patent Application Laid-Open No. Hei 6-181530 does not describe at all the distortion correction processing in small area (block line) units.
  • a buffer memory is not required for processing by random access, but generally, when a memory such as an SDRAM is randomly accessed, the transfer time is reduced. Take it. Therefore, a first object of the present invention is to perform a distortion correction process by effectively utilizing a captured original image, and to output the corrected image to the image output range effectively without waste. It is an object of the present invention to provide an image processing apparatus and an image processing method capable of performing a distortion correction process capable of coping with distortion, barrel distortion, and jinkasa distortion.
  • a second object of the present invention is to provide an image processing apparatus and a distortion correction method capable of calculating a spatial position of a small area (for example, a block line) and realizing distortion correction processing in small area units. That is.
  • the third aspect of the present invention is that accurate distortion correction can be performed even on an image obtained by thinning out images, while accurate distortion correction can be performed on an image obtained by cutting out an arbitrary area such as a digital zoom. And a distortion correction method.
  • a fourth object of the present invention is to provide an image processing apparatus and an image processing method capable of realizing distortion correction processing without greatly increasing the amount of transfer of a bus / the capacity of a memory.
  • An image processing device is an image processing device having a distortion correction unit, further comprising: a distortion correction range calculation unit that calculates an input image range in which the distortion correction unit performs a distortion correction process. Having.
  • the distortion correction range calculation unit that calculates the input image range in which the distortion correction process is performed, an area corresponding to a part or the whole of the output range of the output image (that is, the image after the distortion correction) is provided.
  • the corrected image obtained by the distortion correction can be output to the output range to be output without excess or deficiency.
  • the corrected image can be prevented from protruding or missing.
  • the distortion correction range calculation unit includes: a coordinate generation unit configured to generate an interpolation coordinate; and a distortion correction unit configured to output a coordinate obtained by applying a predetermined distortion correction formula to the generated interpolation coordinate.
  • the position of the corrected image (output image) to be output is generated in advance in order to obtain the position of the captured image (input image) before distortion correction. That is.
  • a distortion correction formula is applied to the interpolated coordinates to generate (convert) and output an image position (coordinates) before distortion correction, and calculate an input image range to be subjected to distortion correction processing from the converted coordinate positions before correction. I am trying to do it.
  • the distortion correction range calculation unit calculates a maximum value and a minimum value of coordinates of pixels corresponding to each of four sides of the output image range and the output image with respect to the coordinates generated by the coordinate conversion.
  • the input image range is calculated from at least one of the coordinates corresponding to the four vertices of the range.
  • the four vertices indicate the vertices of each side in the output image after distortion correction.
  • the distortion correction range calculation unit calculates the input image range by sequentially repeating range calculation for a plurality of input signals to be subjected to distortion correction processing.
  • the distortion correction range calculation is performed on the block lines to be processed next for each of the multiple input signals while the correction processing is performed on the multiple input signals simultaneously.
  • one distortion correction range calculation unit is performed in an iterative process, and a correction magnification M is determined so that the image range after distortion correction for the input image range becomes a predetermined range.
  • the distortion correction range calculation unit calculates an image input range in which distortion correction is performed next while the distortion correction processing unit is performing distortion correction.
  • An image processing method is an image processing method for performing a distortion correction process, wherein when performing the distortion correction process, an input image range in which the distortion correction process is performed is calculated.
  • the input image range in which the distortion correction processing is performed is calculated so that the area corresponding to a part or the whole of the output range of the image after the distortion correction occupies the input image.
  • the corrected image obtained by the distortion correction can be output to the image output range without excess or deficiency, so that the corrected image does not protrude or run out of the image output range. it can.
  • An image processing device is an image processing device having a distortion correction means for performing a distortion correction process on an image data, wherein the distortion correction means includes: When calculating the position corresponding to each pixel according to a predetermined correction formula, the position is calculated in a coordinate system that can describe the spatial position on the imaging surface.
  • the coordinate system corresponding to the imaging surface (that is, the position in the two-dimensional space) is used as a reference. Perform calculations.
  • the distortion correction means performs the processing in units of a first small area included in the corrected image, and converts the coordinate position of each pixel of the first small area according to the correction formula into a small area. After converting the position in the coordinate system corresponding to the imaging surface with respect to the second small region on the imaging plane including the image data, the data of each pixel of the corrected image is generated after converting the position into the coordinates in the second small region. .
  • the interpolation processing can be performed based on the coordinates in the small area to be converted.
  • the image data may be partial image data obtained by capturing only a part of the image data.
  • an image data not all of the captured data but a part of the data, for example, data cut out from the center of the captured data at the time of digital zoom, or reduced data generated by thinning out the captured data. Even can be applied.
  • the image data is filtered with respect to the image data,
  • the data may be generated by performing at least one of the pulling and the interpolation.
  • a distortion correction method is a distortion correction method for an image processing apparatus having distortion correction means for performing distortion correction processing on image data, wherein the distortion correction method includes a coordinate system corresponding to each pixel of the corrected image.
  • this distortion correction method for example, when obtaining the data of each pixel of the corrected image by a correction formula for correcting geometric distortion due to the imaging lens, a coordinate system corresponding to each pixel of the corrected image is used.
  • the first position is converted into a second position in a coordinate system in the image data before distortion correction according to the distortion correction formula, and the converted second position is converted into a coordinate system corresponding to the imaging surface. Is converted into coordinates within the setting area based on the reference, and interpolation processing is performed based on the coordinates to generate pixel data of the corrected image.
  • the processing is performed for each small area included in the corrected image.
  • processing is performed on a small area (for example, an area called a block line) included in the corrected image.
  • An image processing apparatus is an image processing apparatus having a distortion correction means for performing distortion correction processing on image data, wherein the distortion correction unit includes: a memory unit that stores a part of the image data; A memory control unit that controls the writing and reading of data to and from the unit, and controls the image data read from the memory unit. To perform an interpolation operation.
  • a part of the image data can be stored in the memory unit serving as an internal buffer, and the data can be used to perform an interpolation operation for distortion correction processing.
  • the memory control unit controls so that image data (unit line: UL) composed of a fixed number of pixels arranged in a line in a column direction is written as a unit.
  • image data unit line: UL
  • reading control is performed on the image data stored in the memory unit so that the image after the distortion correction processing is output in units of the UL.
  • the buffer capacity of the memory unit only needs to have a capacity of several ULs, that is, at least 1 UL in accordance with the amount of optical distortion. Distortion correction can be realized without greatly increasing the bus transfer amount or the memory capacity.
  • the memory control unit is configured such that, with respect to the coordinate position of the pixel to be processed first of the UL, a region having a predetermined width on the front side and the rear side in the row direction (p-reULB, postULB respectively). ) Is provided so that the area is not overwritten by other processing during the UL processing.
  • the image processing apparatus further comprises a buffer free space monitoring circuit for detecting a free space in the buffer, and when the free space monitoring circuit detects a free space in the buffer, Enables data writing.
  • a buffer free space monitoring circuit for detecting a free space in the buffer, and when the free space monitoring circuit detects a free space in the buffer, Enables data writing.
  • This configuration enables a pipeline-like operation that allows input during data output.
  • the memory unit includes a plurality of memories capable of simultaneously performing a read operation and a write operation simultaneously
  • the memory control unit further includes a write address generation unit that performs a data write control on the memory unit. Circuit and an address for simultaneously reading out data necessary for interpolation from the image data stored in the memory unit. And a read address generation circuit, wherein the data write control is to write simultaneously read data to different memories.
  • An image processing method is an image processing method for performing a distortion correction process on an image data, wherein, when the distortion correction process is performed, the memory unit in which writing and reading of data are controlled is performed. Part of the data is stored, and an interpolation operation is performed on the image data read from the memory unit.
  • a part of the image data is stored in a memory unit as an internal buffer, and an interpolation operation for a distortion correction process can be performed using the data.
  • FIG. 1 is a block diagram showing the overall configuration of the image processing apparatus a according to the first embodiment of the present invention.
  • FIG. 2 is a block diagram illustrating a configuration of the distortion correction processing unit.
  • FIG. 3 to 5 are conceptual diagrams of coordinate conversion in the distortion correction processing unit.
  • FIG. 3 is a diagram showing captured image data
  • FIG. 4 is a diagram showing a corrected image
  • FIG. 5 is a diagram explaining an interpolation process.
  • FIG. 6 is a diagram showing the reading order of image data.
  • FIG. 7 is a diagram for explaining the data overnight order conversion processing in the first data overnight order conversion unit.
  • FIG. 8 is a view for explaining a data order conversion process in the second data order conversion unit.
  • Figure 9 is a diagram showing the relationship between block lines and the memory capacity (buffer capacity) required for distortion correction processing.
  • FIG. 10 is a diagram showing a method of setting a block line width.
  • FIG. 11 is a block diagram illustrating a configuration of the distortion correction range calculation unit.
  • FIGS. 12 and 13 are diagrams illustrating the operation of calculating the input image range when performing the distortion correction process in the distortion correction range calculation unit.
  • FIG. 12 is a diagram illustrating a range on the corrected image.
  • Fig. 13 is a diagram showing the range over one year.
  • FIG. 14 is a flowchart for explaining the operation of the distortion correction processing.
  • FIG. 15 is a flowchart illustrating a method of calculating the correction magnification M in step S11 of FIG.
  • FIG. 16 is a block diagram showing the configuration of the distortion correction range calculation unit in FIG.
  • FIG. 17 is a timing chart of the overnight output of FIG.
  • Fig. 18 is an improvement of the operation of Fig. 17, and is a timing chart of the overnight output in the pipeline.
  • FIG. 19 is a diagram illustrating a method of calculating an input image range when performing distortion correction processing for three channels.
  • FIG. 20 is a flowchart illustrating the operation of the distortion correction processing in the case of three channels.
  • FIG. 21 is a block diagram showing the overall configuration of the image processing apparatus according to the second embodiment of the present invention.
  • FIG. 22 is a view showing a photographed image in which a kinkasa type distortion has occurred.
  • FIGS. 23 and 24 are diagrams showing the relationship between the captured image data before correction and the corrected image after correction
  • FIG. 23 is a diagram showing the captured image data before correction
  • FIG. FIG. 4 is a diagram showing a corrected image of FIG.
  • FIG. 25 is a flowchart of the distortion correction processing of FIGS. 23 and 24.
  • FIGS. 26 and 27 show the relationship between the captured image data before correction and the corrected image after correction in the case of digital zoom.
  • FIG. 26 shows the captured image data before correction.
  • FIG. 27 is a diagram showing a corrected image after the correction.
  • FIGS. 28 and 29 show the relationship between the image data before correction and the corrected image after correction when a certain area is cut out from the image data.
  • FIG. 29 is a view showing a captured image
  • FIG. 29 is a view showing a corrected image after correction.
  • FIGS. 30 to 32 are diagrams for explaining line thinning in the CCD monitor mode.
  • FIG. 30 is a diagram for explaining a state in which data at the time of imaging is thinned out from the CCD by three lines in the vertical direction and taken into the memory.
  • FIG. 32 is a view showing a captured image data stored in a memory
  • FIG. 32 is a view showing a corrected image in which the image is corrected to be asymmetric in the vertical and horizontal directions.
  • FIGS. 33 and 34 are diagrams for explaining horizontal thinning of color data in YC422 format data.
  • FIG. 33 is a diagram showing luminance data
  • FIG. 34 is a diagram showing color data.
  • FIG. 35 is a diagram for explaining center shift of an image.
  • FIG. 36 is a diagram showing the relationship between CCD pixels and captured images.
  • FIG. 37 is a block diagram illustrating a detailed configuration of the distortion correction processing unit in the image processing device according to the third embodiment of the present invention. '
  • FIG. 38 is an image diagram of the interpolation operation in the interpolation circuit.
  • FIG. 39 is a diagram for explaining the internal memory unit in the distortion correction processing unit.
  • FIGS. 40 and 41 are diagrams for explaining the supplementary explanation of FIG. 39 and explaining how data is written to the 2-port SRAM.
  • FIG. 40 is a diagram showing a writing order
  • FIG. 41 is a diagram shown in FIG.
  • FIG. 9 is a diagram showing where data in the write order is written on 16 2-port SRAMs.
  • FIG. 42 is an explanatory diagram for obtaining DO required to calculate the corrected coordinate position in FIG.
  • FIG. 43 is a diagram showing an example of the error processing.
  • FIG. 44 shows another example of the error processing.
  • FIG. 45 shows another example of the error processing.
  • FIG. 46 is a diagram illustrating the buffer amount required for the distortion correction processing.
  • FIG. 47 is a diagram illustrating the buffer amount required for the distortion correction processing.
  • FIGS. 48 and 49 are diagrams for explaining the buffer amount required for the distortion correction processing.
  • FIG. 48 is a diagram for explaining the definitions of preULB and post ULB. It is a figure explaining buffer release amount when straddling a heart.
  • FIG. 50 is a view for explaining a method of calculating the opening amount associated with the UL processing.
  • FIG. 51 is a diagram for explaining a method of calculating the opening amount associated with the UL processing.
  • Fig. 52 is a diagram explaining the vacancy of the pipeline processing accompanying the processing of Fig. 51 o
  • FIG. 53 is a view for explaining a method of calculating the opening amount associated with the UL processing.
  • FIG. 54 is a diagram for explaining the empty space of the pipeline processing accompanying the processing of FIG.
  • FIG. 55 is a diagram for explaining a method of calculating the opening amount associated with the UL processing.
  • FIG. 56 is a diagram showing a grid-like subject.
  • FIG. 57 is a diagram showing a captured image in which barrel distortion has occurred.
  • FIG. 58 is a view showing a photographed image in which pincushion distortion has occurred.
  • FIG. 59 is a diagram showing the concept of the image processing procedure of a general digital camera.
  • FIG. 60 is a diagram showing a block configuration in an image processing device of a conventional digital camera.
  • FIG. 61 is a diagram for explaining an operation of correcting a captured image having a barrel distortion using [Equation 5].
  • FIG. 62 is a diagram for explaining an operation of correcting a photographed image having pincushion distortion by [Equation 5].
  • FIG. 1 is a block diagram showing the overall configuration of the image processing apparatus according to the first embodiment of the present invention.
  • the image signal from the CCD 1 is subjected to pixel defect processing, AZD conversion, and the like by the pre-processing circuit 2 under the control of the CPU 4 that controls each unit connected to the bus 3.
  • the image data over the bus 3 via the frame memory 5
  • the frame memory 5 is a memory configured by SDRAM or the like, and stores data before image processing and data after image processing.
  • the image data read from the frame memory 5 is input to the first data order converter 6 via the bus 3.
  • the first data-order conversion unit 6 includes a plurality of memories capable of storing data in blocks, here two.
  • the first data order converter 6 reads out data from the frame memory 5 in the row direction and stores the data, then reads out the data in the column direction in order, and outputs the data to the image process circuit 7.
  • the image processing circuit 7 performs predetermined image processing on the input data and transfers the processed data to a distortion correction processing unit 8 as a distortion correction unit in the next stage.
  • the distortion correction processing unit 8 performs a distortion correction process on the input data and transfers it to the second data order conversion unit 9 in the next stage.
  • the second data / order conversion unit 9 includes a plurality of memories, here two, capable of storing data in block units.
  • the second data-to-night order converter 9 reads out the data from the distortion correction processor 8 in the column direction and stores the data in the column direction, sequentially reads the data in the direction, and transfers the data to the JPEG processor 10.
  • the JPEG compression unit 10 performs JPEG compression processing, temporarily stores the processed data in the frame memory 5, and records the processed data read from the frame memory 5 on a memory card or the like 11. ing.
  • the distortion correction processing unit 8 calculates the position of the corrected image after the distortion correction (X, Y called the interpolation position) and the corresponding position of the original image before the distortion correction ( ⁇ ′, ⁇ ') And a buffer memory (hereinafter simply referred to as a buffer) for temporarily storing a part of the image data from the circuit of the previous block of the distortion correction processing unit 8.
  • image and internal memory unit 82 a memory controller 8 3 for controlling the Shi out writing and reading with respect to its internal memory unit 82, converted distortion correction image before the position of the coordinates (X 5, ⁇ ') according to the And an interpolation operation unit 84 that performs processing and corrects distortion of data.
  • the interpolation coordinate generation section 81 generates an interpolation position generation section 811 for generating interpolation coordinates (X, ⁇ ) and a predetermined distortion correction for the generated interpolation coordinates (X, ⁇ ).
  • Expression [expression 1] A distortion correction coordinate conversion unit 812 that outputs the coordinates ( ⁇ ′, ⁇ ′) before correction converted by applying (described later), the interpolation coordinates ( ⁇ , ⁇ ) from the interpolation position generation unit 811 and And a selector 813 that can selectively output the transformation coordinates ( ⁇ ′, ⁇ ′) from the distortion correction coordinate transformation unit 812.
  • the set values for each block set in the control register 85 storing control data are set. It works according to. In addition, the status of the processing result can be referenced from the CPU.
  • the distortion correction processing unit 8 includes a distortion correction range calculation unit 12 that calculates an input image range in which the distortion correction processing unit 8 performs a distortion correction process.
  • the distortion correction range calculation unit 12 converts the coordinate by generating a coordinate generation unit 91 that generates interpolation coordinates and applying a predetermined distortion correction formula to the generated interpolation coordinates.
  • a distortion correction coordinate conversion section 92 that outputs coordinates and a correction range detection section 93 that calculates the input image range from the converted coordinate positions before correction are configured.
  • the first data-order converter 6 to the JPEG processor 10 are different from the bus 3 without passing through the bus 3. It is connected so that it can be pipelined through an information transmission path, and transfers and processes the image data in a predetermined block unit in a two-dimensional pixel array.
  • the data transfer via the bus 3 is performed by transferring the data from the frame memory 5 to the first data order converter 6, transferring the data from the JPEG processor 1Q to the frame memory 5, and transferring the data from the frame memory 5 to the memory memory.
  • the data is transferred only to the bus 11 and the data is transferred between the frame memory and each image processing circuit. Evening traffic can be greatly reduced, and the load on bus 3 can be significantly reduced.
  • the distortion correction processing unit 8 is provided after the image processing circuit 7, but the configuration may be reversed.
  • the image processing circuit section composed of the first stage image processing circuit 7 and the second stage image processing circuit, which is a distortion correction processing section 8 a pipeline register is provided before or inside each of the image processing circuits 7 and 8.
  • a small-capacity memory is provided, and the image processing circuits 7 and 8 are configured to perform a pipeline processing operation via the small memory.
  • These small-capacity memories are used to store the peripheral data required for image processing when performing spatial image processing in each of the image processing circuits 7 and 8, and to read image data in block units. It is provided because it is necessary to perform rearrangement and other processing.
  • FIG. 3 to 5 show conceptual diagrams of coordinate conversion in the distortion correction processing unit 8.
  • Fig. 3 shows the original image of the original image
  • Fig. 4 shows the corrected image
  • Fig. 5 shows the coordinate of the original image in Fig. 3 with respect to the coordinate position (X, Y) of the corrected image in Fig. 4.
  • Data coordinates (, ', ⁇ ') at the coordinate position P converted above (The coordinate ⁇ is a coordinate position that does not always exactly match the positions of the pixels that actually constitute the original data.
  • the coordinate position ( ⁇ ', ⁇ ') at the point ⁇ is calculated using the coordinates of the 16 pixels around the ⁇ ⁇ point. Interpolation is performed using the pixel data of.
  • the interpolation calculation unit 84 performs processing to interpolate the data at the point ⁇ from the pixel values (brightness data) of 16 points around it.
  • the generation of the interpolation coordinates by the interpolation position generation unit 811 in FIG. 2 means which pixel position (X, ⁇ ) is pointed on the corrected image side in FIG.
  • the pixel position (X ′, ⁇ ′) before the distortion correction with respect to the pixel position ( ⁇ ,. ⁇ ) after the distortion correction can be calculated.
  • the pixel position ( ⁇ ', ⁇ ') before distortion correction does not always have an integer value corresponding to the pixel position on the original image.
  • Equation 1 Z in [Equation 1] is the distance from the distortion center (X d, Yd) to the point of interest (X, Y).
  • [Equation 1] calculates the coordinates ( ⁇ ', ⁇ ⁇ ') of the original image that is distorted with respect to the point (X, Y) of the corrected image.
  • is a correction magnification for correcting a phenomenon that an image protrudes or becomes insufficient after correction when it is theoretically corrected using the data of the optical system.
  • S X and S y are sampling ratios for correcting phenomena such as thinning in which the vertical and horizontal spatial sampling intervals differ.
  • X off and Y off are values of the center shift for correcting a phenomenon that the object position deviates from the position at the time of shooting after the distortion correction processing.
  • M ⁇ 1 In the barrel-shaped distortion shown in Fig. 61, M ⁇ 1 must be used to reduce the distortion a little in order to correct the distortion. In the case of the pincushion distortion shown in Fig. 62, it must be stretched in the opposite direction, so set M> 1.
  • Equation 5 described in the conventional example is described in consideration of correcting barrel distortion and pincushion distortion.
  • FIG. 6 is a diagram for explaining the reading order of the image data from the frame memory according to the present embodiment.
  • the image data is swept in the line direction, that is, the row direction, and is written in the line direction.When reading, the image data is read in the row direction. Then, it is common to repeat the operation of reading out all the image data of the next adjacent line.
  • the image processing apparatus converts the image data written by sweeping in the row direction into image data in the row direction in units of a certain length in the column direction.
  • the image data is input to the image processing unit 7 in order, and then the next row is input to the image processing unit 7 and input repeatedly to the right end of the image.
  • the small area (rectangular image data) ) Is called a block line (BL).
  • FIGS. 7 and 8 are block diagrams showing the configuration of the first and second data sequence converters.
  • the first data overnight sequence converter 6 has a plurality of memories, here two, capable of storing the image data in blocks, and the two memories 6a and the memories 6a are used. 6b is designed so that writing and reading can be alternately switched by each switch on the writing and reading sides. That is, the frame memory 5 is switchably connected to these memories 6a and 6b by a switch on the writing side, and the image processing section 7 is connected to these memories 6a by a switch on the reading side.
  • the frame memory 5 When the frame memory 5 is connected to the memory 6b so as to be switchable and the frame memory 5 is connected to one of the memory 6a and the memory 6b, the other of the memory 6a and the memory 6b is connected to the image processing unit 7 Is switched to be connected to. That is, the memories 6a and 6b are switched so as not to be connected to both the frame memory 5 and the image processing unit 7 at the same time, and writing and reading are performed alternately.
  • a part of the frame image stored in the frame memory 5 is read in the line direction in block units and stored in one memory, here, for example, the memory 6a.
  • the image data in block units which have already been read and stored from the frame memory 5 are sequentially read in the column direction (vertical direction), and the image processing unit 7 Output to
  • the switch on the writing side and the switch on the reading side are switched. Writing of the next block of image data to the memory 6b is started, and reading of block image data from the memory 6a to the image processing unit 7 is started.
  • the second data order converter 9 is configured in substantially the same way as the first data order converter 6, and operates almost in the same way.
  • the second data converter 9 stores the memory 9 a, the memory 9 b, It has a side switch and a read side switch.
  • writing from the distortion correction processing unit 8 is performed in one of the memories 9a and 9b in the column direction (vertical direction). Reading is performed in the row direction (horizontal direction) from the other of a and the memory 9b, and is output to the JPEG processing unit 10.
  • Figure 9 shows the relationship between the block line and the memory capacity (buffer capacity) required for distortion correction processing.
  • the four distorted solid lines on the dotted line frame indicate that the output data after distortion correction should be a straight line (one vertical line), but are distorted in the original data. Among the four straight lines, the leftmost straight line away from the image center is the most distorted. Black circles indicate positions before distortion correction corresponding to pixel positions of output data after distortion correction.
  • the horizontal width where the distorted input data after imaging becomes the maximum amount of distortion in the block line is taken into consideration by taking into consideration 16-point interpolation with a margin left and right. Is secured as a buffer amount necessary for the distortion correction processing. In other words, it indicates the amount of buffer capable of correcting distortion if there is such a buffer capacity, in other words, the amount of buffer capable of creating a correct linear shape when distortion is corrected.
  • FIG. 10 shows a method of setting the block line width.
  • An example is shown in which the block line width is variably set according to the target position of the distortion correction processing.
  • the curved dotted line indicates a distorted image on the input side, and the degree of distortion increases as the distance from the center of the image, that is, toward the outside, increases. Therefore, when setting the block line width for the input data on the frame memory, the width is set such that the width increases as the distance from the image center increases and the width decreases as the distance from the center increases.
  • the bus occupation time at that time can be reduced.
  • the amount of deformation due to distortion is small at the center of the image.
  • Change the set value of the block line width (the vertical sweep width shown in the figure) depending on the position of the distortion correction processing target. Since Equation 1 contains higher-order terms, the input range necessary for processing the block lines cannot be determined analytically.
  • Set the block line width to calculate the distortion correction range It is set based on the processing result of the unit 12 and by performing a predetermined operation on the result by the CPU.
  • FIG. 11 shows the configuration of the distortion correction range calculation unit 12.
  • the distortion correction range calculation unit 12 includes a coordinate generation unit 91 that generates interpolation coordinates (X, Y) and a predetermined distortion correction expression (eg, [Equation 1]) for the generated interpolation coordinates (X, Y). ) Is applied, and the distortion correction coordinate conversion section 92 outputs coordinates ( ⁇ ', ⁇ ') which are transformed, and inputs necessary for distortion correction processing from the transformed coordinate positions ( ⁇ ', ⁇ ') before correction. And a correction range detection unit 93 for calculating an image range.
  • a coordinate generation unit 91 that generates interpolation coordinates (X, Y) and a predetermined distortion correction expression (eg, [Equation 1]) for the generated interpolation coordinates (X, Y).
  • the distortion correction coordinate conversion section 92 outputs coordinates ( ⁇ ', ⁇ ') which are transformed, and inputs necessary for distortion correction processing from the transformed coordinate positions ( ⁇ ', ⁇
  • the distortion correction range calculation unit 12 includes the coordinate generation unit 91, the distortion correction coordinate conversion unit 92, and the correction range detection unit 93, and controls the operation of the CPU 4 through the control register 94. And the range calculation results will be obtained through Regis Evening 95.
  • the distortion correction range calculation unit 12 is added to the distortion correction processing function, and functions as a support function that allows calculation of an input range of image data in consideration of distortion deformation.
  • the intersection coordinates corresponding to the lattice points of the corrected image are formed on the distorted line, but the distorted area corresponding to the block line, that is, What is necessary is that the dotted line is used as the input image range.
  • the maximum and minimum values for the four sides that define the position range are obtained. The value indicates the input image range.
  • the upper side is Y Tmax, Y Tmin
  • the lower side is Actually, it is detected that the side falls between YBtnax and YBmin, the left side falls between XLmax and XLmin, and the right side falls between XRmax and XRmin. , And store it in the result storage register 95.
  • the block line processing requires a range in which (X Lmin to X Rmax, Y Tmin to ⁇ Bmax) plus the pixels required for interpolation.
  • the converted positions of the vertices are (X, TL, Y, TL), (X, TR, Y, TR), (X, BL, Y, BL) and (X, BR, Y, BR). '
  • the coordinate generation unit 91 generates a coordinate position (X, Y) required for the corrected image by [Equation 2], and converts it into ((′, ⁇ ′) by [Equation 1].
  • the converted positions of each vertex are (X, TL, Y, TL), (X, TR, Y'TR), (X, BL, Y, BL), (X, BR, Y, BR). Is detected by the correction range detection unit 93 and stored in the result storage register 95. ''
  • FIG. 14 is a flowchart for explaining the operation of the distortion correction processing.
  • step S11 the correction magnification M of the distortion correction [Equation 1] is determined. How to determine the correction magnification M will be described later with reference to the flowchart of FIG.
  • step S12 using the determined correction magnification M, as described in the description of FIGS.
  • step S13 the input range thus calculated and the set values required for the distortion correction processing are set.
  • step S14 the distortion correction processing for each block line and the input range calculation for the next block line are simultaneously executed.
  • step S15 it is determined whether or not the distortion correction processing has been completed for the entire output image, so that step S14 is repeated, and the processing is continued until the distortion correction processing has been completed for the entire image, and the processing ends.
  • the image input range for performing the next distortion correction is calculated.
  • the image input range for performing the next distortion correction processing is changed. It is known that it is possible to perform the distortion correction processing sequentially and smoothly on the next block line without delay.
  • step S11 if the correction magnification M is properly determined, even if any of the barrel-type and pincushion-type distortion images described in FIGS. It is possible to put in exactly.
  • FIG. 15 is a flowchart illustrating the method of calculating the correction magnification M in step S11 of FIG.
  • step S21 1.0 is set as the initial value of the correction magnification M.
  • the input image range is calculated by the distortion correction range calculation unit 12 by performing coordinate transformation on, for example, four sides of the output image (step S22). It is determined whether it is within the range of the original image (step S23). If the output range exceeds the output range as shown in FIG. 61 at step S23, M is reduced by M (step S24), and the process returns to step S22 to calculate the input image range. Perform the in-range judgment of S23.
  • step S23 it is determined whether or not it is within the range of the original image. If it is within the range of the original image, the process proceeds to step S25. In step S25, it is determined whether or not the input image range is the maximum M within the range of the original image. If it is not the maximum within the range of the original image, M is increased by M (step S26), and the process returns to step S22 and performs steps S23 to S26. If it is the maximum within the range of the original image in step S25, M at that time is determined as the correction magnification. At this time, the area used for the range calculation is the entire corrected image.
  • the flow in FIG. 15 may be another method.
  • the circuit scale can be reduced by using the multiplier for the correction operation in time series.
  • [Equation 1] when performing the distortion correction processing, the calculations are very multiplied and the circuit scale is extremely large in terms of hardware.
  • multipliers increase the hardware circuit scale, so it is preferable to reduce the number of multipliers as much as possible.
  • a multiplier control section is provided to control the multiplier, and processing is performed in a pipeline while taking timing, thereby reducing the circuit scale without reducing the overall processing speed.
  • FIG. 16 shows a specific configuration of a portion of the distortion correction coordinate conversion section 92 in FIG.
  • the other parts are the same as in FIG.
  • the distortion-correcting coordinate conversion unit 92 performs calculations with many multiplications as shown in [Equation 1]. However, it is necessary to reduce the number of multipliers by processing a plurality of multiplications in that order in a time series while maintaining the timing. It is configured to be able to.
  • Distortion correction coordinate conversion section 92 receives the interpolated coordinates (X, Y) from the coordinate generating unit 9 1, and Z 2 calculator 921 for calculating a Z 2 by calculating (2) of [Expression 1], Z (2)
  • a multiplier control unit 922 that inputs Z 2 from the calculation unit 921 and the key from the multiplier 923 and outputs a and h, a multiplier 923 that inputs a and 3 and outputs the key, and a correction coefficient Multiplier control unit 924 that outputs d corresponding to one of A, B, C,... and hi, d, and outputs £ that is the product of the correction coefficient and an integer multiple of Z
  • the multiplier 925, the £ from the multiplier 925, and the interpolated coordinates (X, Y) from the coordinate generator 91 are input, and the coordinates ( ⁇ ', ⁇ ') of the original data before correction are output.
  • FIG. 17 shows a timing chart of the overnight output of FIG.
  • Zeta 2 calculator 921 the clock CLK is "1, and inputs the timing interpolation coordinates (chi, Upsilon).
  • the multiplier control unit 922 outputs ⁇ 2 as / 5 at the timing of the clock CL '2', and the multiplier control unit 924 outputs the distortion correction coefficient A as d at the same timing '2'. I do.
  • the multiplier 923 shed is input, based on the? Outputs Z 4 as ⁇ , multiplier 925 input Is the shed, and outputs the AZ 2 as etc. the same time '3, based on the d.
  • the timing chart of FIG. 17 shows that there is a time gap (space) in the output data of each variable for each clock in the distortion correction coordinate conversion processing. Therefore, it is conceivable to output the output data of each variable continuously by pipeline processing so that there is no space in time.
  • FIG. 18 is an improvement of the operation of FIG. 17, and shows a timing chart of the overnight output in the pipeline processing.
  • the coordinate position (X ⁇ ') of the original data is obtained as an output after 7 clocks from the input of the interpolation coordinates ( ⁇ , ⁇ ), that is, until one result is obtained. Takes 7 clocks.
  • FIG. 18 since the same thing as the first cycle occurs at the tenth cycle, three pixels are processed in nine cycles. In other words, apparently one pixel is processed in three cycles.
  • the distortion correction range calculation unit has been described as an example in which the distortion correction range calculation processing is performed only for one channel.
  • three channels are calculated in the same time as the time for one channel described above.
  • a method for performing the calculation by one distortion correction range calculation unit will be described. To do this, as shown in Fig. 19, in the range setting on the corrected image in Fig. 12, the pixels for range calculation on the four sides of the region of interest are thinned out to, for example, 1 to 3 pixels, and set and processed. Thus, the processing can be completed in almost the same time as the processing time for one channel.
  • the thinning amount is set at the registration evening.
  • FIG. 20 is a flowchart illustrating the operation of the distortion correction processing in the case of three channels.
  • the distortion correction processing shown in Fig. 14 is applied to three channels.
  • Steps S31 to S33 and step S35 in FIG. 20 are the same as steps S11 to S13 and step S15 in FIG.
  • step S34 distortion correction processing for each block line in channel 3 and calculation of the input range of the next block line for the first channel (for example, R) Calculation of the input range of the next block line for channel 2 (for example, G)
  • the input range TO for the calculation of the input range of the next block line for the third channel (for example, B) is simultaneously executed.
  • the distortion correction range calculation is performed for the next processing target block line for multiple input signals.
  • one distortion correction range calculation unit calculates the range for a plurality of channels.
  • the image input range for performing the next distortion correction is calculated, so when the distortion correction for one block line is completed, the image input range for the next distortion correction processing is known. It is possible to perform the distortion correction processing sequentially and smoothly on the next block line without delay.
  • the distortion correction range calculation unit that calculates the input image range for performing the distortion correction processing since the distortion correction range calculation unit that calculates the input image range for performing the distortion correction processing is provided, the corrected image obtained by the distortion correction is output. It is possible to output without any excess or deficiency in the power output range. Distortion correction processing can be performed by effectively utilizing the original design, and pincushion distortion, barrel distortion, and Jinkasa distortion This makes it possible to perform distortion correction processing that can cope with the above. In addition, the input range required for processing for each block line can be calculated, and the amount of data transfer can be minimized.o
  • FIG. 21 is a block diagram showing the overall configuration of the image processing device according to the second embodiment of the present invention.
  • FIG. 21 shows a configuration in which the distortion correction range calculation unit 12 is deleted from FIG.
  • the configuration of the distortion correction processing unit in FIG. 21 is the same as that in FIG.
  • Equation 1 of the distortion correction coordinate transformation is an image in the whole screen to the last, and even if the corrected image is the image of the coordinate transformation result ( ⁇ ', ⁇ '), Is calculated to be located.
  • the image data input to the distortion correction processing unit 8 is in units of block lines.
  • the distortion correction processing unit 8 needs to know the spatial positional relationship (position in the two-dimensional space) of the input image data.
  • the control register 85 specifies the position of a block line to be processed by the distortion correction processing unit 8. :
  • FIG. 23 and FIG. 24 show the relationship between the captured image data before correction and the corrected image after correction.
  • FIG. 23 shows a photographed image
  • FIG. 24 shows a corrected image.
  • FIGS. 23 and 24 are conceptual diagrams in which attention is paid to a certain pixel position A on a certain block line BL of the corrected image (output side image).
  • the coordinates (X, Y) of position A in the corrected image (output image) are converted to the coordinates (X ', ⁇ ') of position A 'in (input image) using [Equation 1] of the distortion correction coordinate transformation. Is converted.
  • the coordinate positions (X, ⁇ ) and (Xblst, Yblst), the coordinate positions ( ⁇ ', ⁇ ') and ( ⁇ 'blst, ⁇ ' blst) indicate the positions of the entire screen from the origin.
  • the origin is the upper left corner of the entire screen.
  • the image data input to the distortion correction block is in units of a block line indicated by a code BL. For this reason, first, for example, to perform a distorted coordinate conversion process on the pixel A of the corrected image, it is necessary to convert the pixel A to a coordinate position (x ', y') in the coordinate system in the block line BL so that the final interpolation process can be performed. is there.
  • ⁇ and ⁇ are interpolation pitches. If 1.0 or more, a reduced image is generated, and if 1.Q or less, an enlarged image is generated.
  • the coordinate position (X blst, Y blst) corresponds to the position of the left shoulder of the output-side block line of the distortion correction block, that is, the start position of the block line.
  • (m, n) (0, 0)
  • the coordinate position (X, Y) of the output image after correction generated in [Equation 3] is transformed by [Equation 1] to obtain the coordinate position ( ⁇ ', ⁇ ') of the input image before correction in Fig. 23. Ask for. Then, by taking the difference between the coordinate position (,,, ⁇ ') and the coordinate position (X, blst, Y, blst), the left shoulder of the block line (thick dotted rectangle) is defined as the origin. (X ', y').
  • interpolation processing can be performed in block line units.
  • the block line BL 'shown by the thick dotted line on the input image side shown in Fig. 23 is set by the register 85, but in order to generate its value, the input range (distortion) of the image (Correction range) can be calculated.
  • the support function may be provided by adding to the distortion correction processing function of the distortion correction processing unit 8 or the like.
  • FIG. 25 is a flowchart of the distortion correction processing of FIGS. 23 and 24.
  • Step S41 the block line processing where hatching in FIG. 24 is performed is started (Step S41).
  • Step S42 the left shoulder of the hatched area in FIG. 24, that is, the start coordinate position (X blst , Y blst).
  • the coordinate position (X, Y) of the corrected image can be obtained from [Equation 3].
  • m and n are each increased by one, the coordinate position (X, Y) of each pixel in the block line BL indicated by hatching in FIG. 24 can be generated (step S43).
  • the position (X, Y) of the coordinate system in the corrected image is converted into the position ( ⁇ ′, ⁇ ′) of the coordinate system in the captured image before correction using [Equation 1] (step S44).
  • the position ( ⁇ ', ⁇ ') of the coordinate system in the captured image is converted into the position (x ', y') of the coordinate system in the input block line BL by the method described above (step S45).
  • an interpolation process is performed based on the coordinate position (x ', y') in the block line BL, and a plurality of neighboring pixel data is obtained by 16-point interpolation at the coordinate position ( ⁇ ', ⁇ '). By calculating the interpolation data from the evening, the corrected image data for one pixel can be obtained (step S46).
  • Step S47 it is determined whether or not the above steps have been performed for all pixels in the BL of the coordinate system of the corrected image (step S47), and if not completed, the next m and n are set (step S47). 48), Steps S43 to S47 are repeated, and if the processing in all the pixels has been completed in the determination in Step S47, the process proceeds to Step S49.
  • step S49 it is determined whether the distortion correction processing has been completed for all the block lines BL in the entire screen (frame). If not, the next input block line BL is selected. Steps S41 to S49 are repeated, and if the processing has been completed for all the screens in the determination of step S49, the processing ends. 26 to 29 can be said to be modifications of FIG.
  • Only a part of the imaging data may be used.
  • Memory can be saved by selectively capturing part of the image data from the CCD.
  • information (X, imgst, Y, imgst) on where the captured data is located on the image sensor is required.
  • FIGS. 26 and 27 show the case of digital zoom, in which only the central portion is taken from the captured image data.
  • the difference from the case of FIG. 25 is that, as described above, the preprocess circuit 2 sets where to take in the entire screen. Based on this setting, only the necessary parts are captured, and the range is indicated by E 'in Fig. 26.
  • the start position (X imgst, Y imgst) that corresponds to the left shoulder of the digital zoom range E in the entire screen is set.
  • the block line BL is set.
  • position coordinates (Xblst, Y blst) are determined with the left shoulder of the capture range E as the origin, and by changing m and n as in [Equation 2], each pixel in the block line BL is changed. Coordinates can be generated.
  • the position ( ⁇ , ⁇ ) in the coordinates of the entire screen is determined from the coordinate position (X imgst, Y imgst), (X blst, Y blst), ( ⁇ , ⁇ ⁇ ). .
  • the coordinate position ( ⁇ ′, ⁇ ′) in the captured image can be obtained from the coordinate position (X, ⁇ ) determined as described above using [Equation 1].
  • the coordinates (X, imgst, Y, imgst) of the left shoulder can be determined from the set range E 'on the image plane of the captured image data.
  • the coordinates of the left shoulder of the capture range E are defined as the origin, and the coordinate positions (X, blst, Y 'blst) of the left shoulder of the block line BL, are obtained in advance using the support function. Loci in coordinates at Target position (x ', y J) is determined. As a result, interpolation processing is performed for each block line.
  • FIGS. 28 and 29 show a case where a certain area, for example, the edge of the screen is cut out from the image data. This corresponds to a case where a surveillance camera or the like captures an end portion of the image data.
  • FIGS. 28 and 29 the same reference numerals are given as in FIGS. 26 and 27. The operation is the same as in FIGS. 26 and 27, except that the cutout positions are different from those in FIGS. 26 and 27.
  • the CCD as an image pickup device is provided with a monitor mode (a mode in which an image is captured; the entire screen is not read out).
  • monitor mode lines are often thinned out, and the size may differ on the data, even though the two-dimensional space in the image sensor is the same.
  • the image data obtained from the CCD may be subjected to a filling process such as a mouth-to-pass filling process (LPF), or may be interpolated and loaded into the frame memory.
  • a filling process such as a mouth-to-pass filling process (LPF)
  • LPF mouth-to-pass filling process
  • the vertical / horizontal sampling ratio may not be an integer.
  • FIG. 30 shows a state in which the data actually sent from the CCD is only located at the black circles and three lines are thinned out in the vertical direction when capturing data at the time of imaging.
  • the monitor mode only the thinned image is output from the CCD in this way, and when it is stored in the memory, the image becomes thinned in the vertical direction due to the thinning as shown in Figure 31.
  • the image is shorter in the vertical direction than in the horizontal direction as shown in Fig. 31.
  • the phenomenon of being forced appears.
  • the distortion correction according to [Equation 1] the effect of the distortion correction increases as the distance from the center increases, so that the effect of the distortion correction changes vertically and horizontally.
  • S x and S y may be set as non-integers. Further, it is possible even when the interval between the pixels of the image sensor is different vertically and horizontally (for example, a rectangular pixel).
  • J PEG is generally recorded in a short time as Y C b C r, but the setting at that time may be as shown in FIGS. 33 and 34.
  • the resolution for color image data is 1Z2 in the horizontal direction compared to the luminance data.
  • FIG. 35 is a diagram for explaining center shift of an image.
  • Figure 35 shows the corrected image.
  • the center of the distortion is coincident with the center of the image, that is, the center of the CCD (the center of the image) is coincident with the optical axis of the lens (the center of the distortion).
  • FIG. 35 shows a case where the center of the distortion is shifted from the center of the CCD.
  • the center P of the image with respect to the output range H is Q Shown by black circle To).
  • the way in which the distortion-corrected image data is cut out is changed.
  • define the center shift of the image as (X off, Y off) and change the way the image is cropped.
  • the spatial position of a small area (for example, a block line) can be calculated, and the distortion correction processing can be performed in small area units.
  • accurate distortion correction can be performed for images captured by thinning
  • JE accurate distortion correction can also be performed for images obtained by cutting out an arbitrary area, such as digital zoom.
  • FIG. 37 shows a detailed configuration of the distortion correction processing unit 8 in FIG.
  • the interpolation position calculation circuit 22 in FIG. 37 is provided in the interpolation position generation unit 811 in FIG. 2, the selector 24 is provided in the selector 813 in FIG. 2, and the distortion correction coefficient calculation circuit 21 and the interpolation position correction circuit 23 are provided in FIG. , Respectively.
  • the 2-port SRAM 26 in FIG. 37 corresponds to the internal memory section (internal buffer) 82 in FIG. 2, the write address generation circuit 28, the buffer free space monitoring circuit 29, and data transmission availability determination.
  • the circuit 30, the buffer amount calculation circuit 31 and the read address generation circuit 25 correspond to the memory control section 83 of FIG. 2, and the interpolation circuit 27 corresponds to the interpolation calculation section 84 of FIG. 2.
  • the error detection circuit 32 is connected to the memory control unit 83 although not shown in FIG.
  • the error detection circuit 32 has a large distortion amount in the distortion correction processing and will be described later.
  • the interpolation position calculation circuit 22 uses the grant as a trigger to generate one unit line (hereinafter referred to as 1 UL). It calculates the minute interpolation position (X1, Y1).
  • 1UL is defined as the time when writing or reading a certain number of images in a row in the column direction when writing or reading to the memory unit in the block line processing described above. Is one unit. In other words, 1 UL refers to a fixed number of pixels arranged in a line in the column direction on the block line (BL).
  • the interpolation position correction circuit 23 multiplies the interpolation position (X1, Y1) by the distortion correction coefficient F from the distortion correction coefficient calculation circuit 21 to obtain the coordinate position ( ⁇ ', ⁇ ') is calculated.
  • the selector 24 selects (Xl, ⁇ 1) and ( ⁇ , ⁇ '). When performing distortion correction, the selector 24 selects and outputs ( ⁇ ', ⁇ '), and performs enlargement / reduction processing ( (Resize), select (XI, Y1) and output.
  • the two-port SRAM 26 is a buffer for storing data in the distortion correction processing unit 8.
  • the read address generation circuit 25 generates an address (ADR) in the 2-port SRAM 16 corresponding to the interpolation position, outputs a control signal for aligning outputs from the 2-port SRAM 26, and outputs an output image data.
  • the write control signal WE_N is output in synchronization with the evening, and the data string control signal that indicates where D0 shown in Figure 38 and [Equation 3] is located on the 2-port SRAM is output.
  • the write address generation circuit 28 generates an address (ADDRESS) of the 2-port SRAM 26, which is an internal memory, in accordance with the write control signal WE. Count up) o
  • Data transmission availability judgment circuit 30 determines the BLC value, the operation state of this circuit, and the next UL From the request (REQ) state from the post-stage circuit of the coordinate and distortion correction processing unit 8, it is determined whether a grant (GRANT-N) can be transmitted for the REQ signal from the post-stage circuit.
  • the interpolation circuit 27 performs 16-point interpolation for each image data corresponding to the interpolation position.
  • the buffer release calculation circuit 31 calculates the difference between the integer part of the currently processed UL start coordinate and the next UL start coordinate to be processed as the buffer release amount (see FIG. 50).
  • the buffer free space monitoring circuit 29 sends a request (REQ) as a data request to the preceding circuit
  • the buffer free space monitoring circuit 2'9 receives a grant (GRANT) as a request reception from the preceding circuit, and at the same time, reduces the count (in circuit 29) that stores the number of ULs that can be stored in the 2-port SRAM 26 by one. .
  • One UL is transferred as one operation unit with one request and grant. When the count reaches 0, withdraw the request. Then, data flows into the write address generation circuit 28 from the previous stage circuit, and writing to the two-port SRAM 26 is performed. 1 Every time UL input, the internal count (BLC) of the write address generation circuit 18 goes up.
  • the 2-port SRAM 26 is composed of a total of 16 4 ⁇ 4 2-port SRAMs that can simultaneously perform reading and writing so that the interpolation circuit 27 can perform, for example, 16-point interpolation. .
  • the two-port SRAM 26 will be described with reference to FIG. 39, but the number of memories and the size of each memory may be different.
  • the block line width (UL length) is 96, but it may be longer or shorter. What is necessary is just to determine by the balance of a circuit scale and correction performance.
  • 4 x 4 (16 ) Can be 2x2 (four in total) for 4-point interpolation. It should be decided according to the interpolation method (how many points to interpolate).
  • FIG. 39 shows a memory space composed of 16 2-port SRAMs.
  • the horizontal direction is the order of UL input, while the vertical direction is the address assigned to each 2-port SRAM.
  • N be an integer and describe the state at some point in the process.
  • the data stored in No.O, 4, 8 and 12 which are four 2-port SRAMs arranged vertically are 4N, 4N + 4, 4N + 8 and 4N + the 12th UL data
  • the data stored in Nos. 1, 5, 9 and 13 are the data of the 4N + 1, 4N + 5, 4N + 9, and 4N + 13th UL data.
  • the data stored in 6, 10, and 14 are the 4N + 2, 4N + 6, 4N + 10, 4N + 14th UL data, and are stored in Nos. 3, 7, 11, and 15. DeNight is the 4N + 3, 4N + 7, 4N + 11, and 4N + 15th UL night.
  • FIGS. 40 and 41 show a block line having a width of 8 lines (pixels)
  • the data is expressed in units of UL as “1, 2,..., I, m”. , "5, 6, ..., j, n", "9, 10, ..., k, o", ... in that order.
  • FIG. 41 shows where the data in the writing order shown in FIG. 40 is written on 16 4 ⁇ 4 16 two-port SRAM Nos. 0 to 15.
  • image data (data indicated by order 1 to m) of 1 UL in the left vertical column in FIG. .
  • the vertical 2-port SRAM shown in Figure 39 No.0, No.4, No.8 and No.12 have the notation added to each vertical line 0 to 92,:! ⁇ 93, 2 ⁇ 94, 3 ⁇ 95 are the notation of each unit line (1 ⁇ m ⁇ , 5 ⁇ n ⁇ 9 ⁇ ⁇ ⁇ ) shown in Fig. 40 Is different from This is because in FIG. 40 and FIG. 41, the order of insertion is determined for 16 4 ⁇ 4 image data.
  • pixels (0, 4, 8... 92) that are multiples of 4 are stored in the vertical direction.
  • (Multiple of 4) + 1 pixel (1, 5, 9, ... 93) is stored.
  • (Multiple of 4) of U + 2 pixel (2 , 6, 10... 94) are stored, and in the vertical direction of No. 12 of the 2-port SRAM, (multiple of 4) of U + 3 pixels (3, 7, 11 to 95) are stored. is there.
  • sets of o.1,2,3 and No.5,6,7 and ⁇ ⁇ 9,10,11 and ⁇ .13,14,15 of 2-port SRAM are also stored.
  • the data for one UL is stored in the order of one pixel in four 2-port SRA # s arranged in the vertical direction.
  • the first UL data is written to Nos. 0, 4, 8, and 12 (4N line in Fig. 39).
  • the next UL data is written to Nos. 1, 5, 9, and 13 (line 4N + 1 in Fig. 39).
  • 16 points around arbitrary coordinates in the buffer can be simultaneously extracted by one access.
  • the overnight transmission determination circuit 30 receives the request (REQ-N) from the subsequent circuit, and outputs a request acceptance (GRANT-N) if the next UL data can be transmitted.
  • This request reception (GRANT-N) becomes a trigger for itself, and the interpolation position calculation circuit 22 starts operating.
  • An operation trigger (trig) is sent from the data transmission / rejection determination circuit 30 to the distortion correction coefficient calculation circuit 21 so that the interpolation position calculation circuit 22 starts operating and synchronizes with the output of the interpolation position (XI and YD).
  • the distortion correction coefficient calculation circuit 21 calculates the next UL start coordinate after operating by one UL, and ends the processing.
  • the read address generation circuit 25 issues a read address to each of the 16 2-port SRAMs 26 from the input interpolation coordinates. '
  • FIG. 38 shows the interpolation method.
  • FIG. 38 is an image diagram of the interpolation operation in the interpolation circuit 27.
  • the coordinates ( ⁇ ', ⁇ ') of the corrected coordinate position P have already been obtained in [Equation 1] above.
  • the pixel values (luminance data) at these coordinates are obtained from the pixel data D0 to D15 at 16 points around the coordinates ⁇ ( ⁇ ', ⁇ '). If D0 comes from which of the 16 memories, D1, D2..., D15 can be determined from the positional relationship with respect to D0. As described later, DO is obtained for the coordinates of the interpolation position.
  • Figure 42 shows an example of reading from a buffer consisting of 16 two-port SRAMs.
  • X, 10.... Is (4x0 + 10) or more Therefore, in the horizontal direction, the interpolation position is slightly to the right of the 4th + 10th UL of the 2-port SRAM.
  • Y, 50 .... is greater than (4x12 + 2), the 4th + 10th UL, the memory where the 50th pixel is stored (No. 10) outputs the pixel D5 in Figure 7 Therefore, the memory that outputs DO is No. 5 at the upper left. Since the pixel data corresponding to D0 to D15 in FIG. 38 is a part in FIG. 42, an address is generated so that they are output.
  • the image data output from No. 0 does not correspond to D 0.
  • the output from No. 5 corresponds to D0. Therefore, in order to identify which data is output from which memory, a read-out control signal is output from the read address generation circuit 25. 2 ports Performs 16-point interpolation by recognizing where the SRAM 26 is coming from.
  • the pixel data DO to D15 are known, the pixel data at the corrected coordinate position can be obtained as Dout by performing an interpolation process using the interpolation formula of [Equation 4].
  • the difference between the UL start coordinate and the next UL start coordinate is calculated (see Figure 50), and the buffer release amount is output to the buffer free space monitoring circuit 29 in order to release the buffer in which unnecessary data is stored. I do. However, as shown in Fig. 49, it is preferable to release the buffer when straddling the center of distortion, taking into account changes in the values of post ULB1 and post ULB2.
  • the preULB and postULB shown in FIG. 48 are areas in which predetermined width areas are provided on the front and rear sides in the row direction with respect to the coordinate position of the first pixel among the pixels forming the UL. These are defined as pre ULB and post ULB respectively.
  • the buffer release amount is buffered by referring to the change amount of p OS tULB (ULB: Unit Line Buffer, unit line buffer) whose reference value changes instead of the difference between the normal UL start coordinates. Adjust the release amount (adjustment amount is postULB l—postULB2, see Figure 49).
  • the buffer release amount calculation circuit 31 sends to the data transmission availability determination circuit 30 how much data is required from the preceding circuit for the next UL process.
  • the buffer free space monitoring circuit 29 performs buffering by calculating the buffer opening amount described above. If there is a free space in the key, it makes a request to the preceding circuit.
  • the data transmission availability determination circuit 30 determines whether or not the next UL data can be transmitted based on the internal count (BLC) of the write address generation circuit 28, the manual power from the buffer release amount calculation circuit 31, and the preULB value. to decide.
  • the overnight transmission enable / disable determination circuit 30 returns a request acceptance (GRANT_N) in response to a request from the subsequent circuit.
  • the error detection circuit 32 determines whether the coordinates input to the read address generation circuit 25 deviate from the left end (see FIG. 43) or the right end of the block line (BL), or move the upper and lower ends (see FIG. 44) of the block line (BL). An error is output if the value deviates or the amount of distortion deviates from the set values of preULB and post ULB (see Fig. 45).
  • the input image when an image on the input side is interpolated with respect to an image on the output side, the input image may be out of the range.
  • interpolation data is generated in a portion where there is no data in the input range, and an error indicating that interpolation cannot be performed is output from the error detection circuit 32.
  • a predetermined area pre ULB is set forward (right side in the figure) with respect to the first coordinate to be interpolated (the top coordinate indicated by the X mark at the top of the image data in the block line BL in the figure), (Left side in the figure) is provided with a predetermined area P ostUL B.
  • the support function corresponds to the “distortion correction range calculator” in Fig. 1.
  • the attention area becomes BL, but is deformed as shown in FIG. 13 by the coordinate transformation for distortion correction.
  • preULB1 / postULB1 is determined from X'TL, Y, TL, XLmin, and XLmax (see FIG. 48).
  • preULB2 / pos t ULB2 is determined from X, TR, Y, TR, XRmin, and XRmax.
  • the optical distortion bends in the opposite direction after passing through the center of the distortion.
  • the values of pr ULB and pos ULB differ between the left and right sides of the distortion center.
  • this value is also required for processing on one side on the left or right side. If not, the other side has to reserve a large amount of data (that is, a large buffer), which is a waste of buffer.
  • the values are respectively set to the preULB and the post ULB as variables. After passing the center coordinates of the distortion, change these values to change the amount of reserve. In other words, by changing preULB and postULB before and after the center of distortion, the use of the internal buffer is eliminated, and relatively large distortion correction can be performed with a small buffer.
  • the re, post ULB is set to register 85, but in order to generate those values, a sabot function that enables calculation of the input range of image data in consideration of distortion deformation is required.
  • This support function may be provided by adding to the distortion correction processing function of the distortion correction processing unit 8 or the like.
  • the memory control unit 83 controls the area preULB, post ULB not to be overwritten by another process during the 1UL process.
  • the setting of the areas P reULB and post ULB may be set from the CPU 4 to the register 85 (see FIG. 2), or may be automatically calculated and set by the CPU. As described above, 16-point interpolation is performed in the distortion correction processing. However, as shown in FIG.
  • the interpolation position can move by a (where a> 0) during the 1UL processing due to the distortion correction. Because of the 16-point interpolation, the input image range must be the sum of the interval a above and the intervals b L and bR of the pixels required for interpolation on both the pre and post sides. When the distortion center is exceeded, the pre and post ULB values are changed to reduce the number of buffers to the minimum necessary. Also, the above-mentioned “distortion correction calculator” outputs the result taking into account the interpolation. You may let it.
  • the internal memory section (internal buffer) 82 of the distortion correction processing section 8 has a maximum of 96 pixels vertically and 16 lines (pixels) horizontally. This will be used to correct distortion.
  • the data of the block line processing is swept at least 1 UL in the right direction in the figure. It is not always necessary to sweep 1 UL at a time, as several ULs may be released at once. Since the internal memory unit 82 starts from an empty state at first, 16 lines are input and the distortion correction processing is performed. As these unit lines are processed, unnecessary data (one to several UL's worth of data) will be generated on the left line. It is not always unnecessary after processing. When the enlargement ratio is large, it may take several UL before it becomes unnecessary.
  • Unnecessary data is released (ie, overwriting is allowed) and new data is inserted.
  • the sweeping image shifts to the right. Since there is only a size that can read a maximum of 16 lines, the data area that is no longer needed is opened and new data areas are sequentially overwritten. All unnecessary buffer areas are released at once.
  • the opening may be one line or five lines. For example, the first three lines of data that were stored in the buffer are unnecessary for further processing, so they are released and the next data is received, and the next data is processed. Will be overwritten.
  • the amount of buffer that can be released after 1 UL processing is completed cannot be known unless the next UL start coordinate is determined (see Fig. 50). Since the internal buffer is small, to release the portion storing unused data as soon as possible, calculate the next UL start coordinate, obtain the release amount, and release the buffer to enable the internal buffer. Make it available to you. However, a request is received from the circuit block at the subsequent stage for distortion correction, a grant is returned for it, and a one-ultra-long UL data is output to the subsequent stage.After returning the grant after the next request comes, To find the coordinates This delays the release of the buffer, which in turn delays the acquisition of new data, which can result in long pipeline operations. Therefore, as shown in FIG.
  • Fig. 51 there is a method of determining the next coordinate as soon as possible and finding the buffer release amount as shown in Fig. 53.
  • the next UL start coordinate is acquired earlier than when the next start coordinate is obtained at the end, and if it is determined that the necessary data is complete, the next Continuously perform the above UL processing to reduce the processing space. That is, (1) Before the UL processing is completed, the UL data is held in the register, etc., and the start coordinate position of the next UL is calculated, so that the release amount of the next UL processing can be determined in advance. Ask for it.
  • FIG. 51 the next UL start coordinate is acquired earlier than when the next start coordinate is obtained at the end, and if it is determined that the necessary data is complete, the next Continuously perform the above UL processing to reduce the processing space. That is, (1) Before the UL processing is completed, the UL data is held in the register, etc., and the start coordinate position of the next UL is calculated, so that the release amount of the next UL processing can be determined in advance.
  • the buffer release amount is obtained at an early stage by obtaining the start coordinate of the next UL in the second pixel of the distortion correction processing (the processing of the coordinates 1 to ⁇ shown in the figure).
  • the buffer can be released quickly, and as shown in FIG. 54, the amount of free space in the pipeline can be considerably reduced as compared with FIG.
  • Figure 55 is a further improvement of Figure 53.
  • the amount to be released when the currently processed UL is over (the amount to be released 1) is already known during the previous UL processing.
  • the next two UL head coordinates are calculated, and the amount that can be released when the next UL processing is completed (opening amount 2) is obtained in advance. If you do this, There is no need to perform extraordinary coordinate generation (coordinate 2 generation) during UL processing as in the case of Fig. 53. In this way, if the starting coordinates of the next next two ULs are obtained instead of the head of the next UL, the exceptional processing shown in Fig. 53 will be eliminated, and the circuit will be simple. Become.
  • distortion correction can be realized without greatly increasing the amount of transfer of the bus / the capacity of the memory. That is, a relatively large distortion correction process can be performed with a small buffer capacity.

Abstract

歪補正処理部8を有する画像処理装置であって、この画像処理装置は、前記歪補正処理部8が歪補正処理を行うのに必要な入力画像範囲を算出する歪補正範囲算出部12を備えたものである。これにより、歪補正によって得られる補正画像(出力画像)は画像出力範囲に対して過不足なく出力することが可能となり、元データである入力(撮影)画像データを有効に活用した歪補正処理を行え、糸巻き型歪,樽型歪,及び陣笠型歪などに対しても有効な歪補正処理を行うことができる。

Description

明 細 書 発明の名称
画像処理装置、 画像処理方法及び歪補正方法 技術分野
本発明は、 主に、 デジタルカメラ等の電子的撮像装置に用いられる画像処理装 置及び画像処理方法に関し、 特に、 回路規模やデータ転送量を増大させること無 く、 歪補正機能を実現し、 小領域 (例えばブロックライン) 単位での歪補正処理 を行う場合に、 小領域の空間的な位置を算出可能とした画像処理装置.、 画像処理 方法及び歪補正方法に関する。 背景技術
デジタルカメラ, 銀塩カメラを問わず、 一般的にカメラの光学系においては歪 曲収差が現れる。 また、 現在発売されているカメラでは、 光学ズームが可能な機 が殆どであり、 その場合、 ワイド端からテレ端にかけて、 歪曲収差の状態が変 化する。 ワイド端では樽型歪が多く、 テレ端では糸巻き型歪が多い。
歪曲収差は、 例えば格子状の被写体を撮影すると、 樽型歪、 糸巻き型歪として 観測される。
図 5 6は格子状の被写体、 図 5 7は樽型歪を生じた撮影画像、 図 5 8は糸巻き 型歪を生じた撮影画像である。
ところで、 デジタルカメラにおいては、 C C D等の撮像素子のデ一夕に対し、 様々な画像処理を行なった後、 J P E G等の圧縮方式で圧縮したデ一夕をメモリ 力一ド等の記録媒体に記録する。
図 5 9は一般的なデジ夕ルカメラで行われている画像処理手順の概念を示して いる。 C C Dにより取り込まれた撮像信号にプリプロセスで画素欠陥処理、 AZ D変換等を行い、 得られた画像デ一夕を S D RAM等のフレームメモリに一旦記 憶する。 次に、フレームメモリから読み出された画像デ一夕に対してイメージプ ロセスにより各種の画像処理を行い、さらに J P E G処理で画像圧縮して記録媒 体としてのメモリカード等に記録する。
X
図 60は従来のデジタルカメラの画像処理装置のブロック図 (例えば特閧 20
II
00-3123 X 27号公報での従来例) を示している。
図 60において、 従来の画像処理装置は、 パス 103に CPU 104と共にプリプ ロセス回路 102, 複数のイメージプロセス回路 106-1〜 : 106-n, J PEG処理部 1 07, フレームメモリ 105及び記録媒体としてのメモリカード 108が接続されてい る。 そして、 CPU 104の制御により、 CCD 101からの撮像信号がプリプロセ ス回路 102で画素欠陥処理や A/D変換等が施された後、 ノ ス 103を通してフレ ームメモリ 105に一旦記憶される。 次に、 フレームメモリ 105から画像デ一夕を 読み出し、 パス 103を通してイメージプロセス回路 106-1に入力して所定の画像 処理を行い、 再びバス 103を通してフレームメモリ 105に書き直す。 以下同様に して、 バス 103·を介してフレームメモリ 105とイメージプロセス回路' 106-2 ~ 1 06-n との間でデータのやり取りを順次行って、 最後に J PEG処理部 107で J PEG圧縮処理を行い、画像処理したデ一夕をフレームメモリ 105に一旦記憶し、 フレームメモリ 105から読み出した処理データをメモリカード等 108に記録する ようになつている。 以上の各段のイメージプロセス及び J PEG処理では、 小領 域 (プロヅクライン) を単位として画像処理が行われる。
ところで、 イメージプロセス回路の少なくとも 1つにおいて図 56〜図 58で 述べたような歪補正処理を行う方法として、 下記の光学的に表現される歪補正式 [式 5] を用いることによって撮像画像の歪曲収差を補正することが行われる。
[式 5]
2 = (X-Xd) + (Y-Yd ) 2
• [1 +A · z2] +xd
Υ' 二 (Y-Yd) • [1 + A · Z2〗 +Yd
(X. Y) :補正画像内での座標
(Χ' . Υ' ) :撮影画像内での座檁
(Xd. Yd) :歪中心位 BL
A :歪補正係数 しかしながら、 光学的に表現される上記の [式 5 ] を用いて歪補 IEを行った場 合、 補正画像に過不足が生じる。
図 6 1, 図 6 2は樽型歪, 糸巻き型歪を生じた撮影画像を、 上記の [式 5 ] に よって補正する動作を説明するものである。
図 6 1は点線のように樽型に歪んだ元画像 (図示左) を [式 5 ] にて補正した 場合であって、 補正された画像 (図示右) は画像出力範囲からはみ出して無駄に なる部分を生じている。
図 6 2は点線のように糸巻き型に歪んだ元画像 (図示左) を [式 5 ] にて補正 した場合であって、 補正された画像 (図示右) は画像出力範囲より小さぐなりデ —夕が不足する部分が生じる。
このような図 6 1 , 図 6 2の不具合に対して、 先行出願である日本国特開平 9 - 0 9 8 3 4 0号公報では、 歪補正後に、 電子ズームを行うことで補正により伸 長した分を縮小して元の位置まで戻して、 歪補正により失われる画像'情報を最小 限に抑えている。
.一方、 通常、 C C D等の撮像素子の読み出しは、 (1) 本撮影用の全画素読み出 し、 (2) スルー画用の間引き読み出し、 の 2種類の読み出しが可能である。 間引 き読み出し等によって、 撮像したデ一夕から一部を取り込んだ画像デ一夕は、 ァ スぺクト比が 1 : 1ではないため、 そのままでは正確な歪補正が行えない。 また、 従来、 この画像処理の一部として歪補正を行う先行技術が開示されてい る。 例えば、 特開平 6— 1 8 1 5 3 0号公報, 特開平 1 0— 2 2 4 6 9 5号公報 がある。
特開平 6— 1 8 1 5 3 0号公報には、 撮影時における撮像ズームレンズの撮像 ポジションが歪曲収差の大きいポジション内であることが検出手段にて検出され ている場合には、 この撮像ズームレンズによって生じた像の幾何学的歪みを、 固 体撮像素子の撮像データを幾何学的変形に基づき読み出すことにより補正するこ とが記載されている。
特開平 1 0— 2 2 4 6 9 5号公報には、 光学系を経由した光を受光する固体撮 像デバイスで撮像したデータをランダムアクセスビデオメモリに記憶し、 ランダ ム読み出しタイミング発生回路は光学系によって生ずる収差を補正するための収 差補正デ一夕を有し、 この収差補正デ一夕に基づいて固体撮像デバイスによって 生成された信号を所定の順に読み出してビデオ信号を生成することで、 光学系の 歪曲収差を補正することが記載されている。
しかしながら、 特開 2 0 0 0 - 3 1 2 3 2 7号公報では、 フレームメモリと各 イメージプロセス回路間でデ一夕のやり取りが多く、 バスのデ一夕転送量が増大 する。 さらに、 小領域 (ブロックライン) 単位での歪補正処理については全く記 載されていない。
また、 特閧平 9一 0 9 8 3 4 0号公報では、 樽型歪の補正にしか言及しておら ず、撮像中心に一番近い点を基準にしており、原理的に樽型歪の補正のみである。 糸巻き歪に対しては、 補正された画像が画像出力範囲より小さくなり画像デー 夕が不足する部分が生じる。 さらに、 図 2 2に示すような陣笠型歪を補正するに は、 歪補正式に 4次項以上が必要になるが、 元画像データを最大限使うための補 正倍率 Mを解析的に求めることが困難であった。
特開平 6— 1 8 1 5 3 0号公報では、 歪補正処理を行うことが述べられている が、図 3 6に示すように C C Dの撮像面における画素 (黒丸印にて示される縦横 の格子点) 3 1に対して、本来直線であるべき被写体像が光学レンズの歪曲収差 により湾曲して結像 (符号 3 2にて示す) すると、 歪曲収差補正回路内のライン メモリに大容量バッファメモリが必要となる。 また、 ノ、 °ッファメモリの容量で処 理できる画像サイズが制限されてしまう。 さらに、 バッファメモリに保持されて いるデ一夕の空間的な位置の確定方法等についての記載がない。 さらに、 特開平 6 - 1 8 1 5 3 0号公報では、 小領域 (プロックライン) 単位での歪補正処理に ついては全く記載されていない。
また、特開 1 0— 2 2 4 6 9 5号公報では、ランダムアクセスで処理するのに、 バッファメモリは必要ないが、 一般的に S D R AM等のメモリをランダムァクセ スすると、 転送時間がかかる。 そこで、 本発明の第 1の目的は、 撮像した元デ一夕を有効に活用して歪補正処 理を行い、 補正した画像が画像出力範囲に対して無駄なく有効に出力でき、 糸巻 き型歪, 樽型歪, 及び陣笠型歪にも対応できる歪補正処理が可能な画像処理装置 及び画像処理方法を提供することである。
本発明の第 2の目的は、 小領域 (例えばブロヅクライン) の空間的な位置を算 出可能とし、 小領域単位での歪補正処理を実現可能とした画像処理装置及び歪補 正方法を提供することである。
本発明の第 3の自的は、 間引き取り込みされた画像デ一夕に対しても、正確な 歪補正を行える一方、 デジタルズームなど、 任意領域を切り出したデ一夕に対し ても正確な歪補正を行える画像処理装置及び歪補正方法を提供することである。 本発明の第 4の目的は、 バスの転送量ゃメモリの容量を大きく増大させること なく、 歪補正処理を実現できる画像処理装置及び画像処理方法を提供することで ある。 ' 発.明の開示
本発明による画像処理装置は、 歪補正手段を有する画像処理装置であって、 該 画像処理装置は、 さらに、 前記歪補正手段が歪補正処理を行う入力画像範囲を算 出する歪補正範囲算出部を有する。
このように、 歪補正処理を行う入力画像範囲を算出する歪補正範囲算出部を設 けることにより、 出力画像 (即ち、 歪補正後の画像) の出力範囲の一部または全 部に相当する領域が入力画像 (即ち、 撮像画像) 内に占める範囲を算出すること で、 歪補正によって得られる補正画像は出力すべき出力範囲に対して過不足なく 出力することが可能となり、 出力範囲に対して補正画像がはみ出したり不足した りすることのないようにできる。
好ましくは、 前記歪補正範囲算出部は、 補間座槔を生成する座標生成部と、 前 記生成された補間座標に対して所定の歪補正式を適用して変換した座標を出力す る歪補正座標変換部と、 前記変換された座標位置から前記入力画像範囲を算出す る補正範囲検出部と、 を有する。
この構成で、 補間座標を生成するとは、 歪補正前の撮像画像 (入力画像) の位 置を求めるために、 出力されるべき補正後の補正画像 (出力画像) の位置を前も つて生成することである。 この補間座標に対して歪補正式を適用して、 歪補正前 の画像位置 (座標) を生成 (変換) 出力させ、 変換された補正前の座標位置から 歪補正処理すべき入力画像範囲を算出するようにしている。
或いは、 好ましくは、 前記歪補正範囲算出部は、 座標変換により生成された座 標に対し、前記出力画像範囲の 4辺の各辺に対応する画素の座標の最大値と最小 値および前記出力画像範囲の 4頂点に対応する座標の少なくともいずれかから前 記入力画像範囲を算出する。 この構成で、 4頂点とは、 歪補正後の出力画像にお ける各辺の頂点を指している。
或いは、 好ましくは、 前記歪補正範囲算出部は、 歪補正処理を行う複数入力信 号に対して順次範囲算出を繰り返して前記入力画像範囲を算出する。
この構成では、 複数のチャンネルを扱う場合に、 複数入力信号に対して同時に 補正処理を行っている間に、 複数入力信号に対してそれぞれ次の処理対象であ るブロックラインにっき歪補正範囲算出を順次に繰り返して行うことで、 1つの 歪補正範囲算出部で複数チヤンネル分の範囲算出を行わせることが可能である。 好ましくは、 前記範囲算出を繰り返し処理で行い、 入力画像範囲に対して歪補 正後の画像範囲が所定の範囲になるような補正倍率 Mを決定する。
この構成により、 補正倍率 Mを適宜の値に決定することで、 陣笠型歪にも対応 可能となる。
好ましくは、 前記歪補正範囲算出部は、 前記歪補正処理部が歪補正実行中に、 次に歪補正を行う画像入力範囲を算出する。
この構成では、 歪補正実行中に、 次に歪補正を行う画像入力範囲を算出するの で、 1つのブロックラインの歪補正が終わつたときには次の歪補正処理を行う画 像入力範囲が分かっており、 歪補正処理を次のブロックラインに対して順次スム —ズに行なっていくことが可能である。 本発明による画像処理方法は、 歪補正処理を行う画像処理方法であって、 前記 歪補正処理を行うに際して、 歪補正処理を行う入力画像範囲を算出する。
このように、 歪補正処理を行うに際して、 歪補正処理を行う入力画像範囲を算 出することにより、 歪補正後の画像の出力範囲の一部または全部に相当する領域 が入力画像内に占める範囲を算出することで、 歪補正によって得られる補正画像 は画像出力範囲に対して過不足なく出力することが可能となり、 画像出力範囲に 対して補正画像がはみ出したり不足したりすることのないようにできる。
本発明による画像処理装置は、 画像デ一夕に対して歪補正処理を行う歪補正手 段を有する画像処理装置において、 前記歪補正手段は、 補正前の画像データ内に おいて、 補正画像の各画素が対応する位置を所定の補正式に従って算出する際、 撮像面における空間的な位置を記述可能な座標系において算出する。
この構成では、 補正前の画像デ一夕内において、 補正画像の各画素が対応する 位置を算出する際、撮像面に対応する座標系 (即ち 2次元空間におけ'る位置) を 基準にして計算を行う。
.好ましくは、 前記歪補正手段は、 補正画像に含まれる第 1の小領域を単位に処 理を行い、前記第 1の小領域の各画素の座標位置を前記補正式に従って変換した 小領域を含む撮像面における第 2の小領域について、 前記撮像面に対応する座標 系での位置を、 前記第 2の小領域での座標に変換した後に、前記補正画像の各画 素のデータを生成する。
この構成では、 変換される小領域内での座標に基づいて、 補間処理を行うこと ができる。
なお、 前記画像デ一夕は、 撮像デ一夕の一部のみを取り込んだ部分画像データ であってもよい。
画像デ一夕としては、 撮像したデータ全てではなくその一部、 例えばデジタル ズームの際に撮像データの中央部分から切り出されるデータや、 撮像デ一夕から 間引きによって生成される縮小デ一夕に対しても、適用することができる。
また、 前記画像デ一夕は、 前記撮像デ一夕に対してフィルタリング, 空間サン プリングまたは補間処理の少なくともいずれか 1つを行って生成されるデ一夕で あってもよい。
画像データとしては、 周波数的に制限するフィル夕リングを行ったり、 撮像デ ノ イスの撮像面のような 2次元的空間から適宜にサンプリングしたり、 補間処理 (標本化処理などで離散化した画素と画素の間に、 周囲の画素からの推定によつ て画素を作り出す処理) したり、 することによって得られるデ一夕などがある。 本発明による歪補正方法は、 画像データに対して歪補正処理を行う歪補正手段 を有する画像処理装置の歪補正方法であって、 前記歪補正方法は、 補正画像の各 画素に対応する座標系での第 1の位置を生成するステップと、前記第 1の位置を、 歪補正式に従って歪補正前の画像データ内における座標系での第 2の位置に変換 するステツプと、前記歪補正前の画像データ内における座標系での第 2の位置を、 撮像面に対応する座標系を基準とする設定領域内での座標に変換するステップ と、 前記設定領域内での座標に基づいて補間処理を行い、 前記補芷画像の各画素 のデータを生成するステップと、 を有する。
.この歪補正方法では、 例えば撮像レンズによる幾何学的歪みを補正する補正式 によって、 補正画像の各画素のデ一夕を得る際には、 補正画像の各画素に対応す る座標系での第 1の位置に対して、歪補正式に従って歪補正前の画像データ内に おける座標系での第 2の位置に変換し、 この変換された第 2の位置を、 撮像面に 対応する座標系を基準とする設定領域内での座標に変換し、 この座標に基づいて 補間処理を行って補正画像の画素データを生成する。
好ましくは、 前記補正画像に含まれる小領域を単位に処理を行う。
この方法では、 補正画像に含まれる小領域 (例えばブロックラインと呼ばれる 領域) を単位に処理を行うものである。
本発明による画像処理装置は、 画像データに対して歪補正処理を行う歪補正手 段を有する画像処理装置において、 前記歪補正手段は、 前記画像データの一部を 格納するメモリ部と、 前記メモリ部に対するデ一夕の書き込みおよび読み込みを 制御するメモリ制御部と、 を有し、 前記メモリ部から読み出した画像データに対 する補間演算を行う。
この構成では、内部バッファとしてのメモリ部に画像デ一夕の一部を格納して、 そのデータを利用して歪補正処理のための補間演算を行うことができる。
好ましくは、 前記メモリ制御部は、 前記メモリ部への書き込みの際は、列方向 に一列に並んだ一定数分の画素からなる画像データ (ュニットライン: UL) を 単位として書き込むように制御し、 前記メモリ部からの読み出しの際は、 歪補正 処理後の画像が前記 U Lを単位として出力されるように、 前記メモリ部に格納さ れた画像データに対して読み出し制御する。
この構成では、 メモリ部に対して ULを単位として書き込み、 読み出しを行う ので、 メモリ部のバッファ容量としては光学的歪量に応じて数 UL分、 すなわち 少なくとも 1 UL分の容量があればよく、 バスの転送量やメモリの容量を大きく 増大させることなく、 歪補正を実現できる。
さらに、 好ましくは、 前記メモリ制御部は、 前記 ULの最初に処理'される画素 の座標位置に対して、 行方向に対して前側および後側に所定幅の領域 (それそれ p-reULB、 postULB) を設け、 前記 U Lの処理中は他の処理によって 前記領域が上書きされないよう制御する。
この構成により、処理に必要なバッファとしてのメモリ部の前記 p r eULB、 pos t ULBの領域のデ一夕が上書きされないよう確保できる。
好ましくは、 前記画像処理装置は、 さらにバッファの空き領域を検出するバッ ファ空き容量監視回路を有し、 該バッファ空き容量監視回路によりバッファ内の 空き領域が検出されると、 該空き領域へのデータの書き込みを可能とする。
この構成により、 データ出力中に入力も可能なパイプライン的な動作を可能と する。
好ましくは、 前記メモリ部は、 デ一夕のリード動作とライト動作が同時に可能 な複数のメモリからなり、 前記メモリ制御部は、 さらに、 前記メモリ部へのデ一 夕書込み制御を行う書込みアドレス生成回路と、 前記メモリ部に格納されている 画像デ一夕から補間演算に必要なデ一夕を同時に読み出すためのアドレスを生成 する読出しアドレス生成回路と、 を有し、 前記データ書込み制御は、 同時に読み 出すデータをそれそれ異なるメモリに書き込むものである。
この構成によれば、 バッファ内にある画像データから、 補間演算に必要なデ一 夕として任意の座標の周辺の複数の画素 (例えば、 1 6画素) 情報を同時に読み 出すことが可能となり、 演算処理を速やかに行える。
本発明による画像処理方法は、 画像デ一夕に対して歪補正処理を行う画像処理 方法において、 前記歪補正処理を行う際には、 データの書き込みおよび読み込み が制御されるメモリ部に、 前記画像データの一部を格納し、 該メモリ部から読み 出した画像データに対して補間演算を行う。
この方法では、内部バヅファとしてのメモリ部に画像データの一部を格納して、 そのデ一夕を利用して歪補正処理のための補間演算を行うことができる。 図面の簡単な説明 :
図 1は本発明の第 1の実施の形態の画像処 a装置の全体構成を示すプロック図 である。
図 2は歪補正処理部の構成を示すブロック図である。
図 3〜図 5は歪補正処理部における座標変換の概念図であり、 図 3は撮像画像 データを示す図、図 4は補正画像を示す図、図 5は補間処理を説明する図である。 図 6は画像データの読み出し順序を示す図である。
図 7は第 1デ一夕順序変換部におけるデ一夕順序変換処理を説明する図であ る。
図 8は第 2データ順序変換部におけるデ一夕順序変換処理を説明する図であ る。
図 9はブロックラインと歪補正処理に必要なメモリ容量 (バッファ容量) の関 係を示す図である。
図 1 0はブロックライン幅の設定方法を示す図である。
図 1 1は歪補正範囲算出部の構成を示すブロック図である。 図 1 2及び図 1 3は歪補正範囲算出部における、 歪補正処理を行う際の入力画 像範囲を算出する動作を説明する図であり、図 1 2は補正画像上の範囲を示す図、 図 1 3は元デ一夕上の範囲を示す図である。
図 1 4は歪補正処理の動作を説明するフローチャートである。
図 1 5は図 1 4のステップ S 11 における補正倍率 Mの算出方法を説明するフ ローチャートである。
図 1 6は図 1 1の歪補正範囲算出部の構成を示すブロック図である。
図 1 7は図 1 6のデ一夕出力のタイミングチャートである。
図 1 8は図 1 7の動作を改善したもので、 パイプラインでのデ一夕出力の夕ィ ミングチャートである。
図 1 9は 3チャンネル分の歪補正処理を行う際の入力画像範囲を算出する方法 を説明する図である。
図 2 0は 3チヤンネルの場合の歪補正処理の動作を説明するフロー'チャートで める。
_図 2 1は本発明の第 2の実施の形態の画像処理装置の全体構成を示すプロック 図である。
図 2 2は陣笠型の歪を生じた撮影画像を示す図である。
図 2 3及び図 2 4は補正前の撮像画像データと補正後の補正画像の関係を示す 図であり、 図 2 3は補正前の撮像画像デ一夕を示す図、 図 2 4は補正後の補正画 像を示す図である。
図 2 5は図 2 3及び図 2 4の歪補正処理のフローチャートである。
図 2 6及び図 2 7は、 デジタルズームの場合で、 補正前の撮像画像デ一夕と補 正後の補正画像の関係を示す図であり、 図 2 6は補正前の撮像画像デ一夕を示す 図、 図 2 7は補正後の補正画像を示す図である。
図 2 8及び図 2 9は、 撮像デ一夕から或る領域を切り出す場合で、 補正前の撮 像画像データと補正後の補正画像の関係を示す図であり、 図 2 8は補正前の撮像 画像デ一夕を示す図、 図 2 9は補正後の補正画像を示す図である。 図 30〜図 32は CCDのモニタ一モードにおけるライン間引きを説明する図 であり、 図 30は CCDから撮像時のデータを縦方向に 3ライン間引いてメモリ に取り込む状態を説明する図、 図 31はメモリに取り込まれた状態の撮影画像デ 一夕を示す図、 図 32は縦と横で画像が非対称となるのを補正した補正画像を示 す図である。
図 33及び図 34は YC 422形式のデータにおける色デ一夕の横方向の間引 きを説明する図であり、 図 33は輝度データを示す図、 図 34は色データを示す 図である。
図 35は画像の中心ずれを説明する図である。
図 36は CCDの画素と撮影画像の関係を示す図である。
図 37は本発明の第 3の実施の形態の画像処理装置における歪補正処理部の詳 細な構成を示すブロック図である。 '
図 38は補間回路における補間演算のイメージ図である。 ' ' 図 39は歪補正処理部における内部メモリ部を説明する図である。
図40及び図 41は、 図 39の補足説明をする、 2ポート SRAMにデ一夕が 書き込まれる様子を説明する図であり、 図 40は書き込む順番を示す図、 図 41 は図 40に示した書込み順番のデ一夕が 16個の 2ポート SRAM上のどこに書 き込まれていくかを示す図である。
図 42は図 38の補正座標位置を算出するのに必要な DOを求めるための説明 図である。
図 43はエラ一処理例を示す図である。
図 44は他のエラ一処理例を示す図である。
図 45は他のエラ一処理例を示す図である。
図 46は歪補正処理に要するバッファ量について説明する図である。
図 47は歪補正処理に要するバッファ量について説明する図である。
図 48及び図 49は歪補正処理に要するバッファ量について説明する図であ り、 図 48は preULB、 p o s t ULBの定義を説明する図、 図 49は歪中 心を跨ぐ時のバッファ開放量を説明する図である。
図 5 0は U L処理に伴う開放量の算出方法について説明する図である。
図 5 1は U L処理に伴う開放量の算出方法について説明する図である。
図 5 2は図 5 1の処理に伴うパイプライン処理の空きについて説明する図であ る o
図 5 3は U L処理に伴う開放量の算出方法について説明する図である。
図 5 4は図 5 3の処理に伴うパイブライン処理の空きについて説明する図であ る。
図 5 5は U L処理に伴う開放量の算出方法について説明する図である。
図 5 6は格子状の被写体を示す図である。
図 5 7は樽型歪を生じた撮影画像を示す図である。
図 5 8は糸巻き型歪を生じた撮影画像を示す図である。
図 5 9は一般的なデジ夕ルカメラの画像処理手順の概念を示す図である。 図 6 0は従来のデジタルカメラの画像処理装置におけるブロック構成を示す図
^める o
図 6 1は樽型歪を生じた撮影画像を、 [式 5 ] によって補正する動作を説明す る図である。
図 6 2は糸巻き型歪を生じた撮影画像を、 [式 5 ] によって補正する動作を説 明する図である。 発明を実施するための最良の形態
発明の実施の形態について図面を参照して説明する。
図 1は本発明の第 1の実施の形態の画像処理装置の全体構成を示すプロック図 である。
図 1の画像処理装置においては、 バス 3に接続された各部の制御を行う C P U 4の制御により、 C C D 1からの撮像信号をプリプロセス回路 2で画素欠陥処理、 AZD変換等を行い、得られた画像デ一夕を、 バス 3を介してフレームメモリ 5 に一旦記憶する。 フレームメモリ 5は、 S D R AM等で構成され、 画像処理前の デ一夕及び画像処理後のデ一夕を格納するメモリである。 次いで、 フレームメモ リ 5から読み出した画像デ一夕をバス 3を介して、 第 1データ順序変換部 6に入 力する。 第 1デ一夕順序変換部 6は、 後に図 7で説明するように、 ブロック単位 のデ一夕を記憶可能なメモリを複数、ここでは 2つ備えている。 第 1データ順序 変換部 6は、 フレームメモリ 5から行方向にデ一夕を読み出して記憶した後、列 方向にデータを順に読み出し、 イメージプロセス回路 7に出力する。
イメージプロセス回路 7は入力したデ一夕に対して所定の画像処理を行って次 段の歪補正手段としての歪補正処理部 8に転送する。 歪補正処理部 8は入力した デ一夕に対して歪補正処理を行って次段の第 2データ順序変換部 9へ転送する。 第 2デ一夕順序変換部 9は、 後に図 8で説明するように、 ブロック単位のデ一夕 を記憶可能なメモリを複数、 ここでは 2つ備えている。 第 2デ一夕順序変換部 9 は、 歪補正処理部 8から列方向にデ一夕を読み出して記憶した後、 方向にデ —夕を順に読み出し、 J P E G処理部 1 0に転送する。 そして、. J P E G処理部 1 0で J P E G圧縮処理を行い、 処理デ一夕をフレームメモリ 5に一旦記憶し、 フレームメモリ 5から読み出した処理デ一夕をメモリカード等 1 1に記録するよ うになつている。
歪補正処理部 8は、 図 2に示すように、 歪補正後の補正画像の位置 (補間位置 という、 X, Y) とこれに対応した歪補正前の元の画像の位置 (Χ ' , Υ ') を生 成する補間座標生成部 8 1と、 歪補正処理部 8の前段ブロックの回路からの画像 データの一部を一時的に格納しておくバッファメモリ (以下、 単にバッファ) と しての内部メモリ部 8 2と、 その内部メモリ部 8 2に対する書き込み及び読み出 しの制御を行うメモリ制御部 8 3と、 変換した歪補正前の画像位置の座標 ( X 5 , Υ ' ) に従って画像処理をしてデータの歪補正をする補間演算部 8 4と、 を有し て構成されている。
補間座標生成部 8 1は、 図 2に示すように、 補間座標 (X , Υ) を生成する補 間位置生成部 811と、 生成された補間座標 (X , Υ) に対して所定の歪補正式 [式 1 ] (後述する) を適用して変換した補正前の座標 (Χ ' , Υ ' ) を出力する歪補 正座標変換部 812と、 補間位置生成部 811からの補間座標 (Χ, Υ) と歪補正座 標変換部 812からの変換座標 (Χ ', Υ ' ) とを選択的に出力可能なセレクタ 813 と、 で構成されている。 歪補正処理部 8における補間位置生成部 811 , 歪補正座 標変換部 812, セレクタ 813, メモリ制御部 8 3については、 制御データを格納 した制御レジス夕 8 5に設定された各ブロックに対する設定値に従って動作す る。 また、 処理結果のステータスなどを C P Uから参照することができる。
歪補正処理部 8には、 図 1に示すように、 歪補正処理部 8が歪補正処理を行う 入力画像範囲を算出する歪補正範囲算出部 1 2が設けられている。 歪補正範囲算 出部 1 2は、 図 1 1で説明するように、 補間座標を生成する座標生成部 9 1と、 生成された補間座標に対して所定の歪補正式を適用して変換した座標を出力する 歪補正座標変換部 9 2と、 変換された補正前の座標位置から前記入力画像範囲を 算出する補正範囲検出部 9 3と、 を有して構成されている。
以上のように構成された本発明による画像処理装置においては、 上記第 1デ一 夕-順序変換部 6から J P E G処理部 1 0までは、 バス 3を介することなく、 該バ ス 3とは異なる情報伝達経路でパイプライン処理可能なように接続されていて、 画像デ一夕を、 2次元的な画素配列における所定のプロック単位で転送して処理 するようになつている。 このようにバス 3を介したデ一夕転送は、 フレームメモ リ 5から第 1データ順序変換部 6への転送と、 J P E G処理部 1 Qからフレーム メモリ 5への転送及びフレームメモリ 5からメモリ力一ド 1 1への転送だけとな り、 したがってフレームメモリと各イメージプロセス回路との間でデ一夕のやり とりを行っていた従来例 (図 6 0 ) と比べて、 バス 3によるデ一夕転送量を大幅 に低減させることができ、 バス 3の負荷を大幅に軽減することが可能となる。 ま た、 この図 1に示す例においては、 画像処理を行うイメージプロセス回路 7を 1 つのみ設けているが、 複数あっても構わない。 さらに、 図では、イメージプロセ ス回路 7の後に歪補正処理部 8が設けられているが、逆の構成であつても構わな い。 初段のイメージプロセス回路 7と 2段目のイメージプロセス回路である歪補正 処理部 8で構成されるイメージプロセス回路部では、各イメージプロセス回路 7 , 8の前段或いは内部にパイプラインレジス夕として、 図示しない小容量のメモリ が配置されていて、 該小メモリを介して、 各イメージプロセス回路 7 , 8がパイ プライン処理動作を行うように構成されている。 これらの小容量のメモリは、 各 イメージプロセス回路 7, 8で空間的な画像処理を行う場合、 画像処理に必要な 周辺デ一夕の記憶をするために、 また画像データをブロック単位で読み出して配 列換えなどを行って処理する必要があるために、 設けられている。
図 3〜 5は歪補正処理部 8における座標変換の概念図を示している。 図 3は元 デ一夕である撮像画像デ一夕、 図 4は補正画像、 図 5は図 4の補正画像の座標位 置 (X, Y) に対して図 3の元デ一夕の座標上に変換された座標位置 Pでのデ一 夕の座標 (Χ ', Υ ' ) (この座標 Ρは元データを実際に構成する複数の画素の位 置には必ずしも正確には一致しない座標位置にある) を示している。 その Ρ点で の座標位置 (Χ ', Υ ' ) はその Ρ点の周辺の画素 1 6点の座標を使って算出され ¾と共に Ρ点での画像デ一夕はその周囲の前記 1 6点の画素データを用いて補間 演算される。 補間演算部 8 4にて点 Ρの位置のデ一夕をその周囲の 1 6点の画素 値 (輝度データ) から補間演算するべく処理が行われる。 図 2の補間位置生成部 811で補間座標を生成するというのは、図 4の補正画像側でどこの画素位置( X, Υ) を指し示すか、 ということである。
[式 1 ]では、 歪補正後の画素位置 (Χ ,. Υ) に対する歪補正前の画素位置 (X ', Υ ' ) を算出することができる。 但し、 歪補正前の画素位置 (Χ ', Υ ' ) は元 画像デ一夕上の画素位置に対応した整数値になるとは限らないことは前述した通 りである。
[式 1 ]に従うと、 図 4の座標 (Χ, Υ) が図 3のように座標 (Χ ' , Υ ') に変 換される。 これにより、 元デ一夕の中のどこの座標位置のデ一夕を作成すれば、 よいかを知ることができ、 その位置 (Χ ', Υ ' ) のデ一夕を 1 6点補間処理を行 う補間式を用いて周囲 1 6点の既知の画素値 (図 5の黒丸印の入力画像データ) から算出して得ることができる。
ぱ 1]
Χ= · (X-X d) + (X d+ Χ β( ()
(1)
Υ=Μ · (Y-Y + (Y d + Y oil)
Z2 = IS , · (X - X d) ] 2 + (S y · (Y-Y d) (2)
= (x-x d) 2 +Β · Ζ +0 · Ζ6 + 〗 +X d
(3)
= (Y-Y d) [1 +Α · Z +B 4 +C . Z 6
(X, Y) 補正画像内での座棵
(X' , Y' ) 撮影画像内での座標
(xd-. Y d) 歪中心位置
(X oil. Y o 中心ずれ捕正
範囲補正倍率
(S S y) サンプリング比
A, B. C, ' 歪補正係数
[式 1]における Zは、 歪中心 (X d, Yd) から今注目している点 (X, Y) ま での距離である。 [式 1】によって、 補正画像の点 (X, Y) に対して歪んでいる 元画像の方の座標 (Χ', Υ') が算出される。 [式 1】について補足説明すると、 Μは光学系のデ一夕を用いて理論的に補正した際、補正後に画像がはみ出したり、 不足したりする現象を補正するための補正倍率である。 S X, S yは間引き取込 みなど、 縦横で空間的なサンプリング間隔が異なる現象の補正をするためのサン プリング比である。 X off, Y off は歪補正処理によって、 歪補正処理後に、 被 写体位置が撮影時の位置とはずれてしまう現象の補正をする中心ずれの値であ 。
本発明に係る [式 1]では、 高次項 (具体的には Z4、 z6、 ···) を考慮するこ とで、 より複雑な陣笠型の歪 (図 22参照) にも対応できるようにしている。 ま た、 中心が一致していても撮像素子の一部しかデータを取り込まない場合や、 光 軸中心と撮像素子中心がずれている場合など、 歪中心 (X d, Y d ) を考慮する 必要がある。 さらに、 歪補正処理により被写体位置が撮影時の位置からずれる現 象を補正するため、 中心ずれ補正値 (X off, Y off) を考慮する必要がある。 間 引き取込みの場合や輝度デ一夕 (Y) と色デ一夕 (C b, C r) からなる Y C画 像を処理する場合は、 X , Yで空間的なサンプリングが異なる。 そこで係数とし てサンプリング比 (S x , S y ) を導入して、 座標変換を補正するようにしてい る。
図 6 1の樽型歪では歪補正するために M< 1として少し縮むようにしておかな ければならない。 図 6 2の糸巻き型歪の場合は逆に引き伸ばさなければならない ので、 M> 1に設定する。
従来例で述べた [式 5 ] では、 樽型歪 ·糸巻き型歪を補正することを考慮して 記述されている。
次に、 図 6〜図 8を参照して画像データの書き込み及び読み出しの処理及び順 序について説明する。
図 6は、 本実施の形態におけるフレームメモリからの画像デ一夕の読み出し順 序を説明する図である。
画像デ一夕は、 通常は、 ライン方向、 つまり行方向にスイープさせて書き込ま れていて、 読み出し時は行方向に読み出されるようになっており、. 1ラインの画 像デ一夕を全て読み出して、 次に隣接するラィンの画像デ一夕を全て読み出すと いった動作を繰り返して行うのが普通である。
これに対して、 本発明に係る画像処理装置は、 行方向にスイープさせて書き込 まれた画像デ一夕を、 列方向にある一定の長さを単位に、 行方向の画像デ一夕を 順番にイメージプロセス部 7に入力し、 以降、 順次隣の列をイメージプロセス部 7に入力して、 画像の右端まで繰り返し入力するようにしており、 こうして得ら れる小領域 (矩形状の画像データ) をブロックライン (B L ) と呼ぶ。
こうした画像デ一夕の読み出しを可能にするための第 1デ一夕順序変換部 6 と、 第 2デ一夕順序変換部 9との構成を、 図 7及び図 8を参照して説明する。 図 7及び図 8は、 第 1, 第 2デ一夕順序変換部の構成を示すブロック図である。 第 1デ一夕順序変換部 6は、 図 7に示すように、 ブロック単位の画像デ一夕を 記憶可能なメモリを複数、 ここでは 2つ備えており、 この 2つのメモリ 6 aとメ モリ 6 bが書き込み側, 読み出し側の各スィツチにて書き込み, 読み出しが交互 に切り換えられるようになつている。 すなわち、 フレームメモリ 5は、 書き込み 側のスィツチにて、 これらメモリ 6 aとメモリ 6 bとに切換可能に接続されてい るとともに、 イメージプロセス部 7も読み出し側のスィツチにてこれらのモリ 6 aとメモリ 6 bとに切換可能に接続されていて、 フレームメモリ 5がメモリ 6 a とメモリ 6 bとの一方に接続されているときには、 該メモリ 6 aとメモリ 6 bと の他方がイメージプロセス部 7に接続されるように切り換えられる。 すなわち、 メモリ 6 a , 6 bは、 フレームメモリ 5とイメージプロセス部 7との両方に同時 に接続されることがないようにスィツチングされ、 交互に書き込み, み出しが 行われるようになつている。
レームメモリ 5に記憶されているフレーム画像の一部は、 ブロック単位でラ ィン方向に読み出され、一方のメモリ、ここでは例えばメモリ 6 aに記憶される。 これと並行して、 メモリ 6 bからは、 既にフレームメモリ 5から読み出されて 記憶されているブロック単位の画像デ一夕が、 列方向 (縦方向) に順に読み出さ れて、 イメージプロセス部 7へ出力される。
フレームメモリ 5からメモリ 6 aへの書き込みと、 メモリ 6 bからイメージプ 口セス部 7への読み出しが終了すると、 書き込み側のスィツチおよび読み出し側 のスイッチが切り換えられて、 次に、 フレームメモリ 5からメモリ 6 bへ次のブ ロック単位の画像デ一夕の書き込みが開始されるとともに、 メモリ 6 aからィメ —ジプロセス部 7へのブロック単位の画像データの読み出しが開始される。 第 2デ一夕順序変換部 9も、 図 8に示すように、 上記第 1データ順序変換部 6 とほぽ同様に構成されていて、 ほぼ同様に動作するようになっている。
すなわち、 第 2デ一夕順序変換部 9は、 メモリ 9 a, メモリ 9 bと、 書き込み 側スイッチ, 読み出し側スィッチとを有して構成されている。
そして、 該第 2データ順序変換部 9の動作時には、 歪補正処理部 8からの書き 込みがメモリ 9 aとメモリ 9 bとの一方に対して列方向 (縦方向) に行われ、 メ モリ 9 aとメモリ 9 bとの他方からは行方向 (横方向) に読み出しが行われて、 J P E G処理部 1 0へ出力されるようになっている。
図 9はブロックラインと歪補正処理に必要なメモリ容量 (バヅファ容量) の関 係を示している。 点線枠上の歪曲した 4本の実線は、 歪補正後の出力データでは 直線 (縦 1ライン) となるべきデ一夕であるが元デ一夕では歪んでいる。 4本の 直線のうち、 画像中心から離れた左端の直線がもっとも歪曲している。 黒丸印は 歪補正後の出力データの画素位置に対応する歪補正前の位置を示している。 前述 の内部メモリ部 8 2では、 撮像後の歪んだ入力デ一夕がブロックライン内で最大 の歪量となる横方向の幅に 1 6点補間を考慮して左右に余裕分をとつた範囲を、 歪補正処理に必要なバッファ量として確保するようにする。 すなわち'、 これだけ のバッファ容量があれば、 歪補正可能であるバッファ量、 換言すれば歪補正した と.きに正しい直線形状を作成することが可能なバッファ量を示している。
図 1 0は、 ブロックライン幅の設定方法を示すものである。 ブロックライン幅 を歪補正処理の対象位置に応じて可変設定する例を示している。 湾曲した点線は 入力側の歪んだデ一夕を示しており、 画像中心より離れるほど、 すなわち外側に いくほど歪み度合いが大きくなつている。 従って、 フレームメモリ上の入力デ一 夕に対してブロヅクライン幅を設定する際には、 その幅は画像中心から離れるほ ど大きく、 中心に近いほど幅を狭くするように設定する。 これにより、 フレーム メモリ 5からバス 3を介してイメージプロセス回路にデ一夕転送する際に、 デ一 夕幅が狭くてよければそのときのバスの専有時間を減らすことができる。
一般的に、 画像中心では歪による変形量が小さい。 歪補正の処理対象の位置に よって、 ブロックライン幅 (図示の縦方向にスイープする幅) の設定値を変更す る。 式 1には高次項が含まれるため、 ブロックライン分の処理に必要な入力範囲 を解析的に求めることができない。 ブロックライン幅の設定は、 歪補正範囲算出 部 1 2の処理結果に基づき、 また、 C P Uで該結果に所定の演算を施すことによ り設定する。
図 1 1は、 歪補正範囲算出部 1 2の構成を示している。 歪補正範囲算出部 1 2 は、補間座標 (X , Y)を生成する座標生成部 9 1と、生成された補間座標(X, Y) に対して所定の歪補正式 (例えば [式 1 ]) を適用して変換した座標 (Χ ' , Υ ' ) を出力する歪補正座標変換部 9 2と、 変換された補正前の座標位置 (Χ ', Υ ' ) から歪補正処理に必要な入力画像範囲を算出する補正範囲検出部 9 3と、 を有して構成されている。このように歪補正範囲算出部 1 2は、座標生成部 9 1、 歪補正座標変換部 9 2、 補正範囲検出部 9 3からなり、 C P U 4からは制御レジ ス夕 9 4を通じて動作を制御し、範囲算出結果はレジス夕 9 5を通して取得する。 歪補正範囲算出部 1 2は、 歪補正処理機能に対して付加したもので、 歪の変形を 考慮して画像デ一夕の入力範囲を算出可能とするサポート機能として働く。
次に図 1 2及び図 1 3を参照して、 歪補正範囲算出部 1 2における、' 歪補正処 理に必要な入力画像範囲を算出する動作を説明する。
裨正画像内で範囲を指定し、 入力画像上に座標変換する方法で行う。 まず、 図 1 2に示すように補正画像上の所定範囲 (例えば 5行分) の画素位置 (格子点位 置) を決め、 [式 1 ]にて図 1 3に示すように出力側の元デ一夕上に座標変換する ことで、 出力側デ一夕での 5行分のデ一夕の範囲が分かる。 処理の設定は、 ハ一 ドウエアのレジス夕設定で行う。 図 1 2の補正画像上で、 例えばスタートは、 点 (X st, Y st) から間隔 AW, Δ Ηという順番で格子点を生成していき、 縦に何 点、 横に何点かとり、 縦に H out画素、 横に Wout画素となるように設定する。 そして、 元デ一夕上の位置に変換した結果、 補正画像の格子点に対応した交点座 標が歪曲した線上に形成されるが、 そのブロックラインに対応した歪曲した範囲 すなわち外接する図示の太い点線が入力画像範囲として分かればよい。実際には、 図 1 2及び図 1 3で黒丸印にしてあるような矩形状の周囲 4辺上の黒丸位置の座 標だけ追っていけば、 その位置範囲を規定する 4辺について最大値と最小値から 入力画像範囲が分かる。 例えば、 上の辺は Y Tmax, Y Tmin という間に、 下の 辺は YBtnax, Y Bminという間に収まり、 左の辺は X Lmax, X Lmin という間 に、 右の辺は X Rmax, X Rmin という間に収まっている、 というデ一夕を実際 に検出して、結果格納用レジス夕 9 5に格納する。 ブロックライン処理には、 (X Lmin〜X Rmax, Y Tmin〜Υ Bmax) に補間に必要な画素を加えた範囲が必要 である。 なお、 図 1 3で、 出力側の元デ一夕上で、 各頂点の変換後の位置を (X , TL, Y, TL)、 (X , TR, Y, TR)、 (X, BL, Y, BL)、 (X, BR, Y, BR) としている。 '
座標生成部 9 1は、 [式 2]で補正画像に必要な座標位置(X, Y)を生成し、 [式 1]で (Χ', Υ') に変換する。 上辺の変形範囲を Y Tmin〜Y TmaX、 下辺の変 形範囲を丫81^0〜丫81^、 左辺の変形範囲を X Lmin 〜X Lmax、 右辺の変形 範囲を X Rmin〜X Rmax, 各頂点の変換後の位置を (X, TL, Y, TL)、 (X , TR, Y' TR)、 (X, BL, Y, BL)、 (X, BR, Y, BR) とし、 これらを補正 範囲検出部 9 3で検出し、 結果格納用レジス夕 9 5に格納する。 ' '
[式 2 ]
- X = X sT +k - AW
、Y = YST +J 厶 H k, は整数 図 1 4は、 歪補正処理の動作を説明するフローチャートである。 まず、 ステツ プ S 11 で、 歪補正 [式 1]の補正倍率 Mを決定する。 補正倍率 Mを決定の仕方は 図 1 5のフローチャートにて後述する。 次に、 ステップ S 12 では、 決定した補 正倍率 Mを使って、 図 1 0〜図 1 3の説明で述べたようにブロックライン処理に 必要な入力範囲を補間に必要な部分も考慮して算出し、 ステップ S 13 でこの算 出した入力範囲と、 歪補正処理に必要な設定値を設定する。 そして、 ステップ S 14 で、 プロックライン毎の歪補正処理と次ブロックラインの入力範囲算出を同 時実行する。 その後、 画像の最下段のブロックラインの歪補正処理が行われるま で、 ブロヅクライン毎の歪補正処理と次プロヅクラインの入力範囲算出を実行す る。 ステヅブ S 15 において出力画像全体について歪補正処理が終了したか否か を判定することで、 ステップ S 14 を繰り返し、 画像全体について歪補正処理が 終わるまで続行して終了する。
このようにすれば、 歪補正実行中に、 次に歪補正を行う画像入力範囲を算出す るので、 1つのブロックラインの歪補正が終わつたときには次の歪補正処理を行 う画像入力範囲が分かっており、 歪補正処理を次のプロックラインに対して遅れ なく順次スムーズに行なっていくことが可能である。
上記のステップ S 11 で、 補正倍率 Mを適切に決めてやると、 図 6 1及び図 6 2で述べた樽型及び糸卷き型のどの歪み画像を補正処理しても画像の出力範囲に きっちりと入れることが可能である。
図 1 5は図 1 4のステップ S 11 における補正倍率 Mの算出方法を説明するフ 口一チャートを示している。 まず、 ステップ S 21 で補正倍率 Mの初期値として 1 . 0を設定す ¾。 次にその Mと歪補正 [式 1 ]を用いて出力画像の例え'ば 4辺を座 標変換することで歪補正範囲算出部 1 2にて入力画像範囲を算出し (ステップ S 22)、 元画像の範囲内か否かを判定する (ステップ S 23)。 ステップ S 23で図 6 1のように出力範囲を越えるようであれば、 Mを厶 Mだけ減少させた後 (ステツ プ S 24)、 ステップ S 22に戻り、 入力画像範囲を算出し、 再びステップ S 23の 範囲内判定を行う。 すなわち、 少しずつ Mの値を変えて、 ステップ S 23 で元画 像の範囲内か否かを判定し、 元画像の範囲内であれば、 ステップ S 25 へ移行す る。 ステップ S 25 では前記の入力画像範囲が元画像の範囲内に収まる最大の M か否かを判断する。 元画像の範囲内で最大でないならば、 Mを厶 Mだけ増加させ た後 (ステップ S 26)、 ステップ S 22に戻り、 ステップ S 23〜 26を行う。 ス テツプ S 25 で元画像の範囲内で最大ならば、 そのときの Mを補正倍率として決 定する。 このとき、 範囲算出に用いられる領域は、 補正画像の全体である。 なお、 図 1 5のフローは、 他の方法でも良い。 例えば、 補正倍率 Mの最大及び 最小 Mmax、 Mmin を設定し、 順次その範囲を 2分割して最適な Mを追い込む方 法を用いると、 計算量が少なくて済む。 ところで、 図 14におけるステップ S 14 において、 歪補正処理部 8の補正演 算に比べて、 歪補正範囲算出部 12の範囲算出演算の方が演算量が少ない。 そこ で、 補正演算の乗算器を時系列で使うことで、 回路規模の削減が可能となる。 歪補正処理を行う際には、 [式 1]を見れば分かるように非常に掛算が多くてハ 一ドウエア的には回路規模が非常に大きい計算になっている。 一般的に乗算器が ハードウエアの回路規模を大きくしているので、 出来るだけ乗算器を減らすこと が好ましい。 乗算器制御部を設けて乗算器制御し、 タイミングを取りながら、 パ ィプライン的に処理することで、 全体の処理速度を下げずに、 回路規模を縮小で ぎる。
図 16は、図 1 1の歪補正座標変換部 92の部分の具体的な構成を示している。 それ以外の部分は、 図 1 1と同様である。 歪補正座標変換部 92では、 [式 1] のような乗算の多い計算を行うが、 その際の複数の乗算をタイミングを図りなが ら時系列で処理することで、乗算器数を減らすことができるように構成してある。 歪補正座標変換部 92は、 座標生成部 9 1から補間座標 (X, Y) を入力し、 [式 1]の (2) を演算して Z 2を算出する Z 2算出部 921 と、 Z2算出部 921 から の Z2と乗算器 923からのァを入力し、 ひ, ?を出力する乗算器制御部 922 と、 a, 3を入力し、 ァを出力する乗算器 923 と、 補正係数 A, B, C, …のいず れかに相当する dを出力する乗算器制御部 924 と、 ひ, dを入力し、 補正係数 と、 Zの整数倍との積に相当する £を出力する乗算器 925 と、 乗算器 925 から の £と座標生成部 9 1からの補間座標 (X, Y) を入力し、 補正前の元デ一夕の 座標 (Χ', Υ') を出力する補正座標算出部 926と、 を有して構成されている。 図 17は図 16のデ一夕出力のタイミングチャートを示している。 まず、 Ζ2 算出部 921 は、 クロック CLKが ' 1, のタイミングで補間座標 (Χ, Υ) を 入力する。 次に乗算器制御部 922 は、 クロック CL の '2' のタイミングで ひ, /5として Ζ2を出力し、 乗算器制御部 924 は同じタイミング '2, で dとし て歪補正係数 Aを出力する。 次のクロック CLKの '3' のタイミングで、 乗算 器 923は入力されるひ, ?に基づいてァとして Z4を出力し、 乗算器 925は入力 されるひ, dに基づき同じタイミング '3, でどとして AZ2を出力する。 同様 に、 続くクロック CL の '4', '5, のタイミングでは、 d, £として B, B Z4を得、 クロック CLKの '6', '7, のタイミングでは、 6, £として C, CZ6を得る。 その結果として、 クロック CLKの '8, のタイミングで、 補正 座標算出部 926 から補間座標 (X, Y) に対する元データの座標位置 (Χ', Υ ') を出力する。
図 16の構成では、 乗算器は 2つしかないが、 乗算器を時系列で使うことで、 実際には 6つ分の計算をさせている。 結果的に乗算器を 1/3に減らすことが可 能となる。 さらに高次項を考慮する場合でも、 同様の動作をさせればよい。 ところで、 図 17のタイミングチャートを見ると、 歪補正座標変換処理におい てクロックごとの各変数の出力データには時間的な隙間 (空き) があるのが分か る。 そこで、 パイプライン処理により各変数の出力デ一夕を時間的に空きのない ように連続的に出力させることが考えられる。
図 18は、 図 17の動作を改善したものであり、 パイプライン処理でのデ一夕 出力のタイミングチャートを示している。 図 17の動作タイミングでは、 補間座 標 (Χ, Υ) の入力から 7クロック経過後に出力として元デ一夕の座標位置 (X Υ') が得られている、 つまり、 1つ結果が出るまでに 7クロック分の時間を 要する。 これに対して、 図 18では、 10サイクル目に 1サイクル目と同じこと が起こるので、 9サイクルで 3画素処理していることになる。 つまり、 見かけ上 3サイクルで 1画素処理していることになる。
これまでは、 歪補正範囲算出部では 1つのチヤンネルについてしか歪補正範囲 算出処理を行わない例について述べてきたが、 次に前出の 1チャンネル分にかか つた時間と同じ時間で、 3チヤンネル分を 1つの歪補正範囲算出部で行う方法に ついて説明する。 これには、 図 19に示すように、 図 12の補正画像上の範囲設 定において、 注目領域の 4辺における範囲算出用画素を例えば 1ノ3の画素数に 間引いて設定し演算処理させることで、 1チャンネル分の処理時間とほぼ同じ時 間で終わることができる。 間引き量はレジス夕設定で行う。 図 19のように間引 いた座標 (黒丸を付したところ) でしか演算しないため、 前出の処理時間と同じ 時間で複数のチャンネル分に対応でき、しかも回路規模を増大させることがない。 そうすると、 例えばカラ一画像を扱う場合に、 R , G, Bごとに歪補正範囲算出 部を設けなくとも 3チヤンネル分を 1つの回路部で動作させれば 1つの歪補正範 囲算出部で済み、 回路規模を増大させることなく、 同じ時間内で済ませることが できる。
図 2 0は、 3チャンネルの場合の歪補正処理の動作を説明するフローチャート である。 図 1 4に示した歪補正処理を 3チャンネル分に適用したものである。 図 2 0におけるステップ S 31〜S 33及びステップ S 35は、 図 1 4のステツ プ S 11〜S 13及びステップ S 15と同じである。
ステップ S 34では、 3チャンネルにおけるブロックライン毎の歪補正処理と、 1チャンネル目 (例えば、 R) に対する次ブロックラインの入力範囲算出 2チ ヤンネル目 (例えば、 G) に対する次ブロックラインの入力範囲算出 3チャン ネル目 (例えば、 B ) に対する次ブロックラインの入力範囲算出に対する入力範 TO出とを同時に実行する。
これにより、 複数のチャンネルを扱う場合に、 複数入力信号に対して同時に歪 補正処理を行っている間に、 複数入力信号に対してそれそれ次の処理対象である ブロックラインにつき歪補正範囲算出を順次に繰り返して行うことで、 1つの歪 補正範囲算出部で複数チャンネル分の範囲算出を行わせることが可能である。 ま た、 歪補正実行中に、 次に歪補正を行う画像入力範囲を算出するので、 1つのブ ロックラインの歪補正が終わったときには次の歪補正処理を行う画像入力範囲が 分かっており、 歪補正処理を次のブロックラインに対して遅れなく順次スムーズ に行なっていくことが可能である。
以上述べたように本発明の第 1の実施の形態によれば、 歪補正処理を行う入力 画像範囲を算出する歪補正範囲算出部を設けたので、 歪補正によって得られる補 正画像は出力すべき出力範囲に対して過不足なく出力することが可能となる。 元 デ一夕を有効に活用して歪補正処理を行え、 糸巻き型歪, 樽型歪, 及び陣笠型歪 にも対応できる歪補正処理が可能となる。 また、 ブロックライン毎の処理に必要 な入力範囲を算出することができ、 デ一夕転送量を最小限にすることが可能とな る o
図 21は本発明の第 2の実施の形態の画像処理装置の全体構成を示すプロック 図である。図 21は図 1から歪補正範囲算出部 12を削除した構成となっている。 図 21における歪補正処理部の構成は図 2と同様である。
歪補正座標変換の [式 1]は、 あくまでも全画面の中の画像であって、 補正画 像についてもその座標変換結果の (Χ', Υ') の画像にしても、 全画面中で何処 に位置しているかを計算している。
ところが、 歪補正処理部 8に入力される画像デ一夕はブロックライン単位であ る。 歪補正処理部 8としては、 入力される画像デ一夕の空間的な位置関係 (2次 元空間における位置) を知る必要がある。 制御レジス夕 85は、 歪補正処理部 8 で処理するブロックラインの位置を指定している。 :
図 23及び図 24は、 補正前の撮像画像デ一夕と補正後の補正画像の関係を示 している。 図 23は撮影画像デ一夕、 図 24は補正画像を示している。 図 23及 び図 24は補正画像 (出力側画像) の或るブロックライン BLの或る画素位置 A に注目している場合の概念図である。補正画像(出力画像)内の位置 Aの座標(X, Y)は、歪補正座標変換の [式 1]を用いて (入力画像)内の位置 A'の座標 (X ', Υ') に変換される。
座標位置 (X, Υ)及び (Xblst, Yblst)、 座標位置 (Χ', Υ')及び (Χ' blst, Υ' blst) は、 全画面の原点からの位置を示している。 ここでは、 原点は、 全画面の左上端部としている。
歪補正ブロックへ入力される画像デ一夕は、 符号 BLにて示すブロックライン 単位である。そのため、まず補正画像の例えば画素 Aを歪座標変換処理するには、 最終的な補間処理ができるようにブロックライン B L内での座標系における座標 位置 (x', y') に変換する必要がある。
まず、 図 24の補正画像(出力画像)の各画素に対する座標位置(X, Y)は、 下記の [式 3]で生成する。
ぱ 3]
X = X blst +mx ΔΧ
Y = Yblst + nxAY
ΔΧ, ΔΥは補間ピッチで、 1. 0以上なら縮小画像が生成され、 1. Q以下 なら拡大画像が生成される。 座標位置 (X blst, Y blst) は歪補正ブロックの出 力側ブロックラインの左肩の位置、 すなわち、 ブロックラインのスタート位置に 相当している。 (m, n) = (0, 0) のとき、 X = X blst, Y = Y blst となる ので、 [式 3]から座標位置 (Xblst, Yblst) を算出できることになる。 m=0, n=0から始めて、 m, nを例えば交互に 1ずつ増やしていけば、 ブロックライ ン BL内の全ての画素の座標位置 (X, Y) を生成することができる。
この BLに し、 BL内全ての画像の座標位置を [式 1]に従って変換すると、 図 23の変形したハッチング領域 BL〃 にマッピングされる。図 23の BL,は、 図 24の BLを処理するのに必要な入力デ一夕の範囲となる。 (X, blst, Y, bl st>は、 BL, の左上位置であり、 補間に必要な画素等を考慮すると、 変形した ハッチング領域の左上位置とは一致しない。 BL' は、 図 1で説明したサポート 機能 (歪補正範囲算出部 12) を利用して設定する。
[式 3]で生成された補正後の出力画像の座標位置 (X, Y) を、 [式 1] で 座標変換して図 23の補正前の入力画像の座標位置 (Χ', Υ') を求める。 そし て、 座標変換された座標位置 (Χ,, Υ') と、 座標位置 (X, blst, Y, blst) と の差分をとることにより、 ブロックライン (太い点線の矩形) の左肩を原点とす る座標位置 (x', y') を求めることができる。
その結果、 このブロックライン内での座標位置 (x', y') に基づき、 ブロヅ クライン単位での補間処理を行えることになる。
図 23に示す入力画像側の太い点線で示すブロヅクライン BL' はレジス夕 8 5によって設定するが、 その値を生成するためには、 歪の変形を考慮して画像デ 一夕の入力範囲 (歪補正範囲) を算出可能とするサポート機能が必要となる。 こ のサポー卜機能は、 歪補正処理部 8の歪補正処理機能に付加するなどして設けれ ばよい。
次に、図 25を参照して歪補正処理フローを説明する。 図 25は図 23及び図 24の歪補正処理のフローチヤ一トである。
まず、図 24のハツチングを施したところのブロックライン処理を開始する(ス テヅプ S 41)。 前述の [式 3]で、 (m, n) = (0, 0) とおくことにより (ステ ップ S 42)、 図 24のハッチング領域の左肩、 すなわちブロックラインのスター ト座標位置 (X blst, Y blst) を求める。 そして、 [式 3]から補正画像の座標位 置 (X, Y) を求めることができる。 この場合、m, nをそれぞれ 1ずつ増やし ていけば、 図 24のハッチングで示すブロヅクライン B L内の各画素の座標位置 (X, Y) を生成することができる (ステップ S 43)。
次に、 [式 1] を用いて補正画像における座標系の位置 (X, Y) を、 補正前 の撮影画像における座標系の位置 (Χ', Υ') に変換する (ステップ S 44)。 そして、 撮影画像における座標系の位置 (Χ', Υ') を、 前述した方法で入力 ズロックライン BL内の座標系の位置(x', y') に変換する (ステップ S 45)。 次に、 このブロックライン BL内での座標位置 (x', y') に基づいて補間処 理を行い、座標位置 (Χ', Υ') における 16点補間などで周辺の複数の画素デ —夕から補間データを算出することで、 1画素分の補正画像デ一夕が得られる(ス テツプ S 46)。
そして、 以上のステップが、 補正画像の座標系の BL内全画素について行われ たか否かについて判断し (ステップ S 47)、 終了していなければ次の m, nを設 定して (ステップ S 48)、 ステップ S 43〜S 47を繰り返し行い、 ステップ S 47 の判定で全画素について 理が終了していれば、 ステップ S 49に移行する。 ステップ S 49 では、 全画面 (フレーム) 内の全てのブロックライン BLにつ いて歪補正処理が終了したか否かを判断しており、 終了していなければ次の入力 ブロックライン BLを選択し、 ステップ S 41〜ステップ S 49を繰り返し、ステ ップ S 49の判定で全画面ついて処理が終了していれば、 終了する。 図 26〜図 29は、 図 25の変形例とも言うべきものである。
デジ夕ルズームを行う場合や注目する小領域のみを切り出す場合、 撮像デ一夕 の一部しか使わなくても構わない。 選択的に CCDから撮像デ一夕の一部を取り 込むことでメモリを節約することができる。 この場合に歪補正をブロックライン 単位で行うためには、 取り込まれたデータが、 撮像素子上でどこに位置するかの 情報 (X, imgst, Y, imgst) が必要である。
図 26及び図 27は、 デジタルズームの場合を示し、 撮像した画像データから 中央部分のみを取り込むものである。 図 25の場合と異なる点は、 上述したよう に、 全画面の中で何処を取り込むかをプリプロセス回路 2で設定している点であ る。 この設定に基づいて必要な部分のみを取り込んでおり、 その範囲を図 26の E' で示す。
まず、 図 27で全画面の中のデジタルズームする範囲 Eの左肩に当たるスター ト位置 (X imgst, Y imgst) を設定する。 次に、 ブロックライン BLを設定する が、 ここでは梨地にて示す部分である。 このとき、 取り込み範囲 Eの左肩を原点 とする、 位置座標 (Xblst, Y blst) が決定し、 [式 2] と同様に m, nを変化さ せることで、 ブロックライン B L内における各画素の座標を生成することができ る。
この結果、 座標位置 (X imgst, Y imgst), (X blst, Y blst), (πιΧΔΧ, η ΧΔΥ) から全画面の座標における位置 (Χ, Υ) が決定される。.
撮影画像における座標位置 (Χ', Υ') は、 上記のように決定された座標位置 (X, Υ) から [式 1] を用いて求めることができる。
そして次に、 撮影画像データにおけるブロックライン BL, の中での座標位置 (x', y') を求める。
まず、 取り込まれた撮像デ一夕の撮像面における設定範囲 E' から左肩の座標 (X, imgst, Y, imgst) が分かる。 取り込み範囲 E, の左肩を原点とする座標 で、 ブロックライン BL, の左肩の座標位置 (X, blst, Y' blst) はサポート機 能を利用して予め求められており、 ブロックライン BL' 内での座標における座 標位置 (x ', y J ) が決定される。 その結果、 ブロックラインごとの補間処理が 行われる。
図 2 8及び図 2 9は撮像デ一夕から或る領域、 例えば画面の端の方を切り出す 場合である。 これは、 監視カメラなどにおいて、 撮像デ一夕の端部分を取り込む ような場合に相当する。 図 2 8及び図 2 9の場合も、 図 2 6及び図 2 7と同様な 符号を付してある。 図 2 6及び図 2 7と切り出す位置が異なっているだけで、 図 2 6及び図 2 7の場合と同様な動作となる。
なお、 通常のデジタルカメラでは、 C P Uが制御レジス夕に切り出す領域を設 定するため、 切り出し位置が分かっており、 上記の変換が可能だが、 記録後のデ —夕に歪補正処理を行う場合ではタグ等に切り出し領域の位置とサイズを同時に 記録する必要がある。 このとき、 同時に補正係数も記録しておく。
ところで、 撮像素子としての C C Dにはモニターモード (撮像した.全画面を読 み出さないモ一 'ド) が用意されることが多い。 モニターモードでは、 ラインが間 引かれることが多く、撮像素子における 2次元空間的には同一でも、 データ上で は.サイズが異なることがある。 また、 プリプロセスにおいて、 横方向の画素も間 引かれることがある。 また、 C C Dからの撮像デ一夕に口一パスフィル夕 (L P F ) などのフィル夕リング処理をかけたり、 補間処理をしてフレームメモリに取 り込むことがある。 この場合、 縦横のサンプリング比が整数にならない場合が生 じる。 さらに、 ?£ 0にぉける丫〇 1? 0^の記録では、 ( 1)ゃ(^成分の横方 向は 2倍の間隔でサンプリングされることが多く、 データとしては横方向が縮ん だ形になる。 これらは、 [式 1 ] では、 S x, S yによって補正する。
図 3 0は、 撮像時のデータ取り込みにおいて、 実際に C C Dから送られてくる データが黒丸印のところしかなく、 縦方向に 3ライン間引いている状態を示して いる。 モニタ—モードでは、 このように C C Dからは間引かれたデ一夕しか出力 されず、 これをメモリに取り込むと、 図 3 1のように間引きによって上下方向に つぶれた画像デ一夕となる。 図 3 2のように、 空間的に中心から同じ距離にある データを取り出しても、 図 3 1のように縦方向では横方向に対して画像が短く出 力されるという現象が現れる。 この結果、 [式 1 ] による歪補正では、 中心から の距離が遠いほど歪補正の効果が大きくなるようにしてあるので、 縦と横で、 歪 補正の効果が変わってしまう。
このように縦と横で画像が非対称となるのを補正する目的で、補正係数 S X ,
S yが設けられている。 図 3 1の場合には、 縦方向に伸ばす必要があるため、 S X = 1 , S y = 4とする。
この S x, S yの効果により、 縦, 横のサンプリング比が異なっても正確な歪 補正が可能となる。
また、 前述のように、 サンプリング比が整数でない場合は、 S x, S yも非整 数で設定すればよい。 さらに、 撮像素子の各画素の間隔が縦横で異なる場合でも 可能 (例えば長方画素) である。
ところで、 通常、 J P E Gですと Y C b C rというデ一夕で記録されるのがー 般的であるが、 そのときの設定として、 図 3 3及び図 3 4に示すよう 場合が考 えられる。 例えば、 Y C 4 2 2という形式のデ一夕の場合は、 輝度データに比べ て.色デ一夕についての解像度は横方向が 1 Z 2となっている。 この場合は、 色デ 一夕については S x = 2, S y = lと設定して、 補正処理を行えばよい。
ところで、 歪の中心と画像の中心が一致しない場合、 補正前に中心にあった被 写体が、 補正後は中心からずれてしまう。 [式 1 ] では、 中心ずれ補正値 (X off, Y off)で補正することにより、 補正前後で画像の中心に来る被写体が変化しない ようにすることが可能である。
図 3 5は、 画像の中心ずれを説明する図である。
図 3 5は補正画像を示す。 前述の図 4では、 歪の中心と画像の中心が一致して いる、 すなわち、 C C Dの中心 (画像の中心) がレンズ光軸 (歪の中心) に一致 している場合であった。
図 3 5は、 C C Dの中心に対して歪の中心がずれている場合である。 図 3 5で は、 歪中心 (X d, Y d) が画像の中心と異なるので、 中心ずれを考慮せずに歪 補正を行った場合、 出力範囲 Hに対する画像の中心 Pが Q点 (大きな黒丸にて示 す) にずれる。 ユーザにとっては、 実際に撮影した画像と歪補正後に表示される 画像の中心がずれると、非常に違和感を感じるものである。 そこで、 元々歪補正 前に出力範囲 Hの中心にあったデ一夕を、 出力範囲に対して中心の位置にくるよ うにするために、 歪補正された画像データの切り出した方を変える。 それを行う ためには、 画像の中心ずれを (X off, Y off)で定義して、 画像デ一夕の切り出し た方を変えればよい。 画像の中心ずれ (X off, Y off)を設定することで出力範囲 を Hから H ' に移動させ、 元々画像の中心 Pにあった被写体を、 補正後の出力範 囲 H, においても中心にくるように補正することができる。
図 3 5の実施例によれば、 中央の被写体がずれることによる違和感を無くすこ とが出来る。
以上述べたように本発明の第 2の実施の形態によれば、 小領域 (例えばブロッ クライン) の空間的な位置を算出可能とし、 小領域単位での歪補正処理を実現す ることができる。 また、 間引き取り込みされた画像デ一夕に対し も'、正確な歪 補正を行える一方、 デジタルズームなど、 任意領域を切り出したデ一夕に対して も JE確な歪補正を行うことができる。
本発明の第 3の実施の形態の画像処理装置の全体構成は、図 2 1と同様である。 図 3 7は、 図 2における歪補正処理部 8の詳細な構成を示している。
図 3 7の各部と図 2の各部との対応関係を説明する。 図 3 7における補間位置 算出回路 2 2が図 2の補間位置生成部 811に、 セレクタ 2 4が図 2のセレクタ 8 13 に、 歪補正係数算出回路 2 1及び補間位置補正回路 2 3が図 2の歪補正座標 変換部 812に、 それぞれ対応している。 また、 図 3 7における 2ポート S R AM 2 6が図 2の内部メモリ部 (内部バッファ) 8 2に対応し、 書込みアドレス生成 回路 2 8 , バッファ空き容量監視回路 2 9 , デ一夕送信可否判定回路 3 0 , バヅ ファ閧放量算出回路 3 1及び読出しアドレス生成回路 2 5が図 2のメモリ制御部 8 3に、 補間回路 2 7が図 2の補間演算部 8 4に、 それぞれ対応している。 エラ —検出回路 3 2は、 図 2には図示していないがメモリ制御部 8 3に接続して設け られている。 エラ一検出回路 3 2は、 歪補正処理において歪量が大きくなり後述 する preULB、 p o s t U L Bの設定値を越える歪が発生したときに、 エラ ― (ERROR) として CPU 4に伝える機能を有するものである。
補間位置算出回路 22は、 歪補正処理部 8の後段回路からのリクエストに応じ て後段回路へグラント (リクエスト受付) を返したときにそのグラントをトリガ として、 1ユニットライン (以下、 1 ULという) 分の補間位置 (X 1, Y 1) を算出するものである。 ここで、 1ULとは、 前述したブロックライン処理にお いて、 メモリ部への書き込み, 読み出しの際に、 列方向に一列に並んだ一定数分 の画像デ一夕を書き込んだり, 読み出したりする際の一単位である。 つまり、 1 ULは、 ブロックライン (BL) 上の列方向に一列に並んだ一定画素数のデ一夕 を指している。
補間位置補正回路 23は、 歪補正係数算出回路 2 1からの歪補正係数 Fを補間 位置 (X 1, Y 1) に乗算して、 歪補正前の元デ一夕の座標位置 (Χ', Υ') を 計算する。 セレクタ 24は、 (X l, Υ 1) と (Χ,, Υ') を選択するもので、 歪 補正を行う場合は (Χ', Υ') を選択して出力し、 拡大 ·縮小処理 (リサイズ) の を行う場合は (XI, Y1) を選択して出力する。
2ポート S RAM 26は、 歪補正処理部 8内におけるデータを格納するバッフ ァである。
読出しアドレス生成回路 25は、 補間位置に対応する 2ポート SRAM 16内 のアドレス (ADR) を生成したり、 2ポート SRAM26からの出力を整列す るための制御信号を出力したり、 出力画像デ一夕に同期して書き込み制御信号 WE_Nを出力したり、 図 38及び [式 3]に示す D 0が 2ポート SRAM上のどこ の位置かを知らせるデータ列制御信号を出力したりする。
書き込みアドレス生成回路 28は、 書き込み制御信号 WE に合わせて内部メ モリである 2ポート SRAM26のアドレス (ADDRESS) を生成したり、 1 U L分のデ一夕入力が完了したら、 その内部カウン夕 (BLC) をカウントアップす o
デ一夕送信可否判定回路 30は、 BLC値, 本回路の動作状態, 次の UL先頭 座標, 歪補正処理部 8の後段回路からのリクエスト (REQ) 状態とから、 後段 回路からの REQ信号に対してグラント (GRANT— N) を送信できる状態にある かを判定し、 グラント送信可能なら GRANT— N= lとする機能を有する。
補間回路 27は、 補間位置に対応する画像デ一夕につき、 16点補間を行う。 バッファ開放量算出回路 3 1は、 現在処理中の UL先頭座標と、 次に処理予定の UL先頭座標の整数部の差をバッファ開放量 (図 50参照) として算出する。 バッファ空き容量監視回路 29は、 内部バッファとしての 2ポート SRAM2 6に格納されているデ一夕 (UL) 量を保持し、 バッファに空きがあれば、 歪補 正処理部 8の前段回路に対してリクエスト (REQ = 1) を送信する。
次に、 図 37の歪補正処理部 8の回路動作を説明する。
まず、 内部メモリ部 (内部バッファ) である 2ポート SRAM26に空きがあ る場合、バッファ空き容量監視回路 29から前段回路に対してデーダ要求として のリクエスト (REQ) を送信すると、 バッファ空き容量監視回路 2'9は前段回 路からリクエスト受付としてのグラント (GRANT) を受信し、 この受信と同 時に 2ポート SRAM26に格納可能な UL数を記憶するカウン夕 (回路 29内 にある) を 1つ減らす。 1回のリクエストとグラントで 1ULを一動作単位とし てデ一夕転送する。 上記カウン夕が 0になったらリクエストを取り下げる。 そして、 前段回路から書込みアドレス生成回路 28へデ一夕が流入し、 2ポー ト SRAM26への書込みが行われる。 1 UL入力毎に書込みァドレス生成回路 18の内部カウン夕 (BLC) がアップする。
2ポート SRAM 26は、補間回路 27にて例えば 16点補間を行えるように、 図 39の如く読出しと書込みが同時に行える 2ポート SRAMが 4 x 4の計 16 個で構成されている。 .
ここで、 図 39を用いて、 2ポート SRAM 26を説明するが、 メモリの数や 各メモリの大きさは異なっていても構わない。 例えば、 図 39では、 ブロックラ インの幅 (ULの長さ) を 96としているが、 もっと長くしても短くしても構わ ない。 回路規模と補正性能とのバランスで決めればよい。 また、 4 x 4 (計 16 個) も、 4点補間であれば 2x2 (計 4個) で構わない。 補間方式 (何点で補間 するか) に合わせて決めればよい。
図 39は、 16個の 2ポート SRAMからなるメモリ空間で、 横方向は入力さ れる U L順であるが、縦方向は各 2ポート S R A Mごとに付したアドレスである。 Nを整数とし、 処理のある時点での状態を説明する。 縦方向に並んだ 4つの各 2 ポート SRAMである No.O, 4, 8, 12に格納するデ一夕は、 4N, 4N + 4, 4N+8, 4 N+ 12番目の ULのデ一夕であり、 No.l, 5, 9, 1 3に格納するデ一夕は、 4N+1, 4N+5, 4N+9, 4N+13番目のUL のデ一夕であり、 No.2, 6, 10, 14に格納するデ一夕は、 4N + 2, 4 N+6, 4N+10, 4 N+ 14番目の ULのデータであり、 No.3, 7, 1 1, 15に格納するデ一夕は、 4N+3, 4N+7, 4 N+ 11 , 4N+15番 目の ULのデ一夕である。
横方向に並んだ 4つの各 2ポート SRAMである No.O, 1, 2; 3及び N o.4, 5, 6, 7及び No.8, 9, 10, 11及び No.12, 13, 14, 1 5.の各組についても同様に格納されている。
図 40及び図 41を使って、 各 2ポート SRAMにデータが書き込まれる様子 を説明する。 図 40及び図 41では、 図 40に示すように、 幅 8ライン (画素) のブロックラインを想定しており、デ一夕は、 UL単位に「1, 2,···, i, m」、 「5, 6,…, j, n」、 「9, 10,…, k, o」、 …という順序で入力される。 図 41は図 40に示した書込み順番のデ一夕が 4 X4の 16個の 2ポート SRA M No.O〜Νο.15上のどこに書き込まれていくかを示している。 例えば No.O, No. 4, No.8, No.12 には、 図 40の左側縦一列の 1 UL分の画像データ (順番 1〜 m で示されるデータ) が分散されて格納されていく。 なお、 図 39に示される 縦方向の 2ポート SRAM No.0, No.4, No.8, No.12の各縦ラインごとに付され た表記 0〜92, :!〜 93, 2〜94, 3〜 95は、 図 40で示される各ユニットライ ン (1〜 m ···、 5〜 n ···、 9〜θ···、 · · · ·) の表記とは異なっている。 これ は、 図 40及び図 41では、 4 X 4の 16個の画像データにつき鲁き込み順が分 かるように 1〜:6, a〜p, A〜P, …と 16個の塊ごとに符号を付してあるた めである。 図 39の場合はその縦方向の 2ポート SRAM No.0, No.4, No.8, N 0.12の各縦ラインごとに付された表記は、 縦方向の 1つの ULにおけるデータ順 に相当する。 2ポート SRAMNo. 0, No. 4, o. 8, No. 12のそ れそれには 1つの U L画素デ一夕 Νο·0〜 95が交互に分散して記載されている。 従って、図 39の縦方向に並んだ 4つの各縦ラインには 1つのュニヅトライン(U L) の画素順 (0〜95) の何番目の画素であるかを示す表記が付されている。 図 39の 2ポート SRAMの No.Oの縦方向には ULの 4の倍数の画素 (0, 4, 8 … 92) が格納してあり、 2ポート SRAMの No.4の縦方向には ULの (4の 倍数) + 1の画素 (1, 5, 9… 93) が格納してあり、 2ポート SRAMの No. 8の縦方向には U の (4の倍数) +2の画素 (2, 6, 10… 94) が格納してあ り、 2ポート SRAMの No.12の縦方向には U の ( 4の倍数) +3の画素 (3, 7, 11〜95) が格納してある。 さらに、 2ポート SRAMの o.1, 2, 3及び No. 5, 6, 7及び Νο·9, 10 , 11及び Ν ο.13, 14, 15の 組についても同様に格納してある。
再び図 39に戻って、 1UL分のデ一夕は縦方向に並ぶ 4つの 2ポート SRA Μに 1画素づっ順に格納されている。 最初の ULデータは No. 0, 4, 8, 1 2 (図 39の 4Nのライン) に書き込まれる。 次の ULデ一夕は No. 1, 5, 9, 13 (図 39の 4 N+ 1のライン) に書き込まれる。 図 39のバッファ形態 では、 歪補正処理によって補間位置がどのように移動しても、 バッファ内の任意 の座標周辺 16点を 1回のアクセスで同時に抽出することができる構成としてあ る。
デ一夕送信可否判定回路 30が後段回路からリクエスト (REQ— N) を受信 し、 次の ULデ一夕が送れる状態にあればリクエスト受付 (GRANT— N) を 出力する。 このリクエスト受付(GRANT— N)は自分自身へのトリガとなり、 補間位置算出回路 22が動作を開始し、 1UL分動作したら次の UL先頭座標を 算出して終了する。 補間位置算出回路 22が動作開始して補間位置 (XI, YD を出力するのと 同期するようにデ一夕送信可否判定回路 30からは歪補正係数算出回路 21へ動 作トリガ (t rig) を送る。 歪補正係数算出回路 21も補間位置算出回路 22 と同様、 1 UL分動作したら次の UL先頭座標を算出して終了する。
読み出しアドレス生成回路 25は、 入力される補間座標から、 2ポート SRA M26の 16個夫々に読み出しアドレスを発行する。 '
次に、 読み出し及び補間の方法について説明する。
補間方法を図 38に示す。 図 38は補間回路 27における補間演算のイメージ 図である。 補正座標位置 Pの座標 (Χ', Υ') は前出の [式 1]で既に求めてあ る。 この座標における画素値 (輝度データ) を求めるのに、 座標 Ρ (Χ', Υ') の周辺 16点の画素デ一夕 D 0〜D 15から求める。 その内、 D 0が 16個のメ モリのどのメモリから来ているかが分かれば、 D 1, D 2 ···, D 15は D 0に対 する位置関係から分かる。後述するように、 DOは補間位置の座標に つて求ま る。
図 42は 16個の 2ポート SRAMからなるバッファからの読出し例を示して いる。 今、 補間位置 (Χ,, Υ') が X, =10. …, Υ, =50. … (…は小数 点以下の数字) とすると、 X, =10. …は (4x0+10)以上であるから、 横方向には 2ポート SRAMの 4 Ν+ 10番目の U Lより若干右側に補間位置が 来る。 Y, =50.…は(4x 12 + 2)以上であり、 4Ν+ 10番目の ULで、 50番目の画素が格納されているメモリ .(No. 10) が図 7における画素 D 5 を出力するので、 DOを出力するメモリは、 その左上にある No. 5となる。 図 38の D 0〜D 15に対応する画素デ一夕は図 42の〇部であるので、 それ らが出力されるようにアドレスを生成する。
No. 0から出力される画像デ一夕が D 0には対応しない。 図 10の例では、 No. 5からの出力が D 0に対応する。 このため、 どのメモリからどのデータが 出力されているかを識別するため、 読出しアドレス生成回路 25からデ一夕列制 御信号を出力し、 これによつて、 補間演算を行う補間回路 27は D0が 2ポート SRAM26のどこから出ているかを認識して 16点補間を行う。
画素データ DO〜D 15が分かれば、 [式 4] の補間式による補間処理を行うこ とによって、 補正座標位置の画素データを D outとして求めることができる。
[式 4]
Dout = kxo (kyo Do + kyi D4+ky2 D8 + ky3 D|2 )
+ kX| (ky0 D| +ky| D5 + ky2 Dg+ky3 D|3 )
(ky0 D2 + ky| D6+ky2 D[0 +ky3 D|4 )
+ kx3 (ky0 D3 + ky| D7 + ky2 D|| +ky3 D ) 最後の ULデ一夕出力の後、 バッファ開放量算出回路 31は今処理し終わった
UL先頭座標と次の UL先頭座標との差を計算し (図 50参照) 、必要なくなつ たデータの蓄積されているバッファを開放するため、 ノ ッファ開放量をバッファ 空き容量監視回路 29へ出力する。ただし、歪中心を跨ぐ時のバッファ開放量は、 図 49に示すように po s t ULB 1, post ULB 2の値変化も考慮した量 を開放することが好ましい。 図 48に示す pr eULB、 postULBとは、 ULを形成する画素のうち、 最初の画素の座標位置に対して、 行方向に対して前 側及び後側に所定幅の領域を設けたもので、 これらをそれそれ pr eULB、 p o s t ULBと定義している。 歪中心を跨いだ時はバッファ開放量を通常の UL 先頭座標の差ではなく、 参照値の変わる p O S tULB (ULB: Unit Line Buf fer の略、 ユニッ トラインバッファ) の変化量を参照してバッファ開放量を調節 する (調整量は、 postULB l— postULB2で、 図 49参照)。
(UL先頭座標の差) + (調整量) がマイナスになる場合は、 マイナス値を記 憶しておく。 処理が進んでパッファ開放量がマイナス値を超えるまでバヅファの 開放を行わない。
前述のバッファ開放量の算出と共に、 バッファ開放量算出回路 31は次の UL 処理にあとどれだけ前段回路からデータが必要かをデータ送信可否判定回路 30 へ送 - ο
ノ、'ッファ空き容量監視回路 29は前述のパッファ開放量の算出によってバヅフ ァに空きができたら、 前述の前段回路へのリクエストを行う。
データ送信可否判定回路 30は書込みァドレス生成回路 28の内部カウン夕 (BLC) とバッファ開放量算出回路 31からの人力と pr eULB値とに基づ いて、 次の ULデ一夕を送れるかどうかを判断する。 デ一夕送信可否判定回路 3 0は、 後段回路のリクエストに対してリクエスト受付 (GRANT_N) を返す。 エラー検出回路 32は、 読出しアドレス生成回路 25に入力される座標がプロ ックライン (BL) の左端 (図 43参照) や右端を逸脱したり、 ブロックライン (BL) の上下端 (図 44参照) を逸脱したり、 歪量が preULB、 post ULBの設定値を逸脱 (図 45参照) した場合にエラーを出力する。 これらのェ ラーの出力は、 座標を判別して出力することになる。 図 43及び図 44の場合に は、 エラ一を出力するが、 処理は継続する。 図 45の場合も、 エラーを出力する が、処理は継続する。図 45の preULB、 p o s t U L Bの場合については、 エラ一を出力するだけではなく、 逸脱した量を記憶し、 レジス夕に設 して CP U 4がデ一夕として取得できるようにしておく。
.このように、 ブロックライン処理で、 出力側の画像に対して入力側の画像を補 間算出しているときに入力画像の範囲からはみ出すようなときがある。その場合、 入力範囲にデ一夕がない部分で補間デ一夕を生成することになり、 エラー検出回 路 32から補間ができない旨のエラーを出力することになる。
図 46にあるように、 歪の中心座標に対して、 画像の歪み方は 照的になる。 また、 歪みは一般的に中心に近いほど小さく、 離れるほど大きくなる。 そこで、 BLの両端にある ULの変形を考慮し、 バッファを確保すれば、 全ての ULにお いて、 補間処理でデ一夕が不足することは通常はない。 そこで、 補間する最初の 座標 (図ではブロックライン BL内の画像デ一夕の一番上の X印にて示す先頭座 標) に対して前方 (図示右側) に所定の領域 pre ULBを、 後方 (図示左側) に所定の領域 P os tUL Bを設ける。
サポート機能は、 図 1の「歪補正範囲算出部」の部分に該当する。 図 12におい て、 注目領域が BLとなるが、 歪補正の座標変換で図 13のように変形される。 このとき、 X' TL, Y, TL, X Lmin, X Lmaxから p r eULB 1 /p o s t ULB 1が決められる (図 48参照)。 同様に、 X, TR, Y, TR, X Rmin, X Rmaxから preULB2/pos t ULB 2が決められる。
さらに、 UL処理において、 歪の中心を通過すると、 光学的歪の曲がり方が逆 方向となる。 すると、 図 46のように、 歪中心の左右では p r eULB、 pos t ULBの値が異なる。 この値を、 左右どちらにも対応できるよう、 図 47のよ うに右側で最も大きい p o s t ULBを採用し、 左側で最も大きい p r eULB を採用すると、 左側又は右側の一方側の処理のときに必要もないのにもう一方側 のデ一夕を大きく (すなわち、 バッファを広く) 確保しておかなければならず、 バッファの無駄である。
そこで、 preULBと pos t U L Bで予め同じ大きな値で両方決めておく のではなくて、 preULBと pos t ULBを変数としてそれぞれに値を入れ るようにする。 歪の中心座標を過ぎたら、 これらの値を変えてやって確保量を変 えるようにする。 すなわち、 歪中心前後で p r eULB、 postULBを変化 す.ることにより、 内部バッファの使い方に無駄をなくし、小さなバッファで比較 的大きな歪補正を行える。
re, p o s t ULBをレジス夕 85に設定するが、 それらの値を生成する ためには、 歪の変形を考慮して画像データの入力範囲を算出可能とするサボ一ト 機能が必要となる。 このサポート機能は、 歪補正処理部 8の歪補正処理機能に付 加するなどして設ければよい。 メモリ制御部 83は、 1UL処理中は他の処理に よって前記領域 p r eULB,po s t U L Bが上書きされないように制御する。 前記領域 P r eULB, pos t ULBの設定は、 CPU 4からレジス夕 85 (図 2参照)に設定しても構わないし、 CPUで自動的に計算をして設定してもよレ、。 歪補正処理において 16点補間すると前に述べたが、 図 48に示すように、 歪 補正によって補間位置は 1UL処理の間に a (ただし、 a〉0) だけ動き得る。 16点補間する関係上、 入力画像範囲としては pre側, post側とも上記間 隔 aに、 補間に必要な画素分の間隔 b L, bRを加えた範囲が必要となる。 歪中心を越えると、 p r e, p o s t U L Bの値を変えることで、 ノ、"ッファを 必要最小限に絞る。 また、 前述の「歪補正算出部」で、 補間分を考慮して結果を出 力させてもよい。
歪補正処理部 8の持っている内部メモリ部 (内部バッファ) 8 2は、 図 3 9の 場合、 最大で縦 9 6画素の横に 1 6ライン (画素) である。 これを使って歪補正 していくことになる。 ブロックライン処理のデータは少なくとも 1 U Lずつ図示 右方向にスイープしていく。 一気に数 U L開放されることもあるので、 必ずしも 1 U Lずつスイープするわけでない。 内部メモリ部 8 2は、 はじめば空の状態か らスタートするので、 1 6ライン分入ってきて、 歪補正処理を行う。 これらのュ ニットラインを処理していくと、 左側のラインに不要なデ一夕 ( 1から数 U L分 のデータ) が生じることになる。 なお、 処理したら必ず不要になる訳ではなぐ 拡大率が大きい時は不要になるまで数 U Lかかることもある。 不要なデータ分は バッファを開放 (すなわち、 上書き許可) していって新しいデータを'入れていく ことにする。 スイープしていく画像は右側にずれていく。 最大 1 6ライン読み込 めるサイズしかないので、 要らなくなったデ一夕領域は開放して新しいデ一夕を 順次上書きしていくようにする。 不要となったバッファ領域は全て一気に開放し てしまう。 その開放量は 1ラインであるかもしれないし、 5ラインであるかもし れない。 例えば、 はじめの 3ライン分のデ一夕がバッファに入っていたものを以 降の処理に不要であるので開放してしまって次のデ一夕を受け付けるようにし て、 次のデ一夕が上書きされる。
ところで、 1 U L処理が終わった後に開放できるバッファの量は、 次の U L先 頭座標が決まらなければ分からない(図 5 0参照)。内部バッファは小さいので、 使わなくなったデータが格納されている部分をできるだけ早くに開放する為、 次 の U L先頭座標を算出して開放量を取得し、 バッファを開放することで内部バッ ファを有効に利用できるようにする。 ところが、 歪補正に対して後段の回路プロ ックからリクエストが来てそれに対するグラントを返して 1 U Lのデ一夕を後段 へ出力し、 また次のリクエストが来てからグラントを返した後、 座標を求めてと いうように動作させると、 バッファの開放が遅れ、 これに伴って、 新しいデ一夕 の取り达みも遅れ、 結果として、 パイプライン動作に長い空きができてしまうこ とが起こり得る。 そこで、 図 5 1に示すように先の歪補正処理 (図示の座標 1〜 nの処理)を行っている段階で、後段の回路ブロックからリクエストに関係なく、 座標 nの処理が終わったら次の先頭座標 n + 1を演算して開放量を求め、 バッフ ァを早期に開放してしまう。 これにより、 前段回路ブロックから新たなデータ入 力が比較的早く行なわれ、 パイプラインの空きを詰めることができる。 しかしな がら、 図 5 1の場合であると、 座標 nの処理をした後、 画素 n + 1を座標を計算 してから処理を終了するので、 図 5 2のようにバッファ内に次の U L処理に必要 なデ一夕が揃っているのに、 後段からのリクエス卜が連続するとパイプラインに 空きが生じる。 依然としてパイプラインの空きは存在するので、 リクエストが連 続した時は、装置全体の動作速度に悪影響を及ぼす恐れがある。
そこで、 図 5 1の改善策として、 図 5 3のように、 なるべく早く ίこ次の座標が 決まってバッファの開放量を求める方法がある。 図 5 1のように一番最後に次の 先頭座標を求めるよりももつと早い段階で次の U L先頭座標を取得しておき、 必 要なデ一夕が揃っていると判断されたら、 次の U L処理を連続して行うことで処 理の空きを小さくする。 すなわち、 1 U L処理が終了する前に U Lのデ一夕をレ ジス夕等に保持しておいて、 次の U Lの先頭の座標位置を算出することで、 予め 次の U L処理の開放量を求めておく。 図 5 3では、 先の歪補正処理 (図示の座標 1 ~ ηの処理) の 2画素目に次の U Lの先頭座標を求めておいてバッファ開放量 を早い段階で取得する。 これによつて、 バッファの閧放を早くすることができ、 図 5 4に示すように図 5 2に比べてパイプラインの空きをかなり少なくできる。 しかしながら、 回路的に複雑となり、制御も困難となる問題点がある。
そこで、 図 5 3をさらに改善したのが、 図 5 5である。 図 5 5では、 現在処理 中の U Lが終わった時に開放する量 (閧放量 1 ) は前の U L処理中に既に分かつ ている。 座標 ηを算出した後、 2つ先の U L先頭座標を計算し、 次の U L処理が 終わった時に開放できる量 (開放量 2 ) を予め求めておく。 このようにすると、 図 5 3の場合のように U L処理中に例外的な座標生成 (座標 2の生成) を行う必 要がない。 このように、 次の U Lの先頭ではなくて次の次の 2つ先の U Lの先頭 座標を求めておけば、 図 5 3のような例外的な処理がなくなるので、 回路的には 簡単になる。
以上述べたように本発明の第 3の実施の形態によれば、 バスの転送量ゃメモリ の容量を大きく増大させることなく、歪補正を実現することができる。すなわち、 小さなバッファ容量で比較的大きな歪補正処理を行うことが可能となる。 産業上の利用可能性
デジタルカメラ等の電子的撮像装置に用いられる画像処理装置、 画像処理方法 及び歪補正方法に広く利用可能であり、 回路規模やデータ転送量を増大させるこ と無く、歪補正機能を実現し、歪補正処理を行う場合に、空間的な位置を算出し、 元デ一夕である'撮影画像データを有効に活用した歪補正処理を行え、糸巻き型歪, 樽型歪, 及び陣笠型歪などの歪曲収差に基づく歪に対しても有効な歪補正処理を 行うことができる。

Claims

1 .歪補正手段を有する画像処理装置であって、
該画像処理装置は、 さらに、
前記歪補正手段が歪補正処理を行う入力画像範囲を算出する歪補正範囲算出部 を有することを特徴とする画像処理装置。
2 . 前記歪補正範囲算出部は、請
補間座標を生成する座標生成部と、
前記生成された補間座標に対して所定のの歪補正式を適用して変換した座標を出 力する歪補正座標変換部と、
前記変換された座標位置から前記入力画像範囲囲を算出する補正範囲検出部と、 を有することを特徴とする請求項 1に記載の画像処理装置。
3 . 前記座標生成部は、 歪補正後の出力画像範囲における辺縁部の各'画素に対応 する座標のみを用いて補間座標を生成することを特徴とする請求項 2に記載の画 ^処理装置。
4. 前記出力画像範囲は矩形であって、 前記座標生成部は、 該出力画像範囲の 4 辺の各画素に対応する座標のみを用いて補間座標を生成することを特徴とする請 求項 3に記載の画像処理装置。
5 . 前記歪補正範囲算出部は、 座標変換により生成された座標に対し、前記出力 画像範囲の 4辺の各辺に対応する画素の座標の最大値と最小値および前記出力画 像範囲の 4頂点に対応する座標の少なくともいずれかから前記入力画像範囲を算 出することを特徴とする請求項 1〜 4のいずれか 1つに記載の画像処理装置。
6 . 前記歪補正座標変換部は、 前記所定の補正式に含まれる演算を時系列に処理 することを特徴とする請求項 2に記載の画像処理装置。
7 . 前記座標生成部は、 前記歪補正処理のための補間座標に対して所定の間引き を行つて座標を求めることを特徴とする請求項 2に記載の画像処理装置。
8 . 前記歪補正範囲算出部は、 歪補正処理を行う複数入力信号に対して順次範囲 算出を繰り返して前記入力画像範囲を算出することを特徴とする請求項 1に記載 の画像処理装置。
9 . 前記範囲算出を繰り返し処理で行い、 入力画像範囲に対して歪補正後の画像 範囲が所定の範囲になるような補正倍率 Mを決定することを特徴とする請求項 1 又は 8に記載の画像処理装置。
1 0 . 前記歪補正範囲算出部は、
前記歪補正処理部が歪補正実行中に、 次に歪補正を行う画像入力範囲を算出す ることを特徴とする請求項 1に記載の画像処理装置。
1 1 . 歪補正処理を行う画像処理方法であって、
前記歪補正処理を行うに際して、 歪補正処理を行う入力画像範囲を算出するこ とを特徴とする画像処理方法。
1 2 . 画像デ一夕に対して歪補正処理を行う歪補正手段を有する画像 理装置に おいて、
前記歪補正手段は、
j 正前の画像デ一夕内において、 補正画像の各画素が対応する位置を所定の補 正式に従って算出する際、 撮像面における空間的な位置を記述可能な座標系にお いて算出することを特徴とする画像処理装置。
1 3 . 前記歪補正手段は、
補正画像に含まれる第 1の小領域を単位に処理を行い、
前記第 1の小領域の各画素の座標位置を前記補正式に従って変換した小領域を 含む撮像面における第 2の小領域について、 前記撮像面に対応する座標系での位 置を、 前記第 2の小領域での座標に変換した後に、
前記補正画像の各画素のデ一夕を生成することを特徴とする請求項 1に記載の 画像処理装置。
1 4 . 前記画像デ一夕は、
撮像デ一夕の一部のみを取り込んだ部分画像デ一夕であることを特徴とする請 求項 1 2又は 1 3に記載の画像処理装置。
1 5 . 前記部分画像データは、
前記撮像デ一夕の一部を切り出したデ一夕であることを特徴とする請求項 1 4 記載の画像処理装置。
1 6 . 前記部分画像デ一夕は、
前記撮像デ一夕の横または縦の少なくとも一方向に間引かれたデ一夕であるこ とを特徴とする請求項 1 4記載の画像処理装置。
1 7 . 前記画像デ一夕は、
前記撮像デ一夕に対してフィル夕リング, 空間サンプリングまたは補間処理の 少なくともいずれか 1つを行って生成されるデ一夕であることを特徴とする請求 項 1 2記載の画像処理装置。
1 8 . 前記画像データは、
各画素が撮像面で空間的に位置する間隔が縦方向及び横方向で異なることを特 徴とする請求項 1 2に記載の画像処理装置。 : '
1 9 . 画像デ一夕における各画素の空間的なサンプリング間隔が縦横で異なる場 合、歪補正前の画像内における座標を求める補正式は、縦横でのサンプリング間隔 の違いを補正する係数を含むことを特徴とする請求項 1 2〜1 8のいずれか 1つ に記載の画像処理装置。
2 0 . 歪補正前の画像内における座標を求める補正式は、
所定量のオフセット補正が可能であることを特徴とする請求項 1 2〜1 9のい ずれか 1つに記載の画像処理装置。
2 1 . 前記オフセヅ卜補正は、
歪の中心と画像の中心が一致しない場合に行うことを特徴とする請求項 2 0に 記載の画像処理装置。 .
2 2 . 画像データに対して歪補正処理を行う歪補正手段を有する画像処理装置の 歪補正方法であって、
前記歪補正方法は、
補正画像の各画素に対応する座標系での第 1の位置を生成するステップと、 前記第 1の位置を、 歪補正式に従って歪補正前の画像デ一夕内における座標系 での第 2の位置に変換するステツプと、
前記歪補正前の画像データ内における座標系での第 2の位置を、 撮像面に対応 する座標系を基準とする設定領域内での座標に変換するステップと、
前記設定領域内での座標に基づいて補間処理を行い、 前記補正画像の各画素の デ一夕を生成するステップと、
を有することを特徴とする歪補正方法。
23. 前記請求項 22記載の歪補正方法においては、前記補正画像に含まれる小 領域を単位に処理を行うことを特徴とする歪補正方法。
24. 画像デ一夕に対して歪補正処理を行う歪補正手段を有する画像処理装置に おいて、
前記歪補正手段は、
前記画像デー'夕の一部を格納するメモリ部と、 : ' 前記メモリ部に対するデ一夕の書き込みおよび読み込みを制御するメモリ制御 部 _と、
を有し、
前記メモリ部から読み出した画像データに対する補間演算を行うことを特徴と する画像処理装置。
25. 前記メモリ制御部は、
前記メモリ部への書き込みの際は、列方向に一列に並んだ一定数分の画素から なる画像データ (ユニットライン: UL) を単位として書き込むように制御し、 前記メモリ部からの読み出しの際は、 歪補正処理後の画像が前記 U Lを単位とし て出力されるように、 前記メモリ部に格納された画像データに対して読み出し制 御することを特徴とする請求項 24に記載の画像処理装置。
26. 前記メモリ制御部は、 前記 ULの最初に処理される画素の座標位置に対し て、 行方向に対して前側および後側に所定幅の領域 (それそれ preULB、 p ostULB) を設け、 前記 ULの処理中は他の処理によって前記領域が上書き されないよう制御することを特徴とする請求項 25に記載の画像処理装置。
27. 前記メモリ制御部は、 さらに、
前記 ULの処理中に、 前記歪補正手段の前段からのデ一夕を入力するために閧 放可能なバッファ量を算出するバッファ開放量算出回路と、
前記歪補正手段の後段に対するデータ送信の可否を判定するデー 送信可否判 定回路とを有し、
前記バッファ開放量算出回路には、 前記 ULの処理における最初の画素に対す る補間座標を中心として前記 p 0 s t ULBが入力され、 デ一夕送信可否判定回 路には前記 p r e U L Bが入力され、 バッファ開放量算出回路は前記ノ ヅファ開 放量を前記 po s t ULBの値を参照して算出し、 デ一夕送信可否判定回路は前 記 p r eULBの値を参照してデ一夕送信可否の判定を行うことを特徴とする請 求項 25又は 26に記載の画像処理装置。
28. 前記 preULB値、 postULB値は、 それそれ歪中心に対して前側 と後側とで異なる値を設定可能であることを特徴とする請求項 26又は 27に記 載—の画像処理装置。
29. 前記画像処理装置は、 さらにバッファの空き領域を検出するバッファ空き 容量監視回路を有し、
該バッファ空き容量監視回路によりバッファ内の空き領域が検出されると、 該 空き領域へのデ一夕の書き込みを可能とすることを特徴とする請求項 24〜27 のいずれか 1つに記載の画像処理装置。 .
30. 前記メモリ部は、 デ一夕のリード動作とライト動作が同時に可能な複数の メモリからなり、
前記メモリ制御部は、 さらに、
前記メモリ部へのデ一夕書込み制御を行う書込みアドレス生成回路と、 前記メモリ部に格納されている画像データから補間演算に必要なデ一夕を同時 に読み出すためのァドレスを生成する読出しアドレス生成回路と、
を有し、 前記デ一夕書込み制御は、 同時に読み出すデータをそれぞれ異なるメモリに書 き込むものであることを特徴とする請求項 24記載の画像処理装置。
31. 前記画像処理装置は、 さらに、 歪補正処理された座標が前記 ULの処理に おける最初の画像に対する補間座標に対し、 列方向に前記 pr eULB、 po s tULBを逸脱する座標が生成された時、 若しくは、 歪補正された座標が前段か ら入力されない座標となった時にエラ一を検出して出力するエラ一検出回路を有 することを特徴とする請求項 26〜 28のいずれか 1つに記載の画像処理装置。
32. 前記エラ一出力がなされたときはレジス夕を再設定して画像処理を再実行 することが可能であることを特徴とする請求項 26〜28のいずれか 1つに記載 の画像処理装置。
33. 1ULの処理終了後、 次の 1 ULまたはさらにその次の 1 ULの処理を開 始する際の最初の補間座標が演算された後に 1 UL単位の処理を終了することを 特徴とする請求項 25〜29のいずれか 1つに記載の画像処理装置。
34. 画像デ一夕に対して歪補正処理を行う画像処理方法において、
.前記歪補正処理を行うに際は、 データの書き込みおよび読み込みが制御される メモリ部に、 前記画像デ一夕の一部を格納し、 該メモリ部から読み出した画像デ ータに対して補間演算を行うことを特徴とする画像処理方法。
35. 前記画像処理装置は、 さらに、 前記歪補正手段が歪補正処理を行う入力画 像範囲を算出する歪補正範囲算出部を有すること、
を特徴とする請求項 26〜28のいずれか 1つに記載の画像処理装置。
36.前記歪補正範囲算出部は、所定の歪補正式を適用して座標変換可能であり、 歪補正後の出力画像範囲において、
周辺 4辺の各辺に対応する画素を座標変換して生成した変換座標の最大値と最 小値、 および 4頂点に対応する画素を座標変換して生成した変換座標、 の少なく ともいずれかを算出し、 前記 preULBおよび pos tULBは、 前記歪補正 範囲算出部の出力結果から算出すること、 を特徴とする請求項 35記載の画像処 理装置。
PCT/JP2004/011010 2003-07-28 2004-07-27 画像処理装置、画像処理方法及び歪補正方法 WO2005010818A1 (ja)

Priority Applications (2)

Application Number Priority Date Filing Date Title
US10/566,408 US7813585B2 (en) 2003-07-28 2004-07-27 Image processing apparatus, image processing method, and distortion correcting method
EP04771117.1A EP1650705B1 (en) 2003-07-28 2004-07-27 Image processing apparatus, image processing method, and distortion correcting method

Applications Claiming Priority (6)

Application Number Priority Date Filing Date Title
JP2003-202664 2003-07-28
JP2003202493A JP4772281B2 (ja) 2003-07-28 2003-07-28 画像処理装置及び画像処理方法
JP2003-202493 2003-07-28
JP2003202664A JP4334932B2 (ja) 2003-07-28 2003-07-28 画像処理装置及び画像処理方法
JP2003202663A JP2005045513A (ja) 2003-07-28 2003-07-28 画像処理装置及び歪補正方法
JP2003-202663 2003-07-28

Publications (1)

Publication Number Publication Date
WO2005010818A1 true WO2005010818A1 (ja) 2005-02-03

Family

ID=34108564

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2004/011010 WO2005010818A1 (ja) 2003-07-28 2004-07-27 画像処理装置、画像処理方法及び歪補正方法

Country Status (3)

Country Link
US (1) US7813585B2 (ja)
EP (2) EP1650705B1 (ja)
WO (1) WO2005010818A1 (ja)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010032260A (ja) * 2008-07-25 2010-02-12 Jfe Steel Corp 光学系歪補正方法および光学系歪補正装置
CN103116878A (zh) * 2013-02-25 2013-05-22 徐渊 校正图像桶形失真的方法、装置以及图像处理装置
CN109817139A (zh) * 2017-11-21 2019-05-28 三星电子株式会社 显示驱动器和电子设备

Families Citing this family (44)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1657675B1 (en) * 2003-06-02 2014-12-24 Olympus Corporation Image processing device
US7742200B2 (en) * 2005-01-11 2010-06-22 Xerox Corporation Pre-press production image alert system and method
JP2006339988A (ja) * 2005-06-01 2006-12-14 Sony Corp ストリーム制御装置、ストリーム暗号化/復号化装置、および、ストリーム暗号化/復号化方法
US7912317B2 (en) * 2005-10-29 2011-03-22 Apple Inc. Estimating and removing lens distortion from scenes
JP2007148500A (ja) * 2005-11-24 2007-06-14 Olympus Corp 画像処理装置および画像処理方法
US7881563B2 (en) * 2006-02-15 2011-02-01 Nokia Corporation Distortion correction of images using hybrid interpolation technique
AT504372B8 (de) * 2006-11-13 2008-09-15 Arc Seibersdorf Res Gmbh Verfahren und vorrichtung zur ermittlung von interpolationswerten in datenfeldern
JP4931055B2 (ja) * 2006-11-22 2012-05-16 ソニー株式会社 画像処理装置及び画像処理方法
WO2008096533A1 (ja) * 2007-02-07 2008-08-14 Nikon Corporation 画像処理装置および画像処理方法
JP2008227582A (ja) * 2007-03-08 2008-09-25 Hoya Corp 撮像装置
JP2008252522A (ja) * 2007-03-30 2008-10-16 Hoya Corp カメラ
JP4657367B2 (ja) 2007-05-09 2011-03-23 富士通セミコンダクター株式会社 画像処理装置、撮像装置、および画像歪み補正方法
JP2009010730A (ja) * 2007-06-28 2009-01-15 Kyocera Corp 画像処理方法と該画像処理方法を用いた撮像装置
JP5135953B2 (ja) 2007-08-28 2013-02-06 コニカミノルタアドバンストレイヤー株式会社 画像処理装置、画像処理方法、及び撮像装置
FR2920939A1 (fr) * 2007-09-07 2009-03-13 St Microelectronics Sa Correction de deformation d'image
US20090087115A1 (en) * 2007-10-02 2009-04-02 Ping Wah Wong Correction for geometric distortion in images in pipelined hardware
US8525914B2 (en) * 2007-10-25 2013-09-03 DigitalOptics Corporation Europe Limited Imaging system with multi-state zoom and associated methods
JP4919978B2 (ja) * 2008-01-26 2012-04-18 三洋電機株式会社 歪補正装置
WO2009112309A2 (en) * 2008-03-12 2009-09-17 Thomson Licensing Method and system for lens aberration correction
JP5062846B2 (ja) * 2008-07-04 2012-10-31 株式会社リコー 画像撮像装置
JP5409278B2 (ja) * 2009-11-06 2014-02-05 オリンパスイメージング株式会社 画像撮像装置及び画像撮像方法
JP5593060B2 (ja) * 2009-11-26 2014-09-17 株式会社メガチップス 画像処理装置、および画像処理装置の動作方法
JP5316811B2 (ja) * 2010-01-18 2013-10-16 株式会社リコー 画像処理方法及び装置、並びに画像撮像装置
JP5602532B2 (ja) * 2010-07-30 2014-10-08 オリンパス株式会社 画像処理装置および画像処理方法
JP5299383B2 (ja) * 2010-08-20 2013-09-25 株式会社Jvcケンウッド 画像補正装置および画像補正方法
JP2013125401A (ja) * 2011-12-14 2013-06-24 Samsung Electronics Co Ltd 撮像装置および歪補正方法
JP5809575B2 (ja) * 2012-01-31 2015-11-11 株式会社日立ハイテクノロジーズ 画像処理装置および方法と歪補正マップ作成装置および方法と半導体計測装置
JP5924020B2 (ja) * 2012-02-16 2016-05-25 セイコーエプソン株式会社 プロジェクター、及び、プロジェクターの制御方法
JP5997480B2 (ja) * 2012-03-30 2016-09-28 キヤノン株式会社 画像処理装置、画像処理方法およびプログラム
JP5488853B1 (ja) * 2012-11-16 2014-05-14 株式会社ジェイエイアイコーポレーション 収差補正機能付き画像読取装置
TWI517094B (zh) * 2013-01-10 2016-01-11 瑞昱半導體股份有限公司 影像校正方法及影像校正電路
US10013744B2 (en) 2013-08-26 2018-07-03 Inuitive Ltd. Method and system for correcting image distortion
CN104657940B (zh) * 2013-11-22 2019-03-15 中兴通讯股份有限公司 畸变图像校正复原与分析报警的方法和装置
US9443281B2 (en) * 2014-06-27 2016-09-13 Intel Corporation Pixel-based warping and scaling accelerator
US9734603B2 (en) * 2015-06-30 2017-08-15 General Electric Company Systems and methods for peak tracking and gain adjustment
CN107925792A (zh) * 2015-09-07 2018-04-17 索尼互动娱乐股份有限公司 信息处理系统、信息处理装置、输出装置、程序和记录介质
GB2542125A (en) * 2015-09-08 2017-03-15 Sony Corp Colour conversion
CA3012360C (en) * 2016-03-01 2021-12-14 Ventana Medical Systems, Inc. Improved image analysis algorithms using control slides
US10547849B1 (en) * 2016-03-03 2020-01-28 Rockwell Collins, Inc. Low-power and low-latency distortion correction for image processors
JP6563358B2 (ja) * 2016-03-25 2019-08-21 日立オートモティブシステムズ株式会社 画像処理装置及び画像処理方法
JP2019012361A (ja) * 2017-06-29 2019-01-24 キヤノン株式会社 情報処理装置、プログラム及び情報処理方法
CN110544209B (zh) 2018-05-29 2022-10-25 京东方科技集团股份有限公司 图像处理方法、设备以及虚拟现实显示装置
CN111199518B (zh) * 2018-11-16 2024-03-26 深圳市中兴微电子技术有限公司 Vr设备的图像呈现方法、装置、设备和计算机存储介质
US11483547B2 (en) 2019-12-04 2022-10-25 Nxp Usa, Inc. System and method for adaptive correction factor subsampling for geometric correction in an image processing system

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH06153065A (ja) * 1992-11-11 1994-05-31 Olympus Optical Co Ltd 撮像装置
JPH06165024A (ja) * 1992-11-18 1994-06-10 Canon Inc 撮像装置及び画像再生装置及び映像システム
JPH06237412A (ja) * 1993-10-15 1994-08-23 Olympus Optical Co Ltd 映像処理装置
JPH0998340A (ja) * 1995-09-29 1997-04-08 Sanyo Electric Co Ltd 撮像装置
US5796426A (en) 1994-05-27 1998-08-18 Warp, Ltd. Wide-angle image dewarping method and apparatus
JPH11243508A (ja) * 1998-02-25 1999-09-07 Matsushita Electric Ind Co Ltd 画像表示装置
JPH11250239A (ja) * 1998-02-27 1999-09-17 Kyocera Corp Yuvデータによりディストーション補正を行うディジタル撮像装置
JPH11275391A (ja) * 1998-03-20 1999-10-08 Kyocera Corp ディストーション補正を選択できるディジタル撮像装置
JP2000132673A (ja) * 1998-10-28 2000-05-12 Sharp Corp 画像システム
JP2000312327A (ja) * 1999-04-28 2000-11-07 Olympus Optical Co Ltd 画像処理装置

Family Cites Families (21)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH02252375A (ja) 1989-03-27 1990-10-11 Canon Inc 固体撮像カメラ
JP2925871B2 (ja) 1992-12-11 1999-07-28 キヤノン株式会社 固体撮像カメラ
JP3686695B2 (ja) 1994-10-20 2005-08-24 オリンパス株式会社 画像処理装置
JPH08272964A (ja) 1995-03-30 1996-10-18 Fujitsu Denso Ltd 掌紋押捺装置
JPH09252391A (ja) 1996-01-09 1997-09-22 Fuji Photo Film Co Ltd 画像読取装置及び画像受信装置
JP3631333B2 (ja) * 1996-08-23 2005-03-23 シャープ株式会社 画像処理装置
JPH10224695A (ja) 1997-02-05 1998-08-21 Sony Corp 収差補正装置及び方法
US5966678A (en) * 1998-05-18 1999-10-12 The United States Of America As Represented By The Secretary Of The Navy Method for filtering laser range data
JP2965030B1 (ja) 1998-07-27 1999-10-18 株式会社ニコン スクロール表示システム、およびスクロール表示プログラムを記録した記録媒体
US6747702B1 (en) * 1998-12-23 2004-06-08 Eastman Kodak Company Apparatus and method for producing images without distortion and lateral color aberration
JP2001101396A (ja) 1999-09-30 2001-04-13 Toshiba Corp 画像歪み補正処理装置および方法、並びに画像歪み補正処理を行うプログラムを格納した媒体
US6801671B1 (en) * 1999-11-18 2004-10-05 Minolta Co., Ltd. Controlled image deterioration correction device with reduction/enlargement
KR100414083B1 (ko) * 1999-12-18 2004-01-07 엘지전자 주식회사 영상왜곡 보정방법 및 이를 이용한 영상표시기기
JP3677188B2 (ja) * 2000-02-17 2005-07-27 セイコーエプソン株式会社 画像表示装置および方法、並びに、画像処理装置および方法
US6816625B2 (en) * 2000-08-16 2004-11-09 Lewis Jr Clarence A Distortion free image capture system and method
US7262799B2 (en) * 2000-10-25 2007-08-28 Canon Kabushiki Kaisha Image sensing apparatus and its control method, control program, and storage medium
JP4827213B2 (ja) 2001-03-12 2011-11-30 株式会社メガチップス 画像補正装置および画像補正方法
JP3853617B2 (ja) 2001-07-16 2006-12-06 松下電器産業株式会社 虹彩認証装置
US6796426B2 (en) * 2001-11-29 2004-09-28 Ultra Pro Lp Sleeves and album pages for flat items
US6707998B2 (en) * 2002-05-14 2004-03-16 Eastman Kodak Company Method and system for correcting non-symmetric distortion in an image
JP2006014016A (ja) * 2004-06-28 2006-01-12 Seiko Epson Corp 自動画像補正回路

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH06153065A (ja) * 1992-11-11 1994-05-31 Olympus Optical Co Ltd 撮像装置
JPH06165024A (ja) * 1992-11-18 1994-06-10 Canon Inc 撮像装置及び画像再生装置及び映像システム
JPH06237412A (ja) * 1993-10-15 1994-08-23 Olympus Optical Co Ltd 映像処理装置
US5796426A (en) 1994-05-27 1998-08-18 Warp, Ltd. Wide-angle image dewarping method and apparatus
JPH0998340A (ja) * 1995-09-29 1997-04-08 Sanyo Electric Co Ltd 撮像装置
JPH11243508A (ja) * 1998-02-25 1999-09-07 Matsushita Electric Ind Co Ltd 画像表示装置
JPH11250239A (ja) * 1998-02-27 1999-09-17 Kyocera Corp Yuvデータによりディストーション補正を行うディジタル撮像装置
JPH11275391A (ja) * 1998-03-20 1999-10-08 Kyocera Corp ディストーション補正を選択できるディジタル撮像装置
JP2000132673A (ja) * 1998-10-28 2000-05-12 Sharp Corp 画像システム
JP2000312327A (ja) * 1999-04-28 2000-11-07 Olympus Optical Co Ltd 画像処理装置

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
See also references of EP1650705A4
WOLBERG, G ET AL.: "Computer Graphics", vol. 23, 1 July 1989, ACM, article "Separable image warping with spatial lookup tables", pages: 368 - 378

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010032260A (ja) * 2008-07-25 2010-02-12 Jfe Steel Corp 光学系歪補正方法および光学系歪補正装置
CN103116878A (zh) * 2013-02-25 2013-05-22 徐渊 校正图像桶形失真的方法、装置以及图像处理装置
CN103116878B (zh) * 2013-02-25 2015-06-03 徐渊 校正图像桶形失真的方法、装置以及图像处理装置
CN109817139A (zh) * 2017-11-21 2019-05-28 三星电子株式会社 显示驱动器和电子设备

Also Published As

Publication number Publication date
US7813585B2 (en) 2010-10-12
EP2533192A2 (en) 2012-12-12
EP1650705A4 (en) 2010-07-28
EP1650705A1 (en) 2006-04-26
EP2533192A3 (en) 2015-09-02
EP1650705B1 (en) 2013-05-01
US20060188172A1 (en) 2006-08-24
EP2533192B1 (en) 2017-06-28

Similar Documents

Publication Publication Date Title
WO2005010818A1 (ja) 画像処理装置、画像処理方法及び歪補正方法
JP4772281B2 (ja) 画像処理装置及び画像処理方法
WO2004109597A1 (ja) 画像処理装置
US8369632B2 (en) Image processing apparatus and imaging apparatus
US8350927B2 (en) Image-data processing apparatus and image-data processing method
JP4781229B2 (ja) 歪曲収差補正装置、撮像装置、及び歪曲収差補正装置の制御方法
EP1549052A1 (en) Image processing device, image processing system, and image processing method
JP4255345B2 (ja) 撮像装置
JP2007228019A (ja) 撮像装置
US20070230827A1 (en) Method and Apparatus for Downscaling a Digital Colour Matrix Image
JP2004362069A (ja) 画像処理装置
JP5602532B2 (ja) 画像処理装置および画像処理方法
US7212237B2 (en) Digital camera with electronic zooming function
JP4334932B2 (ja) 画像処理装置及び画像処理方法
JP2005045513A (ja) 画像処理装置及び歪補正方法
US7808539B2 (en) Image processor that controls transfer of pixel signals between an image sensor and a memory
US6906748B1 (en) Electronic camera
JP4286124B2 (ja) 画像信号処理装置
US6348950B1 (en) Video signal processing circuit and image pickup apparatus using the circuit
JP4403409B2 (ja) 画像データ処理方法および画像データ処理装置
JP2007156795A (ja) 画像変換装置
JP4424097B2 (ja) 電子ズーム装置
JP2000059800A (ja) 画像信号処理回路
WO2018220794A1 (ja) データ転送装置およびデータ転送方法
JP4070550B2 (ja) 画像信号処理装置

Legal Events

Date Code Title Description
WWE Wipo information: entry into national phase

Ref document number: 200480021876.9

Country of ref document: CN

AK Designated states

Kind code of ref document: A1

Designated state(s): AE AG AL AM AT AU AZ BA BB BG BR BW BY BZ CA CH CN CO CR CU CZ DE DK DM DZ EC EE EG ES FI GB GD GE GH GM HR HU ID IL IN IS KE KG KP KR KZ LC LK LR LS LT LU LV MA MD MG MK MN MW MX MZ NA NI NO NZ OM PG PH PL PT RO RU SC SD SE SG SK SL SY TJ TM TN TR TT TZ UA UG US UZ VC VN YU ZA ZM ZW

AL Designated countries for regional patents

Kind code of ref document: A1

Designated state(s): BW GH GM KE LS MW MZ NA SD SL SZ TZ UG ZM ZW AM AZ BY KG KZ MD RU TJ TM AT BE BG CH CY CZ DE DK EE ES FI FR GB GR HU IE IT LU MC NL PL PT RO SE SI SK TR BF BJ CF CG CI CM GA GN GQ GW ML MR NE SN TD TG

121 Ep: the epo has been informed by wipo that ep was designated in this application
WWE Wipo information: entry into national phase

Ref document number: 2004771117

Country of ref document: EP

Ref document number: 2006188172

Country of ref document: US

Ref document number: 10566408

Country of ref document: US

WWP Wipo information: published in national office

Ref document number: 2004771117

Country of ref document: EP

WWP Wipo information: published in national office

Ref document number: 10566408

Country of ref document: US