WO2017045558A1 - Depth-of-field adjustment method and apparatus, and terminal - Google Patents
Depth-of-field adjustment method and apparatus, and terminal Download PDFInfo
- Publication number
- WO2017045558A1 WO2017045558A1 PCT/CN2016/098319 CN2016098319W WO2017045558A1 WO 2017045558 A1 WO2017045558 A1 WO 2017045558A1 CN 2016098319 W CN2016098319 W CN 2016098319W WO 2017045558 A1 WO2017045558 A1 WO 2017045558A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- depth
- field range
- field
- picture
- focus
- Prior art date
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N23/00—Cameras or camera modules comprising electronic image sensors; Control thereof
- H04N23/95—Computational photography systems, e.g. light-field imaging systems
- H04N23/958—Computational photography systems, e.g. light-field imaging systems for extended depth of field imaging
- H04N23/959—Computational photography systems, e.g. light-field imaging systems for extended depth of field imaging by adjusting depth of field during image capture, e.g. maximising or setting range based on scene characteristics
Definitions
- Embodiments of the present invention relate to, but are not limited to, the field of image capturing, and more particularly, to a depth of field adjustment method, apparatus, and terminal.
- the use of mobile phone cameras to capture images is increasingly popular with users.
- the obtained image is not completely clear.
- the object to be photographed can only be clearly imaged on the imaging surface within a limited distance before and after the focus point of the camera.
- the distance that can form a clear image is the depth of field.
- the depth of field is determined by three factors: lens focal length, aperture value and shooting distance.
- lens focal length For mobile phone cameras, due to hardware limitations, their aperture and focal length are fixed.
- aperture and focal length are fixed.
- This change in depth of field is achieved by changing the focus point. The distance that can be clearly imaged is not actually changed, and the resulting image is clear only for a limited distance before and after the focus point.
- the depth of field is fixed after the focus is achieved, and the user cannot adjust (for example, increase or decrease) the depth of field to increase or decrease the distance of the clear imaging.
- the mobile phone camera of the related art has a fixed depth of field, so it cannot meet the needs of photography enthusiasts, and is not humanized enough to affect the user experience.
- the embodiment of the invention provides a method, a device and a terminal for adjusting the depth of field, so as to at least solve the defects in the related art that the user experience is affected by the fixed depth of field.
- a depth of field adjustment method including:
- Focus on the target collect a base image and calculate the current depth of field
- the method further comprises: setting a preset depth of field range.
- the steps of collecting multiple pictures and superimposing the pictures of the preset depth of field range include:
- the current depth of field range is smaller than the preset depth of field range, focus is performed in the foreground depth direction and/or the back depth direction, and multiple front and back scene images are acquired;
- the captured base picture and the front and back scene pictures are superimposed, and the focus blurred part of the base picture is replaced with the focus clear part of the front and back scene picture to obtain a picture with a preset depth of field range.
- the superimposing the collected basic picture and the front and back scene images includes:
- the focus blur portion of the base picture that is within the preset depth of field is replaced by the same portion of the front and back scene picture that is sharply focused.
- the steps of collecting multiple pictures and superimposing the pictures of the preset depth of field range include:
- the current depth of field range is greater than the preset depth of field range, focus in the foreground depth direction and/or the back depth direction, and collect multiple front and back scene images;
- the collected basic picture and the front and back scene pictures are superimposed, and the focus blurred part in the front and back scene pictures is replaced with the focus clear part in the base picture to obtain a picture with a preset depth of field range.
- the superimposing the collected basic picture and the front and back scene images includes:
- the other parts with sharp focus are replaced by the part with blurred focus.
- the method further includes:
- a depth of field adjustment device including:
- a first picture capturing device configured to focus on the target, collect a base picture, and calculate a current depth of field range
- the second picture capturing device is configured to: if the current depth of field range and the preset depth of field range are inconsistent, focus on the foreground depth direction and/or the back depth direction of the target object, and collect multiple pictures;
- the compositing device is configured to superimpose the collected plurality of pictures, replace the blurred portion with a portion with a clear focus or replace the portion with a clear focus with a portion with a focus blur to obtain a picture of a preset depth of field range.
- the second picture collection device is further configured to: if the second picture collection device determines that the current depth of field range does not match the preset depth of field range,
- a terminal including the depth of field adjustment device described above.
- another depth adjustment method comprising:
- the collected new picture is superimposed with the base picture to obtain a clear picture of a preset depth of field range.
- the method further includes: setting the preset depth of field range before the focusing on the target.
- the collected base image and the at least one new image are superimposed according to the preset depth of field range, and the preset depth of field is replaced with the portion with clear focus in the new image.
- a portion of the base picture in the range where the focus is blurred at the same position, and a clear picture of the preset depth of field range is obtained.
- the collected base image and the at least one new image are superimposed according to the preset depth of field range, and the preset depth of field is replaced by the focus blurred portion of the new image. A portion with a clear focus at the same position in the base picture outside the range, and a clear picture of the preset depth of field range is obtained.
- the method further includes:
- the number of the collected new pictures is greater than or equal to a ratio of the difference to a current depth of field range.
- another depth of field adjustment device comprising:
- a first picture collecting unit configured to focus on the target, collect a base picture of the target, and calculate a current depth of field range
- a second picture collecting unit configured to determine that the current depth of field range is different from the preset depth of field range, and focus on the foreground depth direction and/or the back depth direction of the target object to collect at least one new picture
- a synthesizing unit according to the size relationship between the current depth of field range and the preset depth of field range, superimposing the captured new picture and the basic picture to obtain a clear picture of a preset depth of field range.
- the device further comprises:
- a setting unit configured to set the preset depth of field range before the first picture collecting unit focuses on the target.
- the second picture collecting unit determines that the current depth of field range is different from the preset depth of field range
- the method further includes: calculating a difference between the preset depth of field range and the current depth of field range; obtaining a ratio of the difference to the current depth of field range, and determining, according to the ratio, the number of the new pictures to be collected.
- a sixth aspect there is provided another terminal, the terminal comprising the depth of field adjustment device described in the fifth aspect.
- the depth-of-depth adjustment method, device and terminal of the embodiment of the invention can realize the user's custom control of the depth of field and control the range of clear imaging; and can be used for taking more personalized photo effects, such as background blurring and clear front and back scenes. Etc., more humane, more playable, greatly improving the user's shooting experience.
- FIG. 1 is a flow chart of a depth of field adjustment method according to an embodiment of the present invention.
- FIG. 2 is a schematic view showing the focus of an object according to an embodiment of the present invention.
- FIG. 3 is a schematic diagram of calculation of a depth of field range according to an embodiment of the present invention.
- FIG. 4 is a schematic diagram of a range of depth of field according to an embodiment of the present invention.
- Figure 5 is a schematic illustration of an expanded depth of field range in accordance with an embodiment of the present invention.
- FIG. 6 is a schematic diagram of adjusting a range of depth of field according to an embodiment of the present invention.
- FIG. 7 is a schematic diagram of focusing a captured picture in a back depth direction of a target according to an embodiment of the present invention.
- FIGS. 8 is a schematic diagram of a picture in which the depth of field obtained by superimposing the pictures of FIGS. 2 and 7 is enlarged;
- FIG. 9 is a schematic diagram of a picture with clear front and back views obtained by an embodiment of the present invention.
- Figure 10 is a block diagram showing the structure of a depth of field adjustment apparatus according to an embodiment of the present invention.
- FIG. 11 is a schematic structural diagram of a terminal according to an embodiment of the present invention.
- Figure 12 is a block diagram of the main electrical structure of a camera in accordance with an embodiment of the present invention.
- the depth of field adjustment method, device and terminal of the embodiment of the invention can solve the defect that the relevant terminal depth of field is fixed and cannot meet the user's demand, obtain the custom control of the depth of field, and control the clear imaging range, which greatly improves the user's shooting experience.
- the preset depth of field range when the preset depth of field range is inconsistent with the actual captured depth of field range, multiple images are collected in the foreground depth direction and/or the back depth direction of the target object, and the collected multiple images are superimposed. Replace the blurred part with the part with sharp focus or replace the part with the focus with the focus blur to obtain the picture of the preset depth of field orientation, to realize the custom control of the depth of field and the control of the clear imaging range.
- the depth of field adjustment method of the embodiment of the invention includes the following steps:
- the user can pre-customize the desired depth of field range through the touch screen, keyboard, etc. of the terminal. For example, if the depth of field range is set to 100 mm, the captured base picture is a clear image within 100 mm.
- the target 10 is focused, and after focusing, the focus 10 falls on the object 10, whereby the base picture 100 containing the object 10 is collected.
- the current depth of field range of the base picture 100 is calculated by the following equations (1) - (3).
- ⁇ is the circle of confusion diameter
- F is the aperture value of the camera shooting
- L is the shooting distance
- ⁇ L 1 is dark foreground
- [Delta] L is the depth of field .
- autofocusing can be performed by point focusing, weighted average focusing, or the like, or manually by the user.
- manual focusing it can be achieved by moving the focus point to the target.
- the user can achieve manual focus by dragging the focus point 10 to fall on the target.
- the focus point 20 can be dragged to the tree, the cuboid or the room.
- the current depth of field calculated in step S1 is compared with the preset depth of field preset by the user. If the two are inconsistent, the focus is in the foreground depth direction and the back depth direction of the object 10, and the acquisition is performed. Picture.
- the shooting distance L remains unchanged, and only the position of the focus point 20 is changed (ie, the image capturing device, for example, the position of the terminal should remain unchanged).
- the number of captured images is determined by the difference between the current depth of field range and the preset depth of field range. Specifically, the difference between the preset depth of field range and the current depth of field range is calculated, and the difference is compared with the current depth of field range to obtain a ratio. The number of sheets of the collected picture is greater than or equal to the ratio (if the ratio is not an integer, the integer value is taken). For example, if the preset depth of field is 100mm and the current depth of field is 50mm, the difference between the two is 50mm, and the ratio is 1, you need to collect at least one foreground image or background image; if the current depth of field is 40, If the difference is 60 and the ratio is 1.5, then at least 2 foreground images and/or background images need to be acquired.
- the foreground image or the background image can be collected according to the actual situation. Just ensure that the image with the preset depth of field can be obtained after the subsequent superimposition.
- the preset depth of field range Ly is larger than the current depth of field Ls range, multiple consecutive focusing is performed in the foreground depth direction and/or the back depth direction of the target, and multiple pictures are acquired.
- the number of sheets of the captured picture is determined by the above steps. Referring to Fig. 5, focusing is performed on the foreground depth and the back depth direction of the target (tree), respectively, and two pictures are collected.
- the meshed shaded portion of the figure represents the focus blur portion, and the rest is the focus sharp portion. It should be understood that the depth of field of the terminal is limited by hardware and cannot be adjusted. Therefore, before When the focus is taken in the depth of field direction and the depth of field, the depth of field range Ls2 and Ls1 are equal to Ls.
- the focus blur portion in the preset picture within the preset depth range is replaced by the same portion with clear focus in the front and back scene picture. That is, when the preset depth of field range is larger than the current depth of field range, when the overlay is superimposed, the base image (the first image in FIG. 5) is used as the initial frame, and the same portion of the different focus positions is superimposed (ie, superimposed on the target object) , replace the blurred part with the sharp part of the focus to get a larger depth of field range (ie, the preset depth of field range Ly).
- the preset depth of field range Ly is smaller than the current depth of field Ls, multiple consecutive focusing is performed in the foreground depth direction and/or the back depth direction of the target, and multiple pictures are acquired.
- the number of sheets of the captured picture is determined by the above steps. Referring to Fig. 6, focusing is performed on the foreground depth and the back depth direction of the target (tree), respectively, and two pictures are collected.
- the meshed shaded portion of the figure represents the focus blur portion, and the rest is the focus sharp portion. It should be understood that the depth of field of the terminal is limited by hardware and cannot be adjusted. Therefore, the depth of field range Ls2 and Ls1 and Ls are equal when the focus is photographed in the foreground depth direction and the back depth direction.
- the depth of field adjustment method of the embodiment of the present invention can be superimposed by superimposing the base picture 100 and the front and rear depth of field pictures (the picture obtained by using the rectangular parallelepiped as the focus point as shown in FIG. 7 ).
- the depth of field of the base picture 100 is enlarged, and the picture shown in Fig. 8 is obtained.
- the depth of field is enlarged, and the tree and the cuboid are clear parts.
- a picture with clear front and back views as shown in FIG. 9 can also be obtained.
- the depth of field adjustment method of the embodiment of the invention can realize the user's custom control of the depth of field and control the range of clear imaging; and can be used for taking more personalized photo special effects, such as background blur, clear front and rear scenery, etc., and more humanized It is more playable and greatly enhances the user's shooting experience.
- an embodiment of the present invention further provides a depth of field adjustment apparatus, including:
- the first picture capturing device 501 is configured to focus on the target, collect a base picture, and calculate a current depth of field range.
- Autofocus can be done by point focus, weighted average focus, etc., or the user can focus manually (for example, by focusing on an object in the frame for manual focus). After focusing, the current depth of field range is calculated according to the above formulas (1)-(3).
- the second picture capturing device 502 is configured to collect a plurality of pictures in the foreground depth direction and/or the back depth direction of the target if the current depth of field range and the preset depth of field range do not match.
- the second picture collecting device 502 compares the difference between the current depth of field range and the user preset depth of field range, and the user preset depth of field range is larger or smaller than the current depth of field range, and the target depth (the subject) is continuously focused in front and rear depth directions (can pass Continuously push the camera motor to focus) and capture multiple pictures. It should be understood that the number of sheets of the collected picture is obtained by superimposing the picture to obtain a range of depth of field that is up to the user's preset depth of field.
- the current depth of field range does not match the preset depth of field range, calculating a difference between the preset depth of field range and the current depth of field range; obtaining a ratio of the difference to the current depth of field range, and collecting the number of the front and back scene images Greater than or equal to the ratio.
- the synthesizing device 503 is configured to superimpose the acquired plurality of pictures, replace the blurred portion with a portion with a sharp focus or replace the portion with a clear focus with a portion with a focus blur to obtain a picture of a preset depth of field range.
- the depth of field adjusting device of the embodiment of the present invention corresponds to the above-described depth of field adjusting method, and details are not described herein again.
- an embodiment of the present invention further provides a terminal, including a camera 200, a display screen 300, an input module 400, and the like, and a depth of field adjustment device 500 (shown in FIG. 10).
- 12 is a block diagram of a main electrical configuration of a camera of one embodiment of the present invention.
- the photographic lens 101 is composed of a plurality of optical lenses for forming a subject image.
- An imaging element 102 is disposed in the vicinity of a position where the subject image is formed by the photographing lens 101 on the optical axis of the photographing lens 101.
- the imaging element 102 functions as an imaging unit that captures a subject image and acquires captured image data.
- Photodiodes constituting each pixel are two-dimensionally arranged in a matrix on the imaging element 102. Each photodiode generates a photoelectric conversion current corresponding to the amount of received light, and the photoelectric conversion current is generated by each photodiode
- the connected capacitor performs charge accumulation.
- the front surface of each pixel is provided with a Bayer array of RGB color filters.
- the imaging element 102 is connected to an imaging circuit 103 that performs charge accumulation control and image signal readout control in the imaging element 102, and performs waveform shaping after reducing the reset noise of the read image signal (analog image signal). Further, gain improvement or the like is performed to obtain an appropriate signal level.
- the imaging circuit 103 is connected to the A/D conversion unit 104, which performs analog-to-digital conversion on the analog image signal, and outputs a digital image signal (hereinafter referred to as image data) to the bus 199.
- image data a digital image signal
- the bus 199 is a transmission path for transmitting various data read or generated inside the camera.
- the A/D conversion unit 104 is connected to the bus 199, and an image processor 105, a JPEG processor 106, a microcomputer 107, a SDRAM (Synchronous DRAM) 108, and a memory interface (hereinafter referred to as a memory I/F) are connected. 109. LCD (Liquid Crystal Display) driver 110.
- the image processor 105 performs various kinds of images such as OB subtraction processing, white balance adjustment, color matrix calculation, gamma conversion, color difference signal processing, noise removal processing, simultaneous processing, edge processing, and the like on the image data based on the output of the imaging element 102. deal with.
- the JPEG processor 106 compresses the image data read out from the SDRAM 108 in accordance with the JPEG compression method. Further, the JPEG processor 106 performs decompression of JPEG image data for image reproduction display. At the time of decompression, the file recorded on the recording medium 115 is read, and after the compression processing is performed in the JPEG processor 106, the decompressed image data is temporarily stored in the SDRAM 108 and displayed on the LCD 116. Further, in the present embodiment, the JPEG method is adopted as the image compression/decompression method. However, the compression/decompression method is not limited thereto, and other compression/decompression methods such as MPEG, TIFF, and H.264 may be used.
- Input module 400 includes, but is not limited to, a physical button or a touch input screen or the like.
- the flash memory 114 stores programs for executing various processing sequences of the microcomputer 107.
- the microcomputer 107 performs overall control of the camera in accordance with the program. Further, the flash memory 114 stores various adjustment values of the camera, and the microcomputer 107 reads out the adjustment value, and performs control of the camera in accordance with the adjustment value.
- the SDRAM 108 is an electrically reprogrammable volatile memory for temporarily storing image data or the like. Reservoir. The SDRAM 108 temporarily stores image data output from the A/D conversion unit 104 and image data processed in the image processor 105, the JPEG processor 106, and the like.
- the memory interface 109 is connected to the recording medium 115, and performs control for writing image data and a file header attached to the image data to the recording medium 115 and reading from the recording medium 115.
- the recording medium 115 is, for example, a recording medium such as a memory card that can be detachably attached to the camera body.
- the recording medium 115 is not limited thereto, and may be a hard disk or the like built in the camera body.
- the LCD driver 110 is connected to the LCD 116, and stores image data processed by the image processor 105 in the SDRAM 108.
- the image data stored in the SDRAM 108 is read and displayed on the LCD 116, or the image data stored in the JPEG processor 106 is compressed.
- the JPEG processor 106 reads the compressed image data of the SDRAM 108, decompresses it, and displays the decompressed image data on the LCD 116.
- the LCD 116 is disposed on the back surface of the camera body or the like to perform image display.
- the LCD 116 is provided with a touch panel that detects a user's touch operation.
- the liquid crystal display panel (LCD 116) is disposed as the display portion.
- the present invention is not limited thereto, and various display panels such as an organic EL may be employed.
- the microcomputer 107 functions as a control unit of the entire camera, and collectively controls various processing sequences of the camera.
- the microcomputer 107 is connected to the input module 400 and the flash memory 114.
- the user customizes the range of depth of field required for taking a picture.
- the microcomputer 107 can control the device in the embodiment to perform the following operations: controlling the image capturing device 102, the camera 101 to focus on the target object, acquiring a base image and calculating the current depth of field range; if the current depth of field range and the preset depth of field If the ranges are inconsistent, the imaging element 102 and the camera 101 are controlled to focus in the foreground depth direction and/or the back depth direction of the object to collect multiple pictures; the collected multiple pictures are superimposed, and the blurred parts are replaced with the blurred parts. Partially replace the portion with sharp focus with a portion that is out of focus to get a picture of the preset depth of field.
- the depth-of-depth adjustment method, device and terminal of the embodiment of the invention can realize the user's custom control of the depth of field and control the range of clear imaging; and can be used for taking more personalized photo effects, such as background blurring and clear front and back scenes. Etc., more humane, more playable, greatly improving the user's shooting experience.
- Any process or method description in the flowcharts or otherwise described in the embodiments of the invention may be understood to represent code that includes one or more executable instructions for implementing the steps of a particular logical function or process. Modules, segments or portions, and the scope of the embodiments of the invention includes additional implementations, in which the functions may be performed in a substantially simultaneous manner or in an inverse order depending on the functions involved, in the order shown or discussed. This should be understood by those skilled in the art of the embodiments of the present invention.
- the invention can also be implemented by a computer program product, which comprises all the features enabling the implementation of the method of the invention, which, when installed in a mobile terminal or computer system, can be implemented by operation.
- the computer program in this document refers to any expression of a set of instructions that can be written in any programming language, code or symbol that gives the system information processing capabilities to directly implement a particular function, or Specific functions are implemented after one or two steps: a) conversion to other languages, codes or symbols; b) reproduction in a different format.
- the present application discloses a depth of field adjustment method, device and terminal.
- the method comprises: focusing on a target object, collecting a basic picture and calculating a current depth of field range; if the current depth of field range and the preset depth of field range are inconsistent, the foreground of the target object Focus in the deep direction and/or the back depth direction to capture multiple images; superimpose multiple images captured, replace the blurred portion with a sharply focused portion or replace the sharply focused portion with the focus blur to obtain a preset depth of field Range of pictures.
- the application can realize the user's custom control of the depth of field and control the range of clear imaging; it can be used to shoot more personalized photo effects, such as background blur, clear front and back, etc., more humanized and more playable. Greatly improve the user's shooting experience.
Landscapes
- Engineering & Computer Science (AREA)
- Computing Systems (AREA)
- Theoretical Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Studio Devices (AREA)
Abstract
A depth-of-field adjustment method and apparatus, and a terminal. The method comprises: focusing a target object, collecting a basic picture, and calculating a current depth-of-field range; if the current depth-of-field range is inconsistent with a preset depth-of-field range, focusing in a front depth-of-field direction and/or back depth-of-field direction of the target object, and collecting a plurality of pictures; and superposing the plurality of collected pictures, replacing an out-of-focus part with an in-focus part or replacing an in-focus part with an out-of-focus part, and obtaining a picture within the preset depth-of-field range.
Description
本发明实施例涉及但不限于图像拍摄领域,更具体地说,涉及一种景深调节方法、装置及终端。Embodiments of the present invention relate to, but are not limited to, the field of image capturing, and more particularly, to a depth of field adjustment method, apparatus, and terminal.
目前,利用手机照相机拍摄图像越来越受到用户的喜爱。但是由于拍摄时存在景深,使得获得的图像不完全清晰。被拍摄物体只有位于照相机的对焦点前后的一段有限距离内,才能在成像面上清晰成像,这段能形成清晰图像的距离就是景深。At present, the use of mobile phone cameras to capture images is increasingly popular with users. However, due to the depth of field when shooting, the obtained image is not completely clear. The object to be photographed can only be clearly imaged on the imaging surface within a limited distance before and after the focus point of the camera. The distance that can form a clear image is the depth of field.
而景深由镜头焦距、光圈值和拍摄距离三个因素决定。对于手机照相机,由于硬件限制,其光圈和焦距固定,若要改变景深,只能通过改变拍摄距离。但是这种景深的改变,是通过改变对焦点实现的,其能够清晰成像的距离实际并未被改变,得到的图像只有在对焦点前后的一段有限距离内是清晰的。The depth of field is determined by three factors: lens focal length, aperture value and shooting distance. For mobile phone cameras, due to hardware limitations, their aperture and focal length are fixed. To change the depth of field, you can only change the shooting distance. However, this change in depth of field is achieved by changing the focus point. The distance that can be clearly imaged is not actually changed, and the resulting image is clear only for a limited distance before and after the focus point.
因此,采用相关的手机照相机对目标物进行拍摄时,合焦后景深即为固定,用户无法对景深进行调整(例如,增大或减少),以增大或减小清晰成像的距离。Therefore, when the target camera is used to shoot the target, the depth of field is fixed after the focus is achieved, and the user cannot adjust (for example, increase or decrease) the depth of field to increase or decrease the distance of the clear imaging.
可见,由于相关技术的手机照相机景深固定,所以无法满足摄影爱好者的需求,不够人性化,影响用户体验。It can be seen that the mobile phone camera of the related art has a fixed depth of field, so it cannot meet the needs of photography enthusiasts, and is not humanized enough to affect the user experience.
发明内容Summary of the invention
本发明实施例提供一种景深调节方法、装置及终端,以至少解决上述相关技术中因景深固定影响用户体验的缺陷。The embodiment of the invention provides a method, a device and a terminal for adjusting the depth of field, so as to at least solve the defects in the related art that the user experience is affected by the fixed depth of field.
以下是对本文详细描述的主题的概述。本概述并非是为了限制权利要求的保护范围。The following is an overview of the topics detailed in this document. This Summary is not intended to limit the scope of the claims.
本发明实施例所采用的技术方案是:The technical solution adopted by the embodiment of the present invention is:
第一方面,提供一种景深调节方法,包括:
In a first aspect, a depth of field adjustment method is provided, including:
对目标物进行对焦,采集一基础图片并计算当前景深范围;Focus on the target, collect a base image and calculate the current depth of field;
若当前景深范围和预设景深范围不一致,则在目标物的前景深方向和/或后景深方向进行对焦,采集多张图片;If the current depth of field range and the preset depth of field range are inconsistent, focus on the foreground depth direction and/or the back depth direction of the target object, and collect multiple images;
将采集的多张图片进行叠加,用对焦清晰的部分替换模糊的部分或用对焦模糊的部分替换对焦清晰的部分,得到预设景深范围的图片。Superimpose the acquired multiple pictures, replace the blurred part with the part with the sharp focus or replace the part with the focus with the focus blur to obtain the picture with the preset depth of field.
其中,所述对目标物进行对焦之前,所述方法还包括:设置预设景深范围。Wherein, before the focusing on the target, the method further comprises: setting a preset depth of field range.
其中,所述若当前景深范围和预设景深范围不一致,采集多张图片,并叠加得到预设景深范围的图片的步骤,包括:If the current depth of field range and the preset depth of field range are inconsistent, the steps of collecting multiple pictures and superimposing the pictures of the preset depth of field range include:
若当前景深范围小于预设景深范围,则在前景深方向和/或后景深方向进行对焦,采集多张前后景图片;If the current depth of field range is smaller than the preset depth of field range, focus is performed in the foreground depth direction and/or the back depth direction, and multiple front and back scene images are acquired;
根据预设景深范围,将采集的基础图片和前、后景图片进行叠加,用前后景图片中对焦清晰部分替换基础图片中对焦模糊的部分,得到预设景深范围的图片。According to the preset depth of field range, the captured base picture and the front and back scene pictures are superimposed, and the focus blurred part of the base picture is replaced with the focus clear part of the front and back scene picture to obtain a picture with a preset depth of field range.
其中,所述将采集的基础图片和前、后景图片进行叠加,包括:The superimposing the collected basic picture and the front and back scene images includes:
将基础图片中处于预设景深范围内的对焦模糊部分由前后景图片中对焦清晰的相同部分替换。The focus blur portion of the base picture that is within the preset depth of field is replaced by the same portion of the front and back scene picture that is sharply focused.
其中,所述若当前景深范围和预设景深范围不一致,采集多张图片,并叠加得到预设景深范围的图片的步骤,包括:If the current depth of field range and the preset depth of field range are inconsistent, the steps of collecting multiple pictures and superimposing the pictures of the preset depth of field range include:
若当前景深范围大于预设景深范围,则在前景深方向和/或后景深方向进行对焦,采集多张前后景图片;If the current depth of field range is greater than the preset depth of field range, focus in the foreground depth direction and/or the back depth direction, and collect multiple front and back scene images;
根据预设景深范围,将采集的基础图片和前后景图片进行叠加,用前后景图片中对焦模糊部分替换基础图片中对焦清晰部分,得到预设景深范围的图片。According to the preset depth of field range, the collected basic picture and the front and back scene pictures are superimposed, and the focus blurred part in the front and back scene pictures is replaced with the focus clear part in the base picture to obtain a picture with a preset depth of field range.
其中,所述将采集的基础图片和前、后景图片进行叠加,包括:The superimposing the collected basic picture and the front and back scene images includes:
基础图片中,除预设景深范围外,将其它对焦清晰的部分由对焦模糊的部分替换。
In the base picture, in addition to the preset depth of field range, the other parts with sharp focus are replaced by the part with blurred focus.
其中,所述方法还包括:The method further includes:
若当前景深范围与预设景深范围不一致,则计算预设景深范围和当前景深范围的差值;If the current depth of field range does not match the preset depth of field range, calculate a difference between the preset depth of field range and the current depth of field range;
获取所述差值与当前景深范围的比值,采集的所述前后景图片的张数大于或等于所述比值。Obtaining a ratio of the difference to a current depth of field range, and the collected number of the front and back scene images is greater than or equal to the ratio.
第二方面,提供一种景深调节装置,包括:In a second aspect, a depth of field adjustment device is provided, including:
第一图片采集装置,设置为对目标物进行对焦,采集一基础图片并计算当前景深范围;a first picture capturing device configured to focus on the target, collect a base picture, and calculate a current depth of field range;
第二图片采集装置,设置为若当前景深范围和预设景深范围不一致,则在目标物的前景深方向和/或后景深方向进行对焦,采集多张图片;The second picture capturing device is configured to: if the current depth of field range and the preset depth of field range are inconsistent, focus on the foreground depth direction and/or the back depth direction of the target object, and collect multiple pictures;
合成装置,设置为将采集的多张图片进行叠加,用对焦清晰的部分替换模糊的部分或用对焦模糊的部分替换对焦清晰的部分,得到预设景深范围的图片。The compositing device is configured to superimpose the collected plurality of pictures, replace the blurred portion with a portion with a clear focus or replace the portion with a clear focus with a portion with a focus blur to obtain a picture of a preset depth of field range.
其中,若所述第二图片采集装置确定当前景深范围与预设景深范围不一致,则所述第二图片采集装置还设置为:The second picture collection device is further configured to: if the second picture collection device determines that the current depth of field range does not match the preset depth of field range,
计算预设景深范围和当前景深范围的差值;获取所述差值与当前景深范围的比值,采集的所述前后景图片的张数大于或等于所述比值。Calculating a difference between the preset depth of field range and the current depth of field range; obtaining a ratio of the difference to the current depth of field range, and the collected number of the front and back scene images is greater than or equal to the ratio.
第三方面,提供一种终端,包括上述的景深调节装置。In a third aspect, a terminal is provided, including the depth of field adjustment device described above.
第四方面,提供另一种景深调节方法,该方法包括:In a fourth aspect, another depth adjustment method is provided, the method comprising:
对目标物进行对焦,采集所述目标物的基础图片;Focusing on the target, and collecting a base picture of the target;
计算当前的景深范围;Calculate the current depth of field range;
确定当前的景深范围与预设的景深范围不同时,对所述目标物的前景深方向和/或后景深方向再次进行对焦,采集至少一张新图片;When it is determined that the current depth of field range is different from the preset depth of field range, focus on the foreground depth direction and/or the back depth direction of the target object, and collect at least one new picture;
依据所述当前的景深范围与所述预设的景深范围间的大小关系,将所述采集新图片与所述基础图片进行叠加,得到预设景深范围的清晰图片。And according to the size relationship between the current depth of field range and the preset depth of field range, the collected new picture is superimposed with the base picture to obtain a clear picture of a preset depth of field range.
其中,所述对目标物进行对焦之前,所述方法还包括:设置所述预设景深范围。
The method further includes: setting the preset depth of field range before the focusing on the target.
其中,所述依据所述当前的景深范围与所述预设的景深范围间的大小关系,将所述采集新图片与所述基础图片进行叠加,包括:And the superimposing the collected new picture and the basic picture according to the size relationship between the current depth of field range and the preset depth of field range, including:
若所述当前的景深范围小于预设的景深范围,则根据预设景深范围,将采集的基础图片和至少一张新图片进行叠加,用所述新图片中对焦清晰的部分替换处于预设景深范围内的所述基础图片中相同位置处对焦模糊的部分,得到所述预设景深范围的清晰图片。If the current depth of field range is smaller than the preset depth of field range, the collected base image and the at least one new image are superimposed according to the preset depth of field range, and the preset depth of field is replaced with the portion with clear focus in the new image. A portion of the base picture in the range where the focus is blurred at the same position, and a clear picture of the preset depth of field range is obtained.
其中,所述依据所述当前的景深范围与所述预设的景深范围间的大小关系,将所述采集新图片与所述基础图片进行叠加,包括:And the superimposing the collected new picture and the basic picture according to the size relationship between the current depth of field range and the preset depth of field range, including:
若所述当前的景深范围大于预设的景深范围,则根据预设景深范围,将采集的基础图片和至少一张新图片进行叠加,用所述新图片中对焦模糊的部分替换除预设景深范围外的所述基础图片中相同位置处对焦清晰的部分,得到所述预设景深范围的清晰图片。If the current depth of field range is greater than the preset depth of field range, the collected base image and the at least one new image are superimposed according to the preset depth of field range, and the preset depth of field is replaced by the focus blurred portion of the new image. A portion with a clear focus at the same position in the base picture outside the range, and a clear picture of the preset depth of field range is obtained.
其中,所述确定当前的景深范围与预设的景深范围不同时,该方法还包括:Wherein, when the determining that the current depth of field range is different from the preset depth of field range, the method further includes:
计算所述预设景深范围和当前景深范围的差值;Calculating a difference between the preset depth of field range and the current depth of field range;
获取所述差值与当前景深范围的比值,依据所述比值确定采集所述新图片的数量。Obtaining a ratio of the difference to a current depth of field range, and determining, according to the ratio, the number of the new pictures to be collected.
其中,所述采集的所述新图片的数量大于或等于所述差值与当前景深范围的比值。The number of the collected new pictures is greater than or equal to a ratio of the difference to a current depth of field range.
第五方面,提供另一种景深调节装置,该装置包括:In a fifth aspect, there is provided another depth of field adjustment device, the device comprising:
第一图片采集单元,设置为对目标物进行对焦,采集所述目标物的基础图片;计算当前的景深范围;a first picture collecting unit configured to focus on the target, collect a base picture of the target, and calculate a current depth of field range;
第二图片采集单元,设置为确定当前的景深范围与预设的景深范围不同时,对所述目标物的前景深方向和/或后景深方向再次进行对焦,采集至少一张新图片;a second picture collecting unit, configured to determine that the current depth of field range is different from the preset depth of field range, and focus on the foreground depth direction and/or the back depth direction of the target object to collect at least one new picture;
合成单元,依据所述当前的景深范围与所述预设的景深范围间的大小关系,将所述采集新图片与所述基础图片进行叠加,得到预设景深范围的清晰图片。
And a synthesizing unit, according to the size relationship between the current depth of field range and the preset depth of field range, superimposing the captured new picture and the basic picture to obtain a clear picture of a preset depth of field range.
其中,所述装置还包括:Wherein, the device further comprises:
设置单元,设置为所述第一图片采集单元对目标物进行对焦之前,设置所述预设景深范围。And a setting unit, configured to set the preset depth of field range before the first picture collecting unit focuses on the target.
其中,所述第二图片采集单元确定当前的景深范围与预设的景深范围不同时,Wherein, the second picture collecting unit determines that the current depth of field range is different from the preset depth of field range,
还设置为:计算所述预设景深范围和当前景深范围的差值;获取所述差值与当前景深范围的比值,依据所述比值确定采集所述新图片的数量。The method further includes: calculating a difference between the preset depth of field range and the current depth of field range; obtaining a ratio of the difference to the current depth of field range, and determining, according to the ratio, the number of the new pictures to be collected.
第六方面,提供另一种终端,所述终端包括第五方面中所述的景深调节装置。In a sixth aspect, there is provided another terminal, the terminal comprising the depth of field adjustment device described in the fifth aspect.
实施本发明实施例的景深调节方法、装置及终端,可实现用户对景深的自定义控制,控制清晰成像的范围;可用于拍出更多个性化的照片特效,如背景虚化、前后景清晰等,更加人性化,可玩性更强,极大提高用户的拍摄体验。The depth-of-depth adjustment method, device and terminal of the embodiment of the invention can realize the user's custom control of the depth of field and control the range of clear imaging; and can be used for taking more personalized photo effects, such as background blurring and clear front and back scenes. Etc., more humane, more playable, greatly improving the user's shooting experience.
在阅读并理解了附图和详细描述后,可以明白其他方面。Other aspects will be apparent upon reading and understanding the drawings and detailed description.
附图概述BRIEF abstract
下面将结合附图及实施例对本发明作进一步说明,附图中:The present invention will be further described below in conjunction with the accompanying drawings and embodiments, in which:
图1是本发明实施例的景深调节方法的流程图;1 is a flow chart of a depth of field adjustment method according to an embodiment of the present invention;
图2是本发明实施例的目标物对焦示意图;2 is a schematic view showing the focus of an object according to an embodiment of the present invention;
图3是本发明实施例的景深范围计算示意图;3 is a schematic diagram of calculation of a depth of field range according to an embodiment of the present invention;
图4是本发明实施例的景深范围示意图;4 is a schematic diagram of a range of depth of field according to an embodiment of the present invention;
图5是本发明实施例的扩大景深范围的示意图;Figure 5 is a schematic illustration of an expanded depth of field range in accordance with an embodiment of the present invention;
图6是本发明实施例的调小景深范围的示意图;6 is a schematic diagram of adjusting a range of depth of field according to an embodiment of the present invention;
图7是本发明实施例的在目标物的后景深方向对焦采集图片的示意图;7 is a schematic diagram of focusing a captured picture in a back depth direction of a target according to an embodiment of the present invention;
图8是将图2和图7的图片进行叠加后得到的景深扩大的图片的示意图;8 is a schematic diagram of a picture in which the depth of field obtained by superimposing the pictures of FIGS. 2 and 7 is enlarged;
图9是本发明实施例获得的前后景清晰的图片的示意图;FIG. 9 is a schematic diagram of a picture with clear front and back views obtained by an embodiment of the present invention; FIG.
图10是本发明实施例的景深调节装置的结构框图;
Figure 10 is a block diagram showing the structure of a depth of field adjustment apparatus according to an embodiment of the present invention;
图11是本发明实施的终端的结构示意图;11 is a schematic structural diagram of a terminal according to an embodiment of the present invention;
图12是本发明实施例的相机的主要电气结构的框图。Figure 12 is a block diagram of the main electrical structure of a camera in accordance with an embodiment of the present invention.
本发明实施例的景深调节方法、装置及终端,可解决相关的终端景深固定,无法满足用户需求的缺陷,取得了景深的自定义控制,清晰成像范围控制,极大提高了用户的拍摄体验。The depth of field adjustment method, device and terminal of the embodiment of the invention can solve the defect that the relevant terminal depth of field is fixed and cannot meet the user's demand, obtain the custom control of the depth of field, and control the clear imaging range, which greatly improves the user's shooting experience.
本发明实施例中,当预设景深范围与实际拍摄的景深范围不一致时,在目标物的前景深方向和/或后景深方向上进行对焦采集多张图片,并将采集的多张图片进行叠加,用对焦清晰的部分替换模糊的部分或用对焦模糊的部分替换对焦清晰的部分,以得到预设景深方位的图片,实现景深的自定义控制和清晰成像范围的控制。In the embodiment of the present invention, when the preset depth of field range is inconsistent with the actual captured depth of field range, multiple images are collected in the foreground depth direction and/or the back depth direction of the target object, and the collected multiple images are superimposed. Replace the blurred part with the part with sharp focus or replace the part with the focus with the focus blur to obtain the picture of the preset depth of field orientation, to realize the custom control of the depth of field and the control of the clear imaging range.
为了对本发明的技术特征、目的和效果有更加清楚的理解,现对照附图详细说明本发明的具体实施方式。For a better understanding of the technical features, objects and effects of the present invention, the embodiments of the present invention are described in detail with reference to the accompanying drawings.
参见图1为本发明实施例的景深调节方法的流程图。本发明实施例的景深调节方法包括以下步骤:1 is a flowchart of a depth of field adjustment method according to an embodiment of the present invention. The depth of field adjustment method of the embodiment of the invention includes the following steps:
S1、对目标物进行对焦,采集一基础图片并计算当前景深范围。S1, focus on the target, collect a basic picture and calculate the current depth of field range.
在该步骤之前,用户可通过终端的触摸屏、键盘等对期望的景深范围进行预先自定义设置。例如,可将景深范围设置为100mm,则拍摄得到的基础图片在100mm范围内为清晰图像。Before this step, the user can pre-customize the desired depth of field range through the touch screen, keyboard, etc. of the terminal. For example, if the depth of field range is set to 100 mm, the captured base picture is a clear image within 100 mm.
参见图2,对目标物10进行对焦,合焦后,对焦点10落于目标物10上,由此,采集到得包含目标物10的基础图片100。基础图片100的当前景深范围通过下式(1)-(3)计算得出。Referring to FIG. 2, the target 10 is focused, and after focusing, the focus 10 falls on the object 10, whereby the base picture 100 containing the object 10 is collected. The current depth of field range of the base picture 100 is calculated by the following equations (1) - (3).
其中,结合图3所示,式中σ为弥散圆直径,f为镜头焦距,F为镜头拍
摄时的光圈值,L为拍摄距离,ΔL1为前景深,ΔL2为后景深,ΔL为景深。Wherein, in conjunction with FIG. 3, where σ is the circle of confusion diameter, f is the lens focal length, F is the aperture value of the camera shooting, L is the shooting distance, ΔL 1 is dark foreground, ΔL 2 after depth, [Delta] L is the depth of field .
在本发明的实施例中,可通过点对焦、加权平均对焦等方法进行自动对焦,也可由用户进行手动对焦。进行手动对焦时,可通过将对焦点移动至目标物实现,例如,对于带有触摸功能的终端,用户通过拖动对焦点10使其落于目标物上可实现手动对焦。图2所示的图中,若通过手动对焦,对焦点20可被拖动到树、长方体或房体处。In the embodiment of the present invention, autofocusing can be performed by point focusing, weighted average focusing, or the like, or manually by the user. When manual focusing is performed, it can be achieved by moving the focus point to the target. For example, for a terminal with a touch function, the user can achieve manual focus by dragging the focus point 10 to fall on the target. In the diagram shown in Fig. 2, if the focus is manually focused, the focus point 20 can be dragged to the tree, the cuboid or the room.
S2、若当前景深范围和预设景深范围不一致,则在目标物的前景深方向和/或后景深方向进行对焦,采集多张图片。S2. If the current depth of field range and the preset depth of field range are inconsistent, focus on the foreground depth direction and/or the back depth direction of the target object, and collect multiple images.
具体的,参见图4,将步骤S1中计算得到当前景深与用户预设的预设景深进行比较,若两者不一致,则在目标物10的前景深方向、后景深方向上进行对焦,采集多张图片。在前景深方向和后景深方向上对焦采集图片时,拍摄距离L保持不变,仅改变对焦点20的位置(即图像采集装置,例如,终端的位置应保持不变)。Specifically, referring to FIG. 4, the current depth of field calculated in step S1 is compared with the preset depth of field preset by the user. If the two are inconsistent, the focus is in the foreground depth direction and the back depth direction of the object 10, and the acquisition is performed. Picture. When the captured image is focused in the foreground depth direction and the back depth direction, the shooting distance L remains unchanged, and only the position of the focus point 20 is changed (ie, the image capturing device, for example, the position of the terminal should remain unchanged).
采集图片的数量由当前景深范围和预设景深范围的差值决定。具体的,计算预设景深范围和当前景深范围的差值,并将差值与当前景深范围相比获得一比值。采集图片的张数大于或等于该比值(若该比值不为整数,则取整数值)。例如,若预设景深范围为100mm,而当前景深范围为50mm,则两者的差值为50mm,比值为1,则至少需要采集1张前景图片或后景图片;若当前景深范围为40,则差值为60,比值为1.5,则至少需要采集2张前景图片和/或后景图片。The number of captured images is determined by the difference between the current depth of field range and the preset depth of field range. Specifically, the difference between the preset depth of field range and the current depth of field range is calculated, and the difference is compared with the current depth of field range to obtain a ratio. The number of sheets of the collected picture is greater than or equal to the ratio (if the ratio is not an integer, the integer value is taken). For example, if the preset depth of field is 100mm and the current depth of field is 50mm, the difference between the two is 50mm, and the ratio is 1, you need to collect at least one foreground image or background image; if the current depth of field is 40, If the difference is 60 and the ratio is 1.5, then at least 2 foreground images and/or background images need to be acquired.
采集前景图片或后景图片,可根据实际情况进行设定,只需保证后续进行叠加后,可获得预设景深范围的图片即可。The foreground image or the background image can be collected according to the actual situation. Just ensure that the image with the preset depth of field can be obtained after the subsequent superimposition.
S3、将采集的多张图片进行叠加,用对焦清晰的部分替换模糊的部分或用对焦模糊的部分替换对焦清晰的部分,得到预设景深范围的图片。S3. Superimpose the collected multiple pictures, replace the blurred part with the part with clear focus or replace the part with clear focus with the part with the focus blur to obtain the picture of the preset depth of field range.
若预设景深范围Ly大于当前景深Ls范围,则在目标物的前景深方向和/或后景深方向进行多次连续对焦,采集多张图片。采集图片的张数通过上述步骤确定。参见图5,分别在目标物(树)的前景深方向和后景深方向进行对焦,采集了两张图片。图中的网状阴影部分代表对焦模糊部分,其余为对焦清晰部分。应理解,终端的景深范围受硬件限制,不可调节,因此,在前
景深方向和后景深方向上对焦拍摄时,其景深范围Ls2和Ls1与Ls是相等的。If the preset depth of field range Ly is larger than the current depth of field Ls range, multiple consecutive focusing is performed in the foreground depth direction and/or the back depth direction of the target, and multiple pictures are acquired. The number of sheets of the captured picture is determined by the above steps. Referring to Fig. 5, focusing is performed on the foreground depth and the back depth direction of the target (tree), respectively, and two pictures are collected. The meshed shaded portion of the figure represents the focus blur portion, and the rest is the focus sharp portion. It should be understood that the depth of field of the terminal is limited by hardware and cannot be adjusted. Therefore, before
When the focus is taken in the depth of field direction and the depth of field, the depth of field range Ls2 and Ls1 are equal to Ls.
具体的,叠加时,将基础图片中处于预设景深范围内的对焦模糊部分由前后景图片中对焦清晰的相同部分替换。即当预设景深范围大于当前景深范围时,在叠加时,以基础图片(图5中的第一幅图像)作为初始帧,叠加不同对焦位置的同一部分(即以目标物为中心进行叠加),用对焦清晰部分替换模糊部分,得到更大的景深范围(即预设景深范围Ly)。Specifically, when superimposing, the focus blur portion in the preset picture within the preset depth range is replaced by the same portion with clear focus in the front and back scene picture. That is, when the preset depth of field range is larger than the current depth of field range, when the overlay is superimposed, the base image (the first image in FIG. 5) is used as the initial frame, and the same portion of the different focus positions is superimposed (ie, superimposed on the target object) , replace the blurred part with the sharp part of the focus to get a larger depth of field range (ie, the preset depth of field range Ly).
若预设景深范围Ly小于当前景深Ls范围,则在目标物的前景深方向和/或后景深方向进行多次连续对焦,采集多张图片。采集图片的张数通过上述步骤确定。参见图6,分别在目标物(树)的前景深方向和后景深方向进行对焦,采集了两张图片。图中的网状阴影部分代表对焦模糊部分,其余为对焦清晰部分。应理解,终端的景深范围受硬件限制,不可调节,因此,在前景深方向和后景深方向上对焦拍摄时,其景深范围Ls2和Ls1与Ls是相等的。If the preset depth of field range Ly is smaller than the current depth of field Ls, multiple consecutive focusing is performed in the foreground depth direction and/or the back depth direction of the target, and multiple pictures are acquired. The number of sheets of the captured picture is determined by the above steps. Referring to Fig. 6, focusing is performed on the foreground depth and the back depth direction of the target (tree), respectively, and two pictures are collected. The meshed shaded portion of the figure represents the focus blur portion, and the rest is the focus sharp portion. It should be understood that the depth of field of the terminal is limited by hardware and cannot be adjusted. Therefore, the depth of field range Ls2 and Ls1 and Ls are equal when the focus is photographed in the foreground depth direction and the back depth direction.
具体的,叠加时,基础图片中,除预设景深范围外,其它对焦清晰的部分由对焦模糊的部分替换。即当预设景深范围Ly小于当前景深范围Ls时,在叠加时,以基础图片(图6中的第一幅图像)作为初始帧,叠加不同对焦位置的同一部分(即以目标物为中心进行叠加),用对焦模糊部分替换清晰部分,得到更小的景深范围(即预设景深范围Ly)。Specifically, when superimposing, in the basic picture, except for the preset depth of field range, other parts with clear focus are replaced by the part with blurred focus. That is, when the preset depth of field range Ly is smaller than the current depth of field range Ls, when the overlay is performed, the base image (the first image in FIG. 6) is used as the initial frame, and the same portion of the different focus positions is superimposed (ie, centered on the target) Superimpose), replace the clear part with the focus blur part to get a smaller depth of field range (ie preset depth range Ly).
参见图7和图8,并结合图2,本发明实施例的景深调节方法,通过将基础图片100和前后景深图片(图7所示的以长方体为对焦点采集得到图片)进行叠加,可将基础图片100的景深扩大,得到图8所示图片。图8中景深扩大,树及长方体均为清晰部分。此外,若将对焦点落于房体上,则还可获得图9所示的前后景清晰的图片。Referring to FIG. 7 and FIG. 8 , and in conjunction with FIG. 2 , the depth of field adjustment method of the embodiment of the present invention can be superimposed by superimposing the base picture 100 and the front and rear depth of field pictures (the picture obtained by using the rectangular parallelepiped as the focus point as shown in FIG. 7 ). The depth of field of the base picture 100 is enlarged, and the picture shown in Fig. 8 is obtained. In Figure 8, the depth of field is enlarged, and the tree and the cuboid are clear parts. In addition, if the focus point is placed on the room, a picture with clear front and back views as shown in FIG. 9 can also be obtained.
本发明实施例的景深调节方法,可实现用户对景深的自定义控制,控制清晰成像的范围;可用于拍出更多个性化的照片特效,如背景虚化、前后景清晰等,更加人性化,可玩性更强,极大提高用户的拍摄体验。The depth of field adjustment method of the embodiment of the invention can realize the user's custom control of the depth of field and control the range of clear imaging; and can be used for taking more personalized photo special effects, such as background blur, clear front and rear scenery, etc., and more humanized It is more playable and greatly enhances the user's shooting experience.
参见图10,本发明实施例还提供一种景深调节装置,包括:Referring to FIG. 10, an embodiment of the present invention further provides a depth of field adjustment apparatus, including:
第一图片采集装置501:设置为对目标物进行对焦,采集一基础图片并计算当前景深范围。
The first picture capturing device 501 is configured to focus on the target, collect a base picture, and calculate a current depth of field range.
可通过点对焦、加权平均对焦等方法进行自动对焦,或用户可手动进行对焦(例如,可通过点击取景框中某个物体进行手动对焦)。合焦后,根据上述式(1)-(3)计算当前景深范围。Autofocus can be done by point focus, weighted average focus, etc., or the user can focus manually (for example, by focusing on an object in the frame for manual focus). After focusing, the current depth of field range is calculated according to the above formulas (1)-(3).
第二图片采集装置502:设置为若当前景深范围和预设景深范围不一致,则在目标物的前景深方向和/或后景深方向进行对焦,采集多张图片。The second picture capturing device 502 is configured to collect a plurality of pictures in the foreground depth direction and/or the back depth direction of the target if the current depth of field range and the preset depth of field range do not match.
第二图片采集装置502比较当前景深范围和用户预设景深范围的差异,用户预设景深范围较当前景深范围大或小,则在目标物(被摄主体)前后景深方向进行连续对焦(可通过连续推动摄像头马达进行对焦),采集多张图片。应理解,采集图片的张数以合成装置进行图片叠加后得到的景深范围达到用户预设景深范围为准。具体的,若当前景深范围与预设景深范围不一致,则计算预设景深范围和当前景深范围的差值;获取所述差值与当前景深范围的比值,采集的所述前后景图片的张数大于或等于所述比值。The second picture collecting device 502 compares the difference between the current depth of field range and the user preset depth of field range, and the user preset depth of field range is larger or smaller than the current depth of field range, and the target depth (the subject) is continuously focused in front and rear depth directions (can pass Continuously push the camera motor to focus) and capture multiple pictures. It should be understood that the number of sheets of the collected picture is obtained by superimposing the picture to obtain a range of depth of field that is up to the user's preset depth of field. Specifically, if the current depth of field range does not match the preset depth of field range, calculating a difference between the preset depth of field range and the current depth of field range; obtaining a ratio of the difference to the current depth of field range, and collecting the number of the front and back scene images Greater than or equal to the ratio.
合成装置503:设置为将采集的多张图片进行叠加,用对焦清晰的部分替换模糊的部分或用对焦模糊的部分替换对焦清晰的部分,得到预设景深范围的图片。The synthesizing device 503 is configured to superimpose the acquired plurality of pictures, replace the blurred portion with a portion with a sharp focus or replace the portion with a clear focus with a portion with a focus blur to obtain a picture of a preset depth of field range.
对采集的多帧图片进行叠加处理:以基础图片(原始合焦帧)为初始帧,叠加前后对焦位置的同一部分,用对焦清晰的部分,替换对焦模糊的部分,得到更大的景深范围;若用户预设景深范围较当前景深范围小,则反之用对焦模糊的部分,替换对焦清晰的部分,得到更小的景深范围。Superimposing the acquired multi-frame picture: taking the base picture (original focus frame) as the initial frame, superimposing the same part of the focus position before and after, and replacing the focus blurred part with the part with clear focus to obtain a larger depth of field range; If the user's preset depth of field range is smaller than the current depth of field range, then the portion with the focus blur is replaced with the portion with the focus sharpness to obtain a smaller depth of field range.
应理解,本发明实施例的景深调节装置和上述景深调节方法是相对应的,在此不再赘述。It should be understood that the depth of field adjusting device of the embodiment of the present invention corresponds to the above-described depth of field adjusting method, and details are not described herein again.
参见图11,本发明实施例还提供一种终端,该终端包括相机200、显示屏300、输入模块400等,还包括上述所述的景深调节装置500(图10所示)。参见图12是本发明的一个实施方式的相机的主要电气结构的框图。其中,摄影镜头101由用于形成被摄体像的多个光学镜头构成。在摄影镜头101的光轴上、由摄影镜头101形成被摄体像的位置附近配置有摄像元件102。摄像元件102发挥作为对被摄体像摄像并取得摄像图像数据的摄像部的功能。在摄像元件102上二维地呈矩阵状配置有构成各像素的光电二极管。各光电二极管产生与受光量对应的光电转换电流,该光电转换电流由与各光电二极管
连接的电容器进行电荷蓄积。各像素的前表面配置有拜耳排列的RGB滤色器。Referring to FIG. 11, an embodiment of the present invention further provides a terminal, including a camera 200, a display screen 300, an input module 400, and the like, and a depth of field adjustment device 500 (shown in FIG. 10). 12 is a block diagram of a main electrical configuration of a camera of one embodiment of the present invention. Among them, the photographic lens 101 is composed of a plurality of optical lenses for forming a subject image. An imaging element 102 is disposed in the vicinity of a position where the subject image is formed by the photographing lens 101 on the optical axis of the photographing lens 101. The imaging element 102 functions as an imaging unit that captures a subject image and acquires captured image data. Photodiodes constituting each pixel are two-dimensionally arranged in a matrix on the imaging element 102. Each photodiode generates a photoelectric conversion current corresponding to the amount of received light, and the photoelectric conversion current is generated by each photodiode
The connected capacitor performs charge accumulation. The front surface of each pixel is provided with a Bayer array of RGB color filters.
摄像元件102与摄像电路103连接,该摄像电路103在摄像元件102中进行电荷蓄积控制和图像信号读出控制,对该读出的图像信号(模拟图像信号)降低重置噪声后进行波形整形,进而进行增益提高等以成为适当的信号电平。The imaging element 102 is connected to an imaging circuit 103 that performs charge accumulation control and image signal readout control in the imaging element 102, and performs waveform shaping after reducing the reset noise of the read image signal (analog image signal). Further, gain improvement or the like is performed to obtain an appropriate signal level.
摄像电路103与A/D转换部104连接,该A/D转换部104对模拟图像信号进行模数转换,向总线199输出数字图像信号(以下称之为图像数据)。The imaging circuit 103 is connected to the A/D conversion unit 104, which performs analog-to-digital conversion on the analog image signal, and outputs a digital image signal (hereinafter referred to as image data) to the bus 199.
总线199是用于传送在相机的内部读出或生成的各种数据的传送路径。在总线199连接着上述A/D转换部104,此外还连接着图像处理器105、JPEG处理器106、微型计算机107、SDRAM(Synchronous DRAM)108、存储器接口(以下称之为存储器I/F)109、LCD(液晶显示器:Liquid Crystal Display)驱动器110。The bus 199 is a transmission path for transmitting various data read or generated inside the camera. The A/D conversion unit 104 is connected to the bus 199, and an image processor 105, a JPEG processor 106, a microcomputer 107, a SDRAM (Synchronous DRAM) 108, and a memory interface (hereinafter referred to as a memory I/F) are connected. 109. LCD (Liquid Crystal Display) driver 110.
图像处理器105对基于摄像元件102的输出的图像数据进行OB相减处理、白平衡调整、颜色矩阵运算、伽马转换、色差信号处理、噪声去除处理、同时化处理、边缘处理等各种图像处理。The image processor 105 performs various kinds of images such as OB subtraction processing, white balance adjustment, color matrix calculation, gamma conversion, color difference signal processing, noise removal processing, simultaneous processing, edge processing, and the like on the image data based on the output of the imaging element 102. deal with.
JPEG处理器106在将图像数据记录于记录介质115时,按照JPEG压缩方式压缩从SDRAM108读出的图像数据。此外,JPEG处理器106为了进行图像再现显示而进行JPEG图像数据的解压缩。进行解压缩时,读出记录在记录介质115中的文件,在JPEG处理器106中实施了解压缩处理后,将解压缩的图像数据暂时存储于SDRAM108中并在LCD116上进行显示。另外,在本实施方式中,作为图像压缩解压缩方式采用的是JPEG方式,然而压缩解压缩方式不限于此,当然可以采用MPEG、TIFF、H.264等其他的压缩解压缩方式。When the image data is recorded on the recording medium 115, the JPEG processor 106 compresses the image data read out from the SDRAM 108 in accordance with the JPEG compression method. Further, the JPEG processor 106 performs decompression of JPEG image data for image reproduction display. At the time of decompression, the file recorded on the recording medium 115 is read, and after the compression processing is performed in the JPEG processor 106, the decompressed image data is temporarily stored in the SDRAM 108 and displayed on the LCD 116. Further, in the present embodiment, the JPEG method is adopted as the image compression/decompression method. However, the compression/decompression method is not limited thereto, and other compression/decompression methods such as MPEG, TIFF, and H.264 may be used.
输入模块400包括但不限于实体按键或者触摸输入屏等。 Input module 400 includes, but is not limited to, a physical button or a touch input screen or the like.
闪存114存储用于执行微型计算机107的各种处理序列的程序。微型计算机107根据该程序进行相机整体的控制。此外,闪存114存储相机的各种调整值,微型计算机107读出调整值,按照该调整值进行相机的控制。The flash memory 114 stores programs for executing various processing sequences of the microcomputer 107. The microcomputer 107 performs overall control of the camera in accordance with the program. Further, the flash memory 114 stores various adjustment values of the camera, and the microcomputer 107 reads out the adjustment value, and performs control of the camera in accordance with the adjustment value.
SDRAM108是用于对图像数据等进行暂时存储的可电改写的易失性存
储器。该SDRAM108暂时存储从A/D转换部104输出的图像数据和在图像处理器105、JPEG处理器106等中进行了处理后的图像数据。The SDRAM 108 is an electrically reprogrammable volatile memory for temporarily storing image data or the like.
Reservoir. The SDRAM 108 temporarily stores image data output from the A/D conversion unit 104 and image data processed in the image processor 105, the JPEG processor 106, and the like.
存储器接口109与记录介质115连接,进行将图像数据和附加在图像数据中的文件头等数据写入记录介质115和从记录介质115中读出的控制。记录介质115例如为能够在相机主体上自由拆装的存储器卡等记录介质,然而不限于此,也可以是内置在相机主体中的硬盘等。The memory interface 109 is connected to the recording medium 115, and performs control for writing image data and a file header attached to the image data to the recording medium 115 and reading from the recording medium 115. The recording medium 115 is, for example, a recording medium such as a memory card that can be detachably attached to the camera body. However, the recording medium 115 is not limited thereto, and may be a hard disk or the like built in the camera body.
LCD驱动器110与LCD116连接,将由图像处理器105处理后的图像数据存储于SDRAM108,需要显示时,读取SDRAM108存储的图像数据并在LCD116上显示,或者,JPEG处理器106压缩过的图像数据存储于SDRAM108,在需要显示时,JPEG处理器106读取SDRAM108的压缩过的图像数据,再进行解压缩,将解压缩后的图像数据通过LCD116进行显示。The LCD driver 110 is connected to the LCD 116, and stores image data processed by the image processor 105 in the SDRAM 108. When display is required, the image data stored in the SDRAM 108 is read and displayed on the LCD 116, or the image data stored in the JPEG processor 106 is compressed. In the SDRAM 108, when display is required, the JPEG processor 106 reads the compressed image data of the SDRAM 108, decompresses it, and displays the decompressed image data on the LCD 116.
LCD116配置在相机主体的背面等上,进行图像显示。该LCD116设有检测用户的触摸操作的触摸面板。另外,作为显示部,在本实施方式中配置的是液晶表示面板(LCD116),然而不限于此,也可以采用有机EL等各种显示面板。The LCD 116 is disposed on the back surface of the camera body or the like to perform image display. The LCD 116 is provided with a touch panel that detects a user's touch operation. Further, in the present embodiment, the liquid crystal display panel (LCD 116) is disposed as the display portion. However, the present invention is not limited thereto, and various display panels such as an organic EL may be employed.
微型计算机107发挥作为该相机整体的控制部的功能,统一控制相机的各种处理序列。微型计算机107连接着输入模块400和闪存114。The microcomputer 107 functions as a control unit of the entire camera, and collectively controls various processing sequences of the camera. The microcomputer 107 is connected to the input module 400 and the flash memory 114.
用户通过输入模块400,自定义设置拍照时所需的景深范围。拍照开始时,对摄像头取景框中的目标物进行对焦。Through the input module 400, the user customizes the range of depth of field required for taking a picture. When the picture starts, focus on the target in the camera frame.
所述微型计算机107可通过执行程序控制本实施例中装置执行下列操作:控制摄像元件102、摄像头101对目标物进行对焦,采集一基础图片并计算当前景深范围;若当前景深范围和预设景深范围不一致,则控制摄像元件102和摄像头101在目标物的前景深方向和/或后景深方向进行对焦,以采集多张图片;将采集的多张图片进行叠加,用对焦清晰的部分替换模糊的部分或用对焦模糊的部分替换对焦清晰的部分,以得到预设景深范围的图片。The microcomputer 107 can control the device in the embodiment to perform the following operations: controlling the image capturing device 102, the camera 101 to focus on the target object, acquiring a base image and calculating the current depth of field range; if the current depth of field range and the preset depth of field If the ranges are inconsistent, the imaging element 102 and the camera 101 are controlled to focus in the foreground depth direction and/or the back depth direction of the object to collect multiple pictures; the collected multiple pictures are superimposed, and the blurred parts are replaced with the blurred parts. Partially replace the portion with sharp focus with a portion that is out of focus to get a picture of the preset depth of field.
实施本发明实施例的景深调节方法、装置及终端,可实现用户对景深的自定义控制,控制清晰成像的范围;可用于拍出更多个性化的照片特效,如背景虚化、前后景清晰等,更加人性化,可玩性更强,极大提高用户的拍摄体验。
The depth-of-depth adjustment method, device and terminal of the embodiment of the invention can realize the user's custom control of the depth of field and control the range of clear imaging; and can be used for taking more personalized photo effects, such as background blurring and clear front and back scenes. Etc., more humane, more playable, greatly improving the user's shooting experience.
流程图中或在本发明的实施例中以其他方式描述的任何过程或方法描述可以被理解为,表示包括一个或更多个用于实现特定逻辑功能或过程的步骤的可执行指令的代码的模块、片段或部分,并且本发明实施方式的范围包括另外的实现,其中可以不按所示出或讨论的顺序,包括根据所涉及的功能按基本同时的方式或按相反的顺序,来执行功能,这应被本发明的实施例所述技术领域的技术人员所理解。Any process or method description in the flowcharts or otherwise described in the embodiments of the invention may be understood to represent code that includes one or more executable instructions for implementing the steps of a particular logical function or process. Modules, segments or portions, and the scope of the embodiments of the invention includes additional implementations, in which the functions may be performed in a substantially simultaneous manner or in an inverse order depending on the functions involved, in the order shown or discussed. This should be understood by those skilled in the art of the embodiments of the present invention.
本发明还可以通过计算机程序产品进行实施,所述程序包含能够实现本发明方法的全部特征,当其安装到移动终端或计算机系统中时,通过运行,可以实现本发明的方法。本文件中的计算机程序所指的是:可以采用任何程序语言、代码或符号编写的一组指令的任何表达式,该指令组使系统具有信息处理能力,以直接实现特定功能,或在进行下述一个或两个步骤之后实现特定功能:a)转换成其它语言、编码或符号;b)以不同的格式再现。The invention can also be implemented by a computer program product, which comprises all the features enabling the implementation of the method of the invention, which, when installed in a mobile terminal or computer system, can be implemented by operation. The computer program in this document refers to any expression of a set of instructions that can be written in any programming language, code or symbol that gives the system information processing capabilities to directly implement a particular function, or Specific functions are implemented after one or two steps: a) conversion to other languages, codes or symbols; b) reproduction in a different format.
上面结合附图对本发明的实施例进行了描述,但是本发明并不局限于上述的具体实施方式,上述的具体实施方式仅仅是示意性的,而不是限制性的,本领域的普通技术人员在本发明的启示下,在不脱离本发明宗旨和权利要求所保护的范围情况下,还可做出很多形式,这些均属于本发明的保护之内。The embodiments of the present invention have been described above with reference to the drawings, but the present invention is not limited to the specific embodiments described above, and the specific embodiments described above are merely illustrative and not restrictive, and those skilled in the art In the light of the present invention, many forms may be made without departing from the spirit and scope of the invention as claimed.
本申请公开了一种景深调节方法、装置及终端,方法包括:对目标物进行对焦,采集一基础图片并计算当前景深范围;若当前景深范围和预设景深范围不一致,则在目标物的前景深方向和/或后景深方向进行对焦,采集多张图片;将采集的多张图片进行叠加,用对焦清晰的部分替换模糊的部分或用对焦模糊的部分替换对焦清晰的部分,得到预设景深范围的图片。本申请可实现用户对景深的自定义控制,控制清晰成像的范围;可用于拍出更多个性化的照片特效,如背景虚化、前后景清晰等,更加人性化,可玩性更强,极大提高用户的拍摄体验。
The present application discloses a depth of field adjustment method, device and terminal. The method comprises: focusing on a target object, collecting a basic picture and calculating a current depth of field range; if the current depth of field range and the preset depth of field range are inconsistent, the foreground of the target object Focus in the deep direction and/or the back depth direction to capture multiple images; superimpose multiple images captured, replace the blurred portion with a sharply focused portion or replace the sharply focused portion with the focus blur to obtain a preset depth of field Range of pictures. The application can realize the user's custom control of the depth of field and control the range of clear imaging; it can be used to shoot more personalized photo effects, such as background blur, clear front and back, etc., more humanized and more playable. Greatly improve the user's shooting experience.
Claims (20)
- 一种景深调节方法,该方法包括:A depth of field adjustment method, the method comprising:对目标物进行对焦,采集一基础图片并计算当前景深范围;Focus on the target, collect a base image and calculate the current depth of field;若当前景深范围和预设景深范围不一致,则在目标物的前景深方向和/或后景深方向进行对焦,采集多张图片;If the current depth of field range and the preset depth of field range are inconsistent, focus on the foreground depth direction and/or the back depth direction of the target object, and collect multiple images;将采集的多张图片进行叠加,用对焦清晰的部分替换模糊的部分或用对焦模糊的部分替换对焦清晰的部分,得到预设景深范围的图片。Superimpose the acquired multiple pictures, replace the blurred part with the part with the sharp focus or replace the part with the focus with the focus blur to obtain the picture with the preset depth of field.
- 根据权利要求1所述的景深调节方法,所述对目标物进行对焦之前,所述方法还包括:设置预设景深范围。The depth of field adjustment method according to claim 1, before the focusing on the object, the method further comprises: setting a preset depth of field range.
- 根据权利要求1所述的景深调节方法,所述若当前景深范围和预设景深范围不一致,采集多张图片,并叠加得到预设景深范围的图片的步骤,包括:The depth of field adjustment method according to claim 1, wherein if the current depth of field range and the preset depth of field range are inconsistent, the steps of collecting a plurality of pictures and superimposing the pictures of the preset depth of field range include:若当前景深范围小于预设景深范围,则在前景深方向和/或后景深方向进行对焦,采集多张前、后景图片;If the current depth of field range is smaller than the preset depth of field range, focus is performed in the foreground depth direction and/or the back depth direction, and multiple front and back scene images are acquired;根据预设景深范围,将采集的基础图片和前、后景图片进行叠加,用前后景图片中对焦清晰部分替换基础图片中对焦模糊的部分,得到预设景深范围的图片。According to the preset depth of field range, the captured base picture and the front and back scene pictures are superimposed, and the focus blurred part of the base picture is replaced with the focus clear part of the front and back scene picture to obtain a picture with a preset depth of field range.
- 根据权利要求3所述的景深调节方法,其中,所述将采集的基础图片和前、后景图片进行叠加,包括:The depth of field adjustment method according to claim 3, wherein the superimposing the collected base picture and the front and back scene pictures comprises:将基础图片中处于预设景深范围内的对焦模糊部分由前、后景图片中对焦清晰的相同部分替换。The focus blur portion of the base picture that is within the preset depth of field is replaced by the same portion of the front and back scenes that are clearly focused.
- 根据权利要求1所述的景深调节方法,所述若当前景深范围和预设景深范围不一致,采集多张图片,并叠加得到预设景深范围的图片的步骤,包括:The depth of field adjustment method according to claim 1, wherein if the current depth of field range and the preset depth of field range are inconsistent, the steps of collecting a plurality of pictures and superimposing the pictures of the preset depth of field range include:若当前景深范围大于预设景深范围,则在前景深方向和/或后景深方向进行对焦,采集多张前、后景图片;If the current depth of field range is greater than the preset depth of field range, focus in the foreground depth direction and/or the back depth direction, and collect multiple front and back scene images;根据预设景深范围,将采集的基础图片和前、后景图片进行叠加,用前、 后景图片中对焦模糊部分替换基础图片中对焦清晰部分,得到预设景深范围的图片。According to the preset depth of field range, the collected base picture and the front and back scene pictures are superimposed, before use, The focus blur portion in the background image replaces the sharp portion in the base picture to obtain a picture with a preset depth of field range.
- 根据权利要求5所述的景深调节方法,其中,所述将采集的基础图片和前、后景图片进行叠加,包括:The depth of field adjustment method according to claim 5, wherein the superimposing the collected base picture and the front and back scene pictures comprises:基础图片中,除预设景深范围外,将其它对焦清晰的部分由对焦模糊的部分替换。In the base picture, in addition to the preset depth of field range, the other parts with sharp focus are replaced by the part with blurred focus.
- 根据权利要求1所述的景深调节方法,所述方法还包括:The depth of field adjustment method according to claim 1, further comprising:若当前景深范围与预设景深范围不一致,则计算预设景深范围和当前景深范围的差值;If the current depth of field range does not match the preset depth of field range, calculate a difference between the preset depth of field range and the current depth of field range;获取所述差值与当前景深范围的比值,采集的所述前后景图片的张数大于或等于所述比值。Obtaining a ratio of the difference to a current depth of field range, and the collected number of the front and back scene images is greater than or equal to the ratio.
- 一种景深调节装置,该装置包括:A depth of field adjustment device, the device comprising:第一图片采集装置,设置为对目标物进行对焦,采集一基础图片并计算当前景深范围;a first picture capturing device configured to focus on the target, collect a base picture, and calculate a current depth of field range;第二图片采集装置,设置为确定当前景深范围和预设景深范围不一致,则在目标物的前景深方向和/或后景深方向进行对焦,采集多张图片;The second picture capturing device is configured to determine that the current depth of field range and the preset depth of field range are inconsistent, and then focus on the foreground depth direction and/or the back depth direction of the target object, and collect multiple pictures;合成装置,设置为将采集的多张图片进行叠加,用对焦清晰的部分替换模糊的部分或用对焦模糊的部分替换对焦清晰的部分,得到预设景深范围的图片。The compositing device is configured to superimpose the collected plurality of pictures, replace the blurred portion with a portion with a clear focus or replace the portion with a clear focus with a portion with a focus blur to obtain a picture of a preset depth of field range.
- 根据权利要求8所述的景深调节装置,其中,若所述第二图片采集装置确定当前景深范围与预设景深范围不一致,则所述第二图片采集装置还设置为:The depth of field adjusting device according to claim 8, wherein if the second picture capturing device determines that the current depth of field range does not coincide with the preset depth of field range, the second picture capturing device is further configured to:计算预设景深范围和当前景深范围的差值;获取所述差值与当前景深范围的比值,采集的所述前后景图片的张数大于或等于所述比值。Calculating a difference between the preset depth of field range and the current depth of field range; obtaining a ratio of the difference to the current depth of field range, and the collected number of the front and back scene images is greater than or equal to the ratio.
- 一种终端,所述终端包括权利要求8-9中任一项所述的景深调节装置。A terminal comprising the depth of field adjustment device of any one of claims 8-9.
- 一种景深调节方法,该方法包括: A depth of field adjustment method, the method comprising:对目标物进行对焦,采集所述目标物的基础图片;Focusing on the target, and collecting a base picture of the target;计算当前的景深范围;Calculate the current depth of field range;确定当前的景深范围与预设的景深范围不同时,对所述目标物的前景深方向和/或后景深方向再次进行对焦,采集至少一张新图片;When it is determined that the current depth of field range is different from the preset depth of field range, focus on the foreground depth direction and/or the back depth direction of the target object, and collect at least one new picture;依据所述当前的景深范围与所述预设的景深范围间的大小关系,将所述采集新图片与所述基础图片进行叠加,得到预设景深范围的清晰图片。And according to the size relationship between the current depth of field range and the preset depth of field range, the collected new picture is superimposed with the base picture to obtain a clear picture of a preset depth of field range.
- 根据权利要求11所述的景深调节方法,所述对目标物进行对焦之前,所述方法还包括:设置所述预设景深范围。The depth of field adjustment method according to claim 11, before the focusing on the object, the method further comprises: setting the preset depth of field range.
- 根据权利要求11所述的景深调节方法,所述依据所述当前的景深范围与所述预设的景深范围间的大小关系,将所述采集新图片与所述基础图片进行叠加,包括:The depth of field adjustment method according to claim 11, wherein the superimposing the captured new picture and the basic picture according to the size relationship between the current depth of field range and the preset depth of field range comprises:若所述当前的景深范围小于预设的景深范围,则根据预设景深范围,将采集的基础图片和至少一张新图片进行叠加,用所述新图片中对焦清晰的部分替换处于预设景深范围内的所述基础图片中相同位置处对焦模糊的部分,得到所述预设景深范围的清晰图片。If the current depth of field range is smaller than the preset depth of field range, the collected base image and the at least one new image are superimposed according to the preset depth of field range, and the preset depth of field is replaced with the portion with clear focus in the new image. A portion of the base picture in the range where the focus is blurred at the same position, and a clear picture of the preset depth of field range is obtained.
- 根据权利要求11所述的景深调节方法,所述依据所述当前的景深范围与所述预设的景深范围间的大小关系,将所述采集新图片与所述基础图片进行叠加,包括:The depth of field adjustment method according to claim 11, wherein the superimposing the captured new picture and the basic picture according to the size relationship between the current depth of field range and the preset depth of field range comprises:若所述当前的景深范围大于预设的景深范围,则根据预设景深范围,将采集的基础图片和至少一张新图片进行叠加,用所述新图片中对焦模糊的部分替换除预设景深范围外的所述基础图片中相同位置处对焦清晰的部分,得到所述预设景深范围的清晰图片。If the current depth of field range is greater than the preset depth of field range, the collected base image and the at least one new image are superimposed according to the preset depth of field range, and the preset depth of field is replaced by the focus blurred portion of the new image. A portion with a clear focus at the same position in the base picture outside the range, and a clear picture of the preset depth of field range is obtained.
- 根据权利要求11所述的景深调节方法,所述确定当前的景深范围与预设的景深范围不同时,该方法还包括:The depth of field adjustment method according to claim 11, wherein when the current depth of field range is different from the preset depth of field range, the method further includes:计算所述预设景深范围和当前景深范围的差值;Calculating a difference between the preset depth of field range and the current depth of field range;获取所述差值与当前景深范围的比值,依据所述比值确定采集所述新图片的数量。Obtaining a ratio of the difference to a current depth of field range, and determining, according to the ratio, the number of the new pictures to be collected.
- 根据权利要求15所述的景深调节方法,其中,所述采集的所述新图 片的数量大于或等于所述差值与当前景深范围的比值。The depth of field adjustment method according to claim 15, wherein said new map acquired The number of slices is greater than or equal to the ratio of the difference to the current depth of field range.
- 一种景深调节装置,该装置包括:A depth of field adjustment device, the device comprising:第一图片采集单元,设置为对目标物进行对焦,采集所述目标物的基础图片;计算当前的景深范围;a first picture collecting unit configured to focus on the target, collect a base picture of the target, and calculate a current depth of field range;第二图片采集单元,设置为确定当前的景深范围与预设的景深范围不同时,对所述目标物的前景深方向和/或后景深方向再次进行对焦,采集至少一张新图片;a second picture collecting unit, configured to determine that the current depth of field range is different from the preset depth of field range, and focus on the foreground depth direction and/or the back depth direction of the target object to collect at least one new picture;合成单元,依据所述当前的景深范围与所述预设的景深范围间的大小关系,将所述采集新图片与所述基础图片进行叠加,得到预设景深范围的清晰图片。And a synthesizing unit, according to the size relationship between the current depth of field range and the preset depth of field range, superimposing the captured new picture and the basic picture to obtain a clear picture of a preset depth of field range.
- 根据权利要求17所述的景深调节装置,所述装置还包括:The depth of field adjustment device of claim 17, further comprising:设置单元,设置为所述第一图片采集单元对目标物进行对焦之前,设置所述预设景深范围。And a setting unit, configured to set the preset depth of field range before the first picture collecting unit focuses on the target.
- 根据权利要求17所述的景深调节装置,所述第二图片采集单元确定当前的景深范围与预设的景深范围不同时,The depth of field adjusting device according to claim 17, wherein the second picture collecting unit determines that the current depth of field range is different from the preset depth of field range,还设置为:计算所述预设景深范围和当前景深范围的差值;获取所述差值与当前景深范围的比值,依据所述比值确定采集所述新图片的数量。The method further includes: calculating a difference between the preset depth of field range and the current depth of field range; obtaining a ratio of the difference to the current depth of field range, and determining, according to the ratio, the number of the new pictures to be collected.
- 一种终端,所述终端包括权利要求17-19中任一项所述的景深调节装置。 A terminal comprising the depth of field adjustment device of any one of claims 17-19.
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510585649.9A CN105187722B (en) | 2015-09-15 | 2015-09-15 | Depth of field adjusting method, device and terminal |
CN201510585649.9 | 2015-09-15 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2017045558A1 true WO2017045558A1 (en) | 2017-03-23 |
Family
ID=54909548
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2016/098319 WO2017045558A1 (en) | 2015-09-15 | 2016-09-07 | Depth-of-field adjustment method and apparatus, and terminal |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN105187722B (en) |
WO (1) | WO2017045558A1 (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111583134A (en) * | 2020-04-20 | 2020-08-25 | 清华大学 | Method and device for generating real color data with marked complicated interaction between hand and object |
CN112532881A (en) * | 2020-11-26 | 2021-03-19 | 维沃移动通信有限公司 | Image processing method and device and electronic equipment |
CN112822402A (en) * | 2021-01-08 | 2021-05-18 | 重庆创通联智物联网有限公司 | Image shooting method and device, electronic equipment and readable storage medium |
Families Citing this family (13)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105187722B (en) * | 2015-09-15 | 2018-12-21 | 努比亚技术有限公司 | Depth of field adjusting method, device and terminal |
CN105701762B (en) * | 2015-12-30 | 2020-03-24 | 联想(北京)有限公司 | Picture processing method and electronic equipment |
CN106331454A (en) * | 2016-08-31 | 2017-01-11 | 北京寺库商贸有限公司 | Microscope precision picture taking system and picture taking method |
CN106534689A (en) * | 2016-11-22 | 2017-03-22 | 珠海格力电器股份有限公司 | Method and device for synthesizing image based on multiple cameras |
CN106600529A (en) * | 2016-11-28 | 2017-04-26 | 北京暴风魔镜科技有限公司 | Method and device for acquiring full-focus panoramic image |
CN106941590A (en) * | 2017-05-19 | 2017-07-11 | 深圳天珑无线科技有限公司 | A kind of image processing method and device |
CN108496352B (en) * | 2017-05-24 | 2021-02-09 | 深圳市大疆创新科技有限公司 | Shooting method and device, image processing method and device |
CN107948519B (en) | 2017-11-30 | 2020-03-27 | Oppo广东移动通信有限公司 | Image processing method, device and equipment |
CN108259770B (en) * | 2018-03-30 | 2020-06-02 | Oppo广东移动通信有限公司 | Image processing method, image processing device, storage medium and electronic equipment |
CN109005354A (en) * | 2018-09-25 | 2018-12-14 | 努比亚技术有限公司 | Image pickup method, mobile terminal and computer readable storage medium |
CN109151329A (en) * | 2018-11-22 | 2019-01-04 | Oppo广东移动通信有限公司 | Photographic method, device, terminal and computer readable storage medium |
CN109905600A (en) * | 2019-03-21 | 2019-06-18 | 上海创功通讯技术有限公司 | Imaging method, imaging device and computer readable storage medium |
CN112085686A (en) * | 2020-08-21 | 2020-12-15 | 北京迈格威科技有限公司 | Image processing method, image processing device, electronic equipment and computer readable storage medium |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20120105590A1 (en) * | 2010-10-28 | 2012-05-03 | Sanyo Electric Co., Ltd. | Electronic equipment |
CN103561205A (en) * | 2013-11-15 | 2014-02-05 | 深圳市中兴移动通信有限公司 | Shooting method and shooting device |
CN103973978A (en) * | 2014-04-17 | 2014-08-06 | 华为技术有限公司 | Method and electronic device for achieving refocusing |
CN104125395A (en) * | 2014-05-30 | 2014-10-29 | 深圳市中兴移动通信有限公司 | Method and device for realizing automatic shooting |
CN104506770A (en) * | 2014-12-11 | 2015-04-08 | 小米科技有限责任公司 | Method and device for photographing image |
CN105187722A (en) * | 2015-09-15 | 2015-12-23 | 努比亚技术有限公司 | Depth-of-field adjustment method and apparatus, terminal |
-
2015
- 2015-09-15 CN CN201510585649.9A patent/CN105187722B/en active Active
-
2016
- 2016-09-07 WO PCT/CN2016/098319 patent/WO2017045558A1/en active Application Filing
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20120105590A1 (en) * | 2010-10-28 | 2012-05-03 | Sanyo Electric Co., Ltd. | Electronic equipment |
CN103561205A (en) * | 2013-11-15 | 2014-02-05 | 深圳市中兴移动通信有限公司 | Shooting method and shooting device |
CN103973978A (en) * | 2014-04-17 | 2014-08-06 | 华为技术有限公司 | Method and electronic device for achieving refocusing |
CN104125395A (en) * | 2014-05-30 | 2014-10-29 | 深圳市中兴移动通信有限公司 | Method and device for realizing automatic shooting |
CN104506770A (en) * | 2014-12-11 | 2015-04-08 | 小米科技有限责任公司 | Method and device for photographing image |
CN105187722A (en) * | 2015-09-15 | 2015-12-23 | 努比亚技术有限公司 | Depth-of-field adjustment method and apparatus, terminal |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111583134A (en) * | 2020-04-20 | 2020-08-25 | 清华大学 | Method and device for generating real color data with marked complicated interaction between hand and object |
CN111583134B (en) * | 2020-04-20 | 2022-08-12 | 清华大学 | Method and device for generating real color data with marked complicated interaction between hand and object |
CN112532881A (en) * | 2020-11-26 | 2021-03-19 | 维沃移动通信有限公司 | Image processing method and device and electronic equipment |
CN112822402A (en) * | 2021-01-08 | 2021-05-18 | 重庆创通联智物联网有限公司 | Image shooting method and device, electronic equipment and readable storage medium |
CN112822402B (en) * | 2021-01-08 | 2023-04-18 | 重庆创通联智物联网有限公司 | Image shooting method and device, electronic equipment and readable storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN105187722B (en) | 2018-12-21 |
CN105187722A (en) | 2015-12-23 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2017045558A1 (en) | Depth-of-field adjustment method and apparatus, and terminal | |
JP6935587B2 (en) | Methods and equipment for image processing | |
US9578260B2 (en) | Digital photographing apparatus and method of controlling the digital photographing apparatus | |
KR101214536B1 (en) | Method for performing out-focus using depth information and camera using the same | |
US9473698B2 (en) | Imaging device and imaging method | |
KR101427660B1 (en) | Apparatus and method for blurring an image background in digital image processing device | |
US8395694B2 (en) | Apparatus and method for blurring image background in digital image processing device | |
JP5395678B2 (en) | Distance map generation type multi-lens camera | |
US9215370B2 (en) | Digital photographing apparatus and method of controlling the same to increase continuous shooting speed for capturing panoramic photographs | |
US8937677B2 (en) | Digital photographing apparatus, method of controlling the same, and computer-readable medium | |
JP4935302B2 (en) | Electronic camera and program | |
JP5237978B2 (en) | Imaging apparatus and imaging method, and image processing method for the imaging apparatus | |
JP2007124398A (en) | Photographing device | |
JP2010020758A (en) | Image processing apparatus, imaging apparatus, image processing method and program | |
JP2011159159A (en) | Imaging device and method, and image processing method for imaging device | |
JP2017098631A (en) | Image combination processing device | |
US20090290041A1 (en) | Image processing device and method, and computer readable recording medium containing program | |
JP2010279054A (en) | Image pickup device, image processing device, image pickup method, and image processing method | |
JP2011239267A (en) | Imaging apparatus and image processing apparatus | |
JP6006506B2 (en) | Image processing apparatus, image processing method, program, and storage medium | |
JP6706167B2 (en) | Imaging device, image synthesizing method, and program | |
JP2015050733A (en) | Exposure control apparatus, exposure control method, control program, and imaging apparatus | |
JP2017183983A (en) | Imaging apparatus, control method and control program of the same | |
JP2017009815A (en) | Focus detection device, focus detection method, and camera system | |
JP2014138378A (en) | Image pickup device, control method thereof, and control program thereof |
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: 16845672 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
32PN | Ep: public notification in the ep bulletin as address of the adressee cannot be established |
Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205 DATED 24/07/2018) |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 16845672 Country of ref document: EP Kind code of ref document: A1 |