WO2019235258A1 - 画像処理方法、画像処理装置、撮像装置、プログラム、および、記憶媒体 - Google Patents

画像処理方法、画像処理装置、撮像装置、プログラム、および、記憶媒体 Download PDF

Info

Publication number
WO2019235258A1
WO2019235258A1 PCT/JP2019/020641 JP2019020641W WO2019235258A1 WO 2019235258 A1 WO2019235258 A1 WO 2019235258A1 JP 2019020641 W JP2019020641 W JP 2019020641W WO 2019235258 A1 WO2019235258 A1 WO 2019235258A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
focus
learning
focus image
deformation
Prior art date
Application number
PCT/JP2019/020641
Other languages
English (en)
French (fr)
Inventor
智暁 井上
法人 日浅
Original Assignee
キヤノン株式会社
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by キヤノン株式会社 filed Critical キヤノン株式会社
Publication of WO2019235258A1 publication Critical patent/WO2019235258A1/ja

Links

Images

Classifications

    • G06T5/80
    • G06T5/60
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T9/00Image coding
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20084Artificial neural networks [ANN]

Definitions

  • the present invention relates to an image processing method.
  • the optical performance of an imaging device is evaluated by the imaging performance of a focused object.
  • the appearance of an out-of-focus image may be an important evaluation index for the optical performance of the imaging device. is there.
  • an imaging apparatus such as a digital still camera, a video camera, or a TV camera, the appearance of an out-of-focus image tends to be emphasized.
  • Patent Document 1 discloses an optical system including an apodization filter in the vicinity of a stop.
  • apodization filter in the vicinity of a stop.
  • sagittal halo of off-axis light flux causes unevenness of intensity of an out-of-focus image at the periphery of the screen.
  • the apodization filter is effective in removing such sagittal halo.
  • the optical system including the apodization filter disclosed in Patent Document 1 cannot cope with the correction of the shape of an out-of-focus image caused by vignetting such as ring blur caused by a Cadadioptric lens (reflection telephoto lens).
  • an object of the present invention is to provide an image processing method, an image processing apparatus, an imaging apparatus, a program, and a storage medium that can estimate or correct a deformation of an out-of-focus image from a captured image with high accuracy.
  • An image processing method includes a step of acquiring at least a partial region of an input image in which an out-of-focus image is deformed, and learning information learned in advance regarding the deformation of the out-of-focus image. And estimating or correcting the deformation of the out-of-focus image in the region using the learning information, and the step of estimating or correcting the deformation of the out-of-focus image includes N being an integer of 2 or more.
  • N is an integer from 1 to N
  • n is an n-th linear conversion by each of a plurality of linear functions based on the learning information and an n-th non-linear conversion by a non-linear function.
  • An image processing apparatus includes a storage unit that stores learning information relating to deformation of an out-of-focus image, and the deformation of the out-of-focus image in at least a partial region of the input image using the learning information.
  • An image processing unit that estimates or corrects the image processing unit, where N is an integer greater than or equal to 2 and n is an integer from 1 to N, a plurality of based on the learning information for the region
  • the intermediate data is generated by sequentially executing the n-th linear transformation by each of the linear functions and the n-th nonlinear transformation by the nonlinear functions until n becomes 1 to N, and the learning is performed on the intermediate data.
  • the (N + 1) th linear conversion is performed using at least one linear function based on information.
  • An imaging apparatus includes an imaging unit that acquires an image of a subject space as an input image, and the image processing apparatus.
  • a program according to another aspect of the present invention causes a computer to execute the image processing method.
  • a storage medium stores the program.
  • an image processing method it is possible to provide an image processing method, an image processing device, an imaging device, a program, and a storage medium that can estimate or correct deformation of an out-of-focus image from a captured image with high accuracy.
  • FIG. 6 is a block diagram of an imaging apparatus according to Example 1 and Example 3. 6 is an external view of an imaging apparatus according to Embodiment 1 and Embodiment 3.
  • FIG. 6 is a flowchart illustrating an out-of-focus image correction process according to the first exemplary embodiment. 3 is a flowchart showing learning of learning information in the first embodiment. 6 is a block diagram of an image processing system in Embodiment 2.
  • FIG. 6 is an external view of an image processing system in Embodiment 2.
  • FIG. 10 is a flowchart illustrating a correction process for an out-of-focus image according to the second exemplary embodiment.
  • FIG. 10 is a flowchart illustrating an estimation process of an out-of-focus image deformation according to the third exemplary embodiment.
  • FIG. 10 is a diagram illustrating a network structure for estimating deformation of an out-of-focus image in the third embodiment.
  • 10 is a flowchart illustrating learning of learning information in the third embodiment.
  • the deformation of the out-of-focus image (the shape of the deformed out-of-focus image) is estimated or corrected from the captured image using deep learning (deep learning).
  • the imaging optical system can be applied to photographing a three-dimensional subject.
  • a “three-dimensional subject” is a subject composed of a plurality of parts with different distances in the optical axis direction, and particularly a subject having a point more than the depth of field from the focal plane of the imaging optical system at the time of shooting. It is. At this time, an out-of-focus image is formed on the imaging surface.
  • the “image circle” is a circle on which a light beam passing through the effective diameter of the lens forms an image.
  • the imaging surface is an imaging surface of a semiconductor imaging device (photoelectric conversion device) such as a CCD sensor or a CMOS sensor.
  • a semiconductor imaging device photoelectric conversion device
  • the aforementioned image circle radius may be the maximum image height of the imaging surface in the imaging apparatus.
  • vignetting is seen in the off-axis light beam. “Vignetting” means that a part of the luminous flux is vignetted and is also called vignetting.
  • An out-of-focus image that is not affected by vignetting has a shape that reflects the shape of the stop, and is generally circular. Due to vignetting, a general imaging optical system has a shape with a circle off-axis, and a reflective telephoto lens in which the center of the aperture is shielded has a ring shape (ring blur).
  • the deformation of the out-of-focus image (the shape of the deformed out-of-focus image) can be estimated with high accuracy. Or it can be corrected. That is, according to each embodiment, it is possible to accurately estimate the shape of an out-of-focus image deformed from an ideal out-of-focus image shape according to imaging conditions such as an optical system. Further, according to each embodiment, the deformed out-of-focus image shape can be accurately corrected to the ideal out-of-focus image shape (approaching the ideal out-of-focus image shape).
  • the ideal shape of the out-of-focus image is a shape of an out-of-focus image acquired using an optical system that is not affected by vignetting or aberration of the optical system, for example, a circular shape.
  • the shape of the out-of-focus image deformed due to the influence of vignetting or aberration of the optical system is, for example, a ring shape.
  • FIG. 2 is a block diagram of the imaging apparatus 100.
  • FIG. 3 is an external view of the imaging apparatus 100.
  • the imaging apparatus 100 executes an image processing method, and corrects the deformation of the out-of-focus image (the shape of the out-of-focus image deformed due to the effects of vignetting or aberration of the optical system) by deep learning.
  • the imaging apparatus 100 includes an imaging unit 101 that acquires an image of the subject space as a captured image (input image).
  • the imaging unit 101 includes an imaging optical system 101a that collects light incident from the subject space, and an imaging element 101b having a plurality of pixels.
  • the image sensor 101b is, for example, a CCD (Charge Coupled Device) sensor or a CMOS (Complementary Metal-Oxide Semiconductor) sensor.
  • the image processing unit 102 corrects the out-of-focus image (deformation of the out-of-focus image) with respect to the captured image (input image).
  • the image processing unit 102 includes a learning unit 102a and a correction unit 102b.
  • the storage unit 103 stores learning information (learning information learned in advance regarding the deformation of the out-of-focus image) used when correcting the out-of-focus image (deformation of the out-of-focus image) by the image processing unit 102. Details of this processing will be described later.
  • An output image such as an image whose deformation of the out-of-focus image is corrected by the image processing unit 102 is displayed on the display unit 104 such as a liquid crystal display or stored in the recording medium 105.
  • the captured image may be stored in the recording medium 105 and the correction process of the out-of-focus image may be performed at an arbitrary timing.
  • the captured image may be a moving image as well as a still image. In this case, an out-of-focus image correction process is performed on each frame.
  • the series of control described above is performed by the system controller 106.
  • FIG. 4 is a flowchart showing a correction process for an out-of-focus image. Each step in FIG. 4 is mainly executed by the correction unit 102b of the image processing unit 102.
  • the image processing unit 102 acquires a captured image (input image) in which a defocused image is deformed and learning information.
  • the deformation of the out-of-focus image means a state in which the shape and the luminance distribution are different from those of the ideal out-of-focus image.
  • the learning information is information learned in advance for associating a captured image with an image in which an out-of-focus image (deformation of an out-of-focus image) is corrected.
  • the correction unit 102b acquires at least a partial area (partial area) of the captured image from the captured image.
  • the out-of-focus image correction process is performed in units of this region (partial region) (for each partial region).
  • step S103 the correction unit 102b generates a corrected partial area that is a partial area in which an out-of-focus image is corrected from the partial area using the learning information.
  • CNN Convolutional Neural Network
  • DBN Deep Belief Network
  • CNN has a plurality of layer structures, and linear conversion and non-linear conversion using learning information are executed in each layer.
  • n is an integer from 1 to N
  • the nth layer is called the nth layer
  • the linear conversion and the nonlinear conversion in the nth layer are called the nth linear conversion and the nth nonlinear conversion, respectively.
  • N is an integer of 2 or more.
  • convolution first linear conversion by a plurality of linear functions
  • conversion first nonlinear conversion
  • conversion is performed using a nonlinear function called an activation function.
  • the activation function is shown as AF.
  • the plurality of partial areas 201 are drawn because the input image (captured image) has a plurality of channels.
  • the partial area has three channels of RGB (Red, Green, Blue).
  • RGB Red, Green, Blue
  • the number of channels is not limited to this.
  • the partial region may have the number of channels corresponding to the input captured image. Even when the partial area has a plurality of channels, each channel may be individually input to the CNN.
  • the correcting unit 102b individually calculates convolution between each of the plurality of filters 202 and the partial region 201.
  • the coefficient of the filter 202 is determined based on the learning information.
  • the learning information may be a coefficient of the filter 202 (filter coefficient) itself or a coefficient when the filter 202 is fitted with a predetermined function.
  • the number of channels of each filter 202 matches the number of partial areas 201. When the number of channels in the partial area 201 is 2 or more, a three-dimensional filter is formed (the third dimension represents the number of channels).
  • a constant (which may be negative) determined from the learning information may be added to the convolution result.
  • Examples of the activation function f (x) include the following formulas (1) to (3).
  • Formula (1) is called a sigmoid function
  • Formula (2) is called a hyperbolic tangent function
  • Formula (3) is called ReLU (Rectified Linear Unit).
  • max represents a MAX function that outputs the maximum value among the arguments.
  • the activation functions f (x) shown in the equations (1) to (3) are all monotonically increasing functions. Further, Maxout may be used as the activation function. Maxout is a MAX function that outputs a signal value that is a maximum value in each pixel among a plurality of images that are outputs of the n-th linear conversion. Details of Maxout are described in Non-Patent Document 3.
  • first conversion partial area 203 the partial area subjected to the first linear conversion and the first nonlinear conversion is referred to as a first conversion partial area 203.
  • Each channel component of the first conversion partial area 203 is generated from a convolution of the partial area 201 and each of the plurality of filters 202. For this reason, the number of channels in the first conversion partial area 203 is the same as the number of filters 202.
  • convolution second linear conversion
  • filters 204 determined from the learning information in the same manner as in the first layer and non-linear conversion using an activation function for the first conversion partial region 203.
  • the filter 204 used in the second layer is generally not the same as the filter 202 used in the first layer.
  • the size and number of the filters 204 may not match the filters 204.
  • the number of channels of the filter 204 and the number of channels of the first conversion partial area 203 coincide with each other.
  • a corrected partial region 212 in which the out-of-focus image is corrected is acquired.
  • the filter 211 and the constant used here are also determined based on the learning information.
  • the number of channels in the correction partial area 212 is the same as that in the partial area 201. For this reason, the number of filters 211 is also the same as the number of channels in the partial area 201.
  • the component of each channel of the correction partial area 212 is obtained from an operation including convolution of the intermediate data 210 and each of the filters 211 (there may be one filter 211).
  • the sizes of the partial area 201 and the corrected partial area 212 do not have to match each other. Since no data exists outside the partial area 201 at the time of convolution, the size of the convolution result is reduced if calculation is performed only in the area where the data exists. However, the size can be maintained by setting periodic boundary conditions.
  • Deep learning is said to be more likely to have high performance because it is possible to obtain a stronger non-linear type by making it more multilayer. Generally, the case of having at least three layers is called deep learning.
  • step S104 in FIG. 4 the correction unit 102b determines whether or not the correction of the out-of-focus image has been completed for all of the predetermined region (partial region) in the photographed image.
  • the process proceeds to step S105.
  • the correction unit 102b acquires a partial area where the out-of-focus image has not yet been corrected from the captured image. .
  • step S105 the correction unit 102b outputs an image (corrected image) in which the out-of-focus image is corrected.
  • An image in which the out-of-focus image is corrected is generated by synthesizing the plurality of generated correction partial regions 212.
  • the correction unit 102b outputs the corrected partial area 212 as it is as an image with the out-of-focus image corrected.
  • a CNN network is configured so that a plurality of captured images (a plurality of input images) can be input and a plurality of output images obtained by correcting the respective out-of-focus images of the plurality of captured images can be collectively acquired. May be. Further, a configuration may be adopted in which a plurality of captured images are input and an image in which one out-of-focus image is corrected is acquired. When inputting a plurality of captured images, it is preferable to use a plurality of images having different aperture values (F values) and different focus positions.
  • F values aperture values
  • the aperture value or focus position changes, the size, shape, brightness distribution, etc. of the defocused image in the subject differ, and by inputting multiple images with different defocused images for the same subject, Accuracy can be improved. Further, it is preferable to use an image having a plurality of color channels as a captured image to be input.
  • an image having a plurality of color channels as a captured image to be input.
  • the shape of the out-of-focus image after correction is not limited to this. For example, it is possible to correct to a shape desired by a user such as a star shape or a heart shape.
  • FIG. 5 is a flowchart showing learning of learning information.
  • Each step in FIG. 5 is mainly performed by the learning unit 102 a of the image processing unit 102.
  • the present embodiment is not limited to this, and learning of learning information is performed by a learning unit provided in a device (arithmetic device) different from the imaging device 100 as long as the defocused image is not corrected. May be.
  • a case where the learning unit 102a of the imaging apparatus 100 learns learning information will be described.
  • the learning unit 102a acquires at least a pair of learning images.
  • the pair of learning images differ from the out-of-focus image deformation state (the shape and luminance distribution of the out-of-focus image deformed according to the shooting conditions such as vignetting and aberration of the optical system), and the same subject exists. It is an image.
  • the image in which the out-of-focus image is deformed corresponds one-to-one with the image in which the out-of-focus image is not deformed (an image including an ideal out-of-focus image), or one out-of-focus image.
  • a plurality of images may exist for an image in which the deformation is not generated. In the latter case, the image in which the out-of-focus image is deformed is a plurality of images having different sizes, shapes, or luminance distributions of the out-of-focus image.
  • a simulation or a live-action image may be used.
  • an image in which the out-of-focus image is deformed may be generated by performing an imaging simulation in consideration of the effects of vignetting and aberration on an image in which the out-of-focus image is not deformed.
  • an image obtained by photographing the same subject under different conditions of deformation of the out-of-focus image may be used. For example, when the deformation of the out-of-focus image is caused by the effect of vignetting, the deformation is affected by the aperture value, the focus position, and the like.
  • a learning image may be prepared by estimating an image in which an out-of-focus image is corrected using a method other than deep learning for an image in which the out-of-focus image is deformed.
  • the learning image preferably includes an image including various out-of-focus images (various deformed shapes of the out-of-focus images). This is because an image that is not included in the learning image and has a deformation method cannot correct an out-of-focus image with high accuracy. Further, only one pair of images with different out-of-focus image deformations included in the learning image may be included, but it is preferable that a plurality of images are included for the reasons described above.
  • the learning unit 102a acquires a plurality of learning pairs from the learning image acquired in step S201.
  • the learning pair includes a learning partial area (learning area) and a learning correction partial area.
  • the learning correction partial area is acquired from an image in which an out-of-focus image is deformed, and the size thereof is the same as the partial area of the captured image acquired in step S102.
  • the learning partial area is acquired from an image in which the out-of-focus image is not deformed, and the center of the learning partial area is the same position as the center of the learning correction partial area in the image.
  • the size is the same as the corrected partial area generated in step S103.
  • a pair of learning partial areas and learning correction partial areas does not have to correspond one-to-one.
  • One learning correction partial area and a plurality of learning partial areas may be paired (grouped).
  • step S203 the correction unit 102a acquires (generates) learning information from a plurality of learning pairs (a learning partial region and a learning correction partial region) by learning.
  • learning the same network structure as that for correcting the out-of-focus image is used.
  • a learning correction partial area is input to the network structure shown in FIG. 1, and an error between the output result and the learning partial area is calculated.
  • optimization is performed by updating the coefficients of the plurality of filters used in the first to (N + 1) th layers and constants to be added (learning information) using, for example, error backpropagation (Backpropagation). To do.
  • the initial values of the coefficients and constants of each filter can be arbitrarily set, and are determined from random numbers, for example.
  • pre-training such as Auto Encoder that previously learns the initial value for each layer may be performed.
  • Auto Encoder The details of Auto Encoder are described in Non-Patent Document 4.
  • the method of inputting all of the learning pairs to the network structure and updating the learning information using all the information is called batch learning.
  • this learning method the calculation load becomes enormous as the number of learning pairs increases.
  • a learning technique that uses only one learning pair for updating learning information and uses a different learning pair for each update is called online learning.
  • This method does not increase the amount of calculation even if the number of learning pairs increases, but is greatly affected by noise existing in one learning pair. For this reason, it is preferable to learn using the mini-batch method located between these two methods. In the mini-batch method, a small number is extracted from all learning pairs, and learning information is updated using them. The next update will extract and use a different number of learning pairs. By repeating this, the disadvantages of batch learning and online learning can be reduced, and a high correction effect can be easily obtained.
  • step S204 the correction unit 102a outputs learned learning information.
  • learning information is stored in the storage unit 103.
  • a device for improving the performance of CNN may be used in combination.
  • pooling that is dropout or downsampling may be performed in each layer of the network.
  • ZCA whitening ZCA whitening
  • ZCA whitening ZCA whitening
  • Details of dropout and ZCA whitening are described in Non-Patent Document 5 and Non-Patent Document 6, respectively.
  • an imaging apparatus capable of correcting an out-of-focus image (deformation of an out-of-focus image) with high accuracy from a captured image.
  • an image processing system that corrects an out-of-focus image (deformation of an out-of-focus image), an imaging device that acquires a captured image, and a server that performs learning are individually provided.
  • the learning information to be used is switched by determining the size of an out-of-focus image (out-of-focus image region). According to the size of the out-of-focus image area, the learning information used for the correction processing of the out-of-focus image is separately learned and used, so that the out-of-focus image can be corrected with higher accuracy.
  • FIG. 6 is a block diagram of the image processing system 200.
  • FIG. 7 is an external view of the image processing system 200.
  • the image processing system 200 includes an imaging device 300, an image processing device 301, a server 305, a display device 308, a recording medium 309, and an output device 310.
  • the basic configuration of the imaging apparatus 300 is the same as that of the imaging apparatus 100 described with reference to FIG. 2 except for an image processing unit related to correction of out-of-focus images and learning information.
  • a captured image (input image) captured using the imaging apparatus 300 is stored in the storage unit 302 provided in the image processing apparatus 301.
  • the image processing apparatus 301 is connected to the network 304 by wire or wireless, and can access the server 305 via the network 304.
  • the server 305 includes a learning unit 307 that learns learning information for correcting an out-of-focus image from a captured image, and a storage unit 306 that stores the learning information.
  • a correction unit 303 (image processing unit) provided in the image processing apparatus 301 acquires learning information from the storage unit 306 of the server 305 via the network 304 and corrects an out-of-focus image of the captured image.
  • An output image such as an image whose out-of-focus image is corrected by the correction unit 303 is output to at least one of the display device 308, the recording medium 309, and the output device 310.
  • the display device 308 is, for example, a liquid crystal display or a projector. The user can perform work while confirming an image being processed via the display device 308.
  • the recording medium 309 is, for example, a semiconductor memory, a hard disk, or a server on the network.
  • the output device 310 is a printer, for example.
  • the image processing apparatus 301 may have a function of performing development processing and other image processing as necessary.
  • FIG. 8 is a flowchart showing a correction process for an out-of-focus image.
  • Each step in FIG. 8 is mainly executed by the correction unit 303 (image processing unit) of the image processing apparatus 301.
  • the correction unit 303 acquires a captured image (input image) from the storage unit 302.
  • the correction unit 303 determines the size of the out-of-focus image area included in the captured image.
  • the size of the out-of-focus image region is the size of a region where an out-of-focus image that varies in accordance with the amount of defocus on the image plane and the aperture value is generated. In this embodiment, these amounts are divided by the pixel size to be converted into the number of pixels.
  • a method for determining the size of the out-of-focus image region three examples are shown below.
  • the first example is a method using a plurality of images with different focus positions. Since the size of the out-of-focus image area changes in accordance with the amount of focus shift on the image plane, it is possible to acquire images with different out-of-focus image area sizes by shooting with different focus positions. Further, when an image having the highest contrast is selected for each partial area from a plurality of images, a pan-focus image that is in focus throughout the entire image can be obtained. By comparing the pan-focus image and the photographed image to be corrected, an out-of-focus image region can be detected as a region where the luminance is greatly changed due to a focus shift.
  • the subject distance is calculated for each partial area by a method generally known as DFD (Depth from Defocus). Can do. Since it is possible to estimate the amount of focus shift on the image plane based on the subject distance, the size of the out-of-focus image region can be estimated based on the subject distance and the aperture value obtained by the above method.
  • DFD Depth from Defocus
  • the second example is a method using a plurality of images having different aperture values. Since the size of the out-of-focus image area changes according to the aperture value, it is possible to acquire images with different sizes of the out-of-focus image area by photographing with different aperture values. Further, when an image having the highest contrast is selected for each partial area from a plurality of images, a pan-focus image that is in focus throughout the entire image can be obtained. By comparing the pan-focus image and the captured image to be corrected, an out-of-focus image region can be detected as a region in which the luminance is greatly changed due to the focus shift.
  • the subject distance is calculated for each partial area by a method generally known as DFD (Depth from Defocus). Can do. Since it is possible to estimate the amount of focus shift on the image plane based on the subject distance, the size of the out-of-focus image region can be estimated based on the subject distance and the aperture value obtained by the above method.
  • DFD Depth from Defocus
  • the third example is a method using subject distance (subject distance information). Since it is possible to estimate the amount of focus deviation on the image plane based on the subject distance, the size of the out-of-focus image region can be estimated based on the subject distance and the aperture value by a method described later.
  • the distance information can be acquired by the stereo principle when the imaging apparatus 300 has a multi-view configuration.
  • subject distance information can also be acquired by separately providing a distance measuring unit such as an existing TOF device.
  • the size of the out-of-focus image area may change depending on the position of the image, so the size is determined for a plurality of positions in the captured image, and the learning information is switched according to the position of the partial area. Also good.
  • step S303 the correction unit 303 determines the network structure and learning information to be used and the size of the partial area based on the size of the defocused image area determined in step S302.
  • the correction unit 303 corrects an out-of-focus image using the CNN shown in FIG. If the out-of-focus image area is larger than the size of the partial area, information about the subject to be corrected is lost, so that it is impossible to correct the out-of-focus image with high accuracy.
  • CNN convolves filters in each layer to correct out-of-focus images, and therefore corrects out-of-focus images when the combined range of those filters is smaller than the out-of-focus image area of the captured image. Can not do it.
  • the filter size of the first layer is 5 ⁇ 5
  • the filter size of the second layer is 3 ⁇ 3
  • the range that can be used for correcting the defocused image of a certain pixel is 7 ⁇ 7 pixels centered at.
  • d is the size of the out-of-focus image area with respect to the pixels of the captured image (input image), and the length of the out-of-focus image area in the one-dimensional direction is represented by the number of pixels.
  • N + 1 is the total number of layers.
  • the upper limit of conditional expression (4) indicates that the range that can be used to correct an out-of-focus image of a certain pixel is greater than or equal to the size of the out-of-focus image region.
  • the lower limit of conditional expression (4) cannot theoretically be exceeded.
  • the network structure includes not only the size of the filter used in each layer but also the number of filters used in one layer and the number of layers. In order to correct an out-of-focus image with high accuracy, it is necessary to increase the number of layers and filters as the out-of-focus image region is larger.
  • the learning information is learned for each size of the out-of-focus image region, and learning information corresponding to the size of the out-of-focus image region included in the captured image is used. Thereby, it is possible to correct a defocused image with higher accuracy. Details of learning will be described later.
  • step S304 the correction unit 303 acquires a partial region (at least a partial region of the captured image) from the captured image.
  • step S305 the correction unit 303 generates a correction partial region based on the learning information determined in step S303.
  • step S306 the correction unit 303 determines whether or not the out-of-focus image correction processing has been completed for all of the predetermined regions (partial regions) in the captured image. When the correction of the out-of-focus image is completed for all the predetermined areas, the process proceeds to step S307.
  • step S304 the process returns to step S304, and the correction unit 303 does not yet correct the out-of-focus image (new partial area). From the captured image.
  • step S307 the correction unit 303 outputs an image with the out-of-focus image corrected.
  • the correction unit 303 preferably executes step S304 before steps S302 and S303. At this time, the correction unit 303 acquires the size of the out-of-focus image region with respect to the local region of the captured image in steps S302 and S303, and acquires corresponding learning information and the like.
  • the learning unit 307 of the server 305 learns different learning information according to the size of the out-of-focus image region.
  • the learning method is basically the same as the method described in the first embodiment with reference to FIG. 5, but the preprocessing differs depending on how the learning image is prepared.
  • the learning unit 307 performs steps S201 to S204 on the acquired learning image, and then repeats the same procedure for different out-of-focus image area sizes.
  • the learning image is divided into a plurality of groups. Grouping can be performed in units of images.
  • the image may be divided and grouped. Since each group includes a group whose defocused image area is close in size, steps S201 to S204 are executed for each group to generate learning information.
  • an image processing system capable of correcting an out-of-focus image (deformation of an out-of-focus image) with high accuracy from a captured image.
  • the imaging apparatus according to the present embodiment estimates the deformation of the out-of-focus image (the shape of the deformed out-of-focus image) from the captured image (input image). Note that the configuration and appearance of the imaging apparatus in the present embodiment are the same as those of the imaging apparatus 100 described in the first embodiment with reference to FIGS. 2 and 3. However, in the imaging apparatus of the present embodiment, an estimation unit is provided as an image processing unit instead of the correction unit 102b.
  • FIG. 9 is a flowchart showing a process for estimating the deformation of an out-of-focus image. Each step in FIG. 9 is mainly executed by the estimation unit of the image processing unit 102.
  • step S401 the image processing unit 102 (estimating unit) acquires a captured image (input image) and learning information.
  • the learning information will be described later.
  • learning information that links the partial area of the captured image and the deformation of the out-of-focus image generated in the partial area is acquired.
  • step S402 the estimation unit acquires a partial region for estimating the deformation of the out-of-focus image from the captured image.
  • the estimation unit determines whether or not a defocused image has changed in a pixel (for example, a central pixel) included in the partial region, and information on peripheral pixels (pixels included in the partial region). Use and estimate.
  • step S403 the estimation unit estimates the deformation of the out-of-focus image based on the learning information acquired in step S401.
  • the estimation unit performs estimation using the network structure shown in FIG.
  • FIG. 10 is a diagram illustrating a network structure for estimating deformation of an out-of-focus image in the present embodiment.
  • the process up to the generation of the intermediate data 410 is the same as the process described in the first embodiment with reference to FIG. That is, the partial area 401, the filter 402, the first conversion partial area 403, the filter 404, and the intermediate data 410 of FIG. 10 are respectively the partial area 201, the filter 202, the first conversion partial area 203, the filter 204, FIG. It corresponds to the intermediate data 210.
  • the full connection 411 is executed as the (N + 1) th linear conversion in the (N + 1) th layer.
  • the full connection 411 takes a linear combination of all signals of the input intermediate data 410.
  • the coefficient applied to each signal and the constant to be added are determined by the learning information.
  • there are a plurality of types of coefficients and constants and a linear combination is calculated for each coefficient and constant, and a plurality of results are output.
  • the plurality of values output by the full connection 411 are converted by the activation function (N + 1th non-linear conversion) and input to the softmax 412.
  • the soft max 412 calculates a soft max function expressed by the following equation (5).
  • vector x is a column vector whose components are a plurality of values output by the (N + 1) th nonlinear conversion
  • vector w is a column vector whose components are coefficients determined from learning information.
  • T on the right shoulder of the vector w represents transposition.
  • the probability of whether the deformation of the out-of-focus image generated in the partial region 401 is one of distributions 413a to 413d (omitted after 413e) can be obtained by Expression (5).
  • the distribution indicates whether or not the defocused image is deformed in the partial area.
  • the distribution 413a is a large ring blur
  • the distribution 413b is a small ring blur
  • the distributions 413c and 413d are vignetting. Each variant is shown.
  • K is the total number of distributions
  • j and k are indexes indicating the distribution numbers.
  • step S404 in FIG. 9 the estimation unit determines whether or not the estimation of the out-of-focus image deformation has been completed for all of the predetermined regions (partial regions) in the captured image.
  • the process proceeds to step S405.
  • an area (partial area) for which estimation has not been completed remains, the process returns to step S402, and the estimation unit captures a partial area (new partial area) for which deformation of an out-of-focus image has not yet been estimated. Get from.
  • step S405 the estimation unit outputs an estimation result of the deformation of the out-of-focus image in each partial area within the predetermined area.
  • the estimation result of the deformation of the out-of-focus image can be used to analyze the photographing state of the optical system (imaging optical system) in which the deformation of the out-of-focus image has occurred or to correct the out-of-focus image from the photographed image. it can.
  • a method other than deep learning may be used.
  • FIG. 11 is a flowchart showing learning of learning information.
  • Each step in FIG. 11 is mainly performed by the learning unit 102 a of the image processing unit 102.
  • the present embodiment is not limited to this, and learning of learning information may be performed by a learning unit provided in a device (arithmetic device) different from the imaging device 100.
  • a learning unit provided in a device (arithmetic device) different from the imaging device 100.
  • the learning unit 102a of the imaging apparatus 100 learns learning information will be described.
  • the learning unit 102a acquires a learning image.
  • an image obtained by applying a deformation of an out-of-focus image due to vignetting to an image in which the deformation of the out-of-focus image has not occurred is used as a learning image.
  • One or more learning images may be used.
  • the learning image needs to include the deformation of the out-of-focus image due to different vignetting.
  • the learning unit 102a acquires a plurality of learning pairs from the learning image acquired in step S501.
  • the learning pair is information regarding a partial area (learning deformation partial area) of a learning image (an image in which a defocused image is deformed) and a distribution acting on the partial area.
  • the information related to distribution is a number indicating a specific distribution among the plurality of deformation distributions.
  • the plurality of distributions are distributions 413 a to 413 d (not shown after 413 e) shown in FIG. 10, and these are prepared in advance and stored in the storage unit 103.
  • step S503 the learning unit 102a generates learning information based on the learning pair (information regarding deformation distribution and deformation partial area for learning).
  • the learning information is generated using the network structure shown in FIG.
  • step S504 the learning unit 102a outputs the generated learning information.
  • learning information may be prepared for each size of the out-of-focus image region.
  • an imaging apparatus capable of estimating the deformation of an out-of-focus image from a captured image with high accuracy.
  • the present invention supplies a program that realizes one or more functions of the above-described embodiments to a system or apparatus via a network or a storage medium, and one or more processors in a computer of the system or apparatus read and execute the program This process can be realized. It can also be realized by a circuit (for example, ASIC) that realizes one or more functions.
  • a circuit for example, ASIC
  • an image processing method an image processing device, an imaging device, a program, and a storage medium that can estimate or correct deformation of an out-of-focus image from a captured image with high accuracy.

Abstract

【課題】撮影画像から高精度に焦点外れ像の変形を推定または補正することが可能な画像処理方法を提供する。 【解決手段】画像処理方法は、焦点外れ像の変形が生じている入力画像の少なくとも一部の領域を取得する工程と、焦点外れ像の変形に関して予め学習された学習情報を取得する工程と、学習情報を用いて領域における焦点外れ像の変形を推定または補正する工程とを有し、焦点外れ像の変形を推定または補正する工程は、Nを2以上の整数、nを1からNまでの整数とするとき、領域に対して、学習情報に基づく複数の線型関数のそれぞれによる第n線型変換と、非線型関数による第n非線型変換とをnが1からNになるまで順に実行することで中間データを生成する工程と、中間データに対して、学習情報に基づく少なくとも一つの線型関数による第N+1線型変換を実行する工程とを含む。

Description

画像処理方法、画像処理装置、撮像装置、プログラム、および、記憶媒体
 本発明は、画像処理方法に関する。
 一般に、撮像装置の光学性能は合焦物体の結像性能で評価されるが、用途によっては、焦点外れ像(ボケ像)の見え方が撮像装置の光学性能にとって重要な評価指標になる場合がある。特に、デジタルスチルカメラ、ビデオカメラ、または、TVカメラ等の撮像装置では、焦点外れ像の見え方が重要視される傾向にある。
 特許文献1には、絞りの近傍にアポダイゼーションフィルタを備えた光学系が開示されている。一般に、広角から中望遠の撮像光学系においては、軸外光束のサジタルハロが画面周辺部における焦点外れ像の強度ムラを引き起こす。アポダイゼーションフィルタは、このようなサジタルハロの除去に効果的である。
特開2016-145862号公報
Y.LeCun,et al., "Gradient-based Learning Applied to Document Recognition", Proc. of The IEEE, 1998. G.E.Hinton,et al., "A fast learning algorithm for deep belief nets", Neural Comput. 2006 Jul; 18(7): 1527-54. I.J.Goodfellow,et al., "Maxout networks", arXiv preprint arXiv:1302.4389 (2013). G.E.Hinton & R.R.Salakhutdinov (2006-07-28). "Reducing the Dimensionality of Data with Neural Networks", Science 313(5786): 504-507. N.Srivastava,et al., "Dropout: A simple way to prevent neural networks from overfitting", The Journal of Machine Learning Research, 15(1):1929-1958, 2014. A.Krizhevsky, "Learning Multiple Layers of Features from Tiny Images", 2009, https://www.cs.toronto.edu/~kriz/learning-features-2009-TR.pdf
 しかしながら、特許文献1に開示されたアポダイゼーションフィルタを備えた光学系では、カダディオプトリックレンズ(反射望遠レンズ)で生じるリングボケ等の口径食により生じる焦点外れ像の形状の補正に対応できない。
 そこで本発明は、撮影画像から高精度に焦点外れ像の変形を推定または補正することが可能な画像処理方法、画像処理装置、撮像装置、プログラム、および、記憶媒体を提供することを目的とする。
 本発明の一側面としての画像処理方法は、焦点外れ像の変形が生じている入力画像の少なくとも一部の領域を取得する工程と、前記焦点外れ像の変形に関して予め学習された学習情報を取得する工程と、前記学習情報を用いて前記領域における前記焦点外れ像の変形を推定または補正する工程とを有し、前記焦点外れ像の変形を推定または補正する工程は、Nを2以上の整数、nを1からNまでの整数とするとき、前記領域に対して、前記学習情報に基づく複数の線型関数のそれぞれによる第n線型変換と、非線型関数による第n非線型変換とをnが1からNになるまで順に実行することで中間データを生成する工程と、前記中間データに対して、前記学習情報に基づく少なくとも一つの線型関数による第N+1線型変換を実行する工程とを含む。
 本発明の他の側面としての画像処理装置は、焦点外れ像の変形に関する学習情報を記憶する記憶部と、前記学習情報を用いて入力画像の少なくとも一部の領域における前記焦点外れ像の変形を推定または補正する画像処理部とを有し、前記画像処理部は、Nを2以上の整数、nを1からNまでの整数とするとき、前記領域に対して、前記学習情報に基づく複数の線型関数のそれぞれによる第n線型変換と、非線型関数による第n非線型変換とをnが1からNになるまで順に実行することで中間データを生成し、前記中間データに対して、前記学習情報に基づく少なくとも一つの線型関数による第N+1線型変換を実行する。
 本発明の他の側面としての撮像装置は、被写体空間の像を入力画像として取得する撮像部と、前記画像処理装置とを有する。
 本発明の他の側面としてのプログラムは、前記画像処理方法をコンピュータに実行させる。
 本発明の他の側面としての記憶媒体は、前記プログラムを記憶している。
 本発明の他の目的及び特徴は、以下の実施形態において説明される。
 本発明によれば、撮影画像から高精度に焦点外れ像の変形を推定または補正することが可能な画像処理方法、画像処理装置、撮像装置、プログラム、および、記憶媒体を提供することができる。
実施例1および実施例2における焦点外れ像を補正するネットワーク構造を示す図である。 実施例1および実施例3における撮像装置のブロック図である。 実施例1および実施例3における撮像装置の外観図である。 実施例1における焦点外れ像の補正処理を示すフローチャートである。 実施例1における学習情報の学習を示すフローチャートである。 実施例2における画像処理システムのブロック図である。 実施例2における画像処理システムの外観図である。 実施例2における焦点外れ像の補正処理を示すフローチャートである。 実施例3における焦点外れ像の変形の推定処理を示すフローチャートである。 実施例3における焦点外れ像の変形を推定するネットワーク構造を示す図である。 実施例3における学習情報の学習を示すフローチャートである。
 以下、本発明の実施形態について、図面を参照しながら詳細に説明する。各図において、同一の部材については同一の参照符号を付し、重複する説明は省略する。
 各実施例の具体的な説明へ入る前に、本発明の要旨を述べる。本発明では、ディープラーニング(深層学習)を用いて、撮影画像から焦点外れ像の変形(変形した焦点外れ像の形状)を推定または補正する。一般に撮像光学系は、立体被写体の撮影に適用することができる。ここで、「立体被写体」とは、光軸方向の距離が異なる複数の部分からなる被写体であり、特に、撮影時に撮像光学系の焦点面から被写界深度以上離れた点を持つ被写体のことである。このとき、結像面には焦点外れ像が形成され、焦点外れ像の直径が撮像光学系のイメージサークル半径に対して約1~2%よりも大きくなると、焦点外れ像として認識できるようになる。ここで、「イメージサークル」とは、レンズの有効径内を通った光線が結像する円である。
 本実施形態の光学系をデジタルスチルカメラやビデオカメラの撮像光学系として使用する場合、結像面はCCDセンサやCMOSセンサ等の半導体撮像素子(光電変換素子)の撮像面となる。なお、前述のイメージサークル半径は、撮像装置においては撮像面の最大像高としてもよい。また、一般的な撮像光学系では、軸外光束に口径食が見られる。「口径食」とは、光束の一部がケラレることを意味しており、ビネッティングとも呼ばれる。口径食の影響がない焦点外れ像は、絞りの形状を反映した形状となり、一般的には円形となる。口径食により、一般的な撮像光学系では軸外で円が欠けた様な形状となり、絞り中央部が遮蔽される反射望遠レンズではリング状の形状(リングボケ)となる。
 各実施例によれば、焦点外れ像の状態が異なる画像を用いて、その対応関係をディープラーニングによって学習することにより、焦点外れ像の変形(変形した焦点外れ像の形状)を高精度に推定または補正することができる。すなわち各実施例によれば、理想的な焦点外れ像の形状から光学系等の撮影条件により変形した焦点外れ像の形状を高精度に推定することが可能となる。また各実施例によれば、変形した焦点外れ像の形状を理想的な焦点外れ像の形状に高精度に補正する(理想的な焦点外れ像の形状に近づける)ことが可能となる。ここで、理想的な焦点外れ像の形状は、光学系の口径食や収差等の影響がない光学系を用いて取得された焦点外れ像の形状であり、例えば円形形状である。一方、光学系の口径食や収差等の影響により変形した焦点外れ像の形状は、例えばリング形状である。
 まず、図2および図3を参照して、本発明の実施例1における撮像装置について説明する。図2は、撮像装置100のブロック図である。図3は、撮像装置100の外観図である。本実施例において、撮像装置100は、画像処理方法を実行し、焦点外れ像の変形(光学系の口径食や収差等の影響により変形した焦点外れ像の形状)をディープラーニングにより補正する。
 撮像装置100は、被写体空間の像を撮影画像(入力画像)として取得する撮像部101を有する。撮像部101は、被写体空間から入射する光を集光する結像光学系101aと、複数の画素を有する撮像素子101bとを有する。撮像素子101bは、例えば、CCD(Charge Coupled Device)センサやCMOS(Complementary Metal-Oxide Semiconductor)センサである。
 画像処理部102は、撮影画像(入力画像)に対して、焦点外れ像(焦点外れ像の変形)を補正する。画像処理部102は、学習部102aと補正部102bとを有する。記憶部103は、画像処理部102による焦点外れ像(焦点外れ像の変形)を補正する際に用いられる学習情報(焦点外れ像の変形に関して予め学習された学習情報)を記憶している。この処理の詳細については後述する。画像処理部102により焦点外れ像の変形が補正された画像等の出力画像は、液晶ディスプレイなどの表示部104に表示されるか、または、記録媒体105に保存される。ただし、撮影画像を記録媒体105に保存し、任意のタイミングで焦点外れ像の補正処理を行ってもよい。撮影画像は、静止画だけでなく動画であってもよい。この場合、各フレームに対して焦点外れ像の補正処理を行う。以上の一連の制御は、システムコントローラ106により行われる。
 次に、図4を参照して、画像処理部102による焦点外れ像の補正処理について説明する。画像処理部102は、焦点外れ像の補正処理の際に、事前に学習された学習情報を用いるが、この学習の詳細については後述する。図4は、焦点外れ像の補正処理を示すフローチャートである。図4の各ステップは、主に、画像処理部102の補正部102bにより実行される。
 まずステップS101において、画像処理部102(補正部102b)は、焦点外れ像の変形が生じた撮影画像(入力画像)と学習情報とを取得する。ここで、焦点外れ像の変形とは、理想的な焦点外れ像に対して形状や輝度分布が異なっている状態を意味する。学習情報とは、撮影画像と焦点外れ像(焦点外れ像の変形)が補正された画像とを結び付けるために予め学習された情報である。続いてステップS102において、補正部102bは、撮影画像から、撮影画像の少なくとも一部の領域(部分領域)を取得する。焦点外れ像の補正処理は、この領域(部分領域)を単位として(部分領域ごとに)行われる。
 続いてステップS103において、補正部102bは、学習情報を用いて部分領域から焦点外れ像が補正された部分領域である補正部分領域を生成する。ここで、図1を参照して、焦点外れ像の補正処理について詳述する。図1は、ディープラーニングの一つであるCNN(Convolutional Neural Network)のネットワーク構造を示している。ただし、ディープラーニングとして、CNN以外の手法、例えばDBN(Deep Belief Network)を用いても構わない。CNNおよびDBNの詳細はそれぞれ、非特許文献1および非特許文献2に説明されている。
 CNNは、複数の層構造になっており、各層で学習情報を用いた線型変換と非線型変換とが実行される。nを1からNまでの整数とするとき、n番目の層を第n層、第n層における線型変換と非線型変換とをそれぞれ、第n線型変換と第n非線型変換と呼称する。ただし、Nは2以上の整数である。部分領域201に関しては、第1層において、複数のフィルタ202のそれぞれとのコンボリューション(複数の線型関数による第1線型変換)が実行される。その後、活性化関数(Activation Function)と呼ばれる非線型関数を用いて変換(第1非線型変換)が実行される。図1において、活性化関数をAFとして示している。また、部分領域201が複数枚描画されているのは、入力画像(撮影画像)が複数のチャンネルを有するためである。本実施例において、部分領域はRGB(Red、Green、Blue)の3チャンネルを有する。ただし、チャンネルの数はこれに限定されるものではない。後述のように、複数の撮影画像が入力された場合、部分領域は、入力された撮影画像に対応する数のチャンネル数を有していてもよい。また、部分領域が複数のチャンネルを有する場合でも、1チャンネルごとに個別にCNNへ入力しても構わない。
 フィルタ202は複数存在する。補正部102bは、複数のフィルタ202のそれぞれと部分領域201とのコンボリューションを個別に算出する。フィルタ202の係数は、学習情報に基づいて決定される。学習情報は、フィルタ202の係数(フィルタ係数)そのもの、または、フィルタ202を所定の関数でフィッティングした際の係数でもよい。フィルタ202のそれぞれのチャンネル数は、部分領域201の数と一致する。部分領域201のチャンネル数が2以上の場合、3次元フィルタとなる(3次元目がチャンネル数を表す)。また、コンボリューションの結果に対して、学習情報から決定される定数(負もとり得る)を加算してもよい。
 活性化関数f(x)の例として、以下の式(1)~(3)が挙げられる。
Figure JPOXMLDOC01-appb-M000002
Figure JPOXMLDOC01-appb-M000003
Figure JPOXMLDOC01-appb-M000004
 式(1)はシグモイド関数、式(2)はハイパボリックタンジェント関数、式(3)はReLU(Rectified Linear Unit)と呼ばれる。式(3)中のmaxは、引数のうち最大値を出力するMAX関数を表す。式(1)~(3)に示される活性化関数f(x)は、全て単調増加関数である。また、活性化関数としてMaxoutを使用してもよい。Maxoutは、第n線型変換の出力である複数の画像のうち、各画素で最大値である信号値を出力するMAX関数である。Maxoutの詳細は、非特許文献3に説明されている。
 図1において、第1線型変換および第1非線型変換が施された部分領域を、第1変換部分領域203と呼称する。第1変換部分領域203の各チャンネル成分は、部分領域201と複数のフィルタ202のそれぞれとのコンボリューションから生成される。このため、第1変換部分領域203のチャンネル数は、フィルタ202の数と同じになる。
 第2層では、第1変換部分領域203に対して、第1層と同様に学習情報から決定される複数のフィルタ204とのコンボリューション(第2線型変換)と、活性化関数による非線型変換(第2非線型変換)とを行う。第2層で用いられるフィルタ204は、一般的に、第1層で用いられるフィルタ202と同一ではない。フィルタ204のサイズや数も、フィルタ204と一致しなくてもよい。ただし、フィルタ204のチャンネル数と第1変換部分領域203のチャンネル数とは互いに一致する。補正部102bは、同様の演算を第N層まで繰り返す(第n線型変換および第n非線型変換(n=1~N)を実行する)ことにより、中間データ210を取得する。
 最後に、第N+1層において、中間データ210と複数のフィルタ211のそれぞれとのコンボリューションに定数を加算すること(第N+1線型変換)により、焦点外れ像が補正された補正部分領域212が取得される。ここで用いられるフィルタ211および定数もそれぞれ、学習情報に基づいて決定される。補正部分領域212のチャンネル数は、部分領域201と同じである。このため、フィルタ211の数も部分領域201のチャンネル数と同じである。補正部分領域212の各チャンネルの成分は、中間データ210とフィルタ211のそれぞれ(フィルタ211が一つの場合もある)とのコンボリューションを含む演算から求められる。なお、部分領域201と補正部分領域212とのサイズは互いに一致しなくてもよい。コンボリューションの際に、部分領域201の外側にはデータが存在しないため、データの存在する領域のみで演算すると、コンボリューション結果はサイズが小さくなる。ただし、周期境界条件などを設定することにより、サイズを保つこともできる。
 ディープラーニングが高い性能を発揮できる理由は、非線型変換を多層構造によって何度も実行することにより、高い非線型性が得られるためである。仮に、非線型変換を担う活性化関数が存在せず、線型変換のみでネットワークが構成されていた場合、いくら多層にしてもそれと等価な単層の線型変換が存在するため、多層構造にする意味がない。ディープラーニングは、より多層にする方が強い非線型を得られるため、高い性能が出やすいと言われている。一般に、少なくとも3層以上を有する場合がディープラーニングと呼ばれる。
 続いて、図4のステップS104において、補正部102bは、撮影画像のうち所定の領域(部分領域)の全てに対して焦点外れ像の補正が完了したか否かを判定する。所定の領域の全てに対して補正部分領域212が生成されている場合、ステップS105へ進む。一方、焦点外れ像の補正が完了していない領域(部分領域)が残っている場合、ステップS102へ戻り、補正部102bは、まだ焦点外れ像が補正されていない部分領域を撮影画像から取得する。
 ステップS105において、補正部102bは、焦点外れ像が補正された画像(補正画像)を出力する。焦点外れ像が補正された画像は、生成された複数の補正部分領域212を合成することにより生成される。ただし、部分領域が撮影画像の全体である場合、補正部102bは、補正部分領域212をそのまま焦点外れ像が補正された画像として出力する。以上の処理により、焦点外れ像が補正された画像(理想的な形状(例えば円形形状)の焦点外れ像)を取得することができる。
 なお本実施例では、撮影画像(入力画像)、および、焦点外れ像が補正された画像(出力画像)が共に1枚の場合を説明した。しかし、本実施例はこれに限定されるものではない。例えば、複数の撮影画像(複数の入力画像)を入力し、複数の撮影画像のそれぞれの焦点外れ像が補正された複数の出力画像が一括で取得することができるように、CNNのネットワークを構成してもよい。また、複数の撮影画像を入力し、1枚の焦点外れ像が補正された画像を取得するように構成してもよい。複数の撮影画像を入力する場合、絞り値(F値)やピント位置の異なる複数の画像を用いることが好ましい。絞り値やピント位置が変化すると被写体中での焦点外れ像の大きさ、形状、輝度分布等が異なり、同一の被写体に対して、異なる焦点外れ像が生じた複数の画像を入力することにより、精度を向上することができる。また、入力する撮影画像として、複数の色のチャンネルを有する画像を用いることが好ましい。なお本実施例では、焦点外れ像を理想的な形状(円形形状)に補正する場合を説明したが、補正後の焦点外れ像の形状はこれに限定されるものではない。例えば、星型やハート型等のユーザが所望する形状に補正することも可能である。
 次に、図5を参照して、本実施例における学習情報の学習について説明する。図5は、学習情報の学習を示すフローチャートである。図5の各ステップは、主に、画像処理部102の学習部102aにより行われる。ただし本実施例はこれに限定されるものではなく、学習情報の学習は、焦点外れ像の補正前であれば、撮像装置100とは別の装置(演算装置)に設けられた学習部で行ってもよい。本実施例では、撮像装置100の学習部102aが学習情報を学習する場合について説明する。
 まずステップS201において、学習部102aは、少なくとも一対の学習画像を取得する。一対の学習画像とは、焦点外れ像の変形の状態(光学系の口径食や収差等の撮影条件に応じて変形した焦点外れ像の形状や輝度分布)が異なり、かつ同一の被写体が存在する画像である。焦点外れ像の変形が生じている画像は、焦点外れ像の変形が生じていない画像(理想的な焦点外れ像を含む画像)と一対一に対応しているか、または、1枚の焦点外れ像の変形が生じていない画像に対して複数枚存在していてもよい。後者の場合、焦点外れ像の変形が生じている画像は、焦点外れ像の大きさ、形状、または、輝度分布が異なる複数の画像である。
 学習画像を用意する方法として、シミュレーションや実写画像を用いてもよい。シミュレーションを行う場合、焦点外れ像の変形が生じていない画像に対して、口径食や収差の影響を考慮した撮像シミュレーションを行うことで焦点外れ像の変形が生じている画像を生成すればよい。一方、実写画像を用いる場合、同一の被写体を焦点外れ像の変形が異なる条件で撮影した画像を使用すればよい。例えば、焦点外れ像の変形が口径食の影響による場合、変形は絞り値やピント位置などに影響を受ける。または、点光源などの既知の被写体(焦点外れ像の変形が生じていない画像)を、光学系等の撮影条件を変えて撮影することで、焦点外れ像の変形が異なる学習画像を得てもよい。
 また、焦点外れ像の変形が生じている画像に対してディープラーニング以外の手法を用いて焦点外れ像が補正された画像を推定し、学習画像を用意してもよい。なお学習画像は、様々な焦点外れ像(様々な変形した焦点外れ像の形状)が含まれる画像を含むことが好ましい。学習画像に含まれない変形の仕方をしている画像は、高精度に焦点外れ像を補正することができないためである。また、学習画像に含まれる焦点外れ像の変形が異なる画像は一対のみでもよいが、前述の理由により複数の画像を含むことが好ましい。
 続いてステップS202において、学習部102aは、ステップS201にて取得した学習画像から、複数の学習ペアを取得する。学習ペアは、学習部分領域(学習領域)と学習補正部分領域とからなる。学習補正部分領域は焦点外れ像の変形が生じている画像から取得され、そのサイズはステップS102にて取得した撮影画像の部分領域と同じである。学習部分領域は焦点外れ像の変形が生じていない画像から取得され、学習部分領域の中心は画像において学習補正部分領域の中心と同じ位置である。そのサイズは、ステップS103にて生成された補正部分領域と同じである。前述と同様に、学習部分領域と学習補正部分領域のペア(学習ペア)は、一対一に対応している必要はない。一つの学習補正部分領域と、複数の学習部分領域とがペア(グループ)になっていてもよい。
 続いてステップS203において、補正部102aは、複数の学習ペア(学習部分領域と学習補正部分領域)から、学習情報を学習によって取得(生成)する。学習では、焦点外れ像を補正するネットワーク構造と同じネットワーク構造を使用する。本実施例では、図1に示されるネットワーク構造に対して学習補正部分領域を入力し、その出力結果と学習部分領域との誤差を算出する。この誤差が最小となるように、例えば誤差逆伝播法(Backpropagation)などを用いて、第1乃至N+1層で用いる複数のフィルタのそれぞれの係数や加算する定数(学習情報)を更新して最適化する。各フィルタの係数および定数の初期値は任意に設定することができ、例えば乱数から決定される。または、各層ごとに初期値を事前学習するAuto Encoderなどのプレトレーニングを行ってもよい。Auto Encoderの詳細は、非特許文献4に説明されている。
 学習ペアの全てをネットワーク構造へ入力し、それら全ての情報を使って学習情報を更新する手法をバッチ学習と呼ぶ。ただし、この学習方法は、学習ペアの数が増えるにつれて計算負荷が膨大になる。逆に、学習情報の更新に一つの学習ペアのみを使用し、更新ごとに異なる学習ペアを使用する学習手法をオンライン学習と呼ぶ。この手法は、学習ペアが増えても計算量が増大しないが、一つの学習ペアに存在するノイズの影響を大きく受ける。このため、これら2つの手法の中間に位置するミニバッチ法を用いて学習することが好ましい。ミニバッチ法は、全学習ペアの中から少数を抽出し、それらを用いて学習情報の更新を行う。次の更新では、異なる小数の学習ペアを抽出して使用する。これを繰り返すことにより、バッチ学習とオンライン学習の不利な点を小さくすることができ、高い補正効果を得やすくなる。
 続いてステップS204において、補正部102aは、学習された学習情報を出力する。本実施例において、学習情報は記憶部103に記憶される。以上の処理により、高精度に焦点外れ像を補正するための学習情報を学習することができる。
 また、以上の処理に加えて、CNNの性能を向上させる工夫を併用してもよい。例えば、ロバスト性の向上のためネットワークの各層において、ドロップアウト(Dropout)やダウンサンプリングであるプーリング(pooling)を行ってもよい。または、学習精度の向上のため、学習画像の画素の平均値を0、分散を1に正規化し、隣接する画素の冗長性をなくすZCAホワイトニング(ZCA whitening)などを併用してもよい。ドロップアウトおよびZCAホワイトニングの詳細はそれぞれ、非特許文献5および非特許文献6に説明されている。
 本実施例によれば撮影画像から高精度に焦点外れ像(焦点外れ像の変形)を補正することが可能な撮像装置を提供することができる。
 次に、本発明の実施例2における画像処理システムについて説明する。施例の画像処理システムにおいて、焦点外れ像(焦点外れ像の変形)を補正する画像処理装置と、撮影画像を取得する撮像装置、および、学習を行うサーバが個別に設けられている。また本実施例では、焦点外れ像(焦点外れ像領域)の大きさを判定することにより、使用する学習情報を切り替える。焦点外れ像領域の大きさに応じて、焦点外れ像の補正処理に使用する学習情報を個別に学習して使用することにより、より高精度な焦点外れ像の補正が可能となる。
 図6および図7を参照して、本実施例における画像処理システムについて説明する。図6は、画像処理システム200のブロック図である。図7は、画像処理システム200の外観図である。図6および図7に示されるように、画像処理システム200は、撮像装置300、画像処理装置301、サーバ305、表示装置308、記録媒体309、および、出力装置310を備えて構成される。
 撮像装置300の基本構成は、焦点外れ像の補正と学習情報の学習に関する画像処理部を除いて、図2を参照して説明した撮像装置100と同様である。撮像装置300を用いて撮影された撮影画像(入力画像)は、画像処理装置301に設けられた記憶部302に記憶される。画像処理装置301は、ネットワーク304と有線または無線で接続されており、ネットワーク304を介してサーバ305にアクセスすることができる。サーバ305は、撮影画像から焦点外れ像を補正するための学習情報を学習する学習部307と、学習情報を記憶する記憶部306とを有する。画像処理装置301に設けられた補正部303(画像処理部)は、サーバ305の記憶部306からネットワーク304を介して学習情報を取得し、撮影画像の焦点外れ像を補正する。補正部303により焦点外れ像が補正された画像等の出力画像は、表示装置308、記録媒体309、および、出力装置310の少なくとも一つに出力される。表示装置308は、例えば液晶ディスプレイやプロジェクタである。ユーザは、表示装置308を介して、処理途中の画像を確認しながら作業を行うことができる。記録媒体309は、例えば半導体メモリ、ハードディスク、ネットワーク上のサーバである。出力装置310は、例えばプリンタである。画像処理装置301は、必要に応じて現像処理やその他の画像処理を行う機能を有してもよい。
 次に、図8を参照して、焦点外れ像の補正処理について説明する。図8は、焦点外れ像の補正処理を示すフローチャートである。図8の各ステップは、主に、画像処理装置301の補正部303(画像処理部)により実行される。
 まずステップS301において、補正部303は、記憶部302から、撮影画像(入力画像)を取得する。続いてステップS302において、補正部303は、撮影画像に含まれる焦点外れ像領域の大きさを判定する。焦点外れ像領域の大きさとは、像面上のピントずれ量および絞り値に応じて変動する焦点外れ像が生じている領域の大きさである。本実施例では、これらの量を画素サイズで除すことで画素数に換算する。焦点外れ像領域の大きさを判定する方法として、以下に3つの例を示す。
 第1の例は、ピント位置が異なる複数の画像を用いる方法である。焦点外れ像領域の大きさは像面上のピントずれ量に応じて変化するため、ピント位置が異なる撮影をすることで焦点外れ像領域の大きさが異なる画像を取得することができる。また、複数の画像から、部分領域ごとに最もコントラストが高くなる画像を選択すると、画像全域でピントが合ったパンフォーカス画像を得ることができる。そのパンフォーカス画像と補正を行う撮影画像とを比較することで、ピントずれによって大きく輝度変化している領域として、焦点外れ像領域を検出することができる。また部分領域ごとに、ボケ量と距離情報との相関を得ることが可能であるため、一般的にDFD(Depth from Defocus)として知られている手法により、部分領域ごとに被写体距離を算出することができる。被写体距離に基づいて像面上のピントずれ量を見積もることが可能であるため、前記手法による被写体距離と絞り値とに基づいて焦点外れ像領域の大きさを見積もることができる。
 第2の例は、絞り値が異なる複数の画像を用いる方法である。焦点外れ像領域の大きさは絞り値に応じて変化するため、絞り値が異なる撮影をすることで焦点外れ像領域の大きさが異なる画像を取得することができる。また、複数の画像から、部分領域ごとに最もコントラストが高くなる画像を選択すると、画像全域でピントが合ったパンフォーカス画像を得ることができる。そのパンフォーカス画像と補正を行う撮影画像とを比較することで、ピントずれにより大きく輝度変化している領域として、焦点外れ像領域を検出することができる。また部分領域ごとに、ボケ量と距離情報との相関を得ることが可能であるため、一般的にDFD(Depth from Defocus)として知られている手法により、部分領域ごとに被写体距離を算出することができる。被写体距離に基づいて像面上のピントずれ量を見積もることが可能であるため、前記手法による被写体距離と絞り値とに基づいて焦点外れ像領域の大きさを見積もることができる。
 第3の例は、被写体距離(被写体距離情報)を用いる方法である。被写体距離に基づいて像面上のピントずれ量を見積もることが可能であるため、後述する手法により被写体距離と絞り値とに基づいて焦点外れ像領域の大きさを見積もることができる。被写体距離情報は、例えば、撮像装置300を多眼構成とすることで、ステレオ原理により距離情報を取得することができる。また、既存のTOF装置等の測距ユニットを別途備えることで、被写体距離情報を取得することもできる。
 なお、画像の位置に応じて焦点外れ像領域の大きさが変わる場合があるため、撮影画像内の複数の位置に対して大きさを判定し、部分領域の位置に応じて学習情報を切り替えてもよい。
 続いてステップS303において、補正部303は、ステップS302にて判定された焦点外れ像領域の大きさに基づいて、使用するネットワーク構造と学習情報、および、部分領域のサイズを決定する。本実施例において、補正部303は、図1に示されるCNNを利用して焦点外れ像を補正する。焦点外れ像領域が部分領域のサイズよりも大きいと、補正対象の被写体の情報が欠落してしまうため、高精度な焦点外れ像の補正を行うことができない。また、CNNでは各層でフィルタをコンボリューションして焦点外れ像を補正するため、それらのフィルタが影響する範囲を合わせた範囲が、撮影画像の焦点外れ像領域より小さいと、焦点外れ像を正しく補正することができない。例えば、全層数が2で、第1層のフィルタサイズが5×5、第2層のフィルタサイズが3×3である場合、ある画素の焦点外れ像の補正に使用できる範囲は、この画素を中心とした7×7画素である。このため、このネットワーク構造では、焦点外れ像領域の大きさが7画素以下になっていない場合、焦点外れ像を高精度に補正することができない。したがって、焦点外れ像領域の大きさに基づいて、ある画素の焦点外れ像の補正に使用される範囲(各層のフィルタのサイズに応じて決定される)を決定することが好ましい。
 より詳細には、以下の条件式(4)を満足するように、各層のフィルタのサイズを決定することが好ましい。
Figure JPOXMLDOC01-appb-M000005
 条件式(4)において、dは撮影画像(入力画像)の画素に対する焦点外れ像領域の大きさであり、焦点外れ像領域の1次元方向における長さを画素数で表している。N+1は全層数である。s(m=1~N+1)は、第m線型変換で使用するフィルタのサイズ(第m線型変換(m=1~N+1)のそれぞれにおけるフィルタの1次元サイズ)である。第m線型変換で複数のサイズのフィルタが混合して使用される場合、sは最大のフィルタサイズである。条件式(4)の上限は、ある画素の焦点外れ像の補正に使用できる範囲が、焦点外れ像領域の大きさ以上であることを示している。一方、条件式(4)の下限は、理論的に超えることができない。
 ネットワーク構造は、各層で使用するフィルタのサイズだけでなく、一つの層で使用されるフィルタの数や層数なども含む。焦点外れ像を高精度に補正するには、焦点外れ像領域が大きいほど層数やフィルタの数を増やす必要がある。学習情報は、焦点外れ像領域の大きさごとに学習されており、その中から撮影画像に含まれる焦点外れ像領域の大きさに対応した学習情報を使用する。これにより、より精度の高い焦点外れ像の補正が可能となる。なお、学習の詳細に関しては後述する。
 続いてステップS304において、補正部303は、撮影画像から部分領域(撮影画像の少なくとも一部の領域)を取得する。続いてステップS305において、補正部303は、ステップS303にて決定された学習情報に基づいて、補正部分領域を生成する。続いてステップS306において、補正部303は、撮影画像のうち所定の領域(部分領域)の全てに対して焦点外れ像の補正処理が完了したか否かを判定する。所定の領域の全てに対して焦点外れ像の補正が完了した場合、ステップS307へ進む。一方、焦点外れ像の補正が完了していない領域(部分領域)が残っている場合、ステップS304へ戻り、補正部303は、まだ焦点外れ像が補正されていない部分領域(新たな部分領域)を撮影画像から取得する。ステップS307において、補正部303は、焦点外れ像が補正された画像を出力する。
 なお、撮影画像中の位置に応じて焦点外れ像領域の大きさが大きく異なる場合、補正部303は、ステップS304をステップS302、S303の前に実行することが好ましい。このとき補正部303は、ステップS302、S303において、撮影画像の局所領域に対して焦点外れ像領域の大きさを取得し、対応する学習情報などを取得する。
 次に、サーバ305の学習部307により行われる学習情報の学習に関して説明する。本実施例において、学習部307は、焦点外れ像領域の大きさに応じて異なる学習情報を学習する。学習方法は、図5を参照して実施例1にて説明した方法と基本的に同様であるが、学習画像の用意の仕方によりその前処理が異なる。
 まず、焦点外れ像の変形(変形した焦点外れ像の形状)が異なる学習画像をシミュレーションにより生成する場合に関して説明する。この場合、焦点外れ像領域の大きさを設定して焦点外れ像の変形が生じていない画像から焦点外れ像の変形が生じている画像を生成し、一対の学習画像を得る。学習部307は、取得した学習画像に対してステップS201乃至S204を実行し、その後、異なる焦点外れ像領域の大きさに対して同様の手順を繰り返す。
 次に、焦点外れ像の変形が生じている画像から焦点外れ像の変形が生じていない画像を求めて、学習画像を生成する場合に関して説明する。この場合、焦点外れ像の変形が生じていない画像を求める際に焦点外れ像領域の大きさが求まるため、これにより学習画像を複数のグループに分ける。グループ分けは画像単位で行うことができる。1枚の焦点外れ像の変形が生じている画像内で焦点外れ像領域の大きさが変化している場合、画像を分割してグループ分けを行ってもよい。各グループは焦点外れ像領域の大きさが近いものが含まれているため、グループごとにステップS201乃至S204を実行して、学習情報を生成する。
 本実施例によれば、撮影画像から高精度に焦点外れ像(焦点外れ像の変形)を補正することが可能な画像処理システムを提供することができる。
 次に、本発明の実施例3における撮像装置について説明する。本実施例の撮像装置は、撮影画像(入力画像)から焦点外れ像の変形(変形した焦点外れ像の形状)を推定する。なお、本実施例における撮像装置の構成および外観は、図2および図3を参照して実施例1にて説明した撮像装置100と同様である。ただし本実施例の撮像装置には、画像処理部として、補正部102bに代えて推定部が設けられている。
 図9を参照して、撮影画像(入力画像)から焦点外れ像の変形を推定する処理について説明する。図9は、焦点外れ像の変形の推定処理を示すフローチャートである。図9の各ステップは、主に、画像処理部102の推定部により実行される。
 まずステップS401において、画像処理部102(推定部)は、撮影画像(入力画像)と学習情報とを取得する。学習情報の学習に関しては後述する。この学習により、撮影画像の部分領域と部分領域に生じている焦点外れ像の変形とを結び付ける学習情報が取得されている。続いてステップS402において、推定部は、撮影画像から、焦点外れ像の変形を推定するための部分領域を取得する。本実施例において、推定部は、部分領域に含まれる画素(例えば中心画素)に焦点外れ像の変化が生じているか否かを、その周辺画素(部分領域に含まれている画素)の情報も利用して推定する。
 続いてステップS403において、推定部は、ステップS401にて取得した学習情報に基づいて、焦点外れ像の変形を推定する。本実施例において、推定部は、図10に示されるネットワーク構造を使用して推定を行う。図10は、本実施例における焦点外れ像の変形を推定するネットワーク構造を示す図である。図10において、中間データ410の生成までの工程は、図1を参照して実施例1で説明した工程と同様であるため、それらの説明を省略する。すなわち、図10の部分領域401、フィルタ402、第1変換部分領域403、フィルタ404、および、中間データ410はそれぞれ、図1の部分領域201、フィルタ202、第1変換部分領域203、フィルタ204、および、中間データ210に相当する。
 本実施例では、第N+1層における第N+1線型変換として、フルコネクション411を実行する。フルコネクション411は、入力される中間データ410の全信号の線型結合をとる。この際、各信号にかかる係数と加算される定数は、学習情報によって決定される。また、係数と定数は複数種類が存在し、それぞれの係数と定数に対して線型結合が計算され、複数の結果が出力される。フルコネクション411で出力された複数の値は、活性化関数によって変換され(第N+1非線型変換)、ソフトマックス412に入力される。ソフトマックス412は、以下の式(5)で表されるソフトマックス関数を計算する。
Figure JPOXMLDOC01-appb-M000006
 式(5)において、ベクトルxは第N+1非線型変換で出力された複数の値を成分とする列ベクトル、ベクトルwは学習情報から決定される係数を成分とした列ベクトルである。ベクトルwの右肩に付いたTは、転置を表す。式(5)によって、部分領域401に生じている焦点外れ像の変形が、分布413a~413d(413e以降は省略)のいずれであるかの確率を求めることができる。ここで分布とは、部分領域に焦点外れ像の変形が存在するか否かを示したものであり、分布413aは大きなリングボケ、分布413bは小さなリングボケ、分布413c、413dは口径食による周辺部の変形をそれぞれ示している。式(5)のKは分布の総数、jとkは分布の番号を示すインデックスである。
 続いて、図9のステップS404において、推定部は、撮影画像のうち所定の領域(部分領域)の全てに対して焦点外れ像の変形の推定が完了したか否かを判定する。所定の領域の全てに対して推定が完了した場合、ステップS405へ進む。一方、推定が完了していない領域(部分領域)が残っている場合、ステップS402へ戻り、推定部は、まだ焦点外れ像の変形が推定されていない部分領域(新たな部分領域)を撮影画像から取得する。
 ステップS405において、推定部は、所定の領域内の各部分領域における焦点外れ像の変形の推定結果を出力する。焦点外れ像の変形の推定結果は、焦点外れ像の変形が生じた光学系(結像光学系)の撮影状態を解析するためや、撮影画像から焦点外れ像を補正するため等に用いることができる。焦点外れ像を補正する場合、ディープラーニング以外の手法を用いてもよい。以上の処理により、焦点外れ像の変形が生じている撮影画像から、焦点外れ像の変形を高精度に推定することができる。
 次に、図11を参照して、本実施例における学習情報の生成に関して説明する。図11は、学習情報の学習を示すフローチャートである。図11の各ステップは、主に、画像処理部102の学習部102aにより行われる。ただし本実施例はこれに限定されるものではなく、学習情報の学習は、撮像装置100とは別の装置(演算装置)に設けられた学習部で行ってもよい。本実施例では、実施例1と同様に、撮像装置100の学習部102aが学習情報を学習する場合について説明する。
 まずステップS501において、学習部102aは、学習画像を取得する。本実施例では、焦点外れ像の変形が生じていない画像に対してシミュレーションを用いて口径食のよる焦点外れ像の変形を付与した画像を学習画像とする。学習画像は単数でも複数でもよい。ただし、様々な大きさや形状の焦点外れ像の変形を精度よく推定するには、異なる口径食による焦点外れ像の変形が学習画像に含まれている必要がある。
 続いてステップS502において、学習部102aは、ステップS501にて取得した学習画像から、複数の学習ペアを取得する。本実施例において、学習ペアは、学習画像(焦点外れ像の変形が生じている画像)の部分領域(学習用変形部分領域)、および、この部分領域に作用している分布に関する情報である。分布に関する情報とは、複数の変形分布のうち特定の分布を示す番号である。複数の分布は、図10に示される分布413a~413d(413e以降は省略)であり、これらは事前に用意されて記憶部103に記憶されている。
 続いてステップS503において、学習部102aは、学習ペア(変形分布に関する情報と学習用変形部分領域)に基づいて、学習情報を生成する。学習情報の生成には、図10のネットワーク構造が用いられる。続いてステップS504において、学習部102aは、生成された学習情報を出力する。本実施例において、実施例2と同様に、焦点外れ像領域の大きさごとに学習情報を用意してもよい。
 本実施例によれば、撮影画像から高精度に焦点外れ像の変形を推定することが可能な撮像装置を提供することができる。
 (その他の実施例)
 本発明は、上述の実施例の1以上の機能を実現するプログラムを、ネットワーク又は記憶媒体を介してシステム又は装置に供給し、そのシステム又は装置のコンピュータにおける1つ以上のプロセッサーがプログラムを読出し実行する処理でも実現可能である。また、1以上の機能を実現する回路(例えば、ASIC)によっても実現可能である。
 各実施例によれば、撮影画像から高精度に焦点外れ像の変形を推定または補正することが可能な画像処理方法、画像処理装置、撮像装置、プログラム、および、記憶媒体を提供することができる。
 以上、本発明の好ましい実施例について説明したが、本発明はこれらの実施例に限定されたものではなく、その要旨の範囲内で様々な変形、及び変更が可能である。
 

Claims (17)

  1.  焦点外れ像の変形が生じている入力画像の少なくとも一部の領域を取得する工程と、
     前記焦点外れ像の変形に関して予め学習された学習情報を取得する工程と、
     前記学習情報を用いて前記領域における前記焦点外れ像の変形を推定または補正する工程と、を有し、
     前記焦点外れ像の変形を推定または補正する工程は、Nを2以上の整数、nを1からNまでの整数とするとき、
     前記領域に対して、前記学習情報に基づく複数の線型関数のそれぞれによる第n線型変換と、非線型関数による第n非線型変換とをnが1からNになるまで順に実行することで中間データを生成する工程と、
     前記中間データに対して、前記学習情報に基づく少なくとも一つの線型関数による第N+1線型変換を実行する工程と、を含むことを特徴とする画像処理方法。
  2.  前記焦点外れ像の変形が生じている焦点外れ像領域の大きさを取得する工程を更に有し、
     前記領域の大きさまたは前記学習情報は、前記焦点外れ像領域の大きさに基づいて決定されることを特徴とする請求項1に記載の画像処理方法。
  3.  前記焦点外れ像領域の大きさは、前記入力画像とは異なる絞り値またはピント位置の画像を用いて算出されることを特徴とする請求項2に記載の画像処理方法。
  4.  前記焦点外れ像の変形が生じている前記画像は、理想的な焦点外れ像の形状から変形した焦点外れ像を含む画像であり、
     前記焦点外れ像の変形を推定または補正する工程において、前記焦点外れ像の変形を推定、または、前記焦点外れ像の形状を前記理想的な焦点外れ像の形状に近づけるように前記焦点外れ像を補正することを特徴とする請求項1乃至3のいずれか1項に記載の画像処理方法。
  5.  前記理想的な焦点外れ像は、光学系の口径食または収差の影響がない状態で取得された焦点外れ像であり、
     前記焦点外れ像の変形が生じている前記入力画像は、前記口径食または前記収差の影響により前記理想的な焦点外れ像から変形した焦点外れ像を含む画像であることを特徴とする請求項4に記載の画像処理方法。
  6.  前記第n線型変換(n=1~N)のそれぞれは、前記学習情報に基づく複数のフィルタの各々とのコンボリューションを含むことを特徴とする請求項1乃至5のいずれか一項に記載の画像処理方法。
  7.  前記領域における前記焦点外れ像の変形を補正する工程において、前記第N+1線型変換は、前記学習情報に基づくフィルタとのコンボリューションを含むことを特徴とする請求項6に記載の画像処理方法。
  8.  前記第n線型変換(n=1~N)および前記第N+1線型変換のそれぞれにおける前記フィルタのサイズは、焦点外れ像領域の大きさに基づいて決定されることを特徴とする請求項7に記載の画像処理方法。
  9.  前記入力画像の画素に対する焦点外れ像領域の大きさをd、前記第n線型変換(n=1~N)および前記第N+1線型変換のそれぞれにおける前記フィルタの1次元サイズをs(m=1~N+1)とするとき、
    Figure JPOXMLDOC01-appb-I000001

    なる条件式を満足することを特徴とする請求項7または8に記載の画像処理方法。
  10.  前記学習情報は、前記焦点外れ像の変形の状態が異なり、かつ同一の被写体が存在する少なくとも一対の学習画像を用いて学習された情報であることを特徴とする請求項1乃至9のいずれか1項に記載の画像処理方法。
  11.  前記一対の学習画像は、前記焦点外れ像の変形が生じている画像と、前記焦点外れ像の変形が生じていない画像と、を含むことを特徴とする請求項10に記載の画像処理方法。
  12.  前記学習画像のうち前記焦点外れ像の変形が生じていない前記画像は、前記同一の被写体を異なる絞り値またはピント位置で撮影した画像であることを特徴とする請求項11に記載の画像処理方法。
  13.  前記学習画像は、シミュレーションにより生成された画像であることを特徴とする請求項10乃至12のいずれか1項に記載の画像処理方法。
  14.  焦点外れ像の変形に関する学習情報を記憶する記憶部と、
     前記学習情報を用いて入力画像の少なくとも一部の領域における前記焦点外れ像の変形を推定または補正する画像処理部と、を有し、
     前記画像処理部は、Nを2以上の整数、nを1からNまでの整数とするとき、
     前記領域に対して、前記学習情報に基づく複数の線型関数のそれぞれによる第n線型変換と、非線型関数による第n非線型変換とをnが1からNになるまで順に実行することで中間データを生成し、
     前記中間データに対して、前記学習情報に基づく少なくとも一つの線型関数による第N+1線型変換を実行する、ことを特徴とする画像処理装置。
  15.  被写体空間の像を入力画像として取得する撮像部と、
     請求項14に記載の画像処理装置と、を有することを特徴とする撮像装置。
  16.  請求項1乃至13のいずれか1項に記載の画像処理方法をコンピュータに実行させることを特徴とするプログラム。
  17.  請求項16に記載のプログラムを記憶していることを特徴とする記憶媒体。
PCT/JP2019/020641 2018-06-07 2019-05-24 画像処理方法、画像処理装置、撮像装置、プログラム、および、記憶媒体 WO2019235258A1 (ja)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2018109126A JP7129229B2 (ja) 2018-06-07 2018-06-07 画像処理方法、画像処理装置、撮像装置、プログラム、および、記憶媒体
JP2018-109126 2018-06-07

Publications (1)

Publication Number Publication Date
WO2019235258A1 true WO2019235258A1 (ja) 2019-12-12

Family

ID=68770832

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2019/020641 WO2019235258A1 (ja) 2018-06-07 2019-05-24 画像処理方法、画像処理装置、撮像装置、プログラム、および、記憶媒体

Country Status (2)

Country Link
JP (1) JP7129229B2 (ja)
WO (1) WO2019235258A1 (ja)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003256771A (ja) * 2002-03-06 2003-09-12 Nippon Telegr & Teleph Corp <Ntt> 情景内文字撮像方法とその装置及び情景内文字撮像プログラムとそのプログラムを記録した記録媒体。
JP2009020844A (ja) * 2007-07-13 2009-01-29 Morpho Inc 画像データ処理方法および撮像装置
JP2009069996A (ja) * 2007-09-11 2009-04-02 Sony Corp 画像処理装置および画像処理方法、認識装置および認識方法、並びに、プログラム
JP2010045819A (ja) * 2000-02-28 2010-02-25 Eastman Kodak Co 顔を検出するカメラ及び方法
JP2018055516A (ja) * 2016-09-30 2018-04-05 キヤノン株式会社 画像処理方法、画像処理装置、撮像装置、画像処理プログラム、および、記憶媒体
JP2018084982A (ja) * 2016-11-24 2018-05-31 キヤノン株式会社 画像処理装置、情報処理方法及びプログラム

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109644230B (zh) * 2016-08-25 2020-10-30 佳能株式会社 图像处理方法、图像处理装置、图像拾取装置和存储介质

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010045819A (ja) * 2000-02-28 2010-02-25 Eastman Kodak Co 顔を検出するカメラ及び方法
JP2003256771A (ja) * 2002-03-06 2003-09-12 Nippon Telegr & Teleph Corp <Ntt> 情景内文字撮像方法とその装置及び情景内文字撮像プログラムとそのプログラムを記録した記録媒体。
JP2009020844A (ja) * 2007-07-13 2009-01-29 Morpho Inc 画像データ処理方法および撮像装置
JP2009069996A (ja) * 2007-09-11 2009-04-02 Sony Corp 画像処理装置および画像処理方法、認識装置および認識方法、並びに、プログラム
JP2018055516A (ja) * 2016-09-30 2018-04-05 キヤノン株式会社 画像処理方法、画像処理装置、撮像装置、画像処理プログラム、および、記憶媒体
JP2018084982A (ja) * 2016-11-24 2018-05-31 キヤノン株式会社 画像処理装置、情報処理方法及びプログラム

Also Published As

Publication number Publication date
JP2019212139A (ja) 2019-12-12
JP7129229B2 (ja) 2022-09-01

Similar Documents

Publication Publication Date Title
JP6728365B2 (ja) 画像処理方法、画像処理装置、撮像装置、画像処理プログラム、記憶媒体
EP3614336A1 (en) Image processing method, image processing apparatus, imaging apparatus, lens apparatus, program, and image processing system
JP6910780B2 (ja) 画像処理方法、画像処理装置、撮像装置、画像処理プログラム、および、記憶媒体
JP2018084982A (ja) 画像処理装置、情報処理方法及びプログラム
US11508038B2 (en) Image processing method, storage medium, image processing apparatus, learned model manufacturing method, and image processing system
JP2015222411A (ja) 撮像装置およびその制御方法
US9083879B2 (en) Focus detection apparatus, control method thereof, and image pickup apparatus
JP2007304525A (ja) 画像入力装置および電子機器および画像入力方法
TWI507808B (zh) 攝影裝置
JP2020036310A (ja) 画像処理方法、画像処理装置、撮像装置、レンズ装置、プログラム、記憶媒体、および、画像処理システム
JP2014006388A (ja) 撮像装置およびその制御方法ならびにプログラム
US20190197717A1 (en) Method and device for producing depth information
JP2019074777A (ja) 画像処理方法、画像処理装置、および撮像装置
JP5587264B2 (ja) 調整方法、調整装置、及び、撮像装置の製造方法
JP7146461B2 (ja) 画像処理方法、画像処理装置、撮像装置、プログラム、および、記憶媒体
US20160255294A1 (en) Image capturing apparatus and image processing apparatus
JP2020197774A (ja) 画像処理方法、画像処理装置、撮像装置、画像処理プログラム、および、記憶媒体
JP7191588B2 (ja) 画像処理方法、画像処理装置、撮像装置、レンズ装置、プログラム、および、記憶媒体
JP7129229B2 (ja) 画像処理方法、画像処理装置、撮像装置、プログラム、および、記憶媒体
US11080832B2 (en) Image processing method, image processing apparatus, imaging apparatus, and storage medium
JP7009219B2 (ja) 画像処理方法、画像処理装置、撮像装置、画像処理プログラム、および、記憶媒体
JP2020057373A (ja) 画像処理方法、画像処理装置、撮像装置、プログラム、記憶媒体、画像処理システム、および、学習済みモデルの製造方法
JP2018133064A (ja) 画像処理装置、撮像装置、画像処理方法および画像処理プログラム
JP5344647B2 (ja) 画像処理方法、画像処理装置および画像処理プログラム
JP2019139694A (ja) 画像処理方法、画像処理装置、撮像装置、画像処理プログラム、および、記憶媒体

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19815936

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19815936

Country of ref document: EP

Kind code of ref document: A1