WO2019033970A1 - Method for image virtualization, mobile device, and storage device - Google Patents

Method for image virtualization, mobile device, and storage device Download PDF

Info

Publication number
WO2019033970A1
WO2019033970A1 PCT/CN2018/099373 CN2018099373W WO2019033970A1 WO 2019033970 A1 WO2019033970 A1 WO 2019033970A1 CN 2018099373 W CN2018099373 W CN 2018099373W WO 2019033970 A1 WO2019033970 A1 WO 2019033970A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
camera module
clear
blurred
acquiring
Prior art date
Application number
PCT/CN2018/099373
Other languages
French (fr)
Chinese (zh)
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 WO2019033970A1 publication Critical patent/WO2019033970A1/en

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/95Computational photography systems, e.g. light-field imaging systems
    • H04N23/951Computational photography systems, e.g. light-field imaging systems by using two or more images to influence resolution, frame rate or aspect ratio
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/67Focus control based on electronic image sensor signals

Definitions

  • the present invention relates to the field of image capturing technology, and in particular, to a method for blurring an image, a mobile device, and a storage device.
  • the software algorithm crops out the parts of the photo that need to be highlighted according to the user's needs, and then performs the fuzzy algorithm processing on the rest of the image, and then synthesizes the two, and finally produces a similar A background blur effect produced by the SLR, because the subject that needs to be highlighted by the photo is completely captured by the algorithm and cut and generated, there will be a large error, so the blurred photo generated by this method is less effective;
  • two camera modules are used, one captures the subject and the other captures the depth of field information, and then the captured body depth information is used to crop the main part of the object, and then the rest of the image is performed.
  • the fuzzy algorithm processes and then synthesizes it, because the algorithm can accurately find the things that need to be highlighted according to the depth of field information, so the photo effect generated by this method is better than the former method;
  • the technical problem to be solved by the present invention is to provide a method for blurring an image, a mobile device, and a storage device, which can realize image blurring only through a set of camera modules.
  • a technical solution adopted by the present invention is to provide a method for image blurring, the method comprising:
  • a mobile device which includes a processor and a camera module.
  • the processor is connected to the camera module, and the processor can execute a program to implement the following actions:
  • another technical solution adopted by the present invention is to provide a storage device that stores program data, and the program data can be executed to implement a method for image blurring, the method comprising:
  • Obtaining the first image includes: acquiring a clear image as the first image in the depth of field of the camera module; and acquiring the second image comprises: controlling the lens of the camera module to move along the depth of field direction, acquiring one outside the depth of field of the camera module A blurred image corresponding to the clear image is used as the second image.
  • the beneficial effects of the present invention are: different from the prior art, the two images are collected by the two sets of image capturing devices to obtain a composite image, and the present invention obtains the first image through the camera module, and then changes the lens position of the camera module to obtain the second image. The image is combined to form a third image that is selectively blurred, and the image is blurred by only one set of camera modules.
  • FIG. 1 is a schematic diagram of the principle of a camera module of the present invention
  • FIG. 2 is a schematic flow chart of an embodiment of an image blurring method according to the present invention.
  • FIG. 3 is a schematic flow chart of another embodiment of an image blurring method of the present invention.
  • FIG. 4 is a schematic structural diagram of an embodiment of a mobile device according to the present invention.
  • Figure 5 is a block diagram showing an embodiment of a memory device of the present invention.
  • FIG. 1 is a schematic diagram of the principle of the camera module of the present invention.
  • the lens of the camera module is equivalent to a convex lens. Due to the depth of field of the convex lens, when photographing, the subject to be photographed is within the depth of field, while other parts are outside the depth of field. Objects within the depth of field will be clearly imaged, while other parts outside the depth of field will be blurred, resulting in a blurry subject with clear subjects and blurred backgrounds.
  • the depth of field varies depending on the focal length of the lens, the aperture value, and the shooting distance.
  • the focal length and aperture value of the mobile device are fixed values, which are determined by the specifications and process level when the camera module is manufactured during the production process of the mobile device, and may not be adjusted later, so after the mobile device completes production
  • the focal length and aperture value of the camera module are determined accordingly. Because the focal length of the camera module of the mobile device and the aperture are insufficient to form a shallow depth of field, the captured photos are clearly imaged within the depth of field of the camera module. The sharpness of the shooting distance will be different.
  • FIG. 2 is a schematic flow chart of an embodiment of an image blurring method according to the present invention.
  • the camera module captures the first image according to the need
  • the first image may be a clear image, or a blurred image
  • the second image corresponds to the first image, that is, when the first image is a clear image.
  • the reverse is reversed.
  • the focal length of the lens is not actually changed, but the focus position of the camera module is changed, so that the lens can be moved to a suitable position. Allows the subject to be within the depth of field so that clear imaging can be received over the depth of field on the other side of the lens, thus achieving autofocus within a certain range (Auto Focus). Autofocus does not change the focal length, but changes the object distance and distance to find the sharpest point that the subject can image.
  • the camera module finds the sharpest focus point, continue to control the lens to move back and forth, you will find that the image will become blurred. Due to the movement of the lens, the subject deviates from the imaging position of the best definition, resulting in the entire picture changing. It is blurred, that is, the phenomenon that the focus is not clear and the picture is blurred. As long as the distance of the lens movement can be controlled properly, the effect of the complete blurring of the current scene image can be fully realized, that is, the effect of blurring blurring is formed by using optical characteristics, and the blurring effect and the blurring of the SLR camera are realized. The effect is the same as the imaging is not clear, compared to the use of software to achieve better imaging results.
  • S203 Acquire a second image by using a camera module.
  • the second image corresponds to the first image, that is, when the first image is a clear image, the second image is a blurred blurred image, and when the first image is a blurred blurred image, the second image is For clear images, that is, when the first image is captured within the depth of field of the camera module, the lens of the control camera module is moved to a second image outside the depth of field to capture blurring, when the first image is in the camera module When shooting outside the depth of field, the lens of the control camera module moves to a second image with a clear depth of field.
  • S204 synthesize the first image and the second image into a third image, where the third image is a selectively blurred image;
  • the third image may be a background blur image or a selectively blurred image such as a main body blur image, and the third image is synthesized according to the first image and the second image captured by the camera module.
  • an image is a clear image and the second image is a blurred image
  • the outline of the clear body is determined in the first image, thereby cutting out a body that needs to be clear, and embedding a clear body into a corresponding position on the second image
  • a third image in which the main body is clear and the background is blurred.
  • the contour of the blurring main body is determined in the first image, thereby cutting out a blurring process.
  • the main body inserts a main body that needs to be blurred in a corresponding position on the second image, thereby synthesizing a third image in which the main body is blurred and the background is clear.
  • the present invention acquires the first image through the camera module, and then changes the lens position of the camera module to acquire the second image, thereby synthesizing the selectively blurred third image, which is realized only by a set of camera modules. Image blur.
  • FIG. 3 is a schematic flow chart of another embodiment of the image blurring method of the present invention.
  • the shooting function of the mobile device is enabled, the camera module is turned on, and the corresponding picture is taken as needed.
  • the position of the camera module on the mobile device may be located at the end of the mobile device, or in the middle of the mobile device, etc., and the camera module capable of conveniently using the mobile device is required to perform relative shooting, which is not limited herein.
  • the first image is captured by the camera module, and the shooting target is focused within the depth of field of the camera module to obtain a clear image as the first image of the embodiment.
  • the camera module can focus on the shooting target outside the depth of field, and obtain a blurred image as the first image of the embodiment, and the corresponding second image is a clear image.
  • This embodiment synthesizes a third image that is selectively blurred, which is not limited herein.
  • step S304 is performed, and if the focus target is not selected, step S302 is continued.
  • the lens is moved along the depth of field of the camera module, outside the depth of field of the camera module and according to the selected blurring effect, in the corresponding depth of field Obtaining a blurred image corresponding to the first image as the second image of the embodiment, that is, after selecting a suitable blurring effect, the camera module correspondingly captures the second image according to the position where the target of the first image is captured.
  • the first image and the second image are identical except that the image quality is different.
  • the second image corresponds to the first image, that is, when the first image is a clear image, the second image is a blurred blurred image, and when the first image is a blurred blurred image, the second image is clear
  • the image that is, when the first image is captured in the depth of field of the camera module, the lens of the control camera module is moved to the second image outside the depth of field range, and the first image is in the depth of field of the camera module.
  • the lens of the control camera module is moved to a second image with a clear depth in the depth of field.
  • the blurring effect in the embodiment may be different according to the depth of focus of the camera module and the depth of field of the camera module, so as to achieve different blurring effects, that is, the focus of the camera module and the camera module.
  • the focal length of the lens is not actually changed, but the focus position of the camera module is changed, so that the lens can be moved to a suitable position. Allows the subject to be within the depth of field so that clear imaging can be received over the depth of field on the other side of the lens, thus achieving autofocus within a certain range (Auto Focus). Autofocus does not change the focal length, but changes the object distance and distance to find the sharpest point that the subject can image.
  • the camera module finds the sharpest focus point, continue to control the lens to move back and forth, you will find that the image will become blurred. Due to the movement of the lens, the subject deviates from the imaging position of the best definition, resulting in the entire picture changing. It is blurred, that is, the phenomenon that the focus is not clear and the picture is blurred. As long as the distance of the lens movement can be controlled properly, the effect of the complete blurring of the current scene image can be fully realized, that is, the effect of blurring blurring is formed by using optical characteristics, and the blurring effect and the blurring of the SLR camera are realized. The effect is the same as the imaging is not clear, compared to the use of software to achieve better imaging results.
  • step S306 is performed, and if the blurring effect is not selected, step S304 is continued.
  • the shooting operation is ended, and the third image is combined and output according to the first image and the second image captured by the camera module.
  • the first image is a clear image
  • the second image is a blurred image.
  • the method of synthesizing the third image is explained, and thus the first image and the second image of the present embodiment are not limited.
  • the first image acquiring a clear body of the third image, synthesizing the clear body into a corresponding position on the second image, obtaining a third image with a clear subject and a blurred background; or acquiring according to the first image
  • the clear background of the third image is synthesized into a corresponding position on the second image to obtain a third image with the subject blurred and the background clear.
  • determining the outline of the image body on the first image thereby selecting a clear body or a clear background
  • determining the outline of the image body is obtained by algorithm cutting, which is a conventional means by those skilled in the art, and is no longer used herein. Narration.
  • the present invention acquires a first image in the depth of field of the camera module, and then controls the lens of the camera module to move in the depth direction of the camera module, and acquires a second image outside the depth of field of the camera module, thereby Synthesizing the third image of the selective blur, through a set of camera modules, to achieve image blur, which can improve image blur.
  • FIG. 4 is a schematic structural diagram of an embodiment of a mobile device according to the present invention.
  • the mobile device 400 includes a processor 401 and a camera module 402.
  • the processor 401 is connected to the camera module 402.
  • the position of the camera module 402 on the mobile device 400 can be located at the end of the mobile device 400, or In the middle area of the mobile device 400, the camera module 402 that can conveniently use the mobile device 400 is required to perform corresponding shooting operations, which is not limited herein.
  • the processor 401 is capable of executing a program to control the camera module 402 to obtain a clear image as the first image within its depth of field; then controlling the lens of the camera module 402 to move along the depth of field and acquiring outside the depth of field range a blurred image corresponding to the clear image is used as the second image; according to the first image, the clear body of the third image is acquired, and the clear body is synthesized to the corresponding position on the second image, and the body is clear and the background is blurred. Or three images; or according to the first image, obtain a clear background of the third image, and synthesize the clear background to the corresponding position on the second image to obtain a third image with the subject blurred and the background clear.
  • the processor 401 drives the movement of the motor inside the camera module 402 to push the lens to move, and does not actually change the focal length of the lens.
  • the focal length and aperture of the camera module 402 remain unchanged, but the focus position of the camera module 402 is changed. This allows the lens to be moved to the proper position so that the subject being shot is within the depth of field, so that clear imaging can be received over the depth of field on the other side of the lens, thus achieving autofocus within a certain range.
  • Autofocus does not change the focal length, but changes the object distance and distance to find the sharpest point that the subject can image.
  • the camera module 402 finds the sharpest focus point, continue to control the lens to move back and forth, and the image will be blurred. Due to the movement of the lens, the subject deviates from the imaging position of the best definition, resulting in the entire picture. It becomes blurred, that is, the phenomenon that the focus is not clear and the picture is blurred. As long as the distance of the lens movement can be controlled properly, the effect of the complete blurring of the current scene image can be fully realized, that is, the effect of blurring blurring is formed by using optical characteristics, and the blurring effect and the blurring of the SLR camera are realized. The effect is the same as the imaging is not clear, compared to the use of software to achieve better imaging results.
  • FIG. 5 is a schematic structural diagram of an embodiment of a storage device according to the present invention.
  • the storage device 500 stores the program data 501, and the program data 501 can be executed to implement the image blurring method described in the above embodiments, and details are not described herein again.
  • the disclosed system, apparatus, and method may be implemented in other manners.
  • the device implementations described above are merely illustrative.
  • the division of the modules or units is only a logical function division.
  • there may be another division manner for example, multiple units or components may be used. Combinations can be integrated into another system, or some features can be ignored or not executed.
  • the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device or unit, and may be in an electrical, mechanical or other form.
  • the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the object of the present embodiment.
  • each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
  • the above integrated unit can be implemented in the form of hardware or in the form of a software functional unit.
  • the integrated unit if implemented in the form of a software functional unit and sold or used as a standalone product, may be stored in a computer readable storage medium.
  • the technical solution of the present invention which is essential or contributes to the prior art, or all or part of the technical solution, may be embodied in the form of a software product stored in a storage medium.
  • a number of instructions are included to cause a computer device (which may be a personal computer, server, or network device, etc.) or a processor to perform all or part of the steps of the methods of the various embodiments of the present invention.
  • the foregoing storage medium includes: a U disk, a mobile hard disk, a read only memory (ROM, Read-Only) Memory, random access memory (RAM), disk or optical disk, and other media that can store program code.
  • the present invention acquires a first image in the depth of field of the camera module, and then controls the lens of the camera module to move in the depth direction of the camera module, and acquires a second image outside the depth of field of the camera module, thereby Synthesizing the third image of the selective blur, through a set of camera modules, to achieve image blur, which can improve image blur.

Abstract

Disclosed are a method for image virtualization, a mobile device, and a storage device. The method comprises: acquiring a first image via a camera module; changing the position of a lens of the camera lens; then acquiring a second image via the camera module; and, synthesizing the first image with the second image into a third image, the third image being an optional virtualized image.

Description

一种图像虚化的方法、移动设备以及存储装置 Image blurring method, mobile device and storage device
【技术领域】[Technical Field]
本发明涉及图像拍摄技术领域,特别是涉及一种图像虚化的方法、移动设备以及存储装置。The present invention relates to the field of image capturing technology, and in particular, to a method for blurring an image, a mobile device, and a storage device.
【背景技术】 【Background technique】
目前,移动设备拍照表现能力已经成为消费者关注的重点,而其中图像虚化的拍摄手法得到广泛使用。图像虚化会使图片主体能够更加突出,表现出一种异样的美感,是广大摄影用户非常热衷的一种拍照追求。在移动设备上的图像虚化,实际上是模仿大光圈单反拍出虚化照片的一种手法,要实现虚化效果的照片,需要镜头满足长焦距、大光圈以及选择合适的拍摄距离,才能实现背景虚化,这一般都需要专业的镜头和合适的选择拍摄场景才能达到,部分单反相机可以拍出这种效果。然而,在移动设备上,受限于摄像头模组的规格和工艺水平,无法生产出完全满足要求的摄像头模组。At present, the ability to take pictures of mobile devices has become the focus of consumers' attention, and the shooting methods of image blurring are widely used. Image blurring will make the main body of the picture more prominent, showing a different kind of beauty, which is a kind of photo pursuit that the majority of photography users are very keen on. The blurring of images on mobile devices is actually a way of imitating a blurred photo with a large aperture SLR. To achieve a blurred effect, the lens needs to meet the long focal length, large aperture and choose the appropriate shooting distance. To achieve background blur, this generally requires a professional lens and a suitable selection of shooting scenes to achieve, some SLR cameras can shoot this effect. However, on mobile devices, limited by the specifications and process level of the camera module, it is impossible to produce a camera module that fully satisfies the requirements.
在移动设备上主要有两种方法实现图像虚化。There are two main ways to achieve image blurring on mobile devices.
其一,使用背景虚化软件算法,拍照后,软件算法根据用户需求裁剪出照片中需要突出的部分,再将图像其余部分进行模糊算法处理,然后将两者之合成,最终产生一种类似于单反拍出的一种背景虚化的效果,因为照片需要突出的主体完全由算法捕捉并剪切生成,会有较大误差,所以这种方法生成的虚化照片效果较差;First, using the background blurring software algorithm, after taking a picture, the software algorithm crops out the parts of the photo that need to be highlighted according to the user's needs, and then performs the fuzzy algorithm processing on the rest of the image, and then synthesizes the two, and finally produces a similar A background blur effect produced by the SLR, because the subject that needs to be highlighted by the photo is completely captured by the algorithm and cut and generated, there will be a large error, so the blurred photo generated by this method is less effective;
其二,使用两颗相机模组,其中一颗捕捉拍摄主体,另一颗捕捉画面景深信息,然后同样先通过捕捉到的景深信息,来裁剪出事物主体部分,再将图像其余次要部分进行模糊算法处理,然后将之合成,因为算法能根据景深信息准确的找到需要突出的事物,所以这种方法生成的照片效果较前一种方法要好;Second, two camera modules are used, one captures the subject and the other captures the depth of field information, and then the captured body depth information is used to crop the main part of the object, and then the rest of the image is performed. The fuzzy algorithm processes and then synthesizes it, because the algorithm can accurately find the things that need to be highlighted according to the depth of field information, so the photo effect generated by this method is better than the former method;
虽然这两种方法均能实现图片虚化,但是实际效果完全比不上在单反上真正使用浅景深的光学镜头自然成像形成的虚化效果。Although both methods can achieve image blur, the actual effect is completely inferior to the blurring effect formed by the natural imaging of the optical lens that actually uses shallow depth of field on the SLR.
【发明内容】 [Summary of the Invention]
有鉴于此,本发明主要解决的技术问题是提供一种图像虚化的方法、移动设备以及存储装置,能够仅通过一组摄像头模组,实现图像虚化。In view of this, the technical problem to be solved by the present invention is to provide a method for blurring an image, a mobile device, and a storage device, which can realize image blurring only through a set of camera modules.
为解决上述技术问题,本发明采用的一个技术方案是:提供一种图像虚化的方法,该方法包括:In order to solve the above technical problem, a technical solution adopted by the present invention is to provide a method for image blurring, the method comprising:
通过摄像头模组获取第一图像;改变摄像头模组的镜头位置;之后通过摄像头模组获取第二图像;将第一图像与第二图像合成为第三图像,第三图像为选择性虚化图像。Obtaining a first image through the camera module; changing a lens position of the camera module; then acquiring a second image through the camera module; synthesizing the first image and the second image into a third image, wherein the third image is a selectively blurred image .
为解决上述技术问题,本发明采用的又一个技术方案是:提供一种移动设备,该移动设备包括处理器以及摄像头模组,处理器连接摄像头模组,处理器能够执行程序以实现以下动作:In order to solve the above technical problem, another technical solution adopted by the present invention is to provide a mobile device, which includes a processor and a camera module. The processor is connected to the camera module, and the processor can execute a program to implement the following actions:
控制摄像头模组获取第一图像;改变摄像头模组的镜头位置;之后控制摄像头模组获取第二图像;将第一图像与第二图像合成为第三图像,第三图像为选择性虚化图像。Controlling the camera module to acquire the first image; changing the lens position of the camera module; then controlling the camera module to acquire the second image; synthesizing the first image and the second image into a third image, the third image being a selectively blurred image .
为解决上述技术问题,本发明采用的又一个技术方案是:提供一种存储装置,该存储装置存储有程序数据,该程序数据能够被执行以实现一种图像虚化的方法,该方法包括:In order to solve the above technical problem, another technical solution adopted by the present invention is to provide a storage device that stores program data, and the program data can be executed to implement a method for image blurring, the method comprising:
通过摄像头模组获取第一图像;改变摄像头模组的镜头位置;之后通过摄像头模组获取第二图像;将第一图像与第二图像合成为第三图像,第三图像为选择性虚化图像;获取第一图像包括:在摄像头模组景深范围内,获取一清晰图像作为第一图像;获取第二图像包括:控制摄像头模组的镜头沿景深方向移动,在摄像头模组景深范围外获取一与清晰图像对应的虚化图像作为第二图像。Obtaining a first image through the camera module; changing a lens position of the camera module; then acquiring a second image through the camera module; synthesizing the first image and the second image into a third image, wherein the third image is a selectively blurred image Obtaining the first image includes: acquiring a clear image as the first image in the depth of field of the camera module; and acquiring the second image comprises: controlling the lens of the camera module to move along the depth of field direction, acquiring one outside the depth of field of the camera module A blurred image corresponding to the clear image is used as the second image.
本发明的有益效果是:区别于现有技术通过两组图片采集装置采集图片进行合成图像虚化图片,本发明通过摄像头模组获取第一图像,之后改变摄像头模组的镜头位置,获取第二图像,从而合成选择性虚化的第三图像,仅通过一组摄像头模组,实现图像虚化。The beneficial effects of the present invention are: different from the prior art, the two images are collected by the two sets of image capturing devices to obtain a composite image, and the present invention obtains the first image through the camera module, and then changes the lens position of the camera module to obtain the second image. The image is combined to form a third image that is selectively blurred, and the image is blurred by only one set of camera modules.
【附图说明】 [Description of the Drawings]
图1是本发明摄像头模组的原理示意图;1 is a schematic diagram of the principle of a camera module of the present invention;
图2是本发明图像虚化方法一实施例的流程示意图;2 is a schematic flow chart of an embodiment of an image blurring method according to the present invention;
图3是本发明图像虚化方法另一实施例的流程示意图;3 is a schematic flow chart of another embodiment of an image blurring method of the present invention;
图4是本发明移动设备一实施例的结构示意图;4 is a schematic structural diagram of an embodiment of a mobile device according to the present invention;
图5是本发明存储装置一实施例的结构示意图。Figure 5 is a block diagram showing an embodiment of a memory device of the present invention.
【具体实施方式】【Detailed ways】
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述。The technical solutions in the embodiments of the present invention will be clearly and completely described in the following with reference to the accompanying drawings.
请参阅图1,图1是本发明摄像头模组的原理示意图。Please refer to FIG. 1. FIG. 1 is a schematic diagram of the principle of the camera module of the present invention.
在本实施例中,摄像头模组的镜头相当于一凸透镜,由于凸透镜景深的存在,所以当拍照时,需要拍摄的主体在景深范围内,而其他部分则处于景深范围外,此时,只有处于景深范围内的物体才会成像清晰,而处于景深范围外其他部分则成像模糊,从而形成了一种主体清晰,而四周其他背景部分模糊的虚化拍摄效果。In this embodiment, the lens of the camera module is equivalent to a convex lens. Due to the depth of field of the convex lens, when photographing, the subject to be photographed is within the depth of field, while other parts are outside the depth of field. Objects within the depth of field will be clearly imaged, while other parts outside the depth of field will be blurred, resulting in a blurry subject with clear subjects and blurred backgrounds.
在本实施例中,景深随镜头的焦距、光圈值以及拍摄距离的变化而变化。对于移动设备而言,移动设备的焦距以及光圈值是固定值,是移动设备生产过程中制作摄像头模组时的规格以及工艺水平所决定,后期可能无法对其进行调整,因此移动设备完成生产之后其摄像头模组的焦距以及光圈值就随之确定,由于移动设备的摄像头模组的焦距以及光圈不足以形成浅景深的条件,在摄像头模组的景深范围内,所拍摄的照片成像清晰,随着拍摄距离的远近,清晰度会有所不同。In the present embodiment, the depth of field varies depending on the focal length of the lens, the aperture value, and the shooting distance. For mobile devices, the focal length and aperture value of the mobile device are fixed values, which are determined by the specifications and process level when the camera module is manufactured during the production process of the mobile device, and may not be adjusted later, so after the mobile device completes production The focal length and aperture value of the camera module are determined accordingly. Because the focal length of the camera module of the mobile device and the aperture are insufficient to form a shallow depth of field, the captured photos are clearly imaged within the depth of field of the camera module. The sharpness of the shooting distance will be different.
请参阅图2,图2是本发明图像虚化方法一实施例的流程示意图。Please refer to FIG. 2. FIG. 2 is a schematic flow chart of an embodiment of an image blurring method according to the present invention.
S201:通过摄像头模组获取第一图像;S201: acquiring a first image by using a camera module;
在本实施例中,摄像头模组根据需要拍摄第一图像,第一图像可以是清晰图像,或者是虚化模糊图像,第二图像与第一图像对应,也就是说当第一图像为清晰图像时,第二图像为虚化模糊图像,反之则反。In this embodiment, the camera module captures the first image according to the need, the first image may be a clear image, or a blurred image, and the second image corresponds to the first image, that is, when the first image is a clear image. When the second image is a blurred image, the reverse is reversed.
S202:改变摄像头模组的镜头位置;S202: changing a lens position of the camera module;
在本实施例中,通过驱动摄像头模组内部马达的移动,从而推动镜头移动,实际上并没有改变镜头的焦距,只是改变了摄像头模组的对焦位置,这样可以让镜头移动到合适的位置,让被拍摄的物体处于景深范围之内,从而在镜头另一侧的景深范围内可以接收到清晰的成像,这样就实现在一定范围内的自动对焦(Auto Focus)。自动对焦并没有改变焦距,而是改变了物距与相距,从而来找到拍摄主体能够成像最清晰的点。In this embodiment, by driving the movement of the motor inside the camera module, thereby pushing the lens to move, the focal length of the lens is not actually changed, but the focus position of the camera module is changed, so that the lens can be moved to a suitable position. Allows the subject to be within the depth of field so that clear imaging can be received over the depth of field on the other side of the lens, thus achieving autofocus within a certain range (Auto Focus). Autofocus does not change the focal length, but changes the object distance and distance to find the sharpest point that the subject can image.
当摄像头模组找到最清晰的对焦点的时候,继续控制镜头前后移动,会发现图像都会变得模糊,由于镜头的移动,被摄物体偏离了最佳清晰度的成像位置,导致整个画面都会变得模糊,也就是对焦不清晰,画面模糊的现象。只要能够控制镜头移动的距离合适,就能完全实现对当前场景画面的完全模糊虚化的效果,也即是利用光学特性形成模糊虚化的效果,并且这种虚化效果和单反相机的虚化效果一样都是由于成像不清晰造成,比起使用软件实现具有更好的成像效果。When the camera module finds the sharpest focus point, continue to control the lens to move back and forth, you will find that the image will become blurred. Due to the movement of the lens, the subject deviates from the imaging position of the best definition, resulting in the entire picture changing. It is blurred, that is, the phenomenon that the focus is not clear and the picture is blurred. As long as the distance of the lens movement can be controlled properly, the effect of the complete blurring of the current scene image can be fully realized, that is, the effect of blurring blurring is formed by using optical characteristics, and the blurring effect and the blurring of the SLR camera are realized. The effect is the same as the imaging is not clear, compared to the use of software to achieve better imaging results.
S203:通过摄像头模组获取第二图像;S203: Acquire a second image by using a camera module.
在本实施例中,第二图像与第一图像对应,也就是说当第一图像为清晰图像时,第二图像为虚化模糊图像,当第一图像为虚化模糊图像时,第二图像为清晰图像,即当第一图像在摄像头模组的景深范围内拍摄所得时,控制摄像头模组的镜头移动到景深范围外拍摄虚化模糊的第二图像,当第一图像在摄像头模组的景深范围外拍摄所得时,控制摄像头模组的镜头移动到景深范围内拍摄清晰的第二图像。In this embodiment, the second image corresponds to the first image, that is, when the first image is a clear image, the second image is a blurred blurred image, and when the first image is a blurred blurred image, the second image is For clear images, that is, when the first image is captured within the depth of field of the camera module, the lens of the control camera module is moved to a second image outside the depth of field to capture blurring, when the first image is in the camera module When shooting outside the depth of field, the lens of the control camera module moves to a second image with a clear depth of field.
S204:将第一图像与第二图像合成为第三图像,第三图像为选择性虚化图像;S204: synthesize the first image and the second image into a third image, where the third image is a selectively blurred image;
在本实施例中,第三图像可以是背景虚化图像或者是主体虚化图像等选择性虚化图像,根据摄像头模组拍摄的第一图像以及第二图像,进行合成第三图像,当第一图像为清晰图像,第二图像为虚化模糊图像时,在第一图像中确定清晰主体的轮廓,从而裁剪出需要清晰的主体,将需要清晰的主体嵌入于第二图像上对应位置,进而合成主体清晰且背景模糊的第三图像,当第一图像为虚化模糊图像,第二图像为清晰图像时,在第一图像中确定虚化处理主体的轮廓,从而裁剪出需要虚化处理的主体,将需要虚化处理的主体嵌入于第二图像上对应位置,进而合成主体虚化且背景清晰的第三图像。In this embodiment, the third image may be a background blur image or a selectively blurred image such as a main body blur image, and the third image is synthesized according to the first image and the second image captured by the camera module. When an image is a clear image and the second image is a blurred image, the outline of the clear body is determined in the first image, thereby cutting out a body that needs to be clear, and embedding a clear body into a corresponding position on the second image, and further A third image in which the main body is clear and the background is blurred. When the first image is a blurred image and the second image is a clear image, the contour of the blurring main body is determined in the first image, thereby cutting out a blurring process. The main body inserts a main body that needs to be blurred in a corresponding position on the second image, thereby synthesizing a third image in which the main body is blurred and the background is clear.
以上可以看出,本发明通过摄像头模组获取第一图像,之后改变摄像头模组的镜头位置,获取第二图像,从而合成选择性虚化的第三图像,仅通过一组摄像头模组,实现图像虚化。As can be seen from the above, the present invention acquires the first image through the camera module, and then changes the lens position of the camera module to acquire the second image, thereby synthesizing the selectively blurred third image, which is realized only by a set of camera modules. Image blur.
请参阅图3,图3是本发明图像虚化方法另一实施例的流程示意图。Please refer to FIG. 3. FIG. 3 is a schematic flow chart of another embodiment of the image blurring method of the present invention.
S301:开启摄像头模组;S301: Turn on the camera module;
在本实施例中,启用移动设备的拍摄功能,开启摄像头模组,根据需要拍摄相应图片。摄像头模组在移动设备上的位置可以位于移动设备的端部,又或者位于移动设备的中部区域等,需要满足能够方便使用移动设备的摄像头模组进行相对拍摄工作,在此不做限定。In this embodiment, the shooting function of the mobile device is enabled, the camera module is turned on, and the corresponding picture is taken as needed. The position of the camera module on the mobile device may be located at the end of the mobile device, or in the middle of the mobile device, etc., and the camera module capable of conveniently using the mobile device is required to perform relative shooting, which is not limited herein.
S302:选择拍摄对象,完成对焦;S302: Select a subject to complete the focus;
在本实施例中,通过摄像头模组拍摄第一图像,在摄像头模组的景深范围内对拍摄目标进行对焦,获取一清晰图像作为本实施例的第一图像。In this embodiment, the first image is captured by the camera module, and the shooting target is focused within the depth of field of the camera module to obtain a clear image as the first image of the embodiment.
可选地,摄像头模组可以在景深范围外对拍摄目标进行对焦拍摄,获取一虚化图像作为本实施例的第一图像,相应的第二图像则为清晰图像,通过上述方式,同样可以达到本实施例合成选择性虚化的第三图像,在此不做限定。Optionally, the camera module can focus on the shooting target outside the depth of field, and obtain a blurred image as the first image of the embodiment, and the corresponding second image is a clear image. This embodiment synthesizes a third image that is selectively blurred, which is not limited herein.
S303:判断是否选定对焦目标,并完成对焦;S303: Determine whether the focus target is selected, and complete the focus;
在本实施例中,若已选定对焦目标,并完成对焦,则执行步骤S304,若未选定对焦目标,则继续执行步骤S302。In this embodiment, if the focus target has been selected and the focus is completed, step S304 is performed, and if the focus target is not selected, step S302 is continued.
S304:选择合适的虚化效果;S304: Select a suitable blur effect;
在本实施例中,通过驱动摄像头模组内部马达的移动,从而推动镜头沿摄像头模组的景深方向移动,在摄像头模组的景深范围外并且根据所选择相应的虚化效果,在相应的景深获取一与第一图像对应的虚化图像作为本实施例的第二图像,也就是选择合适的虚化效果后,摄像头模组根据拍摄第一图像的目标所处的位置,相应拍摄第二图像,第一图像与第二图像除画质清晰程度不同之外其他特征均相同。In this embodiment, by driving the movement of the motor inside the camera module, the lens is moved along the depth of field of the camera module, outside the depth of field of the camera module and according to the selected blurring effect, in the corresponding depth of field Obtaining a blurred image corresponding to the first image as the second image of the embodiment, that is, after selecting a suitable blurring effect, the camera module correspondingly captures the second image according to the position where the target of the first image is captured. The first image and the second image are identical except that the image quality is different.
可选地,第二图像与第一图像对应,也就是说当第一图像为清晰图像时,第二图像为虚化模糊图像,当第一图像为虚化模糊图像时,第二图像为清晰图像,即当第一图像在摄像头模组的景深范围内拍摄所得时,控制摄像头模组的镜头移动到景深范围外拍摄虚化模糊的第二图像,当第一图像在摄像头模组的景深范围外拍摄所得时,控制摄像头模组的镜头移动到景深范围内拍摄清晰的第二图像。Optionally, the second image corresponds to the first image, that is, when the first image is a clear image, the second image is a blurred blurred image, and when the first image is a blurred blurred image, the second image is clear The image, that is, when the first image is captured in the depth of field of the camera module, the lens of the control camera module is moved to the second image outside the depth of field range, and the first image is in the depth of field of the camera module. When the external shooting is obtained, the lens of the control camera module is moved to a second image with a clear depth in the depth of field.
可选地,本实施例中的虚化效果可以根据摄像头模组对焦点与摄像头模组的景深范围偏离程度,以实现不同的虚化效果,也就是说摄像头模组对焦点与摄像头模组的景深范围偏离程度越大,所得到的图像就越模糊。Optionally, the blurring effect in the embodiment may be different according to the depth of focus of the camera module and the depth of field of the camera module, so as to achieve different blurring effects, that is, the focus of the camera module and the camera module. The greater the degree of deviation of the depth of field range, the more blurred the resulting image.
在本实施例中,通过驱动摄像头模组内部马达的移动,从而推动镜头移动,实际上并没有改变镜头的焦距,只是改变了摄像头模组的对焦位置,这样可以让镜头移动到合适的位置,让被拍摄的物体处于景深范围之内,从而在镜头另一侧的景深范围内可以接收到清晰的成像,这样就实现在一定范围内的自动对焦(Auto Focus)。自动对焦并没有改变焦距,而是改变了物距与相距,从而来找到拍摄主体能够成像最清晰的点。In this embodiment, by driving the movement of the motor inside the camera module, thereby pushing the lens to move, the focal length of the lens is not actually changed, but the focus position of the camera module is changed, so that the lens can be moved to a suitable position. Allows the subject to be within the depth of field so that clear imaging can be received over the depth of field on the other side of the lens, thus achieving autofocus within a certain range (Auto Focus). Autofocus does not change the focal length, but changes the object distance and distance to find the sharpest point that the subject can image.
当摄像头模组找到最清晰的对焦点的时候,继续控制镜头前后移动,会发现图像都会变得模糊,由于镜头的移动,被摄物体偏离了最佳清晰度的成像位置,导致整个画面都会变得模糊,也就是对焦不清晰,画面模糊的现象。只要能够控制镜头移动的距离合适,就能完全实现对当前场景画面的完全模糊虚化的效果,也即是利用光学特性形成模糊虚化的效果,并且这种虚化效果和单反相机的虚化效果一样都是由于成像不清晰造成,比起使用软件实现具有更好的成像效果。When the camera module finds the sharpest focus point, continue to control the lens to move back and forth, you will find that the image will become blurred. Due to the movement of the lens, the subject deviates from the imaging position of the best definition, resulting in the entire picture changing. It is blurred, that is, the phenomenon that the focus is not clear and the picture is blurred. As long as the distance of the lens movement can be controlled properly, the effect of the complete blurring of the current scene image can be fully realized, that is, the effect of blurring blurring is formed by using optical characteristics, and the blurring effect and the blurring of the SLR camera are realized. The effect is the same as the imaging is not clear, compared to the use of software to achieve better imaging results.
S305:判断虚化效果是否选择完毕;S305: determining whether the blur effect is selected;
在本实施例中,若虚化效果已经选择完毕,则执行步骤S306,若虚化效果未选择完毕,则继续执行步骤S304。In this embodiment, if the blurring effect has been selected, step S306 is performed, and if the blurring effect is not selected, step S304 is continued.
S306:完成拍摄,生成第三图像;S306: Complete shooting to generate a third image;
在本实施例中,结束拍摄动作,根据摄像头模组拍摄的第一图像以及第二图像合成第三图像并输出,本实施例以第一图像为清晰图像,第二图像为虚化图像为例进行阐述合成第三图像的方法,并非因此对本实施例的第一图像以及第二图像造成限定。In this embodiment, the shooting operation is ended, and the third image is combined and output according to the first image and the second image captured by the camera module. In this embodiment, the first image is a clear image, and the second image is a blurred image. The method of synthesizing the third image is explained, and thus the first image and the second image of the present embodiment are not limited.
可选地,根据第一图像,获取第三图像的清晰的主体,将清晰的主体合成到第二图像上对应位置,得到主体清晰且背景虚化的第三图像;或者根据第一图像,获取第三图像的清晰的背景,将清晰的背景合成到第二图像上对应位置,得到主体虚化且背景清晰的第三图像。Optionally, according to the first image, acquiring a clear body of the third image, synthesizing the clear body into a corresponding position on the second image, obtaining a third image with a clear subject and a blurred background; or acquiring according to the first image The clear background of the third image is synthesized into a corresponding position on the second image to obtain a third image with the subject blurred and the background clear.
可选地,通过在第一图像上确定图像主体的轮廓,从而选择清晰的主体或者清晰的背景,确定图像主体的轮廓为通过算法裁剪所得,为本领域技术人员惯用手段,在此就不再赘述。Optionally, by determining the outline of the image body on the first image, thereby selecting a clear body or a clear background, determining the outline of the image body is obtained by algorithm cutting, which is a conventional means by those skilled in the art, and is no longer used herein. Narration.
综上所述,本发明在摄像头模组的景深范围内获取第一图像,之后控制摄像头模组的镜头在摄像头模组的景深方向移动,在摄像头模组的景深范围外获取第二图像,从而合成选择性虚化的第三图像,通过一组摄像头模组,实现图像虚化,能够改善图像虚化。In summary, the present invention acquires a first image in the depth of field of the camera module, and then controls the lens of the camera module to move in the depth direction of the camera module, and acquires a second image outside the depth of field of the camera module, thereby Synthesizing the third image of the selective blur, through a set of camera modules, to achieve image blur, which can improve image blur.
请参阅图4,图4是本发明移动设备一实施例的结构示意图。Please refer to FIG. 4. FIG. 4 is a schematic structural diagram of an embodiment of a mobile device according to the present invention.
在本实施例中,移动设备400包括处理器401以及摄像头模组402,处理器401连接摄像头模组402,摄像头模组402在移动设备400上的位置可以位于移动设备400的端部,又或者位于移动设备400的中部区域等,需要满足能够方便使用移动设备400的摄像头模组402进行相应拍摄工作,在此不做限定。In this embodiment, the mobile device 400 includes a processor 401 and a camera module 402. The processor 401 is connected to the camera module 402. The position of the camera module 402 on the mobile device 400 can be located at the end of the mobile device 400, or In the middle area of the mobile device 400, the camera module 402 that can conveniently use the mobile device 400 is required to perform corresponding shooting operations, which is not limited herein.
处理器401能够执行程序以实现以下动作:控制摄像头模组402在其景深范围内,获取一清晰图像作为第一图像;之后控制摄像头模组402的镜头沿景深方向移动,在其景深范围外获取一与清晰图像对应的虚化图像作为第二图像;根据第一图像,获取第三图像的清晰的主体,将清晰的主体合成到第二图像上对应位置,得到主体清晰且背景虚化的第三图像;或者根据第一图像,获取第三图像的清晰的背景,将清晰的背景合成到第二图像上对应位置,得到主体虚化且背景清晰的第三图像。The processor 401 is capable of executing a program to control the camera module 402 to obtain a clear image as the first image within its depth of field; then controlling the lens of the camera module 402 to move along the depth of field and acquiring outside the depth of field range a blurred image corresponding to the clear image is used as the second image; according to the first image, the clear body of the third image is acquired, and the clear body is synthesized to the corresponding position on the second image, and the body is clear and the background is blurred. Or three images; or according to the first image, obtain a clear background of the third image, and synthesize the clear background to the corresponding position on the second image to obtain a third image with the subject blurred and the background clear.
处理器401通过驱动摄像头模组402内部马达的移动,从而推动镜头移动,实际上并没有改变镜头的焦距,摄像头模组402的焦距以及光圈保持不变,只是改变了摄像头模组402的对焦位置,这样可以让镜头移动到合适的位置,让被拍摄的物体处于景深范围之内,从而在镜头另一侧的景深范围内可以接收到清晰的成像,这样就实现在一定范围内的自动对焦。自动对焦并没有改变焦距,而是改变了物距与相距,从而来找到拍摄主体能够成像最清晰的点。The processor 401 drives the movement of the motor inside the camera module 402 to push the lens to move, and does not actually change the focal length of the lens. The focal length and aperture of the camera module 402 remain unchanged, but the focus position of the camera module 402 is changed. This allows the lens to be moved to the proper position so that the subject being shot is within the depth of field, so that clear imaging can be received over the depth of field on the other side of the lens, thus achieving autofocus within a certain range. Autofocus does not change the focal length, but changes the object distance and distance to find the sharpest point that the subject can image.
当摄像头模组402找到最清晰的对焦点的时候,继续控制镜头前后移动,会发现图像都会变得模糊,由于镜头的移动,被摄物体偏离了最佳清晰度的成像位置,导致整个画面都会变得模糊,也就是对焦不清晰,画面模糊的现象。只要能够控制镜头移动的距离合适,就能完全实现对当前场景画面的完全模糊虚化的效果,也即是利用光学特性形成模糊虚化的效果,并且这种虚化效果和单反相机的虚化效果一样都是由于成像不清晰造成,比起使用软件实现具有更好的成像效果。When the camera module 402 finds the sharpest focus point, continue to control the lens to move back and forth, and the image will be blurred. Due to the movement of the lens, the subject deviates from the imaging position of the best definition, resulting in the entire picture. It becomes blurred, that is, the phenomenon that the focus is not clear and the picture is blurred. As long as the distance of the lens movement can be controlled properly, the effect of the complete blurring of the current scene image can be fully realized, that is, the effect of blurring blurring is formed by using optical characteristics, and the blurring effect and the blurring of the SLR camera are realized. The effect is the same as the imaging is not clear, compared to the use of software to achieve better imaging results.
请参阅图5,图5是本发明存储装置一实施例的结构示意图。Please refer to FIG. 5. FIG. 5 is a schematic structural diagram of an embodiment of a storage device according to the present invention.
在本实施例中,存储装置500存储有程序数据501,程序数据501能够被执行以实现上述实施例所阐述的图像虚化方法,在此就不再赘述。In the present embodiment, the storage device 500 stores the program data 501, and the program data 501 can be executed to implement the image blurring method described in the above embodiments, and details are not described herein again.
在本发明所提供的几个实施方式中,应该理解到,所揭露的系统,装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施方式仅仅是示意性的,例如,所述模块或单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided by the present invention, it should be understood that the disclosed system, apparatus, and method may be implemented in other manners. For example, the device implementations described above are merely illustrative. For example, the division of the modules or units is only a logical function division. In actual implementation, there may be another division manner, for example, multiple units or components may be used. Combinations can be integrated into another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device or unit, and may be in an electrical, mechanical or other form.
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施方式的目的。The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the object of the present embodiment.
另外,在本发明各个实施方式中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above integrated unit can be implemented in the form of hardware or in the form of a software functional unit.
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)或处理器(processor)执行本发明各个实施方式所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质。The integrated unit, if implemented in the form of a software functional unit and sold or used as a standalone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention, which is essential or contributes to the prior art, or all or part of the technical solution, may be embodied in the form of a software product stored in a storage medium. A number of instructions are included to cause a computer device (which may be a personal computer, server, or network device, etc.) or a processor to perform all or part of the steps of the methods of the various embodiments of the present invention. The foregoing storage medium includes: a U disk, a mobile hard disk, a read only memory (ROM, Read-Only) Memory, random access memory (RAM), disk or optical disk, and other media that can store program code.
综上所述,本发明在摄像头模组的景深范围内获取第一图像,之后控制摄像头模组的镜头在摄像头模组的景深方向移动,在摄像头模组的景深范围外获取第二图像,从而合成选择性虚化的第三图像,通过一组摄像头模组,实现图像虚化,能够改善图像虚化。In summary, the present invention acquires a first image in the depth of field of the camera module, and then controls the lens of the camera module to move in the depth direction of the camera module, and acquires a second image outside the depth of field of the camera module, thereby Synthesizing the third image of the selective blur, through a set of camera modules, to achieve image blur, which can improve image blur.
以上所述仅为本发明的实施方式,并非因此限制本发明的专利范围,凡是利用本发明说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本发明的专利保护范围内。The above is only the embodiment of the present invention, and is not intended to limit the scope of the invention, and the equivalent structure or equivalent process transformations made by the description of the invention and the drawings are directly or indirectly applied to other related technologies. The fields are all included in the scope of patent protection of the present invention.

Claims (11)

  1. 一种存储装置,其中,所述存储装置存储有程序数据,所述程序数据能够被执行以实现如下动作:A storage device, wherein the storage device stores program data, the program data being executable to implement the following actions:
    通过摄像头模组获取第一图像;Acquiring the first image through the camera module;
    改变所述摄像头模组的镜头位置;之后Changing the lens position of the camera module;
    通过所述摄像头模组获取第二图像;Acquiring a second image through the camera module;
    将所述第一图像与所述第二图像合成为第三图像,所述第三图像为选择性虚化图像;Combining the first image and the second image into a third image, the third image being a selectively blurred image;
    所述获取第一图像包括:在所述摄像头模组景深范围内,获取一清晰图像作为所述第一图像;The acquiring the first image includes: acquiring a clear image as the first image in a range of depth of the camera module;
    所述获取第二图像包括:控制所述摄像头模组的镜头沿景深方向移动,在所述摄像头模组景深范围外获取一与所述清晰图像对应的虚化图像作为所述第二图像。The acquiring the second image includes: controlling the lens of the camera module to move along the depth of field direction, and acquiring a blurred image corresponding to the clear image as the second image outside the depth of field of the camera module.
  2. 根据权利要求1所述的存储装置,其中,所述将所述第一图像与所述第二图像合成为第三图像包括:The storage device of claim 1, wherein the synthesizing the first image and the second image into a third image comprises:
    根据所述第一图像,获取所述第三图像的清晰的主体,将所述清晰的主体合成到所述第二图像上对应位置,得到主体清晰且背景虚化的所述第三图像;或Acquiring a clear body of the third image according to the first image, synthesizing the clear body to a corresponding position on the second image, to obtain the third image with a clear subject and a blurred background; or
    根据所述第一图像,获取所述第三图像的清晰的背景,将所述清晰的背景合成到所述第二图像上对应位置,得到主体虚化且背景清晰的所述第三图像。Obtaining a clear background of the third image according to the first image, and synthesizing the clear background to a corresponding position on the second image, to obtain the third image with a blurred subject and a clear background.
  3. 一种图像虚化的方法,其中,所述方法包括:A method of image blurring, wherein the method comprises:
    通过摄像头模组获取第一图像;Acquiring the first image through the camera module;
    改变所述摄像头模组的镜头位置;之后Changing the lens position of the camera module;
    通过所述摄像头模组获取第二图像;Acquiring a second image through the camera module;
    将所述第一图像与所述第二图像合成为第三图像,所述第三图像为选择性虚化图像。The first image and the second image are combined into a third image, the third image being a selectively blurred image.
  4. 根据权利要求3所述的方法,其中,所述获取第一图像包括:在所述摄像头模组景深范围内,获取一清晰图像作为所述第一图像。The method of claim 3, wherein the obtaining the first image comprises acquiring a sharp image as the first image within a depth of field of the camera module.
  5. 根据权利要求4所述的方法,其中,所述获取第二图像包括:控制所述摄像头模组的镜头沿景深方向移动,在所述摄像头模组景深范围外获取一与所述清晰图像对应的虚化图像作为所述第二图像。The method according to claim 4, wherein the acquiring the second image comprises: controlling a lens of the camera module to move in a depth of field direction, and acquiring a corresponding image corresponding to the clear image outside the depth of field of the camera module The image is blurred as the second image.
  6. 根据权利要求5所述的方法,其中,所述将所述第一图像与所述第二图像合成为第三图像包括:The method of claim 5, wherein the synthesizing the first image and the second image into a third image comprises:
    根据所述第一图像,获取所述第三图像的清晰的主体,将所述清晰的主体合成到所述第二图像上对应位置,得到主体清晰且背景虚化的所述第三图像;或Acquiring a clear body of the third image according to the first image, synthesizing the clear body to a corresponding position on the second image, to obtain the third image with a clear subject and a blurred background; or
    根据所述第一图像,获取所述第三图像的清晰的背景,将所述清晰的背景合成到所述第二图像上对应位置,得到主体虚化且背景清晰的所述第三图像。Obtaining a clear background of the third image according to the first image, and synthesizing the clear background to a corresponding position on the second image, to obtain the third image with a blurred subject and a clear background.
  7. 一种移动设备,其中,所述移动设备包括处理器以及摄像头模组,所述处理器连接所述摄像头模组,所述处理器能够执行程序以实现以下动作:A mobile device, wherein the mobile device includes a processor and a camera module, the processor is coupled to the camera module, and the processor is capable of executing a program to:
    控制所述摄像头模组获取第一图像;Controlling the camera module to acquire a first image;
    改变所述摄像头模组的镜头位置;之后Changing the lens position of the camera module;
    控制所述摄像头模组获取第二图像;Controlling the camera module to acquire a second image;
    将所述第一图像与所述第二图像合成为第三图像,所述第三图像为选择性虚化图像。The first image and the second image are combined into a third image, the third image being a selectively blurred image.
  8. 根据权利要求7所述的移动设备,其中,所述获取第一图像包括:所述处理器控制所述摄像头模组在其景深范围内,获取一清晰图像作为所述第一图像。The mobile device of claim 7, wherein the obtaining the first image comprises: the processor controlling the camera module to acquire a clear image as the first image within a depth of field thereof.
  9. 根据权利要求8所述的移动设备,其中,所述获取第二图像包括:所述处理器控制所述摄像头模组的镜头沿景深方向移动,控制所述摄像头模组在其景深范围外获取一与所述清晰图像对应的虚化图像作为所述第二图像。The mobile device of claim 8, wherein the acquiring the second image comprises: the processor controlling the lens of the camera module to move in a depth of field direction, and controlling the camera module to acquire a range outside the depth of field thereof A blurred image corresponding to the clear image is used as the second image.
  10. 根据权利要求9所述的移动设备,其中,所述将所述第一图像与所述第二图像合成为第三图像包括:The mobile device of claim 9, wherein the synthesizing the first image and the second image into a third image comprises:
    所述处理器根据所述第一图像,获取所述第三图像的清晰的主体,将所述清晰的主体合成到所述第二图像上对应位置,得到主体清晰且背景虚化的所述第三图像;或And the processor acquires a clear body of the third image according to the first image, and synthesizes the clear body into a corresponding position on the second image, to obtain the first body with clear background and blurred background Three images; or
    所述处理器根据所述第一图像,获取所述第三图像的清晰的背景,将所述清晰的背景合成到所述第二图像上对应位置,得到主体虚化且背景清晰的所述第三图像。And acquiring, by the processor, a clear background of the third image according to the first image, and synthesizing the clear background to a corresponding position on the second image, to obtain the first part that the subject is blurred and the background is clear Three images.
  11. 根据权利要求9所述的移动设备,其中,所述摄像头模组的焦距以及光圈保持不变。The mobile device of claim 9, wherein the focal length and aperture of the camera module remain unchanged.
PCT/CN2018/099373 2017-08-17 2018-08-08 Method for image virtualization, mobile device, and storage device WO2019033970A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201710709675.7 2017-08-17
CN201710709675.7A CN107707809A (en) 2017-08-17 2017-08-17 A kind of method, mobile device and the storage device of image virtualization

Publications (1)

Publication Number Publication Date
WO2019033970A1 true WO2019033970A1 (en) 2019-02-21

Family

ID=61169673

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/099373 WO2019033970A1 (en) 2017-08-17 2018-08-08 Method for image virtualization, mobile device, and storage device

Country Status (2)

Country Link
CN (1) CN107707809A (en)
WO (1) WO2019033970A1 (en)

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107707809A (en) * 2017-08-17 2018-02-16 捷开通讯(深圳)有限公司 A kind of method, mobile device and the storage device of image virtualization
TWI701637B (en) * 2018-07-02 2020-08-11 緯創資通股份有限公司 Image synthesizing method and system
CN110505406A (en) * 2019-08-26 2019-11-26 宇龙计算机通信科技(深圳)有限公司 Background-blurring method, device, storage medium and terminal
CN110830715B (en) * 2019-10-31 2021-06-25 维沃移动通信(杭州)有限公司 Photographing method and electronic equipment
CN114762313B (en) * 2020-01-16 2024-03-01 Oppo广东移动通信有限公司 Image processing method, device, storage medium and electronic equipment
CN111246092B (en) * 2020-01-16 2021-07-20 Oppo广东移动通信有限公司 Image processing method, image processing device, storage medium and electronic equipment
CN111212231B (en) * 2020-01-16 2021-06-15 Oppo广东移动通信有限公司 Image processing method, image processing device, storage medium and electronic equipment
WO2022011657A1 (en) * 2020-07-16 2022-01-20 Oppo广东移动通信有限公司 Image processing method and apparatus, electronic device, and computer-readable storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1392724A (en) * 2001-06-19 2003-01-22 卡西欧计算机株式会社 Image pick-up device and method, storage medium for recording image pick-up method program
US20110149098A1 (en) * 2009-12-18 2011-06-23 Electronics And Telecommunications Research Institute Image processing apparutus and method for virtual implementation of optical properties of lens
CN103945116A (en) * 2013-01-23 2014-07-23 三星电子株式会社 Apparatus and method for processing image in mobile terminal having camera
CN104639831A (en) * 2015-01-05 2015-05-20 信利光电股份有限公司 Camera and depth of field expanding method
CN106303221A (en) * 2016-07-29 2017-01-04 广东欧珀移动通信有限公司 control method, device and mobile terminal
CN107707809A (en) * 2017-08-17 2018-02-16 捷开通讯(深圳)有限公司 A kind of method, mobile device and the storage device of image virtualization

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106303202A (en) * 2015-06-09 2017-01-04 联想(北京)有限公司 A kind of image information processing method and device

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1392724A (en) * 2001-06-19 2003-01-22 卡西欧计算机株式会社 Image pick-up device and method, storage medium for recording image pick-up method program
US20110149098A1 (en) * 2009-12-18 2011-06-23 Electronics And Telecommunications Research Institute Image processing apparutus and method for virtual implementation of optical properties of lens
CN103945116A (en) * 2013-01-23 2014-07-23 三星电子株式会社 Apparatus and method for processing image in mobile terminal having camera
CN104639831A (en) * 2015-01-05 2015-05-20 信利光电股份有限公司 Camera and depth of field expanding method
CN106303221A (en) * 2016-07-29 2017-01-04 广东欧珀移动通信有限公司 control method, device and mobile terminal
CN107707809A (en) * 2017-08-17 2018-02-16 捷开通讯(深圳)有限公司 A kind of method, mobile device and the storage device of image virtualization

Also Published As

Publication number Publication date
CN107707809A (en) 2018-02-16

Similar Documents

Publication Publication Date Title
WO2019033970A1 (en) Method for image virtualization, mobile device, and storage device
RU2415513C1 (en) Image recording apparatus, image recording method, image processing apparatus, image processing method and programme
TWI330747B (en) Image capture apparatus and auto focus control method
WO2012157883A2 (en) Digital photographing apparatus and method of controlling the same to increase continuous shooting speed for capturing panoramic photographs
WO2014071840A1 (en) Method and device for taking photo and video
WO2015192547A1 (en) Method for taking three-dimensional picture based on mobile terminal, and mobile terminal
JP2005128156A (en) Focusing device and method
US20140368695A1 (en) Control device and storage medium
CN110636276B (en) Video shooting method and device, storage medium and electronic equipment
CN103685940A (en) Method for recognizing shot photos by facial expressions
KR102146854B1 (en) Photographing apparatus and method
KR101739379B1 (en) Digital photographing apparatus and control method thereof
JP3732665B2 (en) Automatic focus control device and focusing operation determination method thereof
JP2007251429A (en) Moving image imaging unit, and zoom adjustment method
WO2017128750A1 (en) Image collection method and image collection device
WO2018161817A1 (en) Storage medium, and method and system for simulating photography in virtual reality scene
JP2009103980A (en) Photographic device, image processor, and photographic ystem
CN106027914A (en) Imaging device and imaging method
JP2007336411A (en) Imaging apparatus, auto-bracketing photographing method, and program
CN105282455B (en) A kind of photographic method, device and mobile terminal
CN117479000A (en) Video recording method and related device
CN110809797B (en) Micro video system, format and generation method
JP2009060355A (en) Imaging apparatus, imaging method, and program
CN105933602A (en) Camera shooting method and device
JP2011172093A (en) Imaging apparatus

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

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

Country of ref document: EP

Kind code of ref document: A1