WO2021171980A1 - 画像処理装置及びその制御方法並びにプログラム - Google Patents

画像処理装置及びその制御方法並びにプログラム Download PDF

Info

Publication number
WO2021171980A1
WO2021171980A1 PCT/JP2021/004498 JP2021004498W WO2021171980A1 WO 2021171980 A1 WO2021171980 A1 WO 2021171980A1 JP 2021004498 W JP2021004498 W JP 2021004498W WO 2021171980 A1 WO2021171980 A1 WO 2021171980A1
Authority
WO
WIPO (PCT)
Prior art keywords
image data
image
distance
subject
layer
Prior art date
Application number
PCT/JP2021/004498
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 WO2021171980A1 publication Critical patent/WO2021171980A1/ja
Priority to US17/819,743 priority Critical patent/US20220392092A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/50Depth or shape recovery
    • G06T7/55Depth or shape recovery from multiple images
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/11Region-based segmentation
    • BPERFORMING OPERATIONS; TRANSPORTING
    • B29WORKING OF PLASTICS; WORKING OF SUBSTANCES IN A PLASTIC STATE IN GENERAL
    • B29CSHAPING OR JOINING OF PLASTICS; SHAPING OF MATERIAL IN A PLASTIC STATE, NOT OTHERWISE PROVIDED FOR; AFTER-TREATMENT OF THE SHAPED PRODUCTS, e.g. REPAIRING
    • B29C64/00Additive manufacturing, i.e. manufacturing of three-dimensional [3D] objects by additive deposition, additive agglomeration or additive layering, e.g. by 3D printing, stereolithography or selective laser sintering
    • B29C64/30Auxiliary operations or equipment
    • B29C64/386Data acquisition or data processing for additive manufacturing
    • BPERFORMING OPERATIONS; TRANSPORTING
    • B33ADDITIVE MANUFACTURING TECHNOLOGY
    • B33YADDITIVE MANUFACTURING, i.e. MANUFACTURING OF THREE-DIMENSIONAL [3-D] OBJECTS BY ADDITIVE DEPOSITION, ADDITIVE AGGLOMERATION OR ADDITIVE LAYERING, e.g. BY 3-D PRINTING, STEREOLITHOGRAPHY OR SELECTIVE LASER SINTERING
    • B33Y50/00Data acquisition or data processing for additive manufacturing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/23Clustering techniques
    • G06F18/232Non-hierarchical techniques
    • G06F18/2321Non-hierarchical techniques using statistics or function optimisation, e.g. modelling of probability density functions
    • G06F18/23213Non-hierarchical techniques using statistics or function optimisation, e.g. modelling of probability density functions with fixed number of clusters, e.g. K-means clustering
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T19/00Manipulating 3D models or images for computer graphics
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/40Image enhancement or restoration using histogram techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/174Segmentation; Edge detection involving the use of two or more images
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/26Segmentation of patterns in the image field; Cutting or merging of image elements to establish the pattern region, e.g. clustering-based techniques; Detection of occlusion
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/26Segmentation of patterns in the image field; Cutting or merging of image elements to establish the pattern region, e.g. clustering-based techniques; Detection of occlusion
    • G06V10/267Segmentation of patterns in the image field; Cutting or merging of image elements to establish the pattern region, e.g. clustering-based techniques; Detection of occlusion by performing operations on regions, e.g. growing, shrinking or watersheds
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/74Image or video pattern matching; Proximity measures in feature spaces
    • G06V10/761Proximity, similarity or dissimilarity measures
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N13/00Stereoscopic video systems; Multi-view video systems; Details thereof
    • H04N13/20Image signal generators
    • H04N13/261Image signal generators with monoscopic-to-stereoscopic image conversion
    • H04N13/268Image signal generators with monoscopic-to-stereoscopic image conversion based on depth image-based rendering [DIBR]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N13/00Stereoscopic video systems; Multi-view video systems; Details thereof
    • H04N13/20Image signal generators
    • H04N13/271Image signal generators wherein the generated image signals comprise depth maps or disparity maps
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N13/00Stereoscopic video systems; Multi-view video systems; Details thereof
    • H04N13/30Image reproducers
    • H04N13/388Volumetric displays, i.e. systems where the image is built up from picture elements distributed through a volume
    • H04N13/395Volumetric displays, i.e. systems where the image is built up from picture elements distributed through a volume with depth sampling, i.e. the volume being constructed from a stack or sequence of 2D image planes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10024Color image
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10028Range image; Depth image; 3D point clouds
    • 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/20021Dividing image into blocks, subimages or windows

Definitions

  • the present invention relates to an image processing device, a control method thereof, and a program.
  • Patent Document 1 describes a digital camera that creates a distance map based on a captured image and converts the distance map into depth information to create stereoscopic image data, and a relief based on the stereoscopic image data output from the digital camera.
  • the 3D printer that creates the image is disclosed.
  • a modeled object that expresses three-dimensionally is also provided by stacking a plurality of light-transmitting plates on which an image is printed to form a layered structure.
  • the depth information of the three-dimensional image data is continuous.
  • the depth that can be expressed is discrete, so an image showing which part of the image is printed on which board (layer). It is necessary to create data (hereinafter, layered image data).
  • layered image data a technique for creating such layered image data based on image data has not been sufficiently established.
  • the present invention is an image processing apparatus capable of creating layered image data necessary for creating a modeled object expressing a three-dimensional effect by printing an image for each of a plurality of layers based on the image data.
  • An object of the present invention is to provide a control method and a program thereof.
  • the image processing apparatus includes an acquisition means for acquiring image data and depth information corresponding to the image data, and a plurality of the image data based on the depth information according to a subject distance.
  • the layered image data includes an image processing means for generating layered divided image data divided into layers and an output means for outputting the layered image data, and the layered image data corresponds to a subject whose subject distance is less than the first distance.
  • the image data of the first layer including the image data to be used and the image data of the second layer including the image data corresponding to the subject whose subject distance is equal to or longer than the first distance are included, and the first distance is It is characterized in that it changes based on the depth information.
  • image processing capable of creating layered image data necessary for creating a modeled object expressing a three-dimensional effect by printing an image for each of a plurality of layers based on the image data.
  • a device, a control method thereof, and a program can be provided.
  • a system for generating layered image data indicating which image is printed on which layer based on an image captured by a digital camera will be described as an example, but any image data can be acquired. It can also be applied to the imaging device of.
  • image pickup devices may include, for example, a mobile phone, a game machine, a tablet terminal, a personal computer, a watch-type or eyeglass-type image pickup device, and the like.
  • FIG. 1 is a block diagram showing a functional configuration example of the image processing device 100 of the present embodiment.
  • One or more of the functional blocks shown in FIG. 1 may be realized by hardware such as an ASIC or a programmable logic array (PLA), or may be realized by a programmable processor such as a CPU or MPU executing software. You may. It may also be realized by a combination of software and hardware. Therefore, in the following description, the same hardware can be realized as the main body even if different functional blocks are described as the main body of operation.
  • PDA programmable logic array
  • the image processing device 100 includes an input unit 11 that acquires image information and shooting information taken by the image pickup device 1, and a layered image generation unit that generates layered image data based on the acquired image information and shooting site information. 12 and a storage unit 13 for storing the generated layered image data. Further, the image processing 100 includes an output unit 15 that outputs layered image data to the outside, and a communication means 14 that communicates with the outside.
  • the input unit 11 is an interface (I / F) for acquiring image information and shooting information shot by the imaging device 1.
  • the image information may be acquired directly from the image pickup apparatus 1, or may be acquired from an external storage device (not shown) such as a computer that has acquired and stored the information from the image pickup apparatus 1.
  • the shooting information acquired here includes depth information, and may include shooting conditions, image processing parameters, and the like.
  • the depth information may be any information corresponding to the distance to the subject, and may be, for example, parallax information or defocus information obtained by the distance measuring pixels possessed by the image sensor of the image sensor 1, or subject distance information. It may be itself.
  • the depth information has the same viewpoint and angle of view as the captured image to be acquired, and is preferably a distance image having the same resolution as the captured image.
  • the input unit 11 may acquire the device information of the image pickup apparatus 1 that has captured the image information.
  • the image processing unit 16 performs brightness, color conversion processing, correction processing for defective pixels, shading, noise components, etc., filter processing, image composition processing, etc. for the image data acquired from the input unit 11, the storage unit 13, or the communication unit 14. It is an image processing means that performs various image processing. Further, the image processing unit 16 of the present embodiment includes a layered image generation unit 12. The layered image generation unit 12 generates layered image data indicating which layer is composed of which image based on the image information and the depth information acquired from the input unit 11, the storage unit 13, or the communication unit 14. Generate. The details of the layered image data generation process will be described later. Although only the layered image generation unit 12 is shown in FIG. 1, the image processing unit 16 may have other functional blocks, for example, adjustment of contrast and white balance of image data, color correction, and the like. May be processed.
  • the storage unit 13 is divided into layers, which is composed of a recording medium such as a memory that stores various information such as image data, parameters, imaging information, and device information of an imaging device input via the input unit 11 or the communication unit 14.
  • a recording medium such as a memory that stores various information such as image data, parameters, imaging information, and device information of an imaging device input via the input unit 11 or the communication unit 14.
  • the layered image data generated by the image data generation unit 12 is also stored.
  • the communication unit 14 is a communication I / F that transmits / receives data to / from an external device.
  • the communication unit 14 communicates with the image pickup device 1, the display device 2, or the printing device 3, and acquires device information or the like of the image pickup device 1, the display device 2, or the printing device 3.
  • the output unit 15 is an I / F that outputs the generated layered image data to the display device 2 and the printing device 3 at the output destination.
  • the printing device 3 prints the image data divided for each layer on a board having high light transparency such as an acrylic board based on the layered image data input from the image processing device 100.
  • the printing apparatus 3 prints any of the images of the first to third layers on each of the three acrylic plates. ..
  • a plate on which an image of a first layer is printed, a plate on which an image of a second layer is printed, and a plate on which an image of a third layer is printed are overlapped and integrated to manufacture a modeled object. Can be done. It should be noted that each layer may be fixed at an interval to manufacture a modeled object.
  • ⁇ Layered image data generation process> The specific processing of the layered image data generation processing executed in the image processing apparatus 100 will be described with reference to the flowchart of FIG.
  • the layered image generation unit 12 is configured by a programmable processor, each step of this process reads the processing program stored in the storage unit 13 by the layered image generation unit 12, and is volatile (not shown). This can be achieved by expanding it to memory and executing it.
  • step S101 the input unit 11 acquires the captured image captured by the imaging device 1 and the distance information corresponding to the captured image from the imaging device 1 or the external storage device.
  • the layered image data generation unit 12 calculates a threshold value for dividing into a plurality of regions for each subject distance by using the distance information acquired in step S101 and the preset number of layers to be divided. ..
  • the threshold value is calculated by performing distance clustering by the k-means method. For example, when the captured image shown in FIG. 3 is used as the original image data, the histogram of the corresponding distance information has a shape as shown in FIG. 4A.
  • clustering is executed on four division layers (classes) for the distance shown in FIG. 4A.
  • the distance on the horizontal axis is the distance closer to the origin (left side in the figure) closer to the image pickup device.
  • the distances indicated by the thresholds arr1, arr2, and arr3 indicated by the arrows in FIG. 4B are separated into four ranges by the k-means method.
  • the range from the imaging device to the threshold arr1 or less is the first layer, the threshold arr1 or more, the range less than the threshold arr2 is the second layer, the threshold arr2 or more, the range less than the threshold arr3 is the third layer, the threshold arr3 or more. Is the fourth layer.
  • the distance clustering method is not limited to the k-means method, and other clustering methods such as discriminant analysis method and hierarchical clustering can also be used.
  • the number of divided layers may be a number determined regardless of the image data, may be a number set by the user, or may be automatically determined by the layered image data generation unit 12 according to the distance information. be. If the number of layers is too large, the transmittance will decrease when the images are overlaid after printing. Therefore, it is considered that the range of 2 to 10 layers is suitable.
  • the threshold values (arr1, arr2, arr3) used for division are acquired, the process proceeds to step S103.
  • the layered image data generation unit 12 divides the data by the image using the calculated distance threshold value, and generates layered image data which is the data of the image separated for each layer.
  • a pixel value corresponding to a pixel position of a distance included in the first layer is selected from the image data, the value of the pixel is the selected pixel value, and the values of the other pixels are It is generated by setting the maximum pixel value so that light can be transmitted during printing.
  • the image data of the first layer is generated by extracting the image information of the subject whose subject distance is less than the threshold value arr1 from the image data and setting the maximum value of the pixel value for the pixels having no pixel value. ..
  • FIG. 5A A histogram of the selected distance is shown in FIG. 5A, and an image of the generated first layer is shown in FIG. 6A.
  • the pixel value of the image data is set at the position of the subject whose distance from the image pickup device is less than arr1 (less than the first distance) with respect to other regions.
  • the maximum value is set.
  • the image data of the first layer includes image data corresponding to a subject whose subject distance is less than arr1.
  • the image data of the second and subsequent layers includes the image data of the subject at a distance corresponding to the target layer and the image data of the subject at a distance corresponding to all the layers closer than the target layer. Generate. That is, as shown in FIG. 5B, the image data of the second layer is the pixel position corresponding to the subject having the threshold value arr2 or less (less than the second distance), which is the distance range of the first layer and the second layer. Generated using pixel values. Therefore, as shown in FIG. 6B, the image data of the second layer includes image data corresponding to a subject having a subject distance of less than arr2, and is a region of a subject having a subject distance of arr2 or more (second distance or more). The pixel value is the image data for which the maximum value is set.
  • the image data of the third layer is a pixel position corresponding to a subject having a threshold value of less than arr3 (less than the third distance), which is a distance range from the first layer to the third layer as shown in FIG. 5C. It is generated using the pixel value of. Therefore, as shown in FIG. 6C, the third image data includes image data corresponding to a subject having a subject distance of less than arr3 (less than the third distance), and the subject distance is arr3 or more (third distance or more).
  • the pixel value of the subject area is the image data for which the maximum value is set.
  • the image data of the fourth layer is the image data of the farthest layer, and is generated using the pixel values of the pixel positions corresponding to the subjects at all distances as shown in FIG. 5D. That is, as shown in FIG. 6D, the image of the farthest layer corresponds to all the subjects, but includes image data, and is an image similar to the captured image shown in FIG.
  • the layered image data generation process uses the distance information to generate a plurality of image data divided into a specified number of layers.
  • the generated layered image data is stored in the storage unit 13 and output to an external printing device 3 for printing.
  • the image processing unit 16 may perform brightness adjustment, color correction, and the like for each of the divided images.
  • a sense of depth and a sense of three-dimensionality may be expressed by gradually lowering or increasing the brightness from the image data of the first layer.
  • the subject included in the image data of the first layer is included in the image data of the first to fourth layers, when observed from the front, the colors in which each layer is superimposed can be seen, so that the subjects are divided into a plurality of layers. Color correction or brightness correction may be performed only on the portion to be printed over.
  • the layers farther away from the image pickup apparatus the more the layered images are integrated, and the farthest layer becomes the same image as the captured image.
  • the transmittance of the background light decreases in the area where the same image is printed over a plurality of layers, and the visibility may decrease. be.
  • the area of the tree in the foreground looks dark because the transmittance of the background light is lower than that of the area of the tree in the back.
  • a layered image data generation process that can reduce a decrease in visibility due to image superimposition will be described. Since the configuration of the image processing device 100 is the same as that of the first embodiment, the description thereof will be omitted.
  • the flow of the layered image data generation process is the same as that of the flowchart of FIG. 2, but only the method of layer image generation in step S103 is different. Therefore, the process of step S103 in the present embodiment will be described.
  • the image data of the second and subsequent layers does not include the information of the layer closer to the target layer, and the pixels at the positions corresponding to the subject area included in the distance range of the target layer.
  • Each layered image data is generated using only the pixel values.
  • FIG. 7 shows a histogram of the distance of the image data obtained by dividing the captured image of FIG. 3 into each layer by the processing method of the present embodiment
  • FIG. 8 shows the image indicated by the image data. It is a histogram of the image data of the first to fourth layers in the order of FIGS. 7A to 7D, and the first to fourth layer image data in the order of FIGS. 8A to 8D.
  • the image data of the first layer includes image data corresponding to a subject whose subject distance is less than arr1, and as shown in FIG. 8A, two images located on the front side when viewed from the image pickup apparatus. Only corresponds to trees and the front part of the road.
  • the image data of the second layer includes image data corresponding to a subject having a subject distance of arr1 or more and less than arr2 as shown in FIG. 7B, and is included in the image data of the first layer as shown in FIG. 8B. Corresponds to a subject located slightly farther than the subject (the subject distance is large).
  • the image data of the third layer includes image data corresponding to a subject having a subject distance of arr2 or more and less than arr3 as shown in FIG. 7C, and is included in the image data of the second layer as shown in FIG. 8C. Corresponds to a subject located a little further than the subject.
  • the image data of the fourth layer includes image data corresponding to a subject having a subject distance of arr3 or more as shown in FIG.
  • the pixel value of the pixel corresponding to the subject included in the image data of the first layer is set to the maximum value in the image data of the second to fourth layers, and the subject included in the image data of the second layer.
  • the pixel value of the pixel corresponding to is set to the maximum value in the image data of the first and third layers.
  • the pixel values of the pixels corresponding to the subject included in the third and fourth image data are also set to the maximum values in the image data of the other layers.
  • the pixel values at the same pixel position are not selected in a plurality of layers, so that even if the layers in which the image data of each layer is printed are overlapped, printing is performed.
  • the created areas are not superimposed. Therefore, as compared with the case where the image data corresponding to each layer includes the image data corresponding to all the subjects whose subject distance is equal to or less than the threshold value as in the first embodiment, the transmittance of the background light is improved and the visual recognition is performed. It is possible to reduce the possibility of deterioration.
  • the gap between the layers causes a region where there is no image at the boundary region of the layers.
  • the boundary of the distance between the layers may be overlapped so that such a region does not occur.
  • the image data of the first layer includes the image data of the subject with the subject distance less than the threshold value arr4 as shown in FIG. 9A, the image data of the subject with the subject distance of arr5 or more smaller than arr4 as shown in FIG. 9B.
  • the image data of the second layer is generated so as to include.
  • the image data of the second layer includes the image data of a subject having a subject distance less than the threshold value arr6, as shown in FIG. 9C, the image data of the subject having a subject distance smaller than arr6 and having a subject distance of arr7 or more is included.
  • the image data of the third layer is generated.
  • the image data of the third layer includes the image data of a subject having a subject distance less than the threshold value arr7, as shown in FIG. 9D, the image data of the subject having a subject distance smaller than arr7 and having a subject distance of arr8 or more is included.
  • the image data of the fourth layer is generated.
  • the image corresponding to the subject area near the distance between each layer is included in the image data of each layer.
  • the overlapping distance may be a predetermined amount, or may be determined by the layer division data generation unit 12 based on the distance information corresponding to the input image data.
  • the coefficient ⁇ is set so that arr5 ⁇ arr1 and arr2 ⁇ arr6.
  • the lower limit of the distance is set to arr1 in the first embodiment, but when there is a subject whose subject distance is continuously changing in the vicinity of arr1, the subject is separated by layers. Therefore, by setting arr5, which is smaller than arr1 so that the skirt of the peak indicated by the dotted line is included in the range as in this modification, the lower limit of the distance is set, so that the separation of the subject by the layer can be avoided.
  • the range of the subject distance is set so that the hem of the peak is included in all the boundaries of the first to fourth layers, but the method of overlapping is not limited to this.
  • the layer containing the image with the shorter subject distance uses the threshold value set by clustering as shown in FIG. 7, and the layer containing the image with the longer subject distance is shown in FIG.
  • the lower limit distance may be set so that the hem of the peak is included in the range.
  • the image of the layer including the focus position is generated based on the threshold value as shown in FIG. 7, and the images of the other layers are generated based on the distance range set to include the tail of the peak as shown in FIG. May be good.
  • the image data of each layer in this way, it is possible to express the edge of the subject in the vicinity of the focus by emphasizing it.
  • the focus position is in the distance range of the second layer (for example, arr1 or more and less than arr2)
  • the image data of the first, third, and fourth layers is generated as shown in FIG. 9, and the second layer is generated.
  • the image data of the above may be generated as shown in FIG.
  • the image of each layer generated in the second embodiment can be gradually enlarged in order to generate a superposed area, thereby reducing the area without an image even when observed from an oblique direction. It is possible.
  • FIG. 10 is a block diagram showing a functional configuration of the image pickup apparatus 300 incorporating the conversion information calculation process.
  • the image pickup optical system 30 is composed of a lens unit included in the image pickup device 300 or a lens device that can be attached to the camera body, and forms an optical image of a subject on the image pickup element 31.
  • the image pickup optical system 30 is composed of a plurality of lenses arranged in the direction of the optical axis 30a, and has an exit pupil 30b at a position separated from the image pickup element 31 by a predetermined distance.
  • the direction parallel to the optical axis 30a is defined as the z direction (depth direction). That is, the depth direction is the direction in which the subject exists in the real space with reference to the position of the image pickup apparatus 300.
  • the direction orthogonal to the optical axis 30a and parallel to the horizontal direction of the image pickup element 31 is defined as the x direction
  • the direction orthogonal to the optical axis 30a and parallel to the vertical direction of the image pickup element 31 is defined as the x direction.
  • the y direction is defined as the direction orthogonal to the optical axis 30a and parallel to the vertical direction of the image pickup element 31.
  • the image sensor 31 is, for example, a CCD (charge-coupled device) type image sensor or a CMOS (complementary metal oxide semiconductor) type image sensor.
  • the image sensor 31 performs photoelectric conversion on the subject image formed on the image pickup surface via the image pickup optical system 30 and outputs an image signal related to the subject image.
  • the image sensor 31 of the present embodiment has a function of outputting a signal capable of distance measurement by the imaging surface parallax method as described later, and in addition to the captured image, the distance from the imaging device to the subject (subject).
  • a parallax signal for generating distance information indicating (distance) is output.
  • the control unit 32 includes a CPU (central processing unit), a microprocessor, and the like, and controls the operation of each component of the image pickup device 300. For example, the control unit 32 performs autofocus (AF: automatic focus adjustment) at the time of imaging, change of focus (focus) position, change of F value (aperture value), capture of an image, and the like. Further, the control unit 32 controls the image processing unit 33, the storage unit 34, the input unit 35, the display unit 36, and the communication unit 37.
  • AF automatic focus adjustment
  • the image processing unit 33 executes various image processing included in the image pickup apparatus 300.
  • the image processing unit 33 includes an image generation unit 330, a depth generation unit 331, and a conversion information calculation unit 332.
  • the image processing unit 33 has a memory used as a work area for image processing.
  • One or more of the functional blocks shown in the image processing unit 33 may be realized by hardware such as an ASIC or a programmable logic array (PLA), or realized by executing software by a programmable processor such as a CPU or MPU. You may. It may also be realized by a combination of software and hardware.
  • PDA programmable logic array
  • the image generation unit 330 performs various signal processing such as noise removal, demosaiking, brightness signal conversion, aberration correction, white balance adjustment, and color correction of the image signal output from the image sensor 31.
  • the image data (captured image) output from the image generation unit 330 is stored in the memory or the storage unit 34, and is used by the control unit 32 for displaying an image on the display unit 36 and outputting to an external device via the communication unit 37. ..
  • the depth information generation unit 331 generates a depth image (depth distribution information) showing the distribution of the depth information based on the signal obtained by the distance measuring pixel of the image sensor 31 described later.
  • the depth image is two-dimensional information in which the value stored in each pixel is the subject distance of the subject existing in the region of the captured image corresponding to the pixel.
  • the defocus amount and the parallax information may be used instead of the subject distance.
  • the layer-divided image generation unit 332 is an image processing unit corresponding to the layer-divided image generation unit 12 of the first embodiment, and includes image information and depth information acquired by photographing using the image pickup optical system 30 and the image pickup element 31. Based on this, layered image data is generated.
  • the storage unit 34 uses the captured image data, the layered image data generated by the layered image generation unit 332, the intermediate data generated in the process of the operation of each block, and the operation of the image processing unit 33 and the image pickup device 300. It is a non-volatile recording medium on which reference parameters and the like are recorded.
  • the storage unit 34 may be any recording medium capable of reading and writing at high speed and having a large capacity as long as the processing performance permitted for the realization of processing is guaranteed. For example, the storage unit 34 may be used. Flash memory and the like are preferable.
  • the operation input unit 35 is a user interface that detects information input and setting change operation input made to the image pickup apparatus 300, such as dials, buttons, switches, and touch panels. When the input unit 35 detects the operation input made, it outputs the corresponding control signal to the control unit 32.
  • the display unit 36 is, for example, a display device such as a liquid crystal display or an organic EL.
  • the display unit 36 is used for confirming the composition at the time of shooting by displaying the shot image through, and for notifying various setting screens and message information. Further, by providing the touch panel as the input unit 35 integrally with the display surface of the display unit 36, it is possible to have both the display function and the input function.
  • the communication unit 37 is a communication interface included in the image pickup apparatus 300 that realizes information transmission / reception with the outside.
  • the communication unit 37 may be configured so that the obtained captured image, depth information, layered image data, and the like can be transmitted to another device.
  • the image pickup device 31 is configured by connecting and arranging a plurality of pixel groups 310 of 2 rows ⁇ 2 columns to which different color filters are applied. As shown in the enlarged view, red (R), green (G), and blue (B) color filters are arranged in the pixel group 310, and R, G, and B are arranged from each pixel (photoelectric conversion element). An image signal showing any of the color information of is output.
  • the color filter will be described as having a distribution as shown in the drawing, but the embodiment of the present invention is not limited to this.
  • one pixel (photoelectric conversion element) relates to the horizontal direction of the image pickup device 31 in order to realize the distance measurement function of the image pickup surface phase difference method.
  • a plurality of photoelectric conversion units are arranged side by side. More specifically, as shown in FIG. 11B, each pixel has a light guide layer 313 including a microlens 311 and a color filter 312, and a light receiving layer including a first photoelectric conversion unit 315 and a second photoelectric conversion unit 316. It is composed of 314 and.
  • the microlens 311 is configured to efficiently guide the light flux incident on the pixel to the first photoelectric conversion unit 315 and the second photoelectric conversion unit 316. Further, the color filter 312 passes light in a predetermined wavelength band, passes only light in any of the wavelength bands R, G, and B described above, and passes through the first photoelectric conversion unit 315 and the first photoelectric conversion unit 315 in the subsequent stage. It leads to the photoelectric conversion unit 316 of 2.
  • the light receiving layer 314 is provided with two photoelectric conversion units (first photoelectric conversion unit 315 and second photoelectric conversion unit 316) that convert the received light into an analog image signal, and these two photoelectric conversion units are provided.
  • Two types of signals output from are used for distance measurement. That is, each pixel of the image sensor 31 also has two photoelectric conversion units arranged in the horizontal direction, and is an image composed of signals output from the first photoelectric conversion unit 315 of all the pixels.
  • An image signal composed of a signal and a signal output from the second photoelectric conversion unit 316 is used. That is, the first photoelectric conversion unit 315 and the second photoelectric conversion unit 316 partially receive the light flux that enters the pixel through the microlens 311.
  • the two types of image signals finally obtained are a pupil-divided image group related to the light flux passing through different regions of the exit pupil of the imaging optical system 30.
  • the image signal obtained by combining the image signals photoelectrically converted by the first photoelectric conversion unit 315 and the second photoelectric conversion unit 316 in each pixel is described in an embodiment in which only one photoelectric conversion unit is provided in the pixel. It is equivalent to an image signal (for viewing) output from one photoelectric conversion unit.
  • the image sensor 31 of the present embodiment can output an image signal for viewing and an image signal for distance measurement (two types of pupil-divided images).
  • all the pixels of the image sensor 31 are provided with two photoelectric conversion units and are configured to be capable of outputting high-density depth information. It is not limited to.
  • a distance measuring pixel having only the first photoelectric conversion unit 315 and a distance measuring pixel having only the second photoelectric conversion unit 316 are provided in a part of the image sensor 31, and signals from these pixels are used.
  • the distance measurement may be performed by the imaging surface phase difference method.
  • FIG. 12A is a schematic view showing the light flux received by the exit pupil 30b of the image pickup optical system 30 and the first photoelectric conversion unit 315 of the pixel in the image pickup element 31.
  • FIG. 12B is a schematic view showing the luminous flux received by the second photoelectric conversion unit 316 in the same manner.
  • the microlens 311 shown in FIGS. 12A and 12B is arranged so that the exit pupil 30b and the light receiving layer 314 are in an optically conjugated relationship.
  • the luminous flux that has passed through the exit pupil 30b of the imaging optical system 30 is focused by the microlens 311 and guided to the first photoelectric conversion unit 315 or the second photoelectric conversion unit 316.
  • the first photoelectric conversion unit 315 and the second photoelectric conversion unit 316 mainly receive the luminous flux that has passed through different pupil regions, respectively.
  • the first photoelectric conversion unit 315 has a luminous flux that has passed through the first pupil region 330
  • the second photoelectric conversion unit 316 has a luminous flux that has passed through the second pupil region 330.
  • the plurality of first photoelectric conversion units 315 included in the image sensor 31 mainly receive the light flux passing through the first pupil region 320 and output the first image signal.
  • the plurality of second photoelectric conversion units 316 included in the image sensor 31 mainly receive the light flux passing through the second pupil region 330 and output the second image signal. It is possible to obtain the intensity distribution of the image formed on the image pickup device 31 by the luminous flux passing through the first pupil region 320 from the first image signal. Further, the intensity distribution of the image formed on the image sensor 31 by the luminous flux passing through the second pupil region 330 from the second image signal can be obtained.
  • the relative positional deviation amount (so-called parallax amount) between the first image signal and the second image signal is a value corresponding to the defocus amount.
  • the relationship between the parallax amount and the defocus amount will be described with reference to FIGS. 12C, 12D, and 12E.
  • 12C, 12D, and 12E are schematic views illustrating the image pickup device 31 and the image pickup optical system 30 of the present embodiment.
  • the first luminous flux 321 in the figure is a luminous flux passing through the first pupil region 320
  • the second luminous flux 331 is a luminous flux passing through the second pupil region 330.
  • FIG. 12C shows the state at the time of focusing, and the first luminous flux 321 and the second luminous flux 331 are converged on the image sensor 31. At this time, the amount of parallax between the first image signal formed by the first luminous flux 321 and the second image signal formed by the second luminous flux 331 becomes zero.
  • FIG. 12D shows a state in which the image side is defocused in the negative direction of the z-axis. At this time, the amount of parallax between the first image signal formed by the first luminous flux and the second image signal formed by the second signal does not become 0 and has a negative value.
  • FIG. 12E shows a state in which the image side is defocused in the positive direction of the z-axis.
  • the amount of parallax between the first image signal formed by the first luminous flux and the second image signal formed by the second luminous flux has a positive value. From the comparison between FIGS. 12D and 12E, it can be seen that the directions of the positional deviations are switched according to the positive and negative of the defocus amount. Further, it can be seen that the positional deviation occurs according to the imaging relationship (geometric relationship) of the imaging optical system according to the defocus amount.
  • the amount of parallax which is the positional deviation between the first image signal and the second image signal, can be detected by a region-based matching method described later.
  • step S331 the control unit 32 processes to perform shooting with shooting settings such as the set focal position, aperture, and exposure time. More specifically, the control unit 32 controls the image sensor 31 to take a picture, transmits the obtained pictured image to the image processing unit 33, and stores it in the memory.
  • the captured image is composed of an image signal S1 composed of signals output only from the first photoelectric conversion unit 315 included in the image sensor 31 and a signal output only from the second photoelectric conversion unit 316. It is assumed that there are two types of image signals S2.
  • step S332 the image processing unit 33 generates an viewing image from the obtained captured image. More specifically, the image generation unit 330 of the image processing units 33 first generates one Bayer array image by adding the pixel values of the pixels of the image signal S1 and the image signal S2. The image generation unit 330 performs demosing processing of images of each color of R, G, and B on the Bayer array image to generate an image for viewing. The demosaiking process is performed according to the color filter arranged on the image sensor, and any method may be used as the demosaiking method. In addition, the image generation unit 330 performs processing such as noise removal, luminance signal conversion, aberration correction, white balance adjustment, and color correction to generate a final viewing image and store it in the memory.
  • processing such as noise removal, luminance signal conversion, aberration correction, white balance adjustment, and color correction to generate a final viewing image and store it in the memory.
  • step S333 the image processing unit 33 generates a depth image from the obtained captured image.
  • the depth generation unit 331 performs the processing related to the generation.
  • the process related to the depth image generation will be described with reference to the flowchart of FIG. 13B.
  • step S3331 the depth generation unit 331 performs light quantity correction processing on the image signal S1 and the image signal S2. Due to vignetting at the peripheral angle of view of the imaging optical system 30, the shapes of the first pupil region 320 and the second pupil region 330 are different, and the light amount balance is lost between the image signal S1 and the image signal S2. ing. Therefore, in this step, the depth generation unit 331 corrects the light amount of the image signal S1 and the image signal S2 by using, for example, the light amount correction value stored in advance in the memory.
  • the depth generation unit 331 performs a process of reducing noise generated during conversion in the image sensor 31. Specifically, the depth generation unit 331 realizes noise reduction by applying a filter process to the image signal S1 and the image signal S2. In general, the higher the spatial frequency, the lower the SN ratio and the relatively large amount of noise components. Therefore, the depth generation unit 331 performs a process of applying a low-pass filter in which the passing rate decreases as the spatial frequency increases. Since the light amount correction in step S3331 does not give a suitable result due to the manufacturing error of the imaging optical system 30, the depth generation unit 331 blocks the DC component and has a low pass rate of the high frequency component. It is preferable to apply a filter.
  • the depth generation unit 331 calculates the amount of parallax between these images based on the image signal S1 and the image signal S2. Specifically, the depth generation unit 331 sets a point of interest corresponding to the representative pixel information and a collation region centered on the point of interest in the image signal S1.
  • the collation area may be, for example, a rectangular area such as a square area having a predetermined length on one side centered on the point of interest.
  • the depth generation unit 331 sets a reference point in the image signal S2, and sets a reference region centered on the reference point.
  • the reference region has the same size and shape as the collation region described above.
  • the depth generation unit 331 calculates the degree of correlation between the image included in the matching area of the image signal S1 and the image included in the reference area of the image signal S2 while sequentially moving the reference points, and the degree of correlation is the highest.
  • a high reference point is specified as a corresponding point corresponding to the point of interest in the image signal S2.
  • the amount of relative positional deviation between the corresponding point and the point of interest identified in this way is the amount of parallax at the point of interest.
  • the depth generation unit 331 calculates the parallax amount while sequentially changing the points of interest according to the representative pixel information, thereby calculating the parallax amount at a plurality of pixel positions determined by the representative pixel information. Since this embodiment is simple, the pixel positions (pixel groups included in the representative pixel information) for calculating the parallax amount are set to be the same as the viewing image in order to obtain depth information at the same resolution as the viewing image. It is assumed that it has been done. As a method for calculating the degree of correlation, a method such as NCC (Normalized Cross-Correlation), SSD (Sum of Squared Difference), or SAD (Sum of Absolute Difference) may be used.
  • NCC Normalized Cross-Correlation
  • SSD Serial of Squared Difference
  • SAD Sud of Absolute Difference
  • the calculated parallax amount can be converted into a defocus amount which is the distance from the image sensor 31 to the focal point of the image pickup optical system 30 by using a predetermined conversion coefficient.
  • the predetermined conversion coefficient K and the defocus amount are ⁇ L
  • the conversion coefficient K is set for each region based on information including the aperture value, the exit pupil distance, the image height of the image sensor 31, and the like.
  • the depth generation unit 331 configures two-dimensional information in which the defocus amount calculated in this way is a pixel value, and stores it in the memory as a depth image.
  • the layered image generation unit 332 in step S334 divides the image information for viewing acquired in step S332 into layers based on the depth information acquired in step S333, and performs a process of generating layered image data.
  • the layered image generation process executed by the layered image generation unit 332 is the same as the layered image generation process executed by the layered image generation unit 12 of the first embodiment, and thus the description thereof will be omitted.
  • the layered image may be generated by the method described in the second embodiment and its modification.
  • the image pickup device 31 has an image pickup surface phase difference ranging type photoelectric conversion element and can acquire a viewing image and a depth image.
  • distance information Acquisition is not limited to this.
  • the distance information may be acquired by a stereo ranging method based on, for example, a plurality of captured images obtained from a binocular imaging device or a plurality of different imaging devices.
  • it may be acquired by using a stereo ranging method using a light irradiation unit and an image pickup device, a method using a combination of a TOF (Time of Flight) method and an image pickup device, or the like.
  • TOF Time of Flight
  • FIG. 14 is a block diagram showing a functional configuration example of the image processing device 100 of the present embodiment.
  • the image processing device 100 of the present embodiment is different from the image processing device 100 of the first embodiment in that the image processing unit 16 has the depth information generation unit 17, but the other configurations are the image processing device 100 of the first embodiment. Since it is the same as the above, the description thereof will be omitted.
  • the input unit 11 of the present embodiment receives input of information necessary for generating depth information instead of depth information.
  • the input information is transmitted to the depth information generation unit 17 in the image processing unit 16.
  • the image signal S1 composed of the signals output only from the first photoelectric conversion unit 315 and the signal output only from the second photoelectric conversion unit 316 described in the third embodiment are used.
  • a case where the configured image signal S2 is input will be described as an example.
  • the depth information generation unit 17 generates depth information based on the image signal S1 and the image signal S2.
  • the depth information generation unit 17 generates depth information by performing the processing shown in the flowchart of FIG. 13B in the same manner as the depth information generation unit 331 of the image pickup apparatus 300 according to the third embodiment. The details of the method of generating the depth information will be omitted because they have been described in the third embodiment.
  • the present invention supplies a program that realizes one or more functions of the above-described embodiment to a system or device via a network or storage medium, and one or more processors in the computer of the system or device reads and executes the program. It can also be realized by the processing to be performed. It can also be realized by a circuit (for example, ASIC) that realizes one or more functions.
  • a circuit for example, ASIC

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Data Mining & Analysis (AREA)
  • Materials Engineering (AREA)
  • Chemical & Material Sciences (AREA)
  • Signal Processing (AREA)
  • Software Systems (AREA)
  • Artificial Intelligence (AREA)
  • Evolutionary Computation (AREA)
  • Manufacturing & Machinery (AREA)
  • General Engineering & Computer Science (AREA)
  • General Health & Medical Sciences (AREA)
  • Databases & Information Systems (AREA)
  • Computing Systems (AREA)
  • Medical Informatics (AREA)
  • Health & Medical Sciences (AREA)
  • Mechanical Engineering (AREA)
  • Computer Hardware Design (AREA)
  • Computer Graphics (AREA)
  • Probability & Statistics with Applications (AREA)
  • Optics & Photonics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Evolutionary Biology (AREA)
  • Image Processing (AREA)
  • Processing Or Creating Images (AREA)
  • Studio Devices (AREA)

Abstract

画像処理装置100は、画像データと、画像データに対応する深度情報とを取得する手段(入力部11)と、画像データを前記深度情報に基づいて、被写体距離に応じて複数の層に分割した層分割画像データを生成する手段(層分割画像データ生成部12)と、層分割画像データを出力する手段(出力手段13)と、を備える。層分割画像データは、被写体距離が第1の距離未満の被写体に対応する画像データを含む第1の層の画像データと、被写体距離が前記第1の距離以上の被写体に対応する画像データを含む第2の層の画像データとを含む。第1の距離は取得した深度情報に基づいて変化する。

Description

画像処理装置及びその制御方法並びにプログラム
 本発明は、画像処理装置およびその制御方法ならびにプログラムに関する。
 撮影画像に基づいて、立体的なレリーフ等の造形物を作成する装置やシステムが知られている。特許文献1には、撮影した画像に基づいて距離マップを作成し、距離マップを奥行き情報に変換して立体画像データを作成するデジタルカメラと、デジタルカメラから出力された立体画像データに基づいてレリーフを作成する3Dプリンタとが開示されている。
 一方で、画像をプリントした光透過性を有する板を複数枚重ねて層構造とすることで、立体的な表現をする造形物も提供されている。
特開2018-42106号公報
 3Dプリンタで立体的な造形物を作成する場合、立体画像データの奥行情報は連続的である。一方、複数の板毎に画像をプリントすることで立体感を表現する造形物の場合、表現できる奥行きは離散的であるため、画像のどの部分をどの板(層)にプリントするかを示す画像データ(以下、層分割画像データ)を作成する必要がある。しかしながら、画像データをもとにこのような層分割画像データを作成する技術については十分に確立されていない。
 そこで本発明は、複数の層毎に画像をプリントすることで立体感を表現する造形物を作成する際に必要な層分割画像データを、画像データに基づいて作成することが可能な画像処理装置及びその制御方法並びにプログラムを提供することを目的とする。
 本発明の一側面としての画像処理装置は、画像データと、前記画像データに対応する深度情報とを取得する取得手段と、前記画像データを前記深度情報に基づいて、被写体距離に応じて複数の層に分割した層分割画像データを生成する画像処理手段と、前記層分割画像データを出力する出力手段と、を備え、前記層分割画像データは、被写体距離が第1の距離未満の被写体に対応する画像データを含む第1の層の画像データと、前記被写体距離が前記第1の距離以上の被写体に対応する画像データを含む第2の層の画像データとを含み、前記第1の距離は前記深度情報に基づいて変化することを特徴とする。
 本発明のその他の側面については、以下で説明する実施の形態で明らかにする。
 本発明によれば、複数の層毎に画像をプリントすることで立体感を表現する造形物を作成する際に必要な層分割画像データを、画像データに基づいて作成することが可能な画像処理装置及びその制御方法並びにプログラムを提供することができる。
第1実施形態に係る画像処理装置の機能構成を示すブロック図である。 第1実施形態にて実行される処理を説明するフローチャートである。 第1~第4実施形態にて層分割画像生成処理を説明するための撮影画像の図である。 第1~第4実施形態にて距離による層分割を説明するための図である。 第1実施形態にて距離による層分割を説明するための図である。 第1実施形態にて実行される処理で距離を分割した例を説明する図である。 第1実施形態にて実行される処理で距離を分割した例を説明する図である。 第1実施形態にて実行される処理で距離を分割した例を説明する図である。 第1実施形態にて実行される処理で距離を分割した例を説明する図である。 第1実施形態にて実行される処理で生成された層分割画像を説明する図である。 第1実施形態にて実行される処理で生成された層分割画像を説明する図である。 第1実施形態にて実行される処理で生成された層分割画像を説明する図である。 第1実施形態にて実行される処理で生成された層分割画像を説明する図である。 第2実施形態にて実行される処理で距離を分割した例を説明する図である。 第2実施形態にて実行される処理で距離を分割した例を説明する図である。 第2実施形態にて実行される処理で距離を分割した例を説明する図である。 第2実施形態にて実行される処理で距離を分割した例を説明する図である。 第2実施形態にて実行される処理で生成された層分割画像を説明する図である。 第2実施形態にて実行される処理で生成された層分割画像を説明する図である。 第2実施形態にて実行される処理で生成された層分割画像を説明する図である。 第2実施形態にて実行される処理で生成された層分割画像を説明する図である。 第2実施形態の変形例にて実行される処理で距離を分割した例を説明する図である。 第2実施形態の変形例にて実行される処理で距離を分割した例を説明する図である。 第2実施形態の変形例にて実行される処理で距離を分割した例を説明する図である。 第2実施形態の変形例にて実行される処理で距離を分割した例を説明する図である。 第3実施形態に係る撮像装置の機能構成を示すブロック図である。 第3実施形態に係る撮像素子を説明する図である。 第3実施形態に係る撮像素子を説明する図である。 撮像面位相差方式の測距原理を説明する図である。 撮像面位相差方式の測距原理を説明する図である。 撮像面位相差方式の測距原理を説明する図である。 撮像面位相差方式の測距原理を説明する図である。 撮像面位相差方式の測距原理を説明する図である。 第3実施形態にて実行される処理を説明するフローチャートである。 第3実施形態にて実行される処理を説明するフローチャートである。 第4実施形態に係る画像処理装置の機能構成を示すブロック図である。
 以下、本発明の例示的な実施形態について、図面を参照して詳細に説明する。尚、以下の実施形態は特許請求の範囲に係る発明を限定するものでない。実施形態には複数の特徴が記載されているが、これらの複数の特徴の全てが発明に必須のものとは限らず、また、複数の特徴は任意に組み合わせられてもよい。さらに、添付図面においては、同一若しくは同様の構成に同一の参照番号を付し、重複した説明は省略する。
 以下の実施形態では、デジタルカメラで撮像した画像に基づいてどの層にどの画像を印刷するかを示した層分割画像データを生成するシステムを例に説明をするが、画像データが取得可能な任意の撮像装置にも適用可能である。これらの撮像装置には、例えば携帯電話機、ゲーム機、タブレット端末、パーソナルコンピュータ、時計型や眼鏡型の撮像装置などが含まれてよい。
 [第1実施形態]
 本実施形態では、画像データと、画像データに対応する深度情報とが入力され、入力されたデータに基づいて層分割画像データを生成し、外部に出力する画像処理装置を備えるシステムについて説明をする。
 <画像処理装置100の構成>
 図1は、本実施形態の画像処理装置100の機能構成例を示すブロック図である。なお、図1に示す機能ブロックの1つ以上は、ASICやプログラマブルロジックアレイ(PLA)などのハードウェアによって実現されてもよいし、CPUやMPU等のプログラマブルプロセッサがソフトウェアを実行することによって実現されてもよい。また、ソフトウェアとハードウェアの組み合わせによって実現されてもよい。従って、以下の説明において、異なる機能ブロックが動作主体として記載されている場合であっても、同じハードウェアが主体として実現されうる。
 画像処理装置100は、撮像装置1で撮影された画像情報と撮影情報とを取得する入力部11と、取得した画像情報と撮影場情報に基づいて層分割画像データを生成する層分割画像生成部12と、生成された層分割画像データを記憶する記憶部13とを備える。更に画像処理100は、層分割画像データを外部に出力する出力部15と、外部と通信する通信手段14とを備える。
 入力部11は、撮像装置1で撮影された画像情報および撮影情報を取得するインターフェース(I/F)である。画像情報は、撮像装置1から直接取得してもよいし、撮像装置1から情報を取得して記憶したコンピュータなどの外部記憶装置(不図示)から取得してもよい。ここで取得する撮影情報は、深度情報を含み、撮影条件や画像処理パラメータなどを含んでいてもよい。深度情報は被写体までの距離に対応する情報であればよく、例えば、撮像装置1の撮像素子が有する測距用画素により得られた視差情報やデフォーカス情報であってもよいし、被写体距離情報そのものでもよい。深度情報は、取得する撮影画像と同じ視点および画角であり、撮影画像と同解像度の距離画像であることが好ましい。視点、画角、解像度の1つ以上が異なる場合は、距離情報を変換することにより、撮影画像と視点、画角、解像度を揃えることが好ましい。また、入力部11は、画像情報を撮像した撮像装置1の機器情報を取得してもよい。
 画像処理部16は、入力部11、記憶部13または通信部14より取得した画像データに対して輝度、色変換処理や欠陥画素、シェーディング、ノイズ成分などの補正処理、フィルタ処理や画像合成処理など各種の画像処理を行う画像処理手段である。また、本実施形態の画像処理部16は、層分割画像生成部12を備える。層分割画像生成部12は、入力部11、記憶部13または通信部14より取得した画像情報と深度情報とに基づいて、どの層がどの画像で構成されるかを示す、層分割画像データを生成する。層分割画像データの生成処理の詳細については後述する。尚、図1では層分割画像生成部12しか記載していないが、画像処理部16はその他の機能ブロックを有していてもよく、例えば、画像データのコントラストやホワイトバランスの調整、色補正などの処理をしてもよい。
 記憶部13は、入力部11または通信部14を介して入力される画像データ、パラメータ、撮像情報、撮像装置の機器情報等の各種情報を記憶するメモリ等の記録媒体で構成される、層分割画像データ生成部12で生成された層分割画像データも記憶する。
 通信部14は、外部装置とのデータの送受信を行う通信I/Fである。本実施形態では、通信部14は撮像装置1、表示装置2あるいは印刷装置3と通信し、撮像装置1、表示装置2あるいは印刷装置3の機器情報等を取得する。
 出力部15は、出力先の表示装置2および印刷装置3へ、生成した層分割画像データを出力するI/Fである。
 印刷装置3は、画像処理装置100から入力された層分割画像データに基づいて、層毎に分割された画像データをアクリル板のような光透過性の高い板に印刷する。入力された層分割画像データが3層に分割して印刷することを示している場合、印刷装置3は3枚のアクリル板のそれぞれに、第1~3の層の画像のいずれかを印刷する。第1の層の画像が印刷された板と第2の層の画像が印刷された板と第3の層の画像が印刷された板を重ねて一体化することで、造形物を製造することができる。尚、それぞれの層を、間隔を空けて固定して造形物を製造してもよい。
 <層分割画像データ生成処理>
 画像処理装置100において実行される、層分割画像データの生成処理について、図2のフローチャートを用いて具体的な処理を説明する。ここでは、深度情報として被写体までの距離を示す距離情報を用いる例について説明をするが、視差情報を用いる場合も同様の処理を行うことにより、層分割画像データを生成することができる。なお、層分割画像生成部12がプログラマブルプロセッサにより構成されている場合、本処理の各ステップは、層分割画像生成部12が記憶部13に記憶されている処理プログラムを読み出し、不図示の揮発性メモリに展開して実行することにより実現できる。
 ステップS101で、入力部11は、撮像装置1で撮影された撮影画像と撮影画像に対応する距離情報を撮像装置1または外部記憶装置より取得する。
 ステップS102で、層分割画像データ生成部12は、ステップS101で取得した距離情報と、予め設定されている分割する層数とを用いて、被写体距離毎に複数の領域に分割する閾値を算出する。閾値の算出は、k平均法により距離のクラスタリングを実行することで行う。例えば、図3に示す撮影画像を元の画像データとして用いる場合、対応する距離情報のヒストグラムは図4Aに示すような形状となる。この図4Aに示す距離に対して4つの分割層(クラス)にクラスタリングを実行した場合を考える。図4Aにおいて、横軸の距離は原点に近い側(図中の左側)が撮影した撮像装置に近い距離である。このような距離分布の場合、k平均法により、図4Bの矢印で示した閾値arr1、arr2、arr3で示す距離を境界として4つの範囲に分離される。撮像装置から閾値arr1未満の範囲までが第1の層、閾値arr1以上、閾値arr2未満の範囲が第2の層、閾値arr2以上、閾値arr3未満の範囲が第3の層、閾値arr3以上の範囲が第4の層となる。
 距離のクラスタリング手法はk平均法に限定されることなく、判別分析法や階層型クラスタリングといった他のクラスタリング手法を用いることもできる。分割層数は、画像データよらず定められている数としてもよいし、ユーザが設定した数としてもよいし、距離情報に応じて層分割画像データ生成部12が自動で決定することも可能である。層数が多すぎると印刷後に重ねて表示した際の透過率の低下が生じるため、2層から10層の範囲が好適であると考えられる。分割に用いる閾値(arr1、arr2、arr3)を取得すると、ステップS103へ進む。
 ステップS103で、層分割画像データ生成部12は、算出された距離の閾値を用いて画像でータを分割し、層ごとに分離した画像のデータである、層分割画像データを生成する。第1の層の画像データは、画像データから、第1の層に含まれる距離の画素位置に対応する画素値を選択し、当該画素の値は選択した画素値とし、その他の画素の値は印刷時に光が透過するように画素値の最大値に設定することで生成する。言い換えると、第1の層の画像データは、画像データから、被写体距離が閾値arr1未満の被写体の画像情報を抽出し、画素値がない画素には画素値の最大値を設定することで生成する。
 選択された距離のヒストグラムを図5Aに示し、生成された第1の層の画像を図6Aに示す。図6Aに示したように、第1の層の画像データでは、撮像装置からの距離がarr1未満(第1の距離未満)の被写体の位置には画像データの画素値が、そのほかの領域に対しては最大値が設定されている。言い換えると、第1の層の画像データは、被写体距離がarr1未満の被写体に対応する画像データを含む。
 第2の層以降の画像データは、対象となる層に対応する距離の被写体の画像データと、対象となる層より近距離にある層全てに対応する距離の被写体の画像データとを含むように生成する。つまり、第2の層の画像データは、図5Bで示すように第1の層および第2の層の距離範囲である、閾値arr2未満(第2の距離未満)の被写体に対応する画素位置の画素値を用いて生成される。よって、図6Bに示すように、第2の層の画像データは、被写体距離がarr2未満の被写体に対応する画像データを含み、被写体距離がarr2以上(第2の距離以上)の被写体の領域の画素値には最大値が設定されている画像のデータとなる。
 同様に、第3の層の画像データは、図5Cで示すように第1の層から第3の層の距離範囲である、閾値arr3未満(第3の距離未満)の被写体に対応する画素位置の画素値を用いて生成される。よって、図6Cに示すように、第3の画像データは被写体距離がarr3未満(第3の距離未満)の被写体に対応する画像データを含み、被写体距離がarr3以上(第3の距離以上)の被写体の領域の画素値には最大値が設定されている画像のデータとなる。
 第4の層の画像データは、この例の場合は最遠の層の画像データとなり、図5Dで示すように全ての距離の被写体に対応する画素位置の画素値を用いて生成される。すなわち、最遠の層の画像は図6Dで示すように、すべての被写体に対応するが画像データを含み、図3で示した撮影画像と同様の画像となる。
 以上のように、層分割画像データの生成処理により、距離情報を利用して、指定された層数に分割された複数の画像データが生成される。生成された層分割画像データは、記憶部13に保存されるとともに、外部の印刷装置3へと出力され印刷が実行される。
 尚、画像処理部16は、分割された画像のそれぞれに対して輝度調整や色補正等を行ってもよい。例えば、第1の層の画像データから、徐々に輝度を少し下げたり上げたりすることで奥行き感、立体感を表現してもよい。また、第1の層の画像データに含まれる被写体は第1~第4の層の画像データに含まれることになるため、正面から観察すると、各層が重畳した色が見えるため、複数の層に渡って印刷される部分にのみ色補正や輝度補正を行ってもよい。
 [第2実施形態]
 第1実施形態では、撮像装置から離れた距離の層になるほど、層分割した画像が積算され、最遠層では撮影画像と同じ画像となる。このように分割した画像を印刷した後で層を重ね合わせて観察した場合、同じ画像が複数の層に渡って印刷された領域は背景光の透過率が低下し、視認性が低下することがある。例えば、図3に示した撮像画像の場合、手前の木の領域が、奥の木の領域よりも背景光の透過率が低くなるため、暗く見えることが想定される。
 本実施形態では、画像重畳による視認性の低下を低減することができる層分割画像データ生成処理に関して説明する。画像処理装置100の構成は実施形態1と同様であるため説明を省略する。層分割画像データ生成処理のフローは、図2のフローチャートと同様であるが、ステップS103での層画像生成の方法のみが異なるため、本実施形態におけるステップS103の処理について説明をする。
 本実施形態では、第2の層以降の画像データが、対象となる層より近距離にある層の情報を含まず、対象となる層の距離範囲に含まれる被写体領域に対応する位置の画素の画素値のみを用いてそれぞれの層分割画像データを生成する。
 図3の撮影画像を本実施形態の処理方法でそれぞれの層に分割した画像データの距離のヒストグラムを図7に、画像データが示す画像を図8に示す。図7Aから図7Dの順に、第1から4の層の画像データのヒストグラムであり、図8Aから図8Dの順に第1から第4の層画像データである。第1の層の画像データは、図7Aに示したように被写体距離がarr1未満の被写体に対応する画像データを含み、図8Aに示したように撮像装置から見て手前側に位置する2本の木と道路の手前部分のみに対応する。第2の層の画像データは、図7Bに示したように被写体距離がarr1以上、arr2未満の被写体に対応する画像データを含み、図8Bに示したように第1の層の画像データ中の被写体よりも少し遠くに位置する(被写体距離が大きい)被写体に対応する。第3の層の画像データは、図7Cに示したように被写体距離がarr2以上、arr3未満の被写体に対応する画像データを含み、図8Cに示したように第2の層の画像データ中の被写体よりもさらに少し遠くに位置する被写体に対応する。第4の層の画像データは、図7Dに示したように被写体距離がarr3以上の被写体に対応する画像データを含み、図8Dに示したように第3の層の画像データ中の被写体よりも遠くに位置する被写体に対応する。第1の層の画像データに含まれる被写体に対応する画素の画素値は、第2~第4の層の画像データでは最大値に設定されており、第2の層の画像データに含まれる被写体に対応する画素の画素値は第1、第3~4の層の画像データでは最大値に設定されている。第3、第4の画像データに含まれている被写体に対応する画素の画素値も同様に、他の層の画像データでは最大値に設定されている。
 以上のように、本実施形態による層分割画像データ生成処理によれば、同じ画素位置の画素値が複数の層で選択されないため、それぞれの層の画像データを印刷した層を重ねても、印刷された領域が重畳されない。よって、第1実施形態のようにそれぞれの層に対応する画像データが、被写体距離が閾値以下の全ての被写体に対応する画像データを含む場合と比較して背景光の透過率が向上し、視認性が低下する可能性を低減できる。
 [第2実施形態の変形例]
 第2実施形態の方法で層分割した画像を印刷して、層間に隙間を空けて重畳した場合、斜め方向から観察すると層間の間隙により、層の境界領域で画像が何もない領域が生じる。このような領域が生じないように、図9A~図9Dに示すように各層間の距離の境界を重複させてもよい。図9Aに示すように第1の層の画像データが閾値arr4未満の被写体距離の被写体の画像データを含む場合、図9Bに示すように、arr4よりも小さいarr5以上の被写体距離の被写体の画像データを含むように第2の層の画像データを生成する。同様に、第2の層の画像データが閾値arr6未満の被写体距離の被写体の画像データを含む場合、図9Cに示すように、arr6よりも小さいarr7以上の被写体距離の被写体の画像データを含むように第3の層の画像データを生成する。同様に、第3の層の画像データが閾値arr7未満の被写体距離の被写体の画像データを含む場合、図9Dに示すように、arr7よりも小さいarr8以上の被写体距離の被写体の画像データを含むように第4の層の画像データを生成する。尚、図9の場合、arr5<arr1<arr4、arr7<arr2<arr6、arr9<arr3<arr8であるが、境界の距離が重複していれば重複のさせ方はこれに限定されない。
 このように、各層で距離を重複させることで、各層間の距離付近の被写体領域に対応する画像が、いずれの層の画像データにも含まれる。これにより斜め方向からの観察の際に、層間の間隙が同じ距離であれば、画像のない領域を小さくすることが可能となる。特に連続した距離の途中で、層分割されている領域で効果がある。重複させる距離は、予め定められた量としてもよいし、入力された画像データに対応する距離情報に基づいて、層分割データ生成部12が決定してもよい。例えば、距離のヒストグラムにおいてarr1とarr2の間の範囲にある距離の平均値μ1と標準偏差σ1を求め、標準偏差に対する係数αを用い、arr5=μ1-ασ1、arr6=μ1+ασ1で決定する。ここで、arr5<arr1、arr2<arr6となるように係数αを設定する。図9Bの場合、第1実施形態では距離の下限値をarr1としたが、arr1近傍において被写体距離が連続的に変化している被写体が存在する場合に被写体が層で分離される。よって、本変形例のように点線で示したピークの裾までが範囲に含まれるようにarr1よりも小さいarr5を距離の下限値とすることで、層による被写体の分離を回避することができる。
 図9には、第1~第4の層の全ての境界でピークの裾までがその層に含まれるように被写体距離の範囲を設定したが、重複のさせ方はこれに限定されない。例えば、隣り合う層のうち、被写体距離が短い方の画像を含む方の層は図7のようにクラスタリングにより設定した閾値を用い、被写体距離が遠い方の画像を含む方の層は図9のようにピークの裾までが範囲に含まれるように下限の距離を設定してもよい。このように層分割画像データを生成する場合、第1の層の画像データには、被写体距離がarr1未満の被写体の画像データが含まれ、第2の層の画像データには、被写体距離がarr5以上、arr2未満の被写体の画像データが含まれる。このように、被写体距離が長い方の画像を含む方の層のみをピークの裾まで範囲に含まれるようにすることで被写体距離が短い(撮像装置から見て手前の)被写体のエッジを強調した表現をすることができる。
 また、フォーカス位置を含む層の画像は図7のように閾値に基づいて生成し、そのほかの層の画像は図9のようにピークの裾を含むように設定した距離範囲に基づいて生成してもよい。このように各層の画像データを生成することで、フォーカス近傍の被写体のエッジを強調した表現をすることができる。例えば、第2の層の距離範囲(例えばarr1以上arr2未満)に合焦位置がある場合、第1、第3、第4の層の画像データは図9のように生成し、第2の層の画像データは図7のように生成すればよい。
 また他の手法として、第2実施形態で生成した各層の画像を、順に徐々に拡大することで、重畳領域を生成することで、斜め方向から観察しても画像のない領域を小さくすることが可能である。
 また、入力された画像情報に対応する距離情報に基づいて、上述の実施形態2の処理方法を行うか、変形例のように画像の間隙を小さくする処理方法を行うかを決定してもよい。
 [第3実施形態]
 第1実施形態では、撮像装置1と接続された画像処理装置が層分割画像データを生成する形態について説明をした。本実施形態では、撮像画像を取得する撮像装置(デジタルカメラ)が層分割画像データを生成する形態について説明をする。
 <撮像装置300の構成>
 図10を参照して、撮像装置300の構成について説明する。図10は、変換情報算出処理を組み込んだ撮像装置300の機能構成を示すブロック図である。
 撮像光学系30は、撮像装置300が有するレンズユニット、またはカメラ本体部に装着可能なレンズ装置により構成され、被写体の光学像を撮像素子31上に形成する。撮像光学系30は、光軸30a方向に並んだ複数のレンズで構成され、撮像素子31から所定距離離れた位置に射出瞳30bを有する。なお、本明細書において、光軸30aと平行な方向をz方向(深度方向)と定義する。つまり、深度方向は撮像装置300の位置を基準とすると実空間で被写体が存在する方向である。また、光軸30aと直交し、かつ撮像素子31の水平方向に対して平行な方向をx方向と定義し、光軸30aと直交し、かつ撮像素子31の垂直方向に対して平行な方向をy方向と定義する。
 撮像素子31は、例えばCCD(電荷結合素子)型イメージセンサやCMOS(相補型金属酸化膜半導体)型イメージセンサである。撮像素子31は、撮像光学系30を介して撮像面に形成された被写体像に対する光電変換を行い、被写体像に係る画像信号を出力する。本実施形態の撮像素子31は、後述するように撮像面位相差方式の測距が可能な信号を出力する機能を有しており、撮像画像に加えて、撮像装置から被写体までの距離(被写体距離)を示す距離情報を生成するための視差信号を出力する。
 制御部32は、CPU(中央演算処理装置)やマイクロプロセッサ等を備え、撮像装置300が備える各構成要素の動作を制御する。例えば、制御部32は撮像時のオートフォーカス(AF:自動焦点調節)、フォーカス(合焦)位置の変更、F値(絞り値)の変更、画像の取り込み等を行う。また制御部32は画像処理部33、記憶部34、入力部35、表示部36、通信部37の制御を行う。
 画像処理部33は、撮像装置300が有する各種の画像処理を実行する。画像処理部33は、画像生成部330、深度生成部331、変換情報算出部332を有する。画像処理部33は、画像処理の作業領域として用いられるメモリを有する。画像処理部33に示す機能ブロックの1つ以上は、ASICやプログラマブルロジックアレイ(PLA)などのハードウェアによって実現されてもよいし、CPUやMPU等のプログラマブルプロセッサがソフトウェアを実行することによって実現されてもよい。また、ソフトウェアとハードウェアの組み合わせによって実現されてもよい。
 画像生成部330は、撮像素子31から出力された画像信号のノイズ除去、デモザイキング、輝度信号変換、収差補正、ホワイトバランス調整、色補正などの各種信号処理を行う。画像生成部330から出力される画像データ(撮影画像)はメモリまたは記憶部34に蓄積され、制御部32によって表示部36での画像表示や通信部37を介した外部装置への出力に用いられる。
 深度情報生成部331は、後述する撮像素子31が有する測距用画素により得られた信号を基づいて、深度情報の分布を表す深度画像(深度分布情報)を生成する。ここで、深度画像は、各画素に格納される値が、該画素に対応する撮影画像の領域に存在する被写体の被写体距離である2次元の情報である。実施形態1,2と同様に、被写体距離の代わりに、デフォーカス量や視差情報を用いてもよい。
 層分割画像生成部332は、第1実施形態の層分割画像生成部12に相当する画像処理部であり、撮像光学系30及び撮像素子31を用いた撮影により取得した画像情報と深度情報とに基づいて、層分割画像データを生成する。
 記憶部34は、撮影された画像データ、層分割画像生成部332で生成された層分割画像データ、各ブロックの動作の過程で生成された中間データ、画像処理部33や撮像装置300の動作において参照されるパラメータ等が記録される不揮発性の記録媒体である。記憶部34は、処理の実現にあたり許容される処理性能が担保されるものであれば、高速に読み書きでき、かつ、大容量の記録媒体であればどのようなものであってもよく、例えば、フラッシュメモリなどが好ましい。
 操作入力部35は、例えば、ダイヤル、ボタン、スイッチ、タッチパネル等の、撮像装置300に対してなされた情報入力や設定変更の操作入力を検出するユーザインターフェイスである。入力部35は、なされた操作入力を検出すると、対応する制御信号を制御部32に出力する。
 表示部36は、例えば、液晶ディスプレイや有機EL等の表示装置である。表示部36は、撮影画像をスルー表示することによる撮影時の構図確認や、各種設定画面やメッセージ情報の報知することに用いられる。また、入力部35としてのタッチパネルを表示部36の表示面と一体に備えることで、表示機能と入力機能を併せ持つことができる。
 通信部37は、撮像装置300が備える、外部との情報送受信を実現する通信インタフェースである。通信部37は、得られた撮影画像や深度情報、層分割画像データ等を、他の装置に送出可能に構成されていてよい。
 <撮像素子の構成>
 次に、上述した撮像素子31の構成例について、図11を参照して説明する。撮像素子31は、図11Aに示されるように、異なるカラーフィルタが適用された2行×2列の画素群310が複数連結して配列されることで構成されている。拡大図示されるように、画素群310は、赤(R)、緑(G)、青(B)のカラーフィルタが配置されており、各画素(光電変換素子)からは、R、G、Bのいずれかの色情報を示した画像信号が出力される。なお、本実施形態では一例として、カラーフィルタが、図示されるような分布であるものとして説明するが、本発明の実施はこれに限定されない。
 本実施形態の撮像素子31は、撮像面位相差方式の測距機能を実現すべく、1つの画素(光電変換素子)は、撮像素子31の水平方向に係る、図11AのI-I’断面において、複数の光電変換部が並んで構成される。より詳しくは、図11Bに示されるように、各画素は、マイクロレンズ311及びカラーフィルタ312を含む導光層313と、第1の光電変換部315及び第2の光電変換部316を含む受光層314と、で構成されている。
 導光層313において、マイクロレンズ311は、画素へ入射した光束を第1の光電変換部315及び第2の光電変換部316に効率よく導くよう構成されている。またカラーフィルタ312は、所定の波長帯域の光を通過させるものであり、上述したR、G、Bのいずれかの波長帯の光のみを通過させ、後段の第1の光電変換部315及び第2の光電変換部316に導く。
 受光層314には、受光した光をアナログ画像信号に変換する2つの光電変換部(第1の光電変換部315と第2の光電変換部316)が設けられており、これら2つの光電変換部から出力された2種類の信号が測距に用いられる。即ち、撮像素子31の各画素は、同様に水平方向に並んだ2つの光電変換部を有しており、全画素のうちの第1の光電変換部315から出力された信号で構成された画像信号と、第2の光電変換部316から出力された信号で構成される画像信号が用いられる。つまり、第1の光電変換部315と第2の光電変換部316とは、画素に対してマイクロレンズ311を介して入光する光束を、それぞれ部分的に受光する。よってに、最終的に得られる2種類の画像信号は、撮像光学系30の射出瞳の異なる領域を通過した光束に係る瞳分割画像群となる。ここで、各画素で第1の光電変換部315と第2の光電変換部316とが光電変換した画像信号を合成したものは、画素に1つの光電変換部のみが設けられている態様において該1つの光電変換部から出力される画像信号(鑑賞用)と等価である。
 このような構造を有することで、本実施形態の撮像素子31は、鑑賞用画像信号と測距用画像信号(2種類の瞳分割画像)とを出力することが可能となっている。なお、本実施形態では、撮像素子31の全ての画素が2つの光電変換部を備え、高密度な深度情報を出力可能に構成されているものであるとして説明するが、本発明の実施はこれに限られるものではない。また、第1の光電変換部315のみを有する測距用画素と、第2の光電変換部316のみを有する測距用画素を撮像素子31の一部に設け、これらの画素からの信号を用いて撮像面位相差方式の測距を行ってもよい。
 <撮像面位相差測距方式の測距原理>
 ここで、本実施形態の撮像装置300で行われる、第1の光電変換部315及び第2の光電変換部316から出力された瞳分割画像群に基づいて、被写体距離を算出する原理について、図12を参照して説明する。
 図12Aは、撮像光学系30の射出瞳30bと、撮像素子31中の画素の第1の光電変換部315に受光する光束を示した概略図である。図12Bは同様に第2の光電変換部316に受光する光束を示した概略図である。
 図12A及び図12Bに示したマイクロレンズ311は、射出瞳30bと受光層314とが光学的に共役関係になるように配置されている。撮像光学系30の射出瞳30bを通過した光束は、マイクロレンズ311により集光されて第1の光電変換部315または第2の光電変換部316に導かれる。この際、第1の光電変換部315と第2の光電変換部316にはそれぞれ図12A及び図12Bに示される通り、異なる瞳領域を通過した光束を主に受光する。第1の光電変換部315には第1の瞳領域330を通過した光束、第2の光電変換部316には第2の瞳領域330を通過した光束となる。
 撮像素子31が備える複数の第1の光電変換部315は、第1の瞳領域320を通過した光束を主に受光し、第1の画像信号を出力する。また、同時に撮像素子31が備える複数の第2の光電変換部316は、第2の瞳領域330を通過した光束を主に受光し、第2の画像信号を出力する。第1の画像信号から第1の瞳領域320を通過した光束が撮像素子31上に形成する像の強度分布を得ることができる。また、第2の画像信号から第2の瞳領域330を通過した光束が、撮像素子31上に形成する像の強度分布を得ることができる。
 第1の画像信号と第2の画像信号間の相対的な位置ズレ量(所謂、視差量)は、デフォーカス量に応じた値となる。視差量とデフォーカス量との関係について、図12C、図12D、図12Eを用いて説明する。図12C、図12D、図12Eは本実施形態の撮像素子31、撮像光学系30について説明した概略図である。図中の第1の光束321は、第1の瞳領域320を通過する光束であり、第2の光束331は第2の瞳領域330を通過する光束である。
 図12Cは合焦時の状態を示しており、第1の光束321と第2の光束331が撮像素子31上で収束している。このとき、第1の光束321により形成される第1の画像信号と第2の光束331により形成される第2の画像信号間との視差量は0となる。図12Dは像側でz軸の負方向にデフォーカスした状態を示している。この時、第1の光束により形成される第1の画像信号と第2の信号により形成される第2の画像信号との視差量は0とはならず、負の値を有する。図12Eは、像側でz軸の正方向にデフォーカスした状態を示している。この時、第1の光束により形成される第1の画像信号と第2の光束により形成される第2の画像信号との視差量は正の値を有する。図12Dと図12Eの比較から、デフォーカス量の正負に応じて、位置ズレの方向が入れ替わることが分かる。また、デフォーカス量に応じて、撮像光学系の結像関係(幾何関係)に従って位置ズレが生じることが分かる。第1の画像信号と第2の画像信号との位置ズレである視差量は、後述する領域ベースのマッチング手法により検出することができる。
 <画像生成および深度画像生成処理>
 このような構成をもつ本実施形態の撮像装置300において実行される、撮影した被写体の画像生成および深度画像生成処理について、図13Aのフローチャートを用いて具体的な処理を説明する。
 ステップS331で、制御部32は、設定された焦点位置、絞り、露光時間等の撮影設定にて撮影を行うよう処理する。より詳しくは、制御部32は、撮像素子31に撮影を行わせ、得られた撮影画像を画像処理部33に伝送させ、メモリに格納させるよう制御する。ここで、撮影画像は、撮像素子31が有する第1の光電変換部315のみから出力された信号で構成された画像信号S1と、第2の光電変換部316のみから出力された信号で構成された画像信号S2の2種類であるものとする。
 ステップS332で、画像処理部33は、得られた撮影画像から鑑賞用画像を生成する。より詳しくは、画像処理部33のうちの画像生成部330は、まず画像信号S1と画像信号S2の各画素の画素値を加算することで、1つのベイヤー配列画像を生成する。画像生成部330は、該ベイヤー配列画像について、R、G、B各色の画像のデモザイキング処理を行い、鑑賞用画像を生成する。なお、デモザイキング処理は、撮像素子上に配置されたカラーフィルタに応じて行われるものであり、デモザイキング方法についていずれの方式が用いられるものであってもよい。このほか、画像生成部330は、ノイズ除去、輝度信号変換、収差補正、ホワイトバランス調整、色補正等の処理を行い、最終的な鑑賞用画像を生成してメモリに格納する。
 ステップS333で、画像処理部33は、得られた撮影画像から深度画像を生成する。深度画像については、深度生成部331が生成に係る処理を行う。ここで、深度画像生成に係る処理について、図13Bのフローチャートを用いて説明する。
 ステップS3331で、深度生成部331は、画像信号S1及び画像信号S2について、光量補正処理を行う。撮像光学系30の周辺画角ではヴィネッティングにより、第1の瞳領域320と第2の瞳領域330の形状が異なることに起因し、画像信号S1と画像信号S2の間では、光量バランスが崩れている。従って、本ステップにおいて、深度生成部331は、例えばメモリに予め格納されている光量補正値を用いて、画像信号S1と画像信号S2の光量補正を行う。
 ステップS3332で、深度生成部331は、撮像素子31における変換時に生じたノイズを低減する処理を行う。具体的には深度生成部331は、画像信号S1と画像信号S2に対して、フィルタ処理を適用することで、ノイズ低減を実現する。一般に、空間周波数が高い高周波領域ほどSN比が低くなり、相対的にノイズ成分が多くなる。従って、深度生成部331は、空間周波数が高いほど、通過率が低減するローパスフィルタを適用する処理を行う。なお、ステップS3331における光量補正は、撮像光学系30の製造誤差等によっては好適な結果とはならないため、深度生成部331は、直流成分を遮断し、かつ、高周波成分の通過率が低いバンドパスフィルタを適用することが好ましい。
 ステップS3333で、深度生成部331は、画像信号S1と画像信号S2に基づいて、これらの画像間の視差量を算出する。具体的には、深度生成部331は、画像信号S1内に、代表画素情報に対応した注目点と、該注目点を中心とする照合領域とを設定する。照合領域は、例えば、注目点を中心とした一辺が所定長さを有する正方領域等の矩形領域であってよい。次に深度生成部331は、画像信号S2内に参照点を設定し、該参照点を中心とする参照領域を設定する。参照領域は、上述した照合領域と同一の大きさおよび形状を有する。深度生成部331は、参照点を順次移動させながら、画像信号S1の照合領域内に含まれる画像と、画像信号S2の参照領域内に含まれる画像との相関度を算出し、最も相関度が高い参照点を、画像信号S2における、注目点に対応する対応点として特定する。このようにして特定された対応点と注目点との相対的な位置ズレ量が、注目点における視差量となる。
 深度生成部331は、このように注目点を代表画素情報に従って順次変更しながら視差量を算出することで、該代表画素情報によって定められた複数の画素位置における視差量を算出する。本実施形態では簡単のため、鑑賞用画像と同一の解像度で深度情報を得るべく、視差量を計算する画素位置(代表画素情報に含まれる画素群)は、鑑賞用画像と同数になるよう設定されているものとする。相関度の算出方法として、NCC(Normalized Cross-Correlation)やSSD(Sum of Squared Difference)、SAD(Sum of Absolute Difference)等の方法を用いてよい。
 また、算出された視差量は、所定の変換係数を用いることで、撮像素子31から撮像光学系30の焦点までの距離であるデフォーカス量に変換することができる。ここで、所定の変換係数K、デフォーカス量をΔLとすると、視差量は、
ΔL=K×d   式(1)
によって、デフォーカス量に変換できる。ここで、変換係数Kは絞り値、射出瞳距離、及び撮像素子31における像高等を含む情報に基づいて領域毎に設定されるものとする。
 深度生成部331は、このように算出したデフォーカス量を画素値とする2次元情報を構成し、深度画像としてメモリに格納する。
 ステップS334で層分割画像生成部332は、ステップS333で取得した深度情報に基づいてステップS332で取得した鑑賞用の画像情報を層分割し、層分割画像データを生成する処理を行う。層分割画像生成部332が実行する層分割画像生成処理は、第1実施形態の層分割画像生成部12が実行する層分割画像生成処理と同様であるため説明は省略する。尚、第2実施形態やその変形例で説明をした方法で層分割画像を生成してもよい。
 なお、本実施形態では、撮像素子31が撮像面位相差測距方式の光電変換素子を有し、鑑賞用画像と深度画像とを取得できるものとして説明したが、本発明の実施において、距離情報の取得はこれに限られるものではない。距離情報は、例えば両眼の撮像装置や複数の異なる撮像装置から得られた複数枚の撮影画像に基づいて、ステレオ測距方式で取得するものであってもよい。あるいは、例えば光照射部と撮像装置を用いたステレオ測距方式や、TOF(Time of Flight)方式と撮像装置の組み合わせによる方式等を用いて取得するものであってもよい。
 [第4実施形態]
 第1実施形態では、画像処理装置100が画像情報とそれに対応する深度情報とを外部から受け取り、入力された画像情報と深度情報とに基づいて層分割画像データを生成する形態について説明をした。本実施形態では、深度情報を画像処理装置100が生成する形態について説明をする。
 <画像処理装置100の構成>
 図14は、本実施形態の画像処理装置100の機能構成例を示すブロック図である。本実施形態の画像処理装置100は、画像処理部16が深度情報生成部17を有する点が第1実施形態の画像処理装置100と異なるが、その他の構成は第1実施形態の画像処理装置100と同様であるため説明を省略する。
 本実施形態の入力部11は、深度情報の代わりに、深度情報を生成するために必要な情報の入力を受ける。入力された情報は画像処理部16内の深度情報生成部17に送信される。本実施形態では、第3実施形態で説明をした、第1の光電変換部315のみから出力された信号で構成された画像信号S1と、第2の光電変換部316のみから出力された信号で構成された画像信号S2が入力される場合を例に説明をする。
 <深度情報生成処理>、
 深度情報生成部17は、画像信号S1と、画像信号S2とに基づいて深度情報を生成する。深度情報生成部17は、第3実施形態に係る撮像装置300が有する深度情報生成部331と同様に、図13Bのフローチャートに示した処理を行うことで深度情報を生成する。深度情報の生成方法の詳細は第3実施形態で説明したため省略する。
 [その他の実施形態]
 本発明は、上述の実施形態の1以上の機能を実現するプログラムを、ネットワーク又は記憶媒体を介してシステム又は装置に供給し、そのシステム又は装置のコンピュータにおける1つ以上のプロセッサがプログラムを読出し実行する処理でも実現可能である。また、1以上の機能を実現する回路(例えば、ASIC)によっても実現可能である。
 本発明は上記実施の形態に制限されるものではなく、本発明の精神及び範囲から離脱することなく、様々な変更及び変形が可能である。従って、本発明の範囲を公にするために以下の請求項を添付する。
 本願は、2020年2月26日提出の日本国特許出願特願2020-031080を基礎として優先権を主張するものであり、その記載内容の全てをここに援用する。

Claims (11)

  1.  画像データと、前記画像データに対応する深度情報とを取得する取得手段と、
     前記画像データを前記深度情報に基づいて、被写体距離に応じて複数の層に分割した層分割画像データを生成する画像処理手段と、
     前記層分割画像データを出力する出力手段と、を備え、
     前記層分割画像データは、被写体距離が第1の距離未満の被写体に対応する画像データを含む第1の層の画像データと、前記被写体距離が前記第1の距離以上の被写体に対応する画像データを含む第2の層の画像データとを含み、
     前記第1の距離は前記深度情報に基づいて変化することを特徴とする画像処理装置。
  2.  前記第2の画像データは、前記第1の画像データの少なくとも一部を含むことを特徴とすることを特徴とする請求項1に記載の画像処理装置。
  3.  前記第2の画像データは、前記第1の距離未満の被写体に対応する画像データと、前記第1の距離を超える被写体に対応する画像データとを含むことを特徴とする請求項2に記載の画像処理装置。
  4.  前記第1の層の画像データは、前記第1の距離未満の被写体に対応する画像データを含み、
     前記第2の画像データは前記第1の距離よりも小さい第2の距離以上、前記第1の距離未満の被写体に対応する画像データと、前記第1の距離以上の被写体に対応する画像データとを備えることを特徴とする請求項2に記載の画像処理装置。
  5.  前記画像処理装置は、
     前記深度情報のヒストグラムに基づいて前記第1の距離を決定することを特徴とする請求項1乃至4のいずれか1項に記載の画像処理装置。
  6.  前記画像処理手段は、
     画像データから、前記第1の距離未満の被写体に対応する画像データを抽出して前記第1の層の画像データを生成することを特徴とする請求項1乃至5のいずれか1項に記載の画像処理装置。
  7.  前記画像処理装置は、
     前記深度情報のヒストグラムにおいて第1の層に含まれる距離と第2の層に含まれる距離が重複するように分離することで前記第1の層の画像データと前記第2の層の画像データとを生成することを特徴とする請求項1乃至6のいずれか1項に記載の画像処理装置。
  8.  前記深度情報を取得する深度情報生成手段を備え、
     前記取得手段は、前記深度情報生成手段から前記深度情報を取得することを特徴とする請求項1乃至7のいずれか1項に記載の画像処理装置。
  9.  前記深度情報は、距離情報、デフォーカス情報、及び視差情報の少なくともいずれかを含むことを特徴とする請求項1乃至8のいずれか1項に記載の画像処理装置。
  10.  画像データと、前記画像データに対応する深度情報とを取得する取得工程と、
     前記画像データを前記深度情報に基づいて、被写体距離に応じて複数の層に分割した層分割画像データを生成する画像処理工程と、
     前記層分割画像データを出力する出力工程と、を有し、
     前記層分割画像データは、
     被写体距離が第1の距離未満の被写体に対応する画像データを含む第1の層の画像データと、前記被写体距離が前記第1の距離以上の被写体に対応する画像データを含む第2の層の画像データとを含み、
     前記第1の距離は前記深度情報に基づいて変化することを特徴とする画像処理方法。
  11.  請求項10に記載の画像処理方法の各工程をコンピュータに実行させるプログラム。
PCT/JP2021/004498 2020-02-26 2021-02-08 画像処理装置及びその制御方法並びにプログラム WO2021171980A1 (ja)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US17/819,743 US20220392092A1 (en) 2020-02-26 2022-08-15 Image processing apparatus, image processing method, and storage medium

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2020031080A JP2021135725A (ja) 2020-02-26 2020-02-26 画像処理装置及びその制御方法並びにプログラム
JP2020-031080 2020-02-26

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US17/819,743 Continuation US20220392092A1 (en) 2020-02-26 2022-08-15 Image processing apparatus, image processing method, and storage medium

Publications (1)

Publication Number Publication Date
WO2021171980A1 true WO2021171980A1 (ja) 2021-09-02

Family

ID=77490418

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2021/004498 WO2021171980A1 (ja) 2020-02-26 2021-02-08 画像処理装置及びその制御方法並びにプログラム

Country Status (3)

Country Link
US (1) US20220392092A1 (ja)
JP (1) JP2021135725A (ja)
WO (1) WO2021171980A1 (ja)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS63100898A (ja) * 1986-10-17 1988-05-02 Hitachi Ltd 立体テレビジヨン装置
JPH08136884A (ja) * 1994-11-04 1996-05-31 Matsushita Electric Ind Co Ltd 3次元画像表示装置
JP2001333438A (ja) * 2000-05-23 2001-11-30 Nippon Hoso Kyokai <Nhk> 立体表示装置
JP2019188855A (ja) * 2018-04-18 2019-10-31 株式会社東海理化電機製作所 車両用視認装置

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS63100898A (ja) * 1986-10-17 1988-05-02 Hitachi Ltd 立体テレビジヨン装置
JPH08136884A (ja) * 1994-11-04 1996-05-31 Matsushita Electric Ind Co Ltd 3次元画像表示装置
JP2001333438A (ja) * 2000-05-23 2001-11-30 Nippon Hoso Kyokai <Nhk> 立体表示装置
JP2019188855A (ja) * 2018-04-18 2019-10-31 株式会社東海理化電機製作所 車両用視認装置

Also Published As

Publication number Publication date
JP2021135725A (ja) 2021-09-13
US20220392092A1 (en) 2022-12-08

Similar Documents

Publication Publication Date Title
US9204067B2 (en) Image sensor and image capturing apparatus
JP5066851B2 (ja) 撮像装置
JP5825817B2 (ja) 固体撮像素子及び撮像装置
US9253390B2 (en) Image processing device, image capturing device, image processing method, and computer readable medium for setting a combination parameter for combining a plurality of image data
CN108462830B (zh) 摄像装置及摄像装置的控制方法
US10708486B2 (en) Generation of a depth-artificial image by determining an interpolated supplementary depth through interpolation based on the original depths and a detected edge
US9083879B2 (en) Focus detection apparatus, control method thereof, and image pickup apparatus
CN103688536B (zh) 图像处理装置、图像处理方法
JP2018107654A (ja) 画像処理装置および画像処理方法、プログラム、記憶媒体
KR20180123117A (ko) 화상 처리장치, 촬상장치 및 이들의 제어방법과, 기억매체
JP6003578B2 (ja) 画像生成方法及び装置
CN107960120B (zh) 图像处理设备、摄像设备、图像处理方法和存储介质
JP2021007247A (ja) 画像処理方法、画像処理装置、および、撮像装置
JP6700986B2 (ja) 画像処理装置、撮像装置、画像処理方法、及びプログラム
CN114424516A (zh) 图像处理装置、图像处理方法、摄像装置和程序
JP5348258B2 (ja) 撮像装置
JP6516510B2 (ja) 画像処理装置、撮像装置、画像処理方法、画像処理プログラム、および、記憶媒体
JP6976754B2 (ja) 画像処理装置および画像処理方法、撮像装置、プログラム
JP6168220B2 (ja) 画像生成装置、画像処理装置、画像生成方法及び画像処理プログラム
JP2019078965A (ja) 撮像装置および焦点検出方法
WO2021171980A1 (ja) 画像処理装置及びその制御方法並びにプログラム
JP6254843B2 (ja) 画像処理装置およびその制御方法
WO2021172019A1 (ja) 画像処理装置および画像処理装置の制御方法
JP2012124650A (ja) 撮像装置および撮像方法
JP6789810B2 (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: 21760131

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: 21760131

Country of ref document: EP

Kind code of ref document: A1