WO2020164044A1 - 一种自由视点的图像合成方法、装置及设备 - Google Patents

一种自由视点的图像合成方法、装置及设备 Download PDF

Info

Publication number
WO2020164044A1
WO2020164044A1 PCT/CN2019/075056 CN2019075056W WO2020164044A1 WO 2020164044 A1 WO2020164044 A1 WO 2020164044A1 CN 2019075056 W CN2019075056 W CN 2019075056W WO 2020164044 A1 WO2020164044 A1 WO 2020164044A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
color
depth map
map
color image
Prior art date
Application number
PCT/CN2019/075056
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 北京大学深圳研究生院
Priority to PCT/CN2019/075056 priority Critical patent/WO2020164044A1/zh
Priority to US16/610,296 priority patent/US11368661B2/en
Publication of WO2020164044A1 publication Critical patent/WO2020164044A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/50Image enhancement or restoration using two or more images, e.g. averaging or subtraction
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/77Retouching; Inpainting; Scratch removal
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/80Geometric correction
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/20Analysis of motion
    • G06T7/215Motion-based segmentation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N13/00Stereoscopic video systems; Multi-view video systems; Details thereof
    • H04N13/10Processing, recording or transmission of stereoscopic or multi-view image signals
    • H04N13/106Processing image signals
    • H04N13/111Transformation of image signals corresponding to virtual viewpoints, e.g. spatial image interpolation
    • H04N13/117Transformation of image signals corresponding to virtual viewpoints, e.g. spatial image interpolation the virtual viewpoint locations being selected by the viewers or determined by viewer tracking
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N13/00Stereoscopic video systems; Multi-view video systems; Details thereof
    • H04N13/10Processing, recording or transmission of stereoscopic or multi-view image signals
    • H04N13/106Processing image signals
    • H04N13/156Mixing image signals
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N13/00Stereoscopic video systems; Multi-view video systems; Details thereof
    • H04N13/30Image reproducers
    • H04N13/332Displays for viewing with the aid of special glasses or head-mounted displays [HMD]
    • H04N13/344Displays for viewing with the aid of special glasses or head-mounted displays [HMD] with head-mounted left-right displays
    • 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/10016Video; Image sequence
    • 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/20228Disparity calculation for image-based rendering
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N13/00Stereoscopic video systems; Multi-view video systems; Details thereof
    • H04N13/10Processing, recording or transmission of stereoscopic or multi-view image signals
    • H04N13/106Processing image signals
    • H04N13/122Improving the 3D impression of stereoscopic images by modifying image signal contents, e.g. by filtering or adding monoscopic depth cues
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N13/00Stereoscopic video systems; Multi-view video systems; Details thereof
    • H04N13/10Processing, recording or transmission of stereoscopic or multi-view image signals
    • H04N13/106Processing image signals
    • H04N13/128Adjusting depth or disparity
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N13/00Stereoscopic video systems; Multi-view video systems; Details thereof
    • H04N2013/0074Stereoscopic image analysis
    • H04N2013/0077Colour aspects

Definitions

  • This specification relates to the field of digital video processing technology, and in particular to a free-viewpoint image synthesis method, device and equipment.
  • the depth map constructed for the viewing scene has defects such as the edge of the depth map and the edge of the color map are not aligned, and the depth map has errors. Therefore, the existing depth image-based rendering (DIBR)
  • DIBR depth image-based rendering
  • the free viewpoint synthesis method cannot synthesize images well, and the synthesized images will have ghosts, holes, distortions and other problems.
  • the embodiments of this specification provide a free-viewpoint image synthesis method, device, and equipment, which are used to solve the following technical problems: able to better synthesize images, and eliminate or reduce problems such as ghosts, holes, and distortions in the synthesized images.
  • the first depth map is corrected to obtain a second depth map, wherein the first color map includes a left image and a right image, and the first depth map Including the left picture and the right picture;
  • the second depth map Based on the pose of the virtual viewpoint, forward projecting the second depth map to the position of the virtual viewpoint to obtain a third depth map, wherein the third depth map is a projection map at the position of the virtual viewpoint;
  • optical flow algorithm to correct the second color image to obtain a third color image, wherein the optical flow algorithm realizes alignment of the left image and the right image of the second color image;
  • the receiving device receives the first color map and the first depth map
  • a processing device for processing the first color map and the first depth map to synthesize an image
  • the output device outputs the composite image.
  • said processing the first color map and the first depth map to synthesize an image specifically includes:
  • the first depth map is corrected to obtain a second depth map, wherein the first color map includes a left image and a right image, and the first depth map Including the left picture and the right picture;
  • the second depth map Based on the pose of the virtual viewpoint, forward projecting the second depth map to the position of the virtual viewpoint to obtain a third depth map, wherein the third depth map is a projection map at the position of the virtual viewpoint;
  • optical flow algorithm to correct the second color image to obtain a third color image, wherein the optical flow algorithm realizes alignment of the left image and the right image of the second color image;
  • the embodiment of this specification also provides an electronic device, including:
  • At least one processor and,
  • a memory communicatively connected with the at least one processor; wherein,
  • the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor, so that the at least one processor can:
  • the first depth map is corrected to obtain a second depth map, wherein the first color map includes a left image and a right image, and the first depth map Including the left picture and the right picture;
  • the second depth map Based on the pose of the virtual viewpoint, forward projecting the second depth map to the position of the virtual viewpoint to obtain a third depth map, wherein the third depth map is a projection map at the position of the virtual viewpoint;
  • optical flow algorithm to correct the second color image to obtain a third color image, wherein the optical flow algorithm realizes alignment of the left image and the right image of the second color image;
  • the embodiment of the present specification also provides a computer-readable storage medium for storing a program, which is characterized in that, when the program is executed, image synthesis of free viewpoint is realized.
  • This embodiment uses methods such as depth map correction, optical flow algorithm correction, and weighted calculation to realize image synthesis of free viewpoints, which can achieve better synthesized images, obtain higher-quality synthesized images, and eliminate or reduce ghost images in synthesized images. , Voids, distortions and other issues.
  • FIG. 1 is a flowchart of a free-viewpoint image synthesis method provided by an embodiment of this specification
  • FIG. 2 is a schematic diagram of the edge alignment of the depth map and the color map provided by the embodiment of this specification;
  • FIG. 5 is a schematic diagram of a free-viewpoint image synthesis device provided by an embodiment of this specification.
  • Fig. 1 is a flowchart of a free-viewpoint image synthesis method provided by an embodiment of this specification, which specifically includes:
  • Step S101 Based on the input first color map and first depth map, correct the first depth map to obtain a second depth map.
  • the first color map and the first depth map are input at the same time.
  • the first color image includes a left image and a right image
  • the first depth image includes a left image and a right image, where the left image and the right image respectively represent images taken by the left and right imaging devices.
  • the imaging device can be, but is not limited to, a camera.
  • the first color map is an image captured by imaging devices with different poses
  • the first depth map is an image captured by imaging devices with different poses and/or a depth estimation algorithm. Image.
  • correcting the first depth map to obtain the second depth map specifically includes:
  • Extract the edge information of the first color map and the first depth map and expand the edge of the first depth map so that the edge of the first depth map is aligned with the edge of the first color map
  • the first depth map aligned with the edge of the first color map is smoothed to obtain a second depth map.
  • the Roberts Cross operator, Prewitt operator, Sobel operator, Kirsch operator, Laplacian operator, Canny operator and other methods can be used to extract the edge information of the first color map and the first depth map.
  • the edge extraction of the first color map and the first depth map is preferably the Canny operator.
  • the threshold value in the Canny operator function is set to 10 and 30 respectively.
  • the alignment of the edges of the first depth map and the first color map specifically includes:
  • the second detection of the foreground direction is to detect whether there is an edge of the first color image within a second threshold range along the foreground direction of the foreground edge of the first depth edge; if there is an edge of the first color image, then No expansion alignment is required; if there is no edge of the first color image, the foreground edge of the first depth image is replaced along the background direction with the nearest foreground depth value to replace the background depth value in the path until all The edges of the first color map are aligned with the edges of the first depth map.
  • the first detection is to initially screen whether the edge of the first depth map needs to be expanded and aligned, because the background direction of the foreground edge of the first depth map has the edge of the first color map, indicating the edge of the first depth map There may be a wrong edge area, and of course it may also belong to a correct edge.
  • the edge of the first color image found belongs to the foreground edge, so further detection is required.
  • the second detection of the foreground direction is to avoid setting the correct background edge as the foreground edge and to ensure the accuracy of edge extension alignment.
  • the foreground edge of the depth map is extended to the background direction, and the background depth value is replaced with the nearest foreground depth value until the edge of the color map.
  • the range of the first threshold and the second threshold mentioned in the method for aligning the edges of the first depth map and the first color map can be manually adjusted according to the image size.
  • the first threshold is preferably 20 pixels
  • the second threshold is preferably 20 pixels.
  • FIG. 2 is a schematic diagram of the edge alignment of the depth map and the color map provided by the embodiment of this specification.
  • le1 is the foreground edge
  • the edge alignment method of the first depth map and the first color map is used to find the edges le2 and le3 of the color map in the foreground and background directions.
  • the upper half of le1 has a background in the background direction and no foreground in the foreground direction, so it needs to be expanded;
  • the lower half of le1 has a background in the background direction and a foreground in the foreground direction, so no need to expand.
  • smoothing the first depth map aligned with the edge of the first color map to obtain the second depth map specifically includes:
  • the first depth map aligned with the edge of the first color map is detected line by line, and it is determined whether the edge of the first depth map aligned with the edge of the first color map exists Situations with large changes in depth;
  • the edge of the first depth map that is aligned with the edge of the first color image is linearly changed by using 3 pixels before and after to replace the original , Get the second depth map.
  • 10% of the maximum depth variation of the first depth map where the edges of the first color map are aligned may be used as the third threshold.
  • the depth distribution of the depth map is a change of the histogram, the depth value remains unchanged within a certain range.
  • the position x where the sudden change occurs can be considered. Take the 7 pixels between x-3 and x+3, and perform uniform sampling according to the depth value at position x-3 and the depth value at position x+3. Of course, you can choose between x-5 and x+5 The 11 pixels of the pixel are sampled in a similar way to achieve smoothing.
  • Step S103 Based on the pose of the virtual viewpoint, forward project the second depth map to the position of the virtual viewpoint to obtain a third depth map.
  • the virtual viewpoint position is the position that the viewer wants to watch, and the virtual viewpoint position can be artificially fixed.
  • the virtual viewpoint position is preferably located between a plurality of imaging devices.
  • the third depth map obtained by this method often has cracks. Therefore, filtering processing is further performed.
  • a median filtering method is used for filtering processing.
  • Step S105 Based on the third depth map, back-project the left and right color images closest to the virtual view point position in the first color image to the virtual view point position to obtain a second color image.
  • the second color image obtained in this step may have image information gaps, so it is necessary to further complement the missing image information of the left image and the right image of the second color image;
  • Step S107 Use an optical flow algorithm to correct the second color image to obtain a third color image.
  • the second depth map is forward-projected to obtain the third depth map, and thus the second color image is obtained through back projection. Because the left and right images of the second depth map may have errors, There may be misalignment between the obtained second color images, and the misalignment cannot be ignored. Therefore, the present invention uses the optical flow algorithm to correct the second color image obtained above to obtain the third color image. Specific steps are as follows:
  • Step S109 Perform weighting calculation on the third color image to obtain a composite image.
  • the third depth map obtained by the method of step S107 is in the calibration position, and the weighted calculation is further performed to obtain the composite image, specifically:
  • a weighted calculation is performed to obtain a composite image.
  • the weighting calculation method is preferably the alpha blending algorithm.
  • FIG. 3 is the position of the virtual view point relative to the left and right images provided by the embodiment of this specification. Specifically, the virtual view point position and the left image and the third color image of the third color image are used. The positional relationship of the right image of, the weight of the left image of the third color image and the weight of the right image of the third color image are determined, and the composite image is obtained by weighting calculation.
  • the image repair algorithm is preferably the FMM algorithm (based on fast-moving repair algorithm). The idea of this algorithm is to first process the pixels on the edge of the area to be repaired, and then advance inward layer by layer until the repair is completed. All pixels.
  • the edges of the repaired composite image may vary greatly, so further smoothing processing is required. Specifically, the edge area of the third depth map in the repaired composite image is extracted, and the edge area of the third depth map is median filtered; the edge area of the repaired composite image is extracted, and the edge area of the composite image is extracted. Perform Gaussian blur to obtain a composite image with smooth edges.
  • FIG. 4 is a system framework diagram of a free-viewpoint image synthesis method provided by an embodiment of the specification.
  • the method provided by the embodiments of the present specification can be used to handle the situation where multiple imaging devices are placed horizontally, or the situation where multiple imaging devices are arranged in a ring.
  • Using the method provided in the embodiments of this specification to synthesize images can better synthesize images and obtain higher-quality synthetic images, and eliminate or reduce problems such as ghost images, voids, and distortions in the synthetic images.
  • Fig. 5 is a schematic diagram of a free-viewpoint image synthesis device provided by an embodiment of this specification, which specifically includes:
  • the receiving device 501 receives the first color map and the first depth map
  • the output device 505 outputs the composite image.
  • an electronic device including:
  • At least one processor and,
  • a memory communicatively connected with the at least one processor; wherein,
  • the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor, so that the at least one processor can realize image synthesis.
  • the embodiments of this specification also provide a computer-readable storage medium for storing a program, which is characterized in that image synthesis can be realized when the program is executed.
  • the device, electronic device, non-volatile computer storage medium and method provided in the embodiments of this specification correspond to each other. Therefore, the device, electronic device, and non-volatile computer storage medium also have beneficial technical effects similar to the corresponding method.
  • the beneficial technical effects of the method have been described in detail above, therefore, the beneficial technical effects of the corresponding device, electronic equipment, and non-volatile computer storage medium will not be repeated here.
  • a programmable logic device Programmable Logic Device, PLD
  • FPGA Field Programmable Gate Array
  • HDL Hardware Description Language
  • the controller can be implemented in any suitable manner.
  • the controller can take the form of, for example, a microprocessor or a processor and a computer-readable medium storing computer-readable program codes (such as software or firmware) executable by the (micro)processor. , Logic gates, switches, application specific integrated circuits (ASICs), programmable logic controllers and embedded microcontrollers.
  • controllers include but are not limited to the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20 and Silicon Labs C8051F320, the memory controller can also be implemented as a part of the memory control logic.
  • controller in addition to implementing the controller in a purely computer-readable program code manner, it is entirely possible to program the method steps to make the controller use logic gates, switches, application specific integrated circuits, programmable logic controllers and embedded The same function can be realized in the form of a microcontroller, etc. Therefore, such a controller can be regarded as a hardware component, and the devices included in it for implementing various functions can also be regarded as a structure within the hardware component. Or even, the device for realizing various functions can be regarded as both a software module for realizing the method and a structure within a hardware component.
  • a typical implementation device is a computer.
  • the computer may be, for example, a personal computer, a laptop computer, a cell phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or Any combination of these devices.
  • the embodiments of this specification can be provided as methods, systems, or computer program products. Therefore, the embodiments of this specification may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the embodiments of this specification may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
  • computer-usable storage media including but not limited to disk storage, CD-ROM, optical storage, etc.
  • These computer program instructions can also be stored in a computer-readable memory that can guide a computer or other programmable data processing equipment to work in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture including the instruction device.
  • the device implements the functions specified in one process or multiple processes in the flowchart and/or one block or multiple blocks in the block diagram.
  • These computer program instructions can also be loaded on a computer or other programmable data processing equipment, so that a series of operation steps are executed on the computer or other programmable equipment to produce computer-implemented processing, so as to execute on the computer or other programmable equipment.
  • the instructions provide steps for implementing functions specified in a flow or multiple flows in the flowchart and/or a block or multiple blocks in the block diagram.
  • the computing device includes one or more processors (CPU), input/output interfaces, network interfaces, and memory.
  • processors CPU
  • input/output interfaces network interfaces
  • memory volatile and non-volatile memory
  • the memory may include non-permanent memory in computer readable media, random access memory (RAM) and/or non-volatile memory, such as read-only memory (ROM) or flash memory (flash RAM). Memory is an example of computer readable media.
  • RAM random access memory
  • ROM read-only memory
  • flash RAM flash memory
  • Computer-readable media include permanent and non-permanent, removable and non-removable media, and information storage can be realized by any method or technology.
  • the information can be computer-readable instructions, data structures, program modules, or other data.
  • Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, CD-ROM, digital versatile disc (DVD) or other optical storage, Magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media can be used to store information that can be accessed by computing devices. According to the definition in this article, computer-readable media does not include transitory media, such as modulated data signals and carrier waves.
  • program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types.
  • the instructions can also be practiced in distributed computing environments, in which tasks are performed by remote processing devices connected through a communication network.
  • program modules can be located in local and remote computer storage media including storage devices.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Image Processing (AREA)

Abstract

本说明书实施例公开了一种自由视点的图像合成方法、装置及设备。所述方法包括:基于输入的第一彩色图和第一深度图,将所述第一深度图进行修正,获得第二深度图;基于虚拟视点的位姿,将所述第二深度图正向投影到虚拟视点位置,获得第三深度图;基于所述第三深度图,将所述第一彩色图中距离虚拟视点位置最近的左右两张彩色图反向投影到虚拟视点位置,获得第二彩色图;利用光流算法,校正所述第二彩色图,得到第三彩色图;将所述第三彩色图进行加权计算,得到合成图像。

Description

一种自由视点的图像合成方法、装置及设备 技术领域
本说明书涉及数字视频处理技术领域,尤其涉及一种自由视点的图像合成方法、装置及设备。
背景技术
随着信息科技的发展,人们对视频的观看要求越来越高,传统的提供单一观看视角的播放方式,已无法满足观看者的多视角观看需求。因此,自由视点合成技术应运而生,以适应新一代电视视频播放技术的发展。
现有技术中,针对观看场景构建的深度图存在诸如深度图边缘与彩色图边缘没有对齐、深度图存在误差等缺陷,因此,现有的基于深度图的渲染(Depth Image-based Rendering,DIBR)的自由视点合成方法,不能较好的合成图像,合成的图像会出现鬼影、空洞、扭曲等问题。
基于现有技术,需要一种新的自由视点的图像合成方法,能够较好的合成图像,排除或减少合成图像中出现鬼影、空洞、扭曲等问题。
发明内容
本说明书实施例提供一种自由视点的图像合成方法、装置及设备,用于解决以下技术问题:能够较好的合成图像,排除或减少合成图像中出现鬼影、空洞、扭曲等问题。
为解决上述技术问题,本说明书实施例是这样实现的:
本说明书实施例提供的一种自由视点的图像合成方法,包括:
基于输入的第一彩色图和第一深度图,将所述第一深度图进行修正,获得第二深度图,其中,所述第一彩色图包括左图和右图,所述第一深度图包括左 图和右图;
基于虚拟视点的位姿,将所述第二深度图正向投影到虚拟视点位置,获得第三深度图,其中,所述第三深度图是位于所述虚拟视点位置的投影图;
基于所述第三深度图,将所述第一彩色图中距离虚拟视点位置最近的左右两张彩色图反向投影到虚拟视点位置,获得第二彩色图,其中,所述第二彩色图是所述第一彩色图位于所述虚拟视点位置的投影图;
利用光流算法,校正所述第二彩色图,得到第三彩色图,其中,所述光流算法实现对所述第二彩色图的左图和右图进行对齐;
将所述第三彩色图进行加权计算,得到合成图像。
本说明书实施例提供的一种自由视点的图像合成装置,包括:
接收装置,接收第一彩色图和第一深度图;
处理装置,对所述第一彩色图和所述第一深度图进行处理,合成图像;
输出装置,输出所述合成图像。
优选地,所述对所述第一彩色图和所述第一深度图进行处理,合成图像,具体包括:
基于输入的第一彩色图和第一深度图,将所述第一深度图进行修正,获得第二深度图,其中,所述第一彩色图包括左图和右图,所述第一深度图包括左图和右图;
基于虚拟视点的位姿,将所述第二深度图正向投影到虚拟视点位置,获得第三深度图,其中,所述第三深度图是位于所述虚拟视点位置的投影图;
基于所述第三深度图,将所述第一彩色图中距离虚拟视点位置最近的左右两张彩色图反向投影到虚拟视点位置,获得第二彩色图,其中,所述第二彩色图是所述第一彩色图位于所述虚拟视点位置的投影图;
利用光流算法,校正所述第二彩色图,得到第三彩色图,其中,所述光流算法实现对所述第二彩色图的左图和右图进行对齐;
将所述第三彩色图进行加权计算,得到合成图像。
本说明书实施例还提供一种电子设备,包括:
至少一个处理器;以及,
与所述至少一个处理器通信连接的存储器;其中,
所述存储器存储有可被所述至少一个处理器执行的指令,所述指令被所述至少一个处理器执行,以使所述至少一个处理器能够:
基于输入的第一彩色图和第一深度图,将所述第一深度图进行修正,获得第二深度图,其中,所述第一彩色图包括左图和右图,所述第一深度图包括左图和右图;
基于虚拟视点的位姿,将所述第二深度图正向投影到虚拟视点位置,获得第三深度图,其中,所述第三深度图是位于所述虚拟视点位置的投影图;
基于所述第三深度图,将所述第一彩色图中距离虚拟视点位置最近的左右两张彩色图反向投影到虚拟视点位置,获得第二彩色图,其中,所述第二彩色图是所述第一彩色图位于所述虚拟视点位置的投影图;
利用光流算法,校正所述第二彩色图,得到第三彩色图,其中,所述光流算法实现对所述第二彩色图的左图和右图进行对齐;
将所述第三彩色图进行加权计算,得到合成图像。
本说明书实施例还提供一种计算机可读存储介质,用于存储程序,其特征在于,所述程序被执行时,实现自由视点的图像合成。
本说明书实施例采用的上述至少一个技术方案能够达到以下有益效果:
本实施例通过修正深度图、光流算法校正、加权计算等方法,实现自由视点的图像合成,能够实现较好的合成图像,得到较高质量的合成图像,排除或减少合成图像中出现鬼影、空洞、扭曲等问题。
附图说明
为了更清楚地说明本说明书实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描 述中的附图仅仅是本说明书中记载的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。
图1为本说明书实施例提供的一种自由视点的图像合成方法的流程图;
图2为本说明书实施例提供的深度图和彩色图的边缘对齐的示意图;
图3为本说明书实施例提供的虚拟视点位置相对于左右图的位置;
图4为本说明书实施例提供的一种自由视点的图像合成方法的系统框架图;
图5为本说明书实施例提供的一种自由视点的图像合成装置的示意图。
具体实施方式
为了使本技术领域的人员更好地理解本说明书中的技术方案,下面将结合本说明书实施例中的附图,对本说明书实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。基于本说明书实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都应当属于本申请保护的范围。
在自由视点合成技术中,深度图像的质量直接影响合成图像的效果。对于诸如深度图的边缘和彩色图的边缘不对应、深度图的深度分布不均匀等低质量深度图,应用于基于DIBR的自由视点图像合成中,采用现有技术不能较好的合成图像,会出现诸如鬼影、空洞、扭曲等问题。因此,本发明提供一种新的图像合成方法,具体如图1所示。图1为本说明书实施例提供的一种自由视点的图像合成方法的流程图,具体包括:
步骤S101:基于输入的第一彩色图和第一深度图,将所述第一深度图进行修正,获得第二深度图。
在本说明书的一个实施例中,同时输入第一彩色图和第一深度图。需要特别说明的是,第一彩色图包括左图和右图,第一深度图包括左图和右图,其中,左图和右图分别表示左右成像设备拍摄的图像。需要特别说明的是,成像设备 可以为但不限于:相机。
在本说明书的一个实施例中,第一彩色图为利用不同位姿的成像设备拍摄得到的图像,第一深度图为利用不同位姿的成像设备拍摄得到的图像和/或利用深度估计算法得到的图像。
在本说明书的一个实施例中,对第一深度图进行修正,获得第二深度图,具体包括:
提取第一彩色图和第一深度图的边缘信息,将第一深度图的边缘进行扩展,使第一深度图的边缘与第一彩色图的边缘对齐;
将与第一彩色图的边缘对齐的第一深度图进行平滑处理,得到第二深度图。
在具体实施过程中,提取第一彩色图和第一深度图的边缘信息可以采用Roberts Cross算子、Prewitt算子、Sobel算子、Kirsch算子、Laplacian算子,Canny算子等多种方法,在本说明书的一个实施例中,第一彩色图和第一深度图的边缘提取优选Canny算子。利用Canny算子检测彩色图和深度图的边缘时,为避免边缘纹理过多,在具体实施过程中,Canny算子函数中,阈值分别设置为10和30。
在本说明书的一个实施例中,第一深度图和第一彩色图的边缘对齐,具体包括:
提取所述第一彩色图和所述第一深度图的边缘,以所述第一彩色图的边缘作为参考,检测所述第一深度图边缘的前景边缘和背景边缘;
第一次检测背景方向,沿所述第一深度边缘的前景边缘的背景方向,检测第一阈值范围内是否存在所述第一彩色图的边缘;若不存在所述第一彩色图的边缘,则不需要进行扩展对齐;若存在所述第一彩色图的边缘,则进行第二次检测;
第二次检测前景方向,沿所述第一深度边缘的前景边缘的前景方向,检测第二阈值范围内是否存在所述第一彩色图的边缘;若存在所述第一彩色图的边 缘,则不需要进行扩展对齐;若不存在所述第一彩色图的边缘,则将所述第一深度图的前景边缘,沿背景方向,用最近的前景深度值替换路径中的背景深度值,直到所述第一彩色图边缘,使所述第一深度图的边缘与所述第一彩色图的边缘对齐。
需要特别说明的是第一次检测是为了初步筛选第一深度图的边缘是否需要扩展对齐,因为第一深度图的前景边缘的背景方向存在第一彩色图的边缘,说明第一深度图的边缘有可能存在错误边缘区域,当然也有可能属于正确边缘,找到的第一彩色图的边缘属于前景边缘,因此需要进一步进行检测。第二次检测前景方向是为了避免将正确的背景边缘设置为前景边缘,保证边缘扩展对齐的准确性。在具体实施过程中,将深度图的前景边缘向背景方向中进行扩展,用最近的前景深度值替换背景深度值,直到彩色图的边缘。
在本说明书的一个实施例中,前述第一深度图和第一彩色图的边缘对齐的方法中提到的第一阈值和第二阈值的范围可以根据图像尺寸手动进行调节,在本说明书的一个实施例中,第一阈值优选20个像素,第二阈值优选20个像素。
为便于理解深度图和彩色图的边缘对齐,详细如图2所示。图2为本说明书实施例提供的深度图和彩色图的边缘对齐的示意图。在示意图中,le1为前景边缘,采用上述第一深度图和第一彩色图的边缘对齐的方法,在前景方向、背景方向中寻找彩色图的边缘le2和le3。如示意图中所示,le1的上半段在背景方向存在背景且前景方向不存在前景,因此需要进行扩展;le1的下半段在背景方向存在背景且前景方向存在前景,因此不需要进行扩展。
在本说明书的一个实施例中,将与所述第一彩色图的边缘对齐的第一深度图进行平滑处理,得到第二深度图,具体包括:
根据第三阈值,对所述与所述第一彩色图的边缘对齐的第一深度图逐行进行检测,判断所述与所述第一彩色图的边缘对齐的第一深度图的边缘是否存在深度变化较大的情况;
若所述深度变化超过所述第三阈值,将所述与所述第一彩色图的边缘对齐 的第一深度图的深度变化较大的边缘,利用前后3个像素做线性变化,以替换原始的像素值,得到第二深度图。
需要特别说明的是,可以将第一彩色图的边缘对齐的第一深度图的最大深度变化量的10%作为第三阈值。另外,由于深度图的深度分布是一种直方图的变化,因此在一定范围内,深度值保持不变。在对图像进行平滑处理时,若深度图的深度值变化过大,如从1突然变为10,可以考虑突变发生的位置x。取在x-3和x+3之间的7个像素中,根据x-3位置的深度值和x+3位置的深度值进行均匀采样,当然可以选择在x-5到x+5之间的11个像素,采用类似的方法进行采样,实现平滑处理。
步骤S103:基于虚拟视点的位姿,将所述第二深度图正向投影到虚拟视点位置,获得第三深度图。
需要说明的是,虚拟视点位置是观看者想观看的位置,可以由人为固定虚拟视点位置。虚拟视点位置优选位于多个成像设备之间。
采用该方法获得的第三深度图,往往会存在裂纹,因此,进一步进行滤波过滤处理,在本说明书的一个实施例中,采用中值滤波过滤的方法进行过滤处理。
步骤S105:基于所述第三深度图,将所述第一彩色图中距离虚拟视点位置最近的左右两张彩色图反向投影到虚拟视点位置,获得第二彩色图。
本步骤中获得的第二彩色图会存在图像信息空缺,因此需要进一步将第二彩色图的左图和右图中空缺的图像信息,进行相互补全;
若第二彩色图的左图和右图中的任一一侧的某位置是空的,而对侧的对应位置是有颜色的,则将第二彩色图的对侧的对应位置的颜色赋值给一侧;
若第二彩色图的左图和右图中的任一一侧的某位置是空的,而对侧的对应位置亦是空的,则第二彩色图的两侧均不进行赋值。
步骤S107:利用光流算法,校正所述第二彩色图,得到第三彩色图。
基于前述步骤S103和步骤S105,第二深度图正向投影得到第三深度图, 并由此通过反向投影得到第二彩色图,由于第二深度图的左图和右图可能存在误差,因此得到的第二彩色图之间可能存在错位,该错位不可被忽视。因此,本发明采用光流算法,对前述得到的第二彩色图进行校正,得到第三彩色图。具体步骤如下:
基于光流算法,计算所述第二彩色图的左图相对右图的偏移及所述第二彩色图的右图相对于左图的偏移;
基于虚拟视点位置,计算所述第二彩色图的左图相对右图的校准偏移及所述第二彩色图的右图相对于左图的校准偏移;
基于所述第二彩色图的左图相对右图的校准偏移及所述第二彩色图的右图相对于左图的校准偏移移动所述第二彩色图的左图和/或右图,得到第三彩色图。
在本说明书的一个实施例中,采用Deep Flow光流算法,计算第二彩色图的左图的光流偏移f1及第二彩色图的右图的光流偏移f2;然后根据虚拟视点位置相对于第二彩色图的左图与右图的位置的比例I1/(I1+I2)与I2/(I1+I2),得到左图的偏移量为LR=f1*(I1/(I1+I2))及右图的偏移量为RL=f2*(I2/(I1+I2)),根据左图和右图的偏移量对第二彩色图的左图和/或右图进行移动。具体地,将左图中的像素(xi,yi)移动到(xi+LRx,yi+LRy),将右图中的像素(xi,yi)移动到(xi+RLx,yi+RLy),从而得到第三彩色图。
步骤S109:将所述第三彩色图进行加权计算,得到合成图像。
采用前述步骤S107的方法得到的第三深度图处于校准位置,进一步进行加权计算,即可得到合成图像,具体地:
基于所述第三彩色图的左图和右图的位置及所述虚拟视点位置,确定所述第三彩色图的左图权重和右图的权重,其中,所述第三彩色图的左图权重和右图的权重是基于所述虚拟视点位置的权重;
根据所述第三彩色图的左图的权重和右图的权重,进行加权计算,得到合成图像。
需要特别说明的是,加权计算方法优选alpha blending算法。
为便于理解本说明书实施例的加权计算,图3为本说明书实施例提供的虚拟视点位置相对于左右图的位置,具体地,利用虚拟视点位置与第三彩色图的左图和第三彩色图的右图的位置关系,确定第三彩色图的左图权重与第三彩色图的右图权重,通过加权计算,得到合成图像。
由于合成图像中,可能会存在局部空缺,因此,需要进一步采用图像修补算法对合成图像进行修补,以填补合成图像中存在的局部空缺。在本说明书的一个实施例中,图像修补算法优选FMM算法(基于快速行进的修复算法),该算法的思路是先处理待修复区域边缘上的像素点,然后层层向内推进,直到修复完所有的像素点。
经过修补的合成图像的边缘可能存在变化较大的情况,因此需要进一步进行平滑处理。具体地,提取经过修补的合成图像中的第三深度图的边缘区域,对第三深度图的边缘区域进行中值滤波;提取经过修补的合成图像的边缘区域,对所述合成图像的边缘区域进行高斯模糊,从而得到边缘平滑的合成图像。
基于上述方法,本说明书实施例提供的图像合成方法,可用图4所示表示。图4为本说明书实施例提供的一种自由视点的图像合成方法的系统框架图。
需要特别说明的是,采用本说明书实施例提供的方法,既可以处理水平放置的多个成像设备的情况,也可以处理多个成像设备呈环形排列的情况。
采用本说明书实施例提供的方法合成图像,能够较好的合成图像,得到较高质量的合成图像,排除或减少合成图像中出现鬼影、空洞、扭曲等问题。
上述内容详细提供了一种自由视点的图像合成方法,与之对应的,本申请还提供了一种自由视点的图像合成装置。图5为本说明书实施例提供的一种自由视点的图像合成装置的示意图,具体包括:
接收装置501,接收第一彩色图和第一深度图;
处理装置503,对所述第一彩色图和所述第一深度图进行处理,合成图像;
输出装置505,输出所述合成图像。
基于同样的思路,本说明书实施例还提供了一种电子设备,包括:
至少一个处理器;以及,
与所述至少一个处理器通信连接的存储器;其中,
所述存储器存储有可被所述至少一个处理器执行的指令,所述指令被所述至少一个处理器执行,以使所述至少一个处理器能够实现图像合成。
基于同样的思路,本说明书实施例还提供了一种计算机可读存储介质,用于存储程序,其特征在于,所述程序被执行时能够实现图像合成。
上述对本说明书特定实施例进行了描述。其它实施例在所附权利要求书的范围内。在一些情况下,在权利要求书中记载的动作或步骤可以按照不同于实施例中的顺序来执行并且仍然可以实现期望的结果。另外,在附图中描绘的过程不一定要求示出的特定顺序或者连续顺序才能实现期望的结果。在某些实施方式中,多任务处理和并行处理也是可以的或者可能是有利的。
本说明书中的各个实施例均采用递进的方式描述,各个实施例之间相同相似的部分互相参见即可,每个实施例重点说明的都是与其他实施例的不同之处。尤其,对于装置、电子设备、非易失性计算机存储介质实施例而言,由于其基本相似于方法实施例,所以描述的比较简单,相关之处参见方法实施例的部分说明即可。
本说明书实施例提供的装置、电子设备、非易失性计算机存储介质与方法是对应的,因此,装置、电子设备、非易失性计算机存储介质也具有与对应方法类似的有益技术效果,由于上面已经对方法的有益技术效果进行了详细说明,因此,这里不再赘述对应装置、电子设备、非易失性计算机存储介质的有益技术效果。
在20世纪90年代,对于一个技术的改进可以很明显地区分是硬件上的改进(例如,对二极管、晶体管、开关等电路结构的改进)还是软件上的改进(对于方法流程的改进)。然而,随着技术的发展,当今的很多方法流程的改进已经可以视为硬件电路结构的直接改进。设计人员几乎都通过将改进的方法流程 编程到硬件电路中来得到相应的硬件电路结构。因此,不能说一个方法流程的改进就不能用硬件实体模块来实现。例如,可编程逻辑器件(Programmable Logic Device,PLD)(例如现场可编程门阵列(Field Programmable Gate Array,FPGA))就是这样一种集成电路,其逻辑功能由用户对器件编程来确定。由设计人员自行编程来把一个数字系统“集成”在一片PLD上,而不需要请芯片制造厂商来设计和制作专用的集成电路芯片。而且,如今,取代手工地制作集成电路芯片,这种编程也多半改用“逻辑编译器(logic compiler)”软件来实现,它与程序开发撰写时所用的软件编译器相类似,而要编译之前的原始代码也得用特定的编程语言来撰写,此称之为硬件描述语言(Hardware Description Language,HDL),而HDL也并非仅有一种,而是有许多种,如ABEL(Advanced Boolean Expression Language)、AHDL(Altera Hardware Description Language)、Confluence、CUPL(Cornell University Programming Language)、HDCal、JHDL(Java Hardware Description Language)、Lava、Lola、MyHDL、PALASM、RHDL(Ruby Hardware Description Language)等,目前最普遍使用的是VHDL(Very-High-Speed Integrated Circuit Hardware Description Language)与Verilog。本领域技术人员也应该清楚,只需要将方法流程用上述几种硬件描述语言稍作逻辑编程并编程到集成电路中,就可以很容易得到实现该逻辑方法流程的硬件电路。
控制器可以按任何适当的方式实现,例如,控制器可以采取例如微处理器或处理器以及存储可由该(微)处理器执行的计算机可读程序代码(例如软件或固件)的计算机可读介质、逻辑门、开关、专用集成电路(Application Specific Integrated Circuit,ASIC)、可编程逻辑控制器和嵌入微控制器的形式,控制器的例子包括但不限于以下微控制器:ARC 625D、Atmel AT91SAM、Microchip PIC18F26K20以及Silicone Labs C8051F320,存储器控制器还可以被实现为存储器的控制逻辑的一部分。本领域技术人员也知道,除了以纯计算机可读程序代码方式实现控制器以外,完全可以通过将方法步骤进行逻辑编程来使得控制 器以逻辑门、开关、专用集成电路、可编程逻辑控制器和嵌入微控制器等的形式来实现相同功能。因此这种控制器可以被认为是一种硬件部件,而对其内包括的用于实现各种功能的装置也可以视为硬件部件内的结构。或者甚至,可以将用于实现各种功能的装置视为既可以是实现方法的软件模块又可以是硬件部件内的结构。
上述实施例阐明的系统、装置、模块或单元,具体可以由计算机芯片或实体实现,或者由具有某种功能的产品来实现。一种典型的实现设备为计算机。具体的,计算机例如可以为个人计算机、膝上型计算机、蜂窝电话、相机电话、智能电话、个人数字助理、媒体播放器、导航设备、电子邮件设备、游戏控制台、平板计算机、可穿戴设备或者这些设备中的任何设备的组合。
为了描述的方便,描述以上装置时以功能分为各种单元分别描述。当然,在实施本说明书一个或多个实施例时可以把各单元的功能在同一个或多个软件和/或硬件中实现。
本领域内的技术人员应明白,本说明书实施例可提供为方法、系统、或计算机程序产品。因此,本说明书实施例可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本说明书实施例可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。
本说明书是参照根据本说明书实施例的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。
在一个典型的配置中,计算设备包括一个或多个处理器(CPU)、输入/输出接口、网络接口和内存。
内存可能包括计算机可读介质中的非永久性存储器,随机存取存储器(RAM)和/或非易失性内存等形式,如只读存储器(ROM)或闪存(flash RAM)。内存是计算机可读介质的示例。
计算机可读介质包括永久性和非永久性、可移动和非可移动媒体可以由任何方法或技术来实现信息存储。信息可以是计算机可读指令、数据结构、程序的模块或其他数据。计算机的存储介质的例子包括,但不限于相变内存(PRAM)、静态随机存取存储器(SRAM)、动态随机存取存储器(DRAM)、其他类型的随机存取存储器(RAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、快闪记忆体或其他内存技术、只读光盘只读存储器(CD-ROM)、数字多功能光盘(DVD)或其他光学存储、磁盒式磁带,磁带磁磁盘存储或其他磁性存储设备或任何其他非传输介质,可用于存储可以被计算设备访问的信息。按照本文中的界定,计算机可读介质不包括暂存电脑可读媒体(transitory media),如调制的数据信号和载波。
还需要说明的是,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、商品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、 方法、商品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、商品或者设备中还存在另外的相同要素。
本说明书可以在由计算机执行的计算机可执行指令的一般上下文中描述,例如程序模块。一般地,程序模块包括执行特定任务或实现特定抽象数据类型的例程、程序、对象、组件、数据结构等等。也可以在分布式计算环境中实践说明书,在这些分布式计算环境中,由通过通信网络而被连接的远程处理设备来执行任务。在分布式计算环境中,程序模块可以位于包括存储设备在内的本地和远程计算机存储介质中。
本说明书中的各个实施例均采用递进的方式描述,各个实施例之间相同相似的部分互相参见即可,每个实施例重点说明的都是与其他实施例的不同之处。尤其,对于系统实施例而言,由于其基本相似于方法实施例,所以描述的比较简单,相关之处参见方法实施例的部分说明即可。
以上所述仅为本说明书实施例而已,并不用于限制本申请。对于本领域技术人员来说,本申请可以有各种更改和变化。凡在本申请的精神和原理之内所作的任何修改、等同替换、改进等,均应包含在本申请的权利要求范围之内。

Claims (21)

  1. 一种自由视点的图像合成方法,包括:
    基于输入的第一彩色图和第一深度图,将所述第一深度图进行修正,获得第二深度图,其中,所述第一彩色图包括左图和右图,所述第一深度图包括左图和右图;
    基于虚拟视点的位姿,将所述第二深度图正向投影到虚拟视点位置,获得第三深度图,其中,所述第三深度图是位于所述虚拟视点位置的投影图;
    基于所述第三深度图,将所述第一彩色图中距离虚拟视点位置最近的左右两张彩色图反向投影到虚拟视点位置,获得第二彩色图,其中,所述第二彩色图是所述第一彩色图位于所述虚拟视点位置的投影图;
    利用光流算法,校正所述第二彩色图,得到第三彩色图,其中,所述光流算法实现对所述第二彩色图的左图和右图进行对齐;
    将所述第三彩色图进行加权计算,得到合成图像。
  2. 如权利要求1所述的方法,所述方法进一步包括:
    采用图像修补算法对所述合成图像进行修补,以填补所述合成图像中存在的局部空缺。
  3. 如权利要求2所述的方法,所述方法进一步包括:
    对所述经过修补的合成图像进行平滑处理,使所述经过修补的合成图像的边缘平滑。
  4. 如权利要求1所述的方法,所述基于输入的第一彩色图和第一深度图,将所述第一深度图进行修正,获得第二深度图,具体包括:
    提取所述第一彩色图和所述第一深度图的边缘信息,将所述第一深度图的边缘进行扩展,使所述第一深度图的边缘与所述第一彩色图的边缘对齐;
    将与所述第一彩色图的边缘对齐的第一深度图进行平滑处理,得到第二深度图。
  5. 如权利要求4所述的方法,所述提取所述第一彩色图和所述第一深度图的边缘信息,将所述第一深度图的边缘进行扩展,使所述第一深度图的边缘与所述第一彩色图的边缘对齐,具体包括:
    提取所述第一彩色图和所述第一深度图的边缘,以所述第一彩色图的边缘作为参考,检测所述第一深度图边缘的前景边缘和背景边缘;
    第一次检测背景方向,沿所述第一深度边缘的前景边缘的背景方向,检测第一阈值范围内是否存在所述第一彩色图的边缘;若不存在所述第一彩色图的边缘,则不需要进行扩展对齐;若存在所述第一彩色图的边缘,则进行第二次检测;
    第二次检测前景方向,沿所述第一深度边缘的前景边缘的前景方向,检测第二阈值范围内是否存在所述第一彩色图的边缘;若存在所述第一彩色图的边缘,则不需要进行扩展对齐;若不存在所述第一彩色图的边缘,则将所述第一深度图的前景边缘,沿背景方向,用最近的前景深度值替换路径中的背景深度值,直到所述第一彩色图边缘,使所述第一深度图的边缘与所述第一彩色图的边缘对齐。
  6. 如权利要求4所述的方法,所述将与所述第一彩色图的边缘对齐的第一深度图进行平滑处理,得到第二深度图,具体包括:
    根据第三阈值,对所述与所述第一彩色图的边缘对齐的第一深度图逐行进行检测,判断所述与所述第一彩色图的边缘对齐的第一深度图的边缘是否存在深度变化较大的情况;
    若所述深度变化超过所述第三阈值,将所述与所述第一彩色图的边缘对齐的第一深度图的深度变化较大的边缘,利用前后3个像素做线性变化,以替换原始的像素值,得到第二深度图。
  7. 如权利要求1所述的方法,所述基于虚拟视点的位姿,将所述第二深度图正向投影到虚拟视点位置,获得第三深度图,进一步包括:
    将所述第三深度图进行滤波过滤。
  8. 如权利要求7所述的方法,所述滤波过滤优选中值滤波过滤。
  9. 如权利要求1所述的方法,所述基于所述第三深度图,将所述第一彩色图中距离虚拟视点位置最近的左右两张彩色图反向投影到虚拟视点位置,获得第二彩色图,进一步包括:
    将所述第二彩色图的左图和右图中空缺的图像信息,进行相互补全;
    若所述第二彩色图的左图和右图中的任一一侧的某位置是空的,而对侧的对应位置是有颜色的,则将所述第二彩色图的对侧的对应位置的颜色赋值给一侧;
    若所述第二彩色图的左图和右图中的任一一侧的某位置是空的,而对侧的对应位置亦是空的,则所述第二彩色图的两侧均不进行赋值。
  10. 如权利要求1所述的方法,所述利用光流算法,校正所述第二彩色图,得到第三彩色图,具体包括:
    基于光流算法,计算所述第二彩色图的左图相对右图的偏移及所述第二彩色图的右图相对于左图的偏移;
    基于虚拟视点位置,计算所述第二彩色图的左图相对右图的校准偏移及所述第二彩色图的右图相对于左图的校准偏移;
    基于所述第二彩色图的左图相对右图的校准偏移及所述第二彩色图的右图相对于左图的校准偏移移动所述第二彩色图的左图和/或右图,得到第三彩色图。
  11. 如权利要求1所述的方法,所述将所述第三彩色图进行加权计算,得到合成图像,具体包括:
    基于所述第三彩色图的左图和右图的位置及所述虚拟视点位置,确定所述第三彩色图的左图权重和右图的权重,其中,所述第三彩色图的左图权重和右图的权重是基于所述虚拟视点位置的权重;
    根据所述第三彩色图的左图的权重和右图的权重,进行加权计算,得到合成图像。
  12. 如权利要求11所述的方法,所述加权计算采用alpha blending算法。
  13. 如权利要求2所述的方法,所述图像修补算法优选FMM算法。
  14. 如权利要求3所述的方法,所述平滑处理方法具体包括:
    提取所述合成图像中的第三深度图的边缘区域,对所述第三深度图的边缘区域进行中值滤波;
    提取所述合成图像的边缘区域,对所述合成图像的边缘区域进行高斯模糊。
  15. 如权利要求1所述的方法,所述第一彩色图为利用不同位姿的成像设备拍摄得到的图像。
  16. 如权利要求1所述的方法,所述第一深度图为利用不同位姿的成像设备拍摄得到的图像和/或利用深度估计算法得到的图像。
  17. 如权利要求1所述的方法,所述虚拟视点的位置优选位于多个成像设备之间。
  18. 一种自由视点的图像合成的装置,包括:
    接收装置,接收第一彩色图和第一深度图;
    处理装置,对所述第一彩色图和所述第一深度图进行处理,合成图像;
    输出装置,输出所述合成图像。
  19. 如权利要求18所述的装置,所述对所述第一彩色图和所述第一深度图进行处理,合成图像,具体包括:
    基于输入的第一彩色图和第一深度图,将所述第一深度图进行修正,获得第二深度图,其中,所述第一彩色图包括左图和右图,所述第一深度图包括左图和右图;
    基于虚拟视点的位姿,将所述第二深度图正向投影到虚拟视点位置,获得第三深度图,其中,所述第三深度图是位于所述虚拟视点位置的投影图;
    基于所述第三深度图,将所述第一彩色图中距离虚拟视点位置最近的左右两张彩色图反向投影到虚拟视点位置,获得第二彩色图,其中,所述第二彩色 图是所述第一彩色图位于所述虚拟视点位置的投影图;
    利用光流算法,校正所述第二彩色图,得到第三彩色图,其中,所述光流算法实现对所述第二彩色图的左图和右图进行对齐;
    将所述第三彩色图进行加权计算,得到合成图像。
  20. 一种电子设备,包括:
    至少一个处理器;以及,
    与所述至少一个处理器通信连接的存储器;其中,
    所述存储器存储有可被所述至少一个处理器执行的指令,所述指令被所述至少一个处理器执行,以使所述至少一个处理器能够:
    基于输入的第一彩色图和第一深度图,将所述第一深度图进行修正,获得第二深度图,其中,所述第一彩色图包括左图和右图,所述第一深度图包括左图和右图;
    基于虚拟视点的位姿,将所述第二深度图正向投影到虚拟视点位置,获得第三深度图,其中,所述第三深度图是位于所述虚拟视点位置的投影图;
    基于所述第三深度图,将所述第一彩色图中距离虚拟视点位置最近的左右两张彩色图反向投影到虚拟视点位置,获得第二彩色图,其中,所述第二彩色图是所述第一彩色图位于所述虚拟视点位置的投影图;
    利用光流算法,校正所述第二彩色图,得到第三彩色图,其中,所述光流算法实现对所述第二彩色图的左图和右图进行对齐;
    将所述第三彩色图进行加权计算,得到合成图像。
  21. 一种计算机可读存储介质,用于存储程序,其特征在于,所述程序被执行时,实现权利要求1至17任一项所述的图像合成。
PCT/CN2019/075056 2019-02-14 2019-02-14 一种自由视点的图像合成方法、装置及设备 WO2020164044A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/CN2019/075056 WO2020164044A1 (zh) 2019-02-14 2019-02-14 一种自由视点的图像合成方法、装置及设备
US16/610,296 US11368661B2 (en) 2019-02-14 2019-02-14 Image synthesis method, apparatus and device for free-viewpoint

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2019/075056 WO2020164044A1 (zh) 2019-02-14 2019-02-14 一种自由视点的图像合成方法、装置及设备

Publications (1)

Publication Number Publication Date
WO2020164044A1 true WO2020164044A1 (zh) 2020-08-20

Family

ID=72043892

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/075056 WO2020164044A1 (zh) 2019-02-14 2019-02-14 一种自由视点的图像合成方法、装置及设备

Country Status (2)

Country Link
US (1) US11368661B2 (zh)
WO (1) WO2020164044A1 (zh)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113538318A (zh) * 2021-08-24 2021-10-22 北京奇艺世纪科技有限公司 图像处理方法、装置、终端设备以及可读存储介质
CN113837979A (zh) * 2021-09-28 2021-12-24 北京奇艺世纪科技有限公司 直播图像合成方法、装置、终端设备以及可读存储介质

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11640668B2 (en) 2021-06-10 2023-05-02 Qualcomm Incorporated Volumetric sampling with correlative characterization for dense estimation
CN115375884B (zh) * 2022-08-03 2023-05-30 北京微视威信息科技有限公司 自由视点合成的模型生成方法、图像绘制方法及电子设备

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103581648A (zh) * 2013-10-18 2014-02-12 清华大学深圳研究生院 绘制新视点中的空洞填补方法
US20140118482A1 (en) * 2012-10-26 2014-05-01 Korea Advanced Institute Of Science And Technology Method and apparatus for 2d to 3d conversion using panorama image
CN104780355A (zh) * 2015-03-31 2015-07-15 浙江大学 一种视点合成中基于深度的空洞修复方法
CN108259917A (zh) * 2016-12-28 2018-07-06 中国移动通信集团山东有限公司 基于深度时域下采样的三维视频编解码方法及系统
CN109194888A (zh) * 2018-11-12 2019-01-11 北京大学深圳研究生院 一种针对低质量深度图的dibr自由视点合成方法

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9846960B2 (en) * 2012-05-31 2017-12-19 Microsoft Technology Licensing, Llc Automated camera array calibration
US9736449B1 (en) * 2013-08-12 2017-08-15 Google Inc. Conversion of 2D image to 3D video
US10122992B2 (en) * 2014-05-22 2018-11-06 Disney Enterprises, Inc. Parallax based monoscopic rendering
US10931956B2 (en) * 2018-04-12 2021-02-23 Ostendo Technologies, Inc. Methods for MR-DIBR disparity map merging and disparity threshold determination
CN110889851B (zh) * 2018-09-11 2023-08-01 苹果公司 针对深度和视差估计的语义分割的稳健用途

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140118482A1 (en) * 2012-10-26 2014-05-01 Korea Advanced Institute Of Science And Technology Method and apparatus for 2d to 3d conversion using panorama image
CN103581648A (zh) * 2013-10-18 2014-02-12 清华大学深圳研究生院 绘制新视点中的空洞填补方法
CN104780355A (zh) * 2015-03-31 2015-07-15 浙江大学 一种视点合成中基于深度的空洞修复方法
CN108259917A (zh) * 2016-12-28 2018-07-06 中国移动通信集团山东有限公司 基于深度时域下采样的三维视频编解码方法及系统
CN109194888A (zh) * 2018-11-12 2019-01-11 北京大学深圳研究生院 一种针对低质量深度图的dibr自由视点合成方法

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113538318A (zh) * 2021-08-24 2021-10-22 北京奇艺世纪科技有限公司 图像处理方法、装置、终端设备以及可读存储介质
CN113538318B (zh) * 2021-08-24 2023-12-15 北京奇艺世纪科技有限公司 图像处理方法、装置、终端设备以及可读存储介质
CN113837979A (zh) * 2021-09-28 2021-12-24 北京奇艺世纪科技有限公司 直播图像合成方法、装置、终端设备以及可读存储介质
CN113837979B (zh) * 2021-09-28 2024-03-29 北京奇艺世纪科技有限公司 直播图像合成方法、装置、终端设备以及可读存储介质

Also Published As

Publication number Publication date
US11368661B2 (en) 2022-06-21
US20210368153A1 (en) 2021-11-25

Similar Documents

Publication Publication Date Title
WO2020164044A1 (zh) 一种自由视点的图像合成方法、装置及设备
US10580140B2 (en) Method and system of real-time image segmentation for image processing
CN110663245B (zh) 用于存储成像数据的重叠区以产生优化拼接图像的设备及方法
CN107925755B (zh) 针对图像处理进行平面表面检测的方法和系统
US9591237B2 (en) Automated generation of panning shots
KR101775253B1 (ko) 2차원 이미지 또는 비디오의 3차원 스테레오 이미지 또는 비디오로의 실시간 자동 변환
CN112104854A (zh) 相机视图之间的鲁棒虚拟视图生成的方法和系统
WO2017213923A1 (en) Multi-view scene segmentation and propagation
US20170228867A1 (en) Method and system of image segmentation refinement for image processing
WO2017151240A1 (en) Tracking regions of interest across video frames with corresponding depth maps
US10489897B2 (en) Apparatus and methods for artifact detection and removal using frame interpolation techniques
US10354364B2 (en) Automatic perspective control using vanishing points
US9412170B1 (en) Image processing device and image depth processing method
US10097793B2 (en) Method and system of depth data filling of shadows for image processing
CN104618648A (zh) 一种全景视频拼接系统及拼接方法
BR112016025577B1 (pt) Refocalização de imagem para matrizes de câmera
US10726524B2 (en) Low-resolution tile processing for real-time bokeh
US20220174338A1 (en) System and method of real-time video overlaying or superimposing display
US20210103764A1 (en) Accurate optical flow estimation in stereo pairs of equirectangular images
CN102811333A (zh) 视频处理装置以及插补帧生成方法
CN114119701A (zh) 图像处理方法及其装置
US11170574B2 (en) Method and apparatus for generating a navigation guide
KR20130123891A (ko) 홀 발생 억제를 위한 3d­워핑 방법 및 이를 적용한 영상 처리 장치
AU2015271981A1 (en) Method, system and apparatus for modifying a perceptual attribute for at least a part of an image
TWI826119B (zh) 影像處理方法、系統以及非暫態電腦可讀取記錄媒體

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

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

Country of ref document: EP

Kind code of ref document: A1