WO2017012372A1 - 用于终端的拍照控制方法、装置和终端 - Google Patents
用于终端的拍照控制方法、装置和终端 Download PDFInfo
- Publication number
- WO2017012372A1 WO2017012372A1 PCT/CN2016/078092 CN2016078092W WO2017012372A1 WO 2017012372 A1 WO2017012372 A1 WO 2017012372A1 CN 2016078092 W CN2016078092 W CN 2016078092W WO 2017012372 A1 WO2017012372 A1 WO 2017012372A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- frames
- adjacent
- terminal
- preview images
- pair
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Ceased
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/70—Circuitry for compensating brightness variation in the scene
- H04N23/73—Circuitry for compensating brightness variation in the scene by influencing the exposure time
Definitions
- the present invention relates to the field of terminal camera technology, and in particular, to a camera control method for a terminal, a camera control device for a terminal, and a terminal.
- the terminal when the terminal is taking photos, if the camera shakes or shoots a moving object, the captured image will often be blurred.
- a more common method in the related art is to perform optical image stabilization, that is, by detecting the direction of the cell phone shake, and adopting a method of reverse compensation to prevent blurring of the picture.
- this method can detect and compensate for cell phone shake from four directions or eight directions, the camera effect is still not satisfactory for large jitter or shooting motion pictures.
- the present invention is based on at least one of the above technical problems, and proposes a new camera control scheme for a terminal, which can effectively prevent the terminal from blurring when the terminal photographs a moving object or when the shooting process is shaken, and optimizes.
- the camera's photo effect is based on at least one of the above technical problems, and proposes a new camera control scheme for a terminal, which can effectively prevent the terminal from blurring when the terminal photographs a moving object or when the shooting process is shaken, and optimizes.
- the camera's photo effect is based on at least one of the above technical problems, and proposes a new camera control scheme for a terminal, which can effectively prevent the terminal from blurring when the terminal photographs a moving object or when the shooting process is shaken, and optimizes.
- the camera's photo effect is based on at least one of the above technical problems, and proposes a new camera control scheme for a terminal, which can effectively prevent the terminal from blurring when the terminal photographs a moving object or when the shooting process is shaken, and optimizes
- the present invention provides a photographing control method for a terminal, comprising: acquiring a preview image of two adjacent frames captured by a lens of the terminal when receiving a photographing instruction; The preview image of the frame is subjected to comparative analysis to determine a blur degree between the preview images of the adjacent two frames; and the exposure of the terminal when photographing is calculated according to the blur degree between the preview images of the adjacent two frames Duration; take a picture according to the exposure time.
- the preview images of the adjacent two frames are compared and analyzed to determine the adjacent
- the blur degree between the preview images of the two frames and calculating the exposure duration of the terminal when photographing according to the blur degree between the preview images of the adjacent two frames, so that the terminal can be based on the motion state of the current subject to be photographed and/or the terminal
- the jitter state adjusts the exposure time in time, which can effectively prevent the image captured by the terminal from being blurred or smear, and optimizes the photographing effect of the terminal.
- the ambiguity between the preview images of two adjacent frames is inversely related to the exposure time, and the higher the ambiguity, the shorter the exposure time, in other words, the more intense the motion of the object to be photographed or the greater the amplitude of the terminal jitter, The higher the blur between the preview images of two adjacent frames, the faster the shot is taken to obtain a clear picture by reducing the exposure time.
- the step of performing comparison analysis on the preview images of the two adjacent frames to determine the ambiguity between the preview images of the adjacent two frames specifically includes: The preview images of the frames are respectively divided into at least one image block of the same specification; the matching ratios of at least one pair of image blocks located at the same position in the preview images of the adjacent two frames are respectively compared; according to the at least one pair of image blocks The matching degree of any pair of image blocks, and the correspondence between the preset matching ratio and the ambiguity, and calculating the ambiguity between the preview images of the adjacent two frames.
- the step of calculating the ambiguity between the preview images of the adjacent two frames specifically includes: calculating a sum of ambiguities of all the image blocks in the at least one pair of image blocks, and summing the sums As the degree of blur between the preview images of the adjacent two frames.
- the corresponding relationship between the preset matching rate and the ambiguity is an inverse correlation, that is, the higher the matching rate of any pair of image blocks, the lower the ambiguity between the pair of image blocks.
- the step of comparing the matching ratios of the at least one pair of image blocks located at the same position in the preview images of the adjacent two frames respectively includes: specifically, for any one of the at least one pair of image blocks a pair of image blocks, calculating a Hamming sequence of any one of the pair of image blocks; determining the pair of image blocks according to a Hamming sequence of two of the pair of image blocks Match rate.
- the Hamming sequence is similar to Hamming coding, and the matching ratio of the adjacent two frames is calculated by determining the matching ratio of any pair of image blocks according to the Hamming sequence of the two image blocks in any pair of image blocks.
- the ambiguity between images provides the necessary basis.
- the exposure duration of the terminal when photographing is calculated according to the following formula:
- T_m represents the exposure duration
- F_a represents the preview image frame rate of the lens
- sensor_linecount represents the hardware parameter of the sensor of the lens
- N represents the ambiguity between the preview images of the adjacent two frames.
- the exposure duration of the terminal at the time of photographing is calculated, so that the terminal can timely and according to the motion state of the current object to be photographed and/or the jitter state of the terminal. Adjusting the exposure time, which can effectively prevent the image captured by the terminal from appearing blur or smear, and optimize the camera effect of the terminal.
- the ambiguity between the preview images of two adjacent frames is inversely related to the exposure time, and the higher the ambiguity, the shorter the exposure time, in other words, the more intense the motion of the object to be photographed or the greater the amplitude of the terminal jitter, The higher the blur between the preview images of two adjacent frames, the faster the shot is taken to obtain a clear picture by reducing the exposure time.
- the processing unit includes: a dividing unit, configured to respectively divide the preview images of the adjacent two frames into at least one image block of the same specification; and compare units for respectively comparing the a matching ratio of at least one pair of image blocks located at the same position in the preview images of two adjacent frames; a second calculating unit, configured to select a matching rate according to any one of the at least one pair of image blocks, and preset The correspondence between the matching ratio and the ambiguity, and calculating the ambiguity between the preview images of the adjacent two frames.
- the second calculating unit is specifically configured to: calculate a sum of ambiguities of all pairs of image blocks in the at least one pair of image blocks, and use the sum as a preview image of the adjacent two frames The degree of ambiguity between.
- the corresponding relationship between the preset matching rate and the ambiguity is an inverse correlation, that is, the higher the matching rate of any pair of image blocks, the lower the ambiguity between the pair of image blocks.
- the comparing unit includes: a third calculating unit, configured to calculate any one of the pair of image blocks for any one of the at least one pair of image blocks a Hamming sequence of blocks; a determining unit, configured to determine a matching ratio of the pair of image blocks according to a Hamming sequence of two image blocks in any one of the pair of image blocks.
- the Hamming sequence is similar to Hamming coding, and the matching ratio of the adjacent two frames is calculated by determining the matching ratio of any pair of image blocks according to the Hamming sequence of the two image blocks in any pair of image blocks.
- the ambiguity between images provides the necessary basis.
- the first calculating unit calculates an exposure duration of the terminal when taking a photo according to the following formula:
- T_m represents the exposure duration
- F_a represents the preview image frame rate of the lens
- sensor_linecount represents the hardware parameter of the sensor of the lens
- N represents the ambiguity between the preview images of the adjacent two frames.
- the present invention also provides a terminal, comprising the camera control device for a terminal according to any of the above technical solutions.
- FIG. 1 is a schematic flow chart showing a photographing control method for a terminal according to an embodiment of the present invention
- FIG. 2 shows a schematic block diagram of a photographing control apparatus for a terminal according to an embodiment of the present invention
- FIG. 3 is a schematic diagram showing a process flow of a photographing anti-blurring system according to an embodiment of the present invention
- FIG. 4 is a schematic diagram showing a process flow of photographing anti-blurring according to an embodiment of the present invention
- Figure 5 illustrates a terminal in accordance with one embodiment of the present invention.
- FIG. 1 shows a schematic flow chart of a photographing control method for a terminal according to an embodiment of the present invention.
- a photographing control method for a terminal includes: Step 102, when receiving a photographing instruction, acquiring a preview image of two adjacent frames captured by a lens of the terminal Step 104: Perform comparison analysis on the preview images of the adjacent two frames to determine the degree of blur between the preview images of the adjacent two frames; Step 106, according to the preview images between the adjacent two frames The blur degree is calculated, and the exposure duration of the terminal when photographing is calculated; in step 108, photographing is performed according to the exposure duration.
- the exposure duration of the terminal at the time of photographing is calculated, so that the terminal can timely and according to the motion state of the current object to be photographed and/or the jitter state of the terminal. Adjusting the exposure time, which can effectively prevent the image captured by the terminal from appearing blur or smear, and optimize the camera effect of the terminal.
- the ambiguity between the preview images of two adjacent frames is inversely related to the exposure time, and the higher the ambiguity, the shorter the exposure time, in other words, the more intense the motion of the object to be photographed or the greater the amplitude of the terminal jitter, The higher the blur between the preview images of two adjacent frames, the faster the shot is taken to obtain a clear picture by reducing the exposure time.
- the step of performing comparison analysis on the preview images of the two adjacent frames to determine the ambiguity between the preview images of the adjacent two frames specifically includes: The preview images of the frames are respectively divided into at least one image block of the same specification; and the matching ratios of at least one pair of image blocks located at the same position in the preview images of the adjacent two frames are respectively compared; And calculating a ambiguity between the preview images of the adjacent two frames according to a matching ratio of any one of the at least one pair of image blocks and a preset matching relationship between the matching ratio and the ambiguity.
- the step of calculating the ambiguity between the preview images of the adjacent two frames specifically includes: calculating a sum of ambiguities of all the image blocks in the at least one pair of image blocks, and summing the sums As the degree of blur between the preview images of the adjacent two frames.
- the corresponding relationship between the preset matching rate and the ambiguity is an inverse correlation, that is, the higher the matching rate of any pair of image blocks, the lower the ambiguity between the pair of image blocks.
- the step of comparing the matching ratios of the at least one pair of image blocks located at the same position in the preview images of the adjacent two frames respectively includes: specifically, for any one of the at least one pair of image blocks a pair of image blocks, calculating a Hamming sequence of any one of the pair of image blocks; determining the pair of image blocks according to a Hamming sequence of two of the pair of image blocks Match rate.
- the Hamming sequence is similar to Hamming coding, and the matching ratio of any pair of image blocks is determined according to the Hamming sequence of the two image blocks in any pair of image blocks, for calculation
- the ambiguity between the preview images of two adjacent frames provides the necessary basis.
- the exposure duration of the terminal when photographing is calculated according to the following formula:
- T_m represents the exposure duration
- F_a represents the preview image frame rate of the lens
- sensor_linecount represents the hardware parameter of the sensor of the lens
- N represents the ambiguity between the preview images of the adjacent two frames.
- FIG. 2 shows a schematic block diagram of a photographing control apparatus for a terminal according to an embodiment of the present invention.
- a photographing control apparatus 200 for a terminal includes an obtaining unit 202, a processing unit 204, a first calculating unit 206, and a photographing unit 208.
- the acquiring unit 202 is configured to acquire a preview image of two adjacent frames captured by the lens of the terminal when receiving the photographing instruction, and the processing unit 204 is configured to compare the preview images of the adjacent two frames. An analysis to determine a degree of blur between preview images of the adjacent two frames;
- the first calculating unit 206 is configured to calculate an exposure duration of the terminal when the camera is photographed according to the blur degree between the preview images of the adjacent two frames, and the photographing unit 208 is configured to perform photographing according to the exposure duration.
- the exposure duration of the terminal at the time of photographing is calculated, so that the terminal can timely and according to the motion state of the current object to be photographed and/or the jitter state of the terminal. Adjusting the exposure time, which can effectively prevent the image captured by the terminal from appearing blur or smear, and optimize the camera effect of the terminal.
- the ambiguity between the preview images of two adjacent frames is inversely related to the exposure time, and the higher the ambiguity, the shorter the exposure time, in other words, the more intense the motion of the object to be photographed or the greater the amplitude of the terminal jitter, The higher the blur between the preview images of two adjacent frames, the faster the shot is taken to obtain a clear picture by reducing the exposure time.
- the processing unit 204 includes: a dividing unit 2042, configured to respectively divide the preview images of the adjacent two frames into at least one image block of the same specification; and the comparing unit 2044 is configured to respectively Comparing a matching ratio of at least one pair of image blocks located at the same position in the preview images of the adjacent two frames; a second calculating unit 2046, configured to select a matching rate according to any one of the at least one pair of image blocks And a preset correspondence between the matching ratio and the ambiguity, and calculating a ambiguity between the preview images of the adjacent two frames.
- the second calculating unit 2046 is specifically configured to: calculate a sum of ambiguities of all pairs of the image blocks in the at least one pair of image blocks, and use the sum as a preview of the adjacent two frames The degree of ambiguity between images.
- the corresponding relationship between the preset matching rate and the ambiguity is an inverse correlation, that is, the higher the matching rate of any pair of image blocks, the lower the ambiguity between the pair of image blocks.
- the comparing unit 2044 includes: a third calculating unit 2044A, configured to calculate any one of the pair of image blocks for any one of the at least one pair of image blocks a Hamming sequence of an image block; a determining unit 2044B, configured to determine a matching ratio of the pair of image blocks according to a Hamming sequence of two image blocks in the pair of image blocks.
- the Hamming sequence is similar to Hamming coding, and the matching ratio of the adjacent two frames is calculated by determining the matching ratio of any pair of image blocks according to the Hamming sequence of the two image blocks in any pair of image blocks.
- the ambiguity between images provides the necessary basis.
- the first calculating unit 206 calculates an exposure duration of the terminal when taking a photo according to the following formula:
- T_m represents the exposure duration
- F_a represents the preview image frame rate of the lens
- sensor_linecount represents the hardware parameter of the sensor of the lens
- N represents the ambiguity between the preview images of the adjacent two frames.
- the operation process of the camera anti-blurring system includes:
- Step 302 Acquire data of preview images of two consecutive frames (ie, the first frame and the second frame in the figure).
- step 304 a photo anti-blur processing is performed.
- Step 308 taking a photo according to the exposure time.
- FIG. 4 shows a specific flow of the camera anti-blurring process in FIG. 3, including:
- Step 402 extracting two consecutive frames of preview images.
- Step 404 performing block processing on each frame image in the two frame preview images.
- those skilled in the art can determine the number of blocks according to actual conditions, such as 64 blocks.
- step 406 a Hamming sequence for each block is calculated.
- the Hamming sequence is similar to the Hamming code.
- Step 408 Compare the Hamming sequence of each pair of blocks corresponding to the positions in the two frames of images.
- step 410 the matching rate of each pair of blocks and the number of blocks of the same matching rate are counted.
- Step 412 assign a ambiguity to the matching ratio of each pair of blocks according to a preset correspondence between the matching ratio and the ambiguity, and calculate a sum of all the ambiguities of the blocks as the ambiguity between the two frames.
- Table 1 For the correspondence between the matching rate and the ambiguity, refer to Table 1:
- the ambiguity between the two frames of preview images is brought into the exposure time calculation formula to obtain a suitable exposure time.
- the formula for calculating the exposure time can refer to the formula: T_m represents the exposure time, F_a represents the preview image frame rate of the terminal lens, sensor_linecount represents the hardware parameter of the lens sensor, and N represents the ambiguity between successive two frames of preview images.
- the following problems are mainly solved in the embodiment: 1. Implementing block processing on two consecutive frames of preview images; 2. Using Hamming sequences to compare matching degrees of image blocks at the same position; 3. Different for The image block matching degree introduces the corresponding ambiguity; 4. The design formula of the exposure time that changes according to the ambiguity change is designed.
- Figure 5 illustrates a terminal in accordance with one embodiment of the present invention.
- the present invention also provides a terminal 500 comprising the photographing control device 200 for a terminal according to any of the above aspects.
- the technical solution of the present invention can be applied to multiple scenarios: for example, the user sits on a bumpy vehicle, and if a stationary object is to be photographed, the ordinary mobile phone may appear blurred, and the technical solution of the present invention can be adopted. Preview the data for two consecutive frames, calculate the vibration amplitude of the camera, give the appropriate photo exposure time, make the shooting picture clear; Scene 2: When the mobile phone is stationary, when shooting a moving pedestrian or vehicle, the technical solution of the invention can prevent the movement The blurring of objects or the appearance of smear greatly enhances the user experience.
- the present invention proposes a new camera control scheme for a terminal, which can effectively prevent the terminal from being blurred when the terminal photographs a moving object or when the shooting process is shaken. Optimized the camera's photo effect.
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Studio Devices (AREA)
Abstract
一种用于终端的拍照控制方法、装置和终端,其中,用于终端的拍照控制方法包括:在接收到拍照指令时,获取所述终端的镜头捕获到的相邻两帧的预览图像;将所述相邻两帧的预览图像进行对比分析,以确定所述相邻两帧的预览图像之间的模糊度;根据所述相邻两帧的预览图像之间的模糊度,计算所述终端在拍照时的曝光时长;根据所述曝光时长进行拍照。在终端拍摄运动物体或在拍摄过程发生抖动时,能够有效地防止终端拍照模糊,优化了终端的拍照效果。
Description
本发明涉及终端拍照技术领域,具体而言,涉及一种用于终端的拍照控制方法、一种用于终端的拍照控制装置和一种终端。
目前,终端在进行拍照时,如果发生抖动或是拍摄运动的物体,往往会使拍摄到的图像模糊不清。
为解决上述问题,相关技术中较为常用的方法是进行光学防抖,即通过检测手机抖动的方向,采用逆向补偿的方法,防止拍照模糊。这种方法虽然能够从四方向或是八方向对手机抖动进行检测和补偿,但是对于大幅度的抖动或是拍摄运动画面时,拍照效果依然不理想。
因此,如何能够有效地防止终端拍照模糊,优化终端的拍照效果成为亟待解决的技术问题。
发明内容
本发明正是基于上述技术问题至少之一,提出了一种新的用于终端的拍照控制方案,使得在终端拍摄运动物体或在拍摄过程发生抖动时,能够有效地防止终端拍照模糊,优化了终端的拍照效果。
有鉴于此,本发明提出了一种用于终端的拍照控制方法,包括:在接收到拍照指令时,获取所述终端的镜头捕获到的相邻两帧的预览图像;将所述相邻两帧的预览图像进行对比分析,以确定所述相邻两帧的预览图像之间的模糊度;根据所述相邻两帧的预览图像之间的模糊度,计算所述终端在拍照时的曝光时长;根据所述曝光时长进行拍照。
在该技术方案中,通过在接收拍照指令时,获取终端的镜头捕获到的相邻两帧的预览图像,将相邻两帧的预览图像进行对比分析,以确定相邻
两帧的预览图像之间的模糊度,并根据相邻两帧的预览图像之间的模糊度,计算终端在拍照时的曝光时长,使得终端能够根据当前待拍摄对象的运动状态和/或终端的抖动状态,及时地调整曝光时长,进而可以有效防止终端拍摄的图像出现模糊或是拖影的问题,优化了终端的拍照效果。
其中,相邻两帧的预览图像之间的模糊度与曝光时间呈反相关关系,模糊度越高,曝光时间越短,换句话说,待拍摄对象运动越剧烈或终端抖动幅度越大时,相邻两帧的预览图像之间的模糊度就越高,通过降低曝光时长,快速地进行拍摄以获取清晰的画面。
在上述技术方案中,优选地,将所述相邻两帧的预览图像进行对比分析,以确定所述相邻两帧的预览图像之间的模糊度的步骤具体包括:将所述相邻两帧的预览图像分别划分为相同规格的至少一个图像块;分别比较所述相邻两帧的预览图像中位于相同位置处的至少一对图像块的匹配率;根据所述至少一对图像块中任一对图像块的匹配率,以及预置的匹配率与模糊度的对应关系,计算所述相邻两帧的预览图像之间的模糊度。
其中,优选地,计算所述相邻两帧的预览图像之间的模糊度的步骤具体包括:计算所述至少一对图像块中的所有对图像块的模糊度的总和,并将所述总和作为所述相邻两帧的预览图像之间的模糊度。
其中,预置的匹配率与模糊度的对应关系为反相关关系,即任一对图像块的匹配率越高,则该任一对图像块之间的模糊度越低。
在上述技术方案中,优选地,分别比较所述相邻两帧的预览图像中位于相同位置处的至少一对图像块的匹配率的步骤具体包括:针对所述至少一对图像块中的任一对图像块,计算所述任一对图像块中任一个图像块的汉明序列;根据所述任一对图像块中的两个图像块的汉明序列确定所述任一对图像块的匹配率。
在该技术方案中,汉明序列类似于汉明编码,通过根据任一对图像块中的两个图像块的汉明序列确定任一对图像块的匹配率,为计算相邻两帧的预览图像之间的模糊度提供必要依据。
在上述技术方案中,优选地,根据以下公式计算所述终端在拍照时的曝光时长:
根据本发明的第二方面,还提出了一种用于终端的拍照控制装置,包括:获取单元,用于在接收到拍照指令时,获取所述终端的镜头捕获到的相邻两帧的预览图像;处理单元,用于将所述相邻两帧的预览图像进行对比分析,以确定所述相邻两帧的预览图像之间的模糊度;第一计算单元,用于根据所述相邻两帧的预览图像之间的模糊度,计算所述终端在拍照时的曝光时长;拍摄单元,用于根据所述曝光时长进行拍照。
在该技术方案中,通过在接收拍照指令时,获取终端的镜头捕获到的相邻两帧的预览图像,将相邻两帧的预览图像进行对比分析,以确定相邻两帧的预览图像之间的模糊度,并根据相邻两帧的预览图像之间的模糊度,计算终端在拍照时的曝光时长,使得终端能够根据当前待拍摄对象的运动状态和/或终端的抖动状态,及时地调整曝光时长,进而可以有效防止终端拍摄的图像出现模糊或是拖影的问题,优化了终端的拍照效果。
其中,相邻两帧的预览图像之间的模糊度与曝光时间呈反相关关系,模糊度越高,曝光时间越短,换句话说,待拍摄对象运动越剧烈或终端抖动幅度越大时,相邻两帧的预览图像之间的模糊度就越高,通过降低曝光时长,快速地进行拍摄以获取清晰的画面。
在上述技术方案中,优选地,所述处理单元包括:划分单元,用于将所述相邻两帧的预览图像分别划分为相同规格的至少一个图像块;比较单元,用于分别比较所述相邻两帧的预览图像中位于相同位置处的至少一对图像块的匹配率;第二计算单元,用于根据所述至少一对图像块中任一对图像块的匹配率,以及预置的匹配率与模糊度的对应关系,计算所述相邻两帧的预览图像之间的模糊度。
其中,优选地,所述第二计算单元具体用于:计算所述至少一对图像块中的所有对图像块的模糊度的总和,并将所述总和作为所述相邻两帧的预览图像之间的模糊度。
其中,预置的匹配率与模糊度的对应关系为反相关关系,即任一对图像块的匹配率越高,则该任一对图像块之间的模糊度越低。
在上述技术方案中,优选地,所述比较单元包括:第三计算单元,用于针对所述至少一对图像块中的任一对图像块,计算所述任一对图像块中任一个图像块的汉明序列;确定单元,用于根据所述任一对图像块中的两个图像块的汉明序列确定所述任一对图像块的匹配率。
在该技术方案中,汉明序列类似于汉明编码,通过根据任一对图像块中的两个图像块的汉明序列确定任一对图像块的匹配率,为计算相邻两帧的预览图像之间的模糊度提供必要依据。
在上述技术方案中,优选地,所述第一计算单元根据以下公式计算所述终端在拍照时的曝光时长:
本发明还提供了一种终端,包括如上述任一技术方案所述的用于终端的拍照控制装置。
通过以上技术方案,使得在终端拍摄运动物体或在拍摄过程发生抖动时,能够有效地防止终端拍照模糊,优化了终端的拍照效果。
图1示出了根据本发明的一个实施例的用于终端的拍照控制方法的示意流程图;
图2示出了根据本发明的一个实施例的用于终端的拍照控制装置的示意框图;
图3示出了根据本发明的一个实施例的拍照防模糊系统的处理流程示意图;
图4示出了根据本发明的实施例的拍照防模糊的处理流程示意图;
图5示出了根据本发明的一个实施例的终端。
为了能够更清楚地理解本发明的上述目的、特征和优点,下面结合附图和具体实施方式对本发明进行进一步的详细描述。需要说明的是,在不冲突的情况下,本申请的实施例及实施例中的特征可以相互组合。
在下面的描述中阐述了很多具体细节以便于充分理解本发明,但是,本发明还可以采用其他不同于在此描述的其他方式来实施,因此,本发明的保护范围并不受下面公开的具体实施例的限制。
图1示出了根据本发明的一个实施例的用于终端的拍照控制方法的示意流程图。
如图1所示,根据本发明的一个实施例的用于终端的拍照控制方法,包括:步骤102,在接收到拍照指令时,获取所述终端的镜头捕获到的相邻两帧的预览图像;步骤104,将所述相邻两帧的预览图像进行对比分析,以确定所述相邻两帧的预览图像之间的模糊度;步骤106,根据所述相邻两帧的预览图像之间的模糊度,计算所述终端在拍照时的曝光时长;步骤108,根据所述曝光时长进行拍照。
在该技术方案中,通过在接收拍照指令时,获取终端的镜头捕获到的相邻两帧的预览图像,将相邻两帧的预览图像进行对比分析,以确定相邻两帧的预览图像之间的模糊度,并根据相邻两帧的预览图像之间的模糊度,计算终端在拍照时的曝光时长,使得终端能够根据当前待拍摄对象的运动状态和/或终端的抖动状态,及时地调整曝光时长,进而可以有效防止终端拍摄的图像出现模糊或是拖影的问题,优化了终端的拍照效果。
其中,相邻两帧的预览图像之间的模糊度与曝光时间呈反相关关系,模糊度越高,曝光时间越短,换句话说,待拍摄对象运动越剧烈或终端抖动幅度越大时,相邻两帧的预览图像之间的模糊度就越高,通过降低曝光时长,快速地进行拍摄以获取清晰的画面。
在上述技术方案中,优选地,将所述相邻两帧的预览图像进行对比分析,以确定所述相邻两帧的预览图像之间的模糊度的步骤具体包括:将所述相邻两帧的预览图像分别划分为相同规格的至少一个图像块;分别比较所述相邻两帧的预览图像中位于相同位置处的至少一对图像块的匹配率;
根据所述至少一对图像块中任一对图像块的匹配率,以及预置的匹配率与模糊度的对应关系,计算所述相邻两帧的预览图像之间的模糊度。
其中,优选地,计算所述相邻两帧的预览图像之间的模糊度的步骤具体包括:计算所述至少一对图像块中的所有对图像块的模糊度的总和,并将所述总和作为所述相邻两帧的预览图像之间的模糊度。
其中,预置的匹配率与模糊度的对应关系为反相关关系,即任一对图像块的匹配率越高,则该任一对图像块之间的模糊度越低。
在上述技术方案中,优选地,分别比较所述相邻两帧的预览图像中位于相同位置处的至少一对图像块的匹配率的步骤具体包括:针对所述至少一对图像块中的任一对图像块,计算所述任一对图像块中任一个图像块的汉明序列;根据所述任一对图像块中的两个图像块的汉明序列确定所述任一对图像块的匹配率。
在该技术方案中,在该技术方案中,汉明序列类似于汉明编码,通过根据任一对图像块中的两个图像块的汉明序列确定任一对图像块的匹配率,为计算相邻两帧的预览图像之间的模糊度提供必要依据。
在上述技术方案中,优选地,根据以下公式计算所述终端在拍照时的曝光时长:
图2示出了根据本发明的一个实施例的用于终端的拍照控制装置的示意框图。
如图2所示,根据本发明的一个实施例的用于终端的拍照控制装置200,包括:获取单元202、处理单元204、第一计算单元206和拍摄单元208。
其中,获取单元202,用于在接收到拍照指令时,获取所述终端的镜头捕获到的相邻两帧的预览图像;处理单元204,用于将所述相邻两帧的预览图像进行对比分析,以确定所述相邻两帧的预览图像之间的模糊度;
第一计算单元206,用于根据所述相邻两帧的预览图像之间的模糊度,计算所述终端在拍照时的曝光时长;拍摄单元208,用于根据所述曝光时长进行拍照。
在该技术方案中,通过在接收拍照指令时,获取终端的镜头捕获到的相邻两帧的预览图像,将相邻两帧的预览图像进行对比分析,以确定相邻两帧的预览图像之间的模糊度,并根据相邻两帧的预览图像之间的模糊度,计算终端在拍照时的曝光时长,使得终端能够根据当前待拍摄对象的运动状态和/或终端的抖动状态,及时地调整曝光时长,进而可以有效防止终端拍摄的图像出现模糊或是拖影的问题,优化了终端的拍照效果。
其中,相邻两帧的预览图像之间的模糊度与曝光时间呈反相关关系,模糊度越高,曝光时间越短,换句话说,待拍摄对象运动越剧烈或终端抖动幅度越大时,相邻两帧的预览图像之间的模糊度就越高,通过降低曝光时长,快速地进行拍摄以获取清晰的画面。
在上述技术方案中,优选地,所述处理单元204包括:划分单元2042,用于将所述相邻两帧的预览图像分别划分为相同规格的至少一个图像块;比较单元2044,用于分别比较所述相邻两帧的预览图像中位于相同位置处的至少一对图像块的匹配率;第二计算单元2046,用于根据所述至少一对图像块中任一对图像块的匹配率,以及预置的匹配率与模糊度的对应关系,计算所述相邻两帧的预览图像之间的模糊度。
其中,优选地,所述第二计算单元2046具体用于:计算所述至少一对图像块中的所有对图像块的模糊度的总和,并将所述总和作为所述相邻两帧的预览图像之间的模糊度。
其中,预置的匹配率与模糊度的对应关系为反相关关系,即任一对图像块的匹配率越高,则该任一对图像块之间的模糊度越低。
在上述技术方案中,优选地,所述比较单元2044包括:第三计算单元2044A,用于针对所述至少一对图像块中的任一对图像块,计算所述任一对图像块中任一个图像块的汉明序列;确定单元2044B,用于根据所述任一对图像块中的两个图像块的汉明序列确定所述任一对图像块的匹配率。
在该技术方案中,汉明序列类似于汉明编码,通过根据任一对图像块中的两个图像块的汉明序列确定任一对图像块的匹配率,为计算相邻两帧的预览图像之间的模糊度提供必要依据。
在上述技术方案中,优选地,所述第一计算单元206根据以下公式计算所述终端在拍照时的曝光时长:
以下对本发明的技术方案进一步说明。
如图3所示,根据本发明的一个实施例的拍照防模糊系统的运行过程,包括:
步骤302,获取连续两帧(即图中第一帧和第二帧)预览图像的数据。
步骤304,进行拍照防模糊处理。
步骤306,计算准确的曝光时间。
步骤308,根据曝光时间进行拍照。
图4示出了图3中的拍照防模糊处理的具体流程,包括:
步骤402,提取连续两帧预览图像。
步骤404,对两帧预览图像中的每帧图像进行分块处理。这里本领域的技术人员可根据实际情况决定分块的数量,如分为64块等。
步骤406,计算每块的汉明序列。其中,汉明序列类似于汉明编码。
步骤408,比较两帧图像中对应位置的每对分块的汉明序列。
步骤410,统计每对分块的匹配率及相同匹配率的块数。
步骤412,根据预置的匹配率与模糊度的对应关系,为每对分块的匹配率分配模糊度,并计算所有对分块的模糊度的总和,以作为两帧图像之间的模糊度。其中,匹配率与模糊度的对应关系可参考表1:
| 匹配度 | ≤0.1 | ≤0.2 | ≤0.3 | ≤0.4 | ≤0.5 | ≤0.6 | ≤0.7 | ≤0.8 | ≤0.9 | <1.0 | =1.0 |
| 模糊度 | 128 | 96 | 68 | 48 | 36 | 24 | 16 | 8 | 3 | 1 | 0 |
表1
步骤414,将两帧预览图像之间的模糊度带入曝光时间计算公式,得到合适的曝光时间。其中,曝光时间计算公式可参考公式:T_m表示曝光时间,F_a表示终端镜头的预览图像帧率,sensor_linecount表示镜头的传感器的硬件参数,N表示连续两帧预览图像之间的模糊度。
根据上述步骤,在本实施例中主要解决了以下问题:1、实现对连续两帧预览图像的分块处理;2、利用汉明序列比较相同位置处图像块的匹配程度;3、对不同的图像块匹配程度引入相应的模糊度;4、设计根据模糊度变化而变化的曝光时间计算公式。
图5示出了根据本发明的一个实施例的终端。本发明还提供了一种终端500,包括如上述任一技术方案所述的用于终端的拍照控制装置200。
本发明的技术方案可应用于多个场景:如情景1:用户坐在颠簸的交通工具上,如果想要拍摄静止的物体,普通的手机会出现模糊,而采用本发明的技术方案,可以通过连续两帧预览数据,计算出摄像头的震动幅度,给出合适的拍照曝光时间,使得拍摄画面清晰;情景2:手机静止,拍摄运动的行人或车辆时,采用本发明的技术方案,可以防止运动物体模糊或是拖影的出现,极大地提升了用户的使用体验。
以上结合附图详细说明了本发明的技术方案,本发明提出了一种新的用于终端的拍照控制方案,使得在终端拍摄运动物体或在拍摄过程发生抖动时,能够有效地防止终端拍照模糊,优化了终端的拍照效果。
以上所述仅为本发明的优选实施例而已,并不用于限制本发明,对于本领域的技术人员来说,本发明可以有各种更改和变化。凡在本发明的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。
Claims (11)
- 一种用于终端的拍照控制方法,其特征在于,包括:在接收到拍照指令时,获取所述终端的镜头捕获到的相邻两帧的预览图像;将所述相邻两帧的预览图像进行对比分析,以确定所述相邻两帧的预览图像之间的模糊度;根据所述相邻两帧的预览图像之间的模糊度,计算所述终端在拍照时的曝光时长;根据所述曝光时长进行拍照。
- 根据权利要求1所述的用于终端的拍照控制方法,其特征在于,将所述相邻两帧的预览图像进行对比分析,以确定所述相邻两帧的预览图像之间的模糊度的步骤具体包括:将所述相邻两帧的预览图像分别划分为相同规格的至少一个图像块;分别比较所述相邻两帧的预览图像中位于相同位置处的至少一对图像块的匹配率;根据所述至少一对图像块中任一对图像块的匹配率,以及预置的匹配率与模糊度的对应关系,计算所述相邻两帧的预览图像之间的模糊度。
- 根据权利要求2所述的用于终端的拍照控制方法,其特征在于,计算所述相邻两帧的预览图像之间的模糊度的步骤具体包括:计算所述至少一对图像块中的所有对图像块的模糊度的总和,并将所述总和作为所述相邻两帧的预览图像之间的模糊度。
- 根据权利要求2所述的用于终端的拍照控制方法,其特征在于,分别比较所述相邻两帧的预览图像中位于相同位置处的至少一对图像块的匹配率的步骤具体包括:针对所述至少一对图像块中的任一对图像块,计算所述任一对图像块中任一个图像块的汉明序列;根据所述任一对图像块中的两个图像块的汉明序列确定所述任一对图像块的匹配率。
- 一种用于终端的拍照控制装置,其特征在于,包括:获取单元,用于在接收到拍照指令时,获取所述终端的镜头捕获到的相邻两帧的预览图像;处理单元,用于将所述相邻两帧的预览图像进行对比分析,以确定所述相邻两帧的预览图像之间的模糊度;第一计算单元,用于根据所述相邻两帧的预览图像之间的模糊度,计算所述终端在拍照时的曝光时长;拍摄单元,用于根据所述曝光时长进行拍照。
- 根据权利要求6所述的用于终端的拍照控制装置,其特征在于,所述处理单元包括:划分单元,用于将所述相邻两帧的预览图像分别划分为相同规格的至少一个图像块;比较单元,用于分别比较所述相邻两帧的预览图像中位于相同位置处的至少一对图像块的匹配率;第二计算单元,用于根据所述至少一对图像块中任一对图像块的匹配率,以及预置的匹配率与模糊度的对应关系,计算所述相邻两帧的预览图像之间的模糊度。
- 根据权利要求7所述的用于终端的拍照控制装置,其特征在于,所述第二计算单元具体用于:计算所述至少一对图像块中的所有对图像块的模糊度的总和,并将所述总和作为所述相邻两帧的预览图像之间的模糊度。
- 根据权利要求7所述的用于终端的拍照控制装置,其特征在于, 所述比较单元包括:第三计算单元,用于针对所述至少一对图像块中的任一对图像块,计算所述任一对图像块中任一个图像块的汉明序列;确定单元,用于根据所述任一对图像块中的两个图像块的汉明序列确定所述任一对图像块的匹配率。
- 一种终端,其特征在于,包括如权利要求6至10中任一项所述的用于终端的拍照控制装置。
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201510423234.1A CN105635559B (zh) | 2015-07-17 | 2015-07-17 | 用于终端的拍照控制方法及装置 |
| CN201510423234.1 | 2015-07-17 |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2017012372A1 true WO2017012372A1 (zh) | 2017-01-26 |
Family
ID=56050009
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2016/078092 Ceased WO2017012372A1 (zh) | 2015-07-17 | 2016-03-31 | 用于终端的拍照控制方法、装置和终端 |
Country Status (2)
| Country | Link |
|---|---|
| CN (1) | CN105635559B (zh) |
| WO (1) | WO2017012372A1 (zh) |
Cited By (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN112822412A (zh) * | 2020-12-28 | 2021-05-18 | 维沃移动通信有限公司 | 曝光方法和电子设备 |
| CN113596315A (zh) * | 2020-04-30 | 2021-11-02 | 鸿富锦精密电子(郑州)有限公司 | 动态场景补偿的拍照方法及摄像装置 |
| CN113676673A (zh) * | 2021-08-10 | 2021-11-19 | 广州极飞科技股份有限公司 | 图像采集方法、图像采集系统及无人设备 |
| WO2022156705A1 (zh) * | 2021-01-20 | 2022-07-28 | 维沃移动通信(杭州)有限公司 | 拍摄方法、拍摄装置和电子设备 |
Families Citing this family (7)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN110475072B (zh) | 2017-11-13 | 2021-03-09 | Oppo广东移动通信有限公司 | 拍摄图像的方法、装置、终端和存储介质 |
| CN107809592B (zh) | 2017-11-13 | 2019-09-17 | Oppo广东移动通信有限公司 | 拍摄图像的方法、装置、终端和存储介质 |
| CN109698906B (zh) * | 2018-11-24 | 2021-01-26 | 四川鸿景润科技有限公司 | 基于图像的抖动处理方法及装置、视频监控系统 |
| CN110493522A (zh) * | 2019-08-26 | 2019-11-22 | Oppo广东移动通信有限公司 | 防抖方法和装置、电子设备、计算机可读存储介质 |
| CN110868550B (zh) * | 2019-11-25 | 2021-04-06 | 维沃移动通信(杭州)有限公司 | 一种拍照方法及终端设备电子设备 |
| US20240242358A1 (en) * | 2021-07-07 | 2024-07-18 | Qualcomm Incorporated | Local motion detection for improving image capture and/or processing operations |
| CN117201927A (zh) * | 2022-06-06 | 2023-12-08 | 惠州Tcl移动通信有限公司 | 摄像控制方法、装置、电子设备及计算机可读存储介质 |
Citations (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101052098A (zh) * | 2006-04-06 | 2007-10-10 | 华邦电子股份有限公司 | 一种减少影像模糊的方法与相机 |
| US20090073306A1 (en) * | 2007-09-13 | 2009-03-19 | Samsung Electronics Co., Ltd. | Method, medium, and apparatus for setting exposure time |
| CN103702015A (zh) * | 2013-12-20 | 2014-04-02 | 华南理工大学 | 一种近红外条件下人脸图像采集系统的曝光控制方法 |
| CN104363380A (zh) * | 2014-10-15 | 2015-02-18 | 北京智谷睿拓技术服务有限公司 | 图像采集控制方法和装置 |
| CN104660915A (zh) * | 2015-02-09 | 2015-05-27 | 广东欧珀移动通信有限公司 | 全景拍照曝光的控制方法及装置 |
| CN104657742A (zh) * | 2015-01-23 | 2015-05-27 | 华东师范大学 | 一种基于汉明嵌入核的图像概念检测方法及其汉明嵌入核 |
-
2015
- 2015-07-17 CN CN201510423234.1A patent/CN105635559B/zh active Active
-
2016
- 2016-03-31 WO PCT/CN2016/078092 patent/WO2017012372A1/zh not_active Ceased
Patent Citations (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101052098A (zh) * | 2006-04-06 | 2007-10-10 | 华邦电子股份有限公司 | 一种减少影像模糊的方法与相机 |
| US20090073306A1 (en) * | 2007-09-13 | 2009-03-19 | Samsung Electronics Co., Ltd. | Method, medium, and apparatus for setting exposure time |
| CN103702015A (zh) * | 2013-12-20 | 2014-04-02 | 华南理工大学 | 一种近红外条件下人脸图像采集系统的曝光控制方法 |
| CN104363380A (zh) * | 2014-10-15 | 2015-02-18 | 北京智谷睿拓技术服务有限公司 | 图像采集控制方法和装置 |
| CN104657742A (zh) * | 2015-01-23 | 2015-05-27 | 华东师范大学 | 一种基于汉明嵌入核的图像概念检测方法及其汉明嵌入核 |
| CN104660915A (zh) * | 2015-02-09 | 2015-05-27 | 广东欧珀移动通信有限公司 | 全景拍照曝光的控制方法及装置 |
Cited By (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN113596315A (zh) * | 2020-04-30 | 2021-11-02 | 鸿富锦精密电子(郑州)有限公司 | 动态场景补偿的拍照方法及摄像装置 |
| CN112822412A (zh) * | 2020-12-28 | 2021-05-18 | 维沃移动通信有限公司 | 曝光方法和电子设备 |
| CN112822412B (zh) * | 2020-12-28 | 2023-04-07 | 维沃移动通信有限公司 | 曝光方法、装置、电子设备和存储介质 |
| WO2022156705A1 (zh) * | 2021-01-20 | 2022-07-28 | 维沃移动通信(杭州)有限公司 | 拍摄方法、拍摄装置和电子设备 |
| US12401893B2 (en) | 2021-01-20 | 2025-08-26 | Vivo Mobile Communication Co., Ltd. | Shooting method, shooting apparatus, and electronic device |
| CN113676673A (zh) * | 2021-08-10 | 2021-11-19 | 广州极飞科技股份有限公司 | 图像采集方法、图像采集系统及无人设备 |
Also Published As
| Publication number | Publication date |
|---|---|
| CN105635559A (zh) | 2016-06-01 |
| CN105635559B (zh) | 2018-02-13 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN105635559B (zh) | 用于终端的拍照控制方法及装置 | |
| CN102640189B (zh) | 用于估计场景中精确和相对物体距离的方法 | |
| EP2849428B1 (en) | Image processing device, image processing method, image processing program, and storage medium | |
| US9531962B2 (en) | Image set alignment and combination processing | |
| EP2521091B1 (en) | Estimation of motion blur in a picture | |
| CN110536057B (zh) | 图像处理方法和装置、电子设备、计算机可读存储介质 | |
| JP7078139B2 (ja) | ビデオ安定化方法及び装置、並びに非一時的コンピュータ可読媒体 | |
| CN107690673B (zh) | 图像处理方法、装置及服务器 | |
| CN115018701A (zh) | 用于创建场景的超分辨率图像的光学图像稳定移动 | |
| CN110661977A (zh) | 主体检测方法和装置、电子设备、计算机可读存储介质 | |
| CN104754180B (zh) | 降低视频画面抖动的方法与装置 | |
| KR102003460B1 (ko) | 왜곡제거장치 및 방법 | |
| JP2009501473A (ja) | モーションブラー効果を除去する方法および装置 | |
| CN110493522A (zh) | 防抖方法和装置、电子设备、计算机可读存储介质 | |
| CN104102069B (zh) | 一种成像系统的对焦方法及装置、成像系统 | |
| CN110572534A (zh) | 全景图像的数字视频稳像方法、装置、设备及存储介质 | |
| CN107231526B (zh) | 图像处理方法以及电子设备 | |
| CN102318334A (zh) | 图像处理装置、摄像装置以及图像处理方法 | |
| CN111372000A (zh) | 视频防抖方法和装置、电子设备及计算机可读存储介质 | |
| CN104270571B (zh) | 图像处理方法以及电子设备 | |
| US20150350547A1 (en) | Scene Stability Detection | |
| JP2021033015A5 (zh) | ||
| CN106385546A (zh) | 通过图像处理改善移动电子设备摄像效果的方法和系统 | |
| CN107959840A (zh) | 图像处理方法、装置、计算机可读存储介质和计算机设备 | |
| Sindelar et al. | Space-variant image deblurring on smartphones using inertial sensors |
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: 16827063 Country of ref document: EP Kind code of ref document: A1 |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |
|
| 122 | Ep: pct application non-entry in european phase |
Ref document number: 16827063 Country of ref document: EP Kind code of ref document: A1 |






