WO2017128750A1 - 一种图像采集方法和图像采集装置 - Google Patents

一种图像采集方法和图像采集装置 Download PDF

Info

Publication number
WO2017128750A1
WO2017128750A1 PCT/CN2016/100142 CN2016100142W WO2017128750A1 WO 2017128750 A1 WO2017128750 A1 WO 2017128750A1 CN 2016100142 W CN2016100142 W CN 2016100142W WO 2017128750 A1 WO2017128750 A1 WO 2017128750A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
mobile terminal
prompt
preview image
current image
Prior art date
Application number
PCT/CN2016/100142
Other languages
English (en)
French (fr)
Inventor
王进
Original Assignee
中兴通讯股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2017128750A1 publication Critical patent/WO2017128750A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/66Remote control of cameras or camera parts, e.g. by remote control devices
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/63Control of cameras or camera modules by using electronic viewfinders

Definitions

  • the present invention relates to the field of mobile terminals, and in particular, to an image acquisition method and an image acquisition device.
  • the phone properties of mobile terminals are becoming weaker and weaker, and it has become a comprehensive electronic terminal that integrates social, game and information browsing.
  • the application of the camera function has a very high proportion. This can be used to upload a large number of photos, assist photos, photos, etc. through various SNS (Social Network Software) applications such as WeChat and Weibo. Processing and so on are reflected.
  • SNS Social Network Software
  • self-timer is an extremely important application scenario, which occupies a large proportion in the sharing of SNS; moreover, self-portrait photos have higher requirements for quality and portrait effects than scenes such as shooting landscapes, which is also the beauty of various self-portrait photos.
  • the main object of the present invention is to provide an image acquisition method and an image acquisition device, aiming at The image acquisition of the rear camera during the self-timer process improves the imaging effect of the self-timer.
  • an image acquisition method including:
  • the current image is saved.
  • the first attitude information and the second posture information include all axial offset angles of the gyroscope.
  • the step of adjusting the prompt of the mobile terminal according to the difference between the second posture information and the first posture information and the difference between the current image and the preview image, so that the current image is close to the preview image includes:
  • the output adjusts the prompt of the mobile terminal to bring the current image close to the preview image.
  • the method further includes: extracting at least two corresponding image features in the current image and the preview image, and generating a prompt for adjusting the distance of the mobile terminal according to the relationship between the distances of the image features, and the method further includes:
  • a prompt for adjusting the left and right movement of the mobile terminal or moving up and down is generated according to the difference in the relative position of the image feature in the current image and the preview image.
  • the method further includes:
  • an image collection device including:
  • the initial recording unit is configured to confirm that the front camera collects the preview image toward the shooting target, records the preview image, and records the first posture information of the mobile terminal when the preview image is captured;
  • a data acquiring unit configured to acquire second posture information of the mobile terminal when the rear camera faces the shooting target and a current image collected by the rear camera;
  • the prompt output unit is configured to adjust the prompt of the mobile terminal according to the difference between the second posture information and the first posture information and the difference between the current image and the preview image, so that the current image is close to the preview image;
  • the judging unit is configured to save the current image when the degree of difference between the current image and the preview image is less than a preset threshold.
  • the first attitude information and the second posture information include all axial offset angles of the gyroscope.
  • the prompt output unit includes:
  • the first prompting module is configured to compare the second posture information with the orientation angle and the elevation angle in the first posture information, and generate a prompt for adjusting the angle of the mobile terminal according to the angle difference;
  • the second prompting module is configured to extract at least two corresponding image features in the current image and the preview image respectively, and generate a prompt for adjusting the distance of the mobile terminal according to the size relationship between the image features;
  • the prompt output module is configured to output a prompt for adjusting the mobile terminal to make the current image close to the preview image.
  • the prompt output unit further includes:
  • the third prompting module is configured to generate a prompt for adjusting the left and right movement of the mobile terminal according to the difference of the relative positions of the image features in the current image and the preview image.
  • the device further includes:
  • the completion prompt unit is set to prompt the output image acquisition completion.
  • Another embodiment of the present invention provides a computer storage medium storing execution instructions for performing the method in the above embodiments.
  • the image collecting method and the image collecting device proposed by the invention complete the shooting composition through the front camera, and record the position state of the mobile terminal when the composition is completed, and perform image capturing in the rear camera.
  • the position status recorded by the front camera prompts the user to adjust the position of the mobile terminal, and then collects the image through the rear camera; realizes the front camera framing, the image acquisition mode of the rear camera shooting, and realizes the back based Self-portrait of the camera's high imaging effect.
  • FIG. 1 is a flowchart of a method for a first embodiment of an image collection method according to an embodiment of the present invention
  • FIG. 2 is a flowchart of a method for a second embodiment of an image collection method according to an embodiment of the present invention
  • FIG. 3 is a structural block diagram of a first embodiment of an image capture device according to an embodiment of the present invention.
  • FIG. 4 is a block diagram showing the structure of a second embodiment of an image capture device according to an embodiment of the present invention.
  • FIG. 1 is a flowchart of a method for a first embodiment of an image collection method according to an embodiment of the present invention. As shown in the figure, the method includes the following steps:
  • the shooting target is mainly a mobile terminal user.
  • the front camera is first pointed at itself, and the desired composition of the image acquisition is viewed through the display screen disposed on the same side as the front camera, and after confirming the composition is completed, the movement is adjusted.
  • Terminal orientation will be the mobile terminal The rear camera is aimed at you and finally finishes shooting.
  • the preview image collected by the front camera is confirmed, that is, the composition desired by the user, the preview image is recorded, and the mobile terminal is collected when the preview image is captured.
  • the first posture information is used to describe the posture of the mobile terminal when the preview image is acquired, or the first posture information is used to describe the posture of the front camera when the preview image is acquired.
  • the rear camera can be adjusted according to the first posture information to the position where the front camera is located when the preview image is acquired. If the positions of the front camera and the rear camera are the same, if the shooting target is unchanged, You can get the same image with the same composition, and because the rear camera is configured higher than the front camera, you can get better image quality through the rear camera.
  • S12 Acquire a second posture information of the mobile terminal when the rear camera faces the shooting target and a current image acquired by the rear camera.
  • the acquired current image, the second posture information and the current image are temporary data, and need to be adjusted according to the first posture information and the preview image.
  • S13 Adjust the prompt of the mobile terminal according to the difference between the second posture information and the first posture information and the difference between the current image and the preview image, so that the current image is close to the preview image.
  • the first attitude information is used as a posture reference for the rear camera shooting, but this attitude reference is not a complete reference. Because the central axes of the front camera and the rear camera are parallel, the front camera and the rear camera are opposite in orientation and the lenses of the camera are not in the same plane.
  • the rear camera is generally disposed in the middle axial direction of the rear side of the mobile terminal.
  • the front camera is generally disposed on the left or right side of the front side of the mobile terminal. Therefore, when comparing the first posture information and the second posture information, the first posture information or the second posture information needs to be corrected to be certain, and the spatial distance between the two is eliminated.
  • the mobile terminal is adjusted according to the difference in the imaged content such that the current image is close to the preview image.
  • step S12 and step S13 are not a single operation or an end, but a combination of multiple adjustments. Because it is very likely that the desired image acquisition cannot be achieved with one adjustment, multiple adjustments are required to adjust the position of the front camera when the rear camera is adjusted to the composition. Each small adjustment can be regarded as repeated execution of step S12 and step S13, and the current image is brought close to the preview image by a plurality of small operations, and finally the image satisfying the requirement is collected.
  • the photographing composition is completed by the front camera, and the position state of the mobile terminal when the composition is completed is recorded, and when the rear camera performs image capturing, the position state recorded by the front camera composing the image prompts the user to adjust the movement.
  • the position of the terminal, and then the image is acquired by the rear camera; the front camera framing and the image capture mode of the rear camera are realized, and the self-timer based on the high imaging effect of the rear camera is realized.
  • FIG. 2 is a flowchart of a method for a second embodiment of an image collection method according to an embodiment of the present invention. As shown in the figure, the method includes the following steps:
  • S22 Acquire a second posture information of the mobile terminal when the rear camera faces the shooting target and a current image acquired by the rear camera.
  • the first attitude information and the second posture information may be separately provided with a sensor implementation, such as a distance sensor disposed before and after; or may be implemented by using a sensor existing in the mobile terminal.
  • a sensor implementation such as a distance sensor disposed before and after
  • a sensor existing in the mobile terminal For example, in a gyroscope, a micro-electromechanical gyroscope is generally used in a mobile terminal, and the rotation and deflection operations can be well measured.
  • the first posture information and the second posture information collected by the gyroscope include a gyroscope. All axial offset angles, especially towards the angle and pitch angle.
  • the orientation angle and the elevation angle are embodied in the coordinate system. If the position of the rear camera of the mobile terminal is taken as the origin, the longitudinal axis is taken as the Y axis, and the horizontal line is taken as the X axis, then the imaging axis of the rear camera is the Z axis, When the first posture information is placed in the coordinate system for calculation, the data in the first posture information needs to be inverted by 180° along the X axis.
  • S24 Extract at least two corresponding image features in the current image and the preview image respectively, and generate a prompt for adjusting the distance of the mobile terminal according to the size relationship between the image features.
  • the judging process is implemented by the mobile terminal, and the current image and the preview image are identified, and at least two corresponding image features are respectively extracted, and then further judged according to the feature. For example, both inner corners of the eye are extracted, and the distance between the two inner corners is calculated; if the distance calculated in the current image is smaller than the distance calculated in the preview image, the mobile terminal needs to be translated in the direction of the shooting target, otherwise Pan to the direction of the principle shooting target.
  • Feature recognition in an image can be achieved by methods such as spot detection, corner detection, binary string feature descriptors, and the like.
  • S25 Generate a prompt for adjusting the left and right movement of the mobile terminal according to the difference of the relative positions of the image features in the current image and the preview image.
  • the image is determined, whereby the extracted image features also have a determined relative position, such as the distance from the four vertices in the preview image.
  • a determined relative position such as the distance from the four vertices in the preview image.
  • the relative positional deviation of the extracted image features in the current image is large in the current image, it is necessary to generate a prompt to adjust the left and right or up and down movement of the mobile terminal, and adjust the image features to be in the preview image. Corresponding location.
  • S26 Output a prompt for adjusting the mobile terminal to make the current image close to the preview image.
  • the prompts of the mobile terminal are mainly realized by voice, such as clockwise rotation, zooming in, far away, panning to the left, etc., by multiple adjustments, the current image is as close as possible to the preview image, and finally the desired effect at the time of composition is acquired.
  • the difference between the current image and the preview image is not the difference of the objects in the image, but Is the similarity of the picture itself. Therefore, feature recognition is not involved in the judgment of the difference degree, mainly the recognition of the pixel distribution.
  • the preview image is imaged from the left side of the shooting target at 45°; the current image is imaged from the right side of the shooting target at 45°, and the feature analysis of the shooting target is the same target, but from the similarity of the image itself.
  • the two achieve different imaging effects, so in this solution, the user is prompted to further adjust the position of the mobile terminal until the imaging effects of the two are close.
  • S28 A prompt for outputting image acquisition completion.
  • the prompt for image acquisition can be performed in various ways, such as vibration, voice, and prompt sound, and in particular, for example, a sound of a shutter is used as a sound.
  • the photographing composition is completed by the front camera, and the position state of the mobile terminal when the composition is completed is recorded, and when the rear camera performs image capturing, the position state recorded by the front camera composing the image prompts the user to adjust the movement.
  • the position of the terminal, and then the image is acquired by the rear camera; the front camera framing and the image capture mode of the rear camera are realized, and the self-timer based on the high imaging effect of the rear camera is realized.
  • the recording of the attitude information based on the gyroscope and the adjustment prompt generation based on the image features further realize the self-timer process based on the rear camera without changing the structure of the mobile terminal.
  • FIG. 3 is a structural block diagram of a first embodiment of an image capture device according to an embodiment of the present invention. As shown in the figure, the device includes:
  • the initial recording unit 10 is configured to confirm that the front camera collects the preview image toward the shooting target, records the preview image, and records the first posture information of the mobile terminal when the preview image is captured;
  • the data acquiring unit 20 is configured to acquire second posture information of the mobile terminal when the rear camera faces the shooting target and a current image collected by the rear camera;
  • the prompt output unit 30 is configured to adjust the prompt of the mobile terminal according to the difference between the second posture information and the first posture information and the difference between the current image and the preview image, so that the current image is close to the preview image;
  • the judgment collecting unit 40 is configured to save the current image when the degree of difference between the current image and the preview image is less than a preset threshold.
  • the image capturing device of the embodiment completes the shooting composition through the front camera, and records the position state of the mobile terminal when the composition is completed.
  • the position state recorded by the front camera composing the image prompts the user to adjust the movement.
  • the position of the terminal, and then the image is acquired by the rear camera; the front camera framing and the image capture mode of the rear camera are realized, and the self-timer based on the high imaging effect of the rear camera is realized.
  • FIG. 4 is a structural block diagram of a second embodiment of an image capture device according to an embodiment of the present invention. As shown in the figure, the device includes:
  • the initial recording unit 10 is configured to confirm that the front camera collects the preview image toward the shooting target, records the preview image, and records the first posture information of the mobile terminal when the preview image is captured;
  • the data acquiring unit 20 is configured to acquire second posture information of the mobile terminal when the rear camera faces the shooting target and a current image collected by the rear camera;
  • the prompt output unit 30 is configured to adjust the prompt of the mobile terminal according to the difference between the second posture information and the first posture information and the difference between the current image and the preview image, so that the current image is close to the preview image;
  • the judgment collecting unit 40 is configured to save the current image when the degree of difference between the current image and the preview image is less than a preset threshold.
  • the first attitude information and the second attitude information comprise all axial offset angles of the gyroscope.
  • the prompt output unit 30 includes:
  • the first prompting module 31 is configured to compare the second posture information with the orientation angle and the elevation angle in the first posture information, and generate a prompt for adjusting the angle of the mobile terminal according to the angle difference;
  • the second prompting module 32 is configured to extract at least two corresponding image features in the current image and the preview image respectively, and generate a prompt for adjusting the distance of the mobile terminal according to the size relationship between the image features;
  • the prompt output module 34 is configured to output a prompt for adjusting the mobile terminal to bring the current image close to the preview image.
  • the prompt output unit 30 further includes:
  • the third prompting module 33 is configured to generate a prompt for adjusting the left and right movement of the mobile terminal according to the difference of the relative positions of the image features in the current image and the preview image.
  • the device further includes:
  • the completion prompting unit 50 is set to output a prompt for image acquisition completion.
  • the image capturing device of the embodiment completes the shooting composition through the front camera, and records the position state of the mobile terminal when the composition is completed.
  • the position state recorded by the front camera composing the image prompts the user to adjust the movement.
  • the position of the terminal, and then the image is acquired by the rear camera; the front camera framing and the image capture mode of the rear camera are realized, and the self-timer based on the high imaging effect of the rear camera is realized.
  • the recording of the attitude information based on the gyroscope and the adjustment prompt generation based on the image features further realize the self-timer process based on the rear camera without changing the structure of the mobile terminal.
  • the image acquisition device and the image acquisition method are provided in the same embodiment.
  • the specific implementation process is described in the embodiment of the image acquisition method, and the technical features in the image collection method are applicable in the device embodiment. No longer.
  • the foregoing embodiment method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be through hardware, but in many cases, the former is better.
  • Implementation Based on such understanding, the technical solution of the present invention, which is essential or contributes to the prior art, may be embodied in the form of a software product stored in a storage medium (such as ROM/RAM, disk,
  • the optical disc includes a number of instructions for causing a terminal device (which may be a cell phone, a computer, a server, an air conditioner, or a network device, etc.) to perform the methods described in various embodiments of the present invention.
  • an image capture method and an image capture device provided by the embodiments of the present invention have the following beneficial effects: the photographing composition is completed by the front camera, and the position state of the mobile terminal when the composition is completed is recorded, and the image is collected at the rear camera.
  • the user prompts the user to adjust the position of the mobile terminal, and then collects the image through the rear camera; realizes the front camera framing, the image capture mode of the rear camera, and realizes the camera based on the rear camera.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Studio Devices (AREA)

Abstract

本发明公开了一种图像采集方法和图像采集装置。该图像采集方法,包括:确认前置摄像头朝向拍摄目标采集到预览图像,记录预览图像以及采集到预览图像时移动终端的第一姿态信息;获取后置摄像头朝向拍摄目标时的移动终端的第二姿态信息和后置摄像头采集的当前图像;根据第二姿态信息与第一姿态信息的差异以及当前图像与预览图像的差异输出调整移动终端的提示,使当前图像接近预览图像;当当前图像与预览图像的差异度小于预设阈值时,保存当前图像。本方案实现了前置摄像头取景,后置摄像头拍摄的图像采集模式,实现了基于后置摄像头的高成像效果的自拍。

Description

一种图像采集方法和图像采集装置 技术领域
本发明涉及移动终端领域,尤其涉及一种图像采集方法和图像采集装置。
背景技术
随着电子技术和移动通讯技术的不断发展,移动终端的电话属性越来越弱,开始成为一种集社交、游戏、信息浏览的综合性电子终端。而在上述的功能中,拍照功能的应用具备极高的比例,这一点可以通过微信、微博等各类SNS(Social Network Software,社会性网络软件)应用每天大量的照片上传、辅助拍照、照片处理等得以体现。其中,自拍又是极其重要的应用场景,在SNS的分享中占据了很大比例;而且,自拍照片对品质、人像效果的要求明显高于拍摄风景等场景,这也是各种针对自拍照片的美拍、容颜修饰软件层出不穷,使用率及传播率都很高的原因。
但是目前的移动终端进行自拍,往往只能使用前摄像头,达不到最佳效果。原因在于,由于近年移动终端设计风格的极简主义潮流,都采用大屏平板的设计,尽量减少任何同整体外观不协调的设计元素及活动部件,因此主流的配置都采用后摄+前摄的双固定摄像头设计,而由于成本、结构、布局、正面外观设计的要求,绝大部分智能终端在正面配置的摄像头都属于小尺寸、低分辨率、各方面配置及性能都较低的型号,也没有闪光灯,同后置摄像头有如天壤之别。单纯从手机设计的角度看,这个问题不易解决,而用户面对自拍时实时查看构图、远近、对焦等效果的使用需求,只能退而求其次采用前摄头,这就相当于主动放弃了性能优越的后摄像头。
发明内容
本发明的主要目的在于提出一种图像采集方法和图像采集装置,旨在实 现后置摄像头在自拍过程中的图像采集,提高自拍的成像效果。
为实现上述目的,本发明提出一种图像采集方法,包括:
确认前置摄像头朝向拍摄目标采集到预览图像,记录预览图像以及采集到预览图像时移动终端的第一姿态信息;
获取后置摄像头朝向拍摄目标时的移动终端的第二姿态信息和后置摄像头采集的当前图像;
根据第二姿态信息与第一姿态信息的差异以及当前图像与预览图像的差异输出调整移动终端的提示,使当前图像接近预览图像;
当所述当前图像与所述预览图像的差异度小于预设阈值时,保存当前图像。
其中,所述第一姿态信息和第二姿态信息包括陀螺仪的所有轴向的偏移角。
其中,所述根据第二姿态信息与第一姿态信息的差异以及当前图像与预览图像的差异输出调整移动终端的提示,使当前图像接近预览图像,包括:
将第二姿态信息与第一姿态信息中的朝向角和俯仰角对应进行比对,根据角度差异生成调整移动终端角度的提示;
分别在当前图像和预览图像中提取至少两个对应的图像特征,根据图像特征之间距离的大小关系生成调整移动终端距离的提示;
输出调整移动终端的提示,使当前图像接近预览图像。
其中,所述分别在当前图像和预览图像中提取至少两个对应的图像特征,根据图像特征之间距离的大小关系生成调整移动终端距离的提示之后,还包括:
根据图像特征在当前图像中和预览图像中相对位置的差异,生成调整移动终端左右或上下移动的提示。
其中,所述当所述当前图像与所述预览图像的差异度小于预设阈值时,保存当前图像之后,还包括:
输出图像采集完成的提示。
另外,为实现上述目的,本发明还提出了一种图像采集装置,包括:
初始记录单元,设置为确认前置摄像头朝向拍摄目标采集到预览图像,记录预览图像以及采集到预览图像时移动终端的第一姿态信息;
数据获取单元,设置为获取后置摄像头朝向拍摄目标时的移动终端的第二姿态信息和后置摄像头采集的当前图像;
提示输出单元,设置为根据第二姿态信息与第一姿态信息的差异以及当前图像与预览图像的差异输出调整移动终端的提示,使当前图像接近预览图像;
判断采集单元,设置为当所述当前图像与所述预览图像的差异度小于预设阈值时,保存当前图像。
其中,所述第一姿态信息和第二姿态信息包括陀螺仪的所有轴向的偏移角。
其中,所述提示输出单元,包括:
第一提示模块,设置为将第二姿态信息与第一姿态信息中的朝向角和俯仰角对应进行比对,根据角度差异生成调整移动终端角度的提示;
第二提示模块,设置为分别在当前图像和预览图像中提取至少两个对应的图像特征,根据图像特征之间距离的大小关系生成调整移动终端距离的提示;
提示输出模块,设置为输出调整移动终端的提示,使当前图像接近预览图像。
其中,所述提示输出单元,还包括:
第三提示模块,设置为根据图像特征在当前图像中和预览图像中相对位置的差异,生成调整移动终端左右或上下移动的提示。
其中,所述装置,还包括:
完成提示单元,设置为输出图像采集完成的提示。
本发明另一实施例提供了一种计算机存储介质,所述计算机存储介质存储有执行指令,所述执行指令用于执行上述实施例中的方法。
本发明所提出的图像采集方法和图像采集装置,通过前置摄像头完成拍摄构图,并记录构图完成时移动终端的位置状态,在后置摄像头进行图像采 集时,通过前置摄像头构图时记录的位置状态提示用户调整移动终端的位置,再通过后置摄像头采集图像;实现了前置摄像头取景,后置摄像头拍摄的图像采集模式,实现了基于后置摄像头的高成像效果的自拍。
附图说明
图1为本发明具体实施方式中提供的一种图像采集方法第一实施例的方法流程图;
图2为本发明具体实施方式中提供的一种图像采集方法第二实施例的方法流程图;
图3为本发明具体实施方式中提供的一种图像采集装置第一实施例的结构方框图;
图4为本发明具体实施方式中提供的一种图像采集装置第二实施例的结构方框图。
本发明目的的实现、功能特点及优点将结合实施例,参照附图做进一步说明。
具体实施方式
应当理解,此处所描述的具体实施例仅仅用以解释本发明,并不用于限定本发明。
请参考图1,其是本发明具体实施方式中提供的一种图像采集方法第一实施例的方法流程图,如图所示,该方法包括以下步骤:
S11:确认前置摄像头朝向拍摄目标采集到预览图像,记录预览图像以及采集到预览图像时移动终端的第一姿态信息。
本方案主要用于自拍,因此,实施例中的描述均基于自拍实现,也就是说拍摄目标主要是移动终端用户。在具体实施本方案过程中,对于用户而言,先将前置摄像头对准自己,通过与前置摄像头设置于同一侧的显示屏查看图像采集想要的构图,在确认构图完成后,调整移动终端朝向,将移动终端的 后置摄像头对准自己,最后完成拍摄。
在这一用户调整移动终端的过程中,当前置摄像头对准用户时,确认前置摄像头采集到的预览图像,也就是用户想要的构图,记录预览图像以及采集到预览图像时移动终端的第一姿态信息。第一姿态信息用于描述采集到预览图像时移动终端的姿态,或者说,第一姿态信息用于描述采集到预览图像时前置摄像头的姿态。
因为前置摄像头和后置摄像头的中轴线平行,前置摄像头和后置摄像头的朝向相反。根据这一相对位置,可以根据第一姿态信息将后置摄像头调整到采集预览图像时前置摄像头所在的位置,如果前置摄像头和后置摄像头的位置相同,在拍摄目标不变的情况下,可以获得构图相同的图像,而因为后置摄像头的配置高于前置摄像头,通过后置摄像头也可以获得更优质的成像效果。
S12:获取后置摄像头朝向拍摄目标时的移动终端的第二姿态信息和后置摄像头采集的当前图像。
后置摄像头朝向拍摄目标时,因为调整移动终端朝向的过程是手动操作,因此不可能将后置摄像头刚好调整原来前置摄像头的位置,此时需要获取移动终端的第二姿态信息和后置摄像头采集的当前图像,第二姿态信息和当前图像都是临时数据,需要根据第一姿态信息和预览图像进行调整。
S13:根据第二姿态信息与第一姿态信息的差异以及当前图像与预览图像的差异输出调整移动终端的提示,使当前图像接近预览图像。
第一姿态信息作为后置摄像头拍摄时的姿态参考,只是这一姿态参考不是完全参考。因为前置摄像头和后置摄像头的中轴线平行,前置摄像头和后置摄像头的朝向相反并且摄像头的镜片也不在同一平面上,后置摄像头一般设置于移动终端后侧竖直方向的中轴向上,前置摄像头一般设置于移动终端前侧听筒的左边或右边。所以在将第一姿态信息和第二姿态信息进行比较时,需要将第一姿态信息或第二姿态信息做一定的修正,将二者的空间距离消除后再做比较。
同时,仅有前置摄像头和后置摄像头的姿态相同还不足以采集到与预览图像的构图相同的图像,必须进一步修正平移造成的成像差异,也就是需要 比较当前图像和预览图像,根据成像内容的差异进调整移动终端,使得当前图像接近预览图像。
需要说明的是,在本方案中,步骤S12和步骤S13并不是单次操作即结束,而是多次调整的综合。因为很可能一次调整无法实现想要的图像采集,需要多次调整才能实现将后置摄像头调整到构图时前置摄像头所在的位置。每次小的调整都可以视为步骤S12和步骤S13的重复执行,通过多次小的操作使当前图像接近预览图像,最终采集到满足要求的图像。
S14:当当前图像与预览图像的差异度小于预设阈值时,保存当前图像。
对于全手工操作而言,几乎不可能将后置摄像头完全调整到构图时前置摄像头所在的位置,所以在当前图像与预览图像的相似度达到一定的范围,也就是差异度小于预设阈值时,保存当前图像,完成图像采集。图像的相似度判断不是本方案的研究重点,在现有技术中也多有实现,在此不做进一步说明。
本实施例的图像采集方法,通过前置摄像头完成拍摄构图,并记录构图完成时移动终端的位置状态,在后置摄像头进行图像采集时,通过前置摄像头构图时记录的位置状态提示用户调整移动终端的位置,再通过后置摄像头采集图像;实现了前置摄像头取景,后置摄像头拍摄的图像采集模式,实现了基于后置摄像头的高成像效果的自拍。
请参考图2,其是本发明具体实施方式中提供的一种图像采集方法第二实施例的方法流程图,如图所示,该方法包括以下步骤:
S21:确认前置摄像头朝向拍摄目标采集到预览图像,记录预览图像以及采集到预览图像时移动终端的第一姿态信息。
S22:获取后置摄像头朝向拍摄目标时的移动终端的第二姿态信息和后置摄像头采集的当前图像。
第一姿态信息和第二姿态信息可以另外设置传感器实现,例如前后设置的距离传感器;也可以利用移动终端已有的传感器实现。例如陀螺仪,移动终端中一般采用微机电陀螺仪,可以对转动、偏转的动作做很好的测量,体现在本方案中,通过陀螺仪采集的第一姿态信息和第二姿态信息包括陀螺仪的所有轴向的偏移角,尤其是朝向角和俯仰角。
S23:将第二姿态信息与第一姿态信息中的朝向角和俯仰角对应进行比对,根据角度差异生成调整移动终端角度的提示。
在实际比对过程中,其中有些参数不能直接做比较,需要进行一定的修正。例如朝向角和俯仰角体现在坐标系中,如果将移动终端的后置摄像头的位置作为原点,纵向轴线作为Y轴,水平线作为X轴,那么后置摄像头的成像轴则为Z轴,在将第一姿态信息放入该坐标系进行计算时,需要将第一姿态信息中的数据沿X轴翻转180°。
S24:分别在当前图像和预览图像中提取至少两个对应的图像特征,根据图像特征之间距离的大小关系生成调整移动终端距离的提示。
对于用户而言,没办法看到当前图像的成像效果,判断过程由移动终端实现,将当前图像与预览图像进行识别,分别提取至少两个对应的图像特征,再进一步根据特征进行判断。例如均提取出两个内侧眼角,再计算两个内侧眼角之间的距离;如果当前图像中计算出的距离小于预览图像中计算出的距离,那么需要将移动终端向拍摄目标所在方向平移,否则向原理拍摄目标的方向平移。图像中特征识别可以通过例如斑点检测、角点检测、二进制字符串特征描述子等方法实现。
S25:根据图像特征在当前图像中和预览图像中相对位置的差异,生成调整移动终端左右或上下移动的提示。
在预览图像中,图像是确定的,由此,其中提取出的图像特征也具有确定的相对位置,例如离预览图像中四个顶点的距离是多少。与之对应的,如果在当前图像中,提取出的图像特征在当前图像中的相对位置偏移较大,则需要生成调整移动终端左右或上下移动的提示,将图像特征调整到在预览图像中对应的位置。
S26:输出调整移动终端的提示,使当前图像接近预览图像。
移动终端的提示主要通过语音实现,例如顺时针旋转、拉近、远离、向左平移等,通过多次调整,使当前图像尽可能接近预览图像,最终采集到构图时想要的效果。
S27:当当前图像与预览图像的差异度小于预设阈值时,保存当前图像。
在本方案中当前图像与预览图像的差异度不是图像中物体的差异度,而 是图片本身的相似度。所以在差异度判断时不涉及特征识别,主要是像素分布的识别。例如预览图像中从拍摄目标左侧45°成像;当前图像中从拍摄目标右侧45°成像,从拍摄目标的特征分析,两者拍摄的是同一个目标,但是从图片本身的相似度而言,两者实现的是不同的成像效果,所以在本方案,会提示用户进一步调整移动终端的位置,直到两者的成像效果接近。
又例如,预览图像中从拍摄目标左侧45°成像;在经过多次调整移动终端的提示后,高度、距离和移动终端的放置状态都相同,但是当前图像是从拍摄目标左侧44°成像,此时经过差异度分析,当前图像和预览图像的差异度为6%,假设预设阈值为8%,那么当前的差异度小于预设的阈值,当前图像可以保存。
S28:输出图像采集完成的提示。
图像采集完成的提示可以有多种方式,例如震动、语音、提示音,尤其例如将按快门的声音作为提示音。
本实施例的图像采集方法,通过前置摄像头完成拍摄构图,并记录构图完成时移动终端的位置状态,在后置摄像头进行图像采集时,通过前置摄像头构图时记录的位置状态提示用户调整移动终端的位置,再通过后置摄像头采集图像;实现了前置摄像头取景,后置摄像头拍摄的图像采集模式,实现了基于后置摄像头的高成像效果的自拍。同时,基于陀螺仪的姿态信息的记录以及基于图像特征的调整提示生成,进一步在不改变移动终端结构的基础上,实现了基于后置摄像头的自拍过程。
请参考图3,其是本发明具体实施方式中提供的一种图像采集装置第一实施例的结构方框图,如图所示,该装置,包括:
初始记录单元10,设置为确认前置摄像头朝向拍摄目标采集到预览图像,记录预览图像以及采集到预览图像时移动终端的第一姿态信息;
数据获取单元20,设置为获取后置摄像头朝向拍摄目标时的移动终端的第二姿态信息和后置摄像头采集的当前图像;
提示输出单元30,设置为根据第二姿态信息与第一姿态信息的差异以及当前图像与预览图像的差异输出调整移动终端的提示,使当前图像接近预览图像;
判断采集单元40,设置为当当前图像与预览图像的差异度小于预设阈值时,保存当前图像。
本实施例的图像采集装置,通过前置摄像头完成拍摄构图,并记录构图完成时移动终端的位置状态,在后置摄像头进行图像采集时,通过前置摄像头构图时记录的位置状态提示用户调整移动终端的位置,再通过后置摄像头采集图像;实现了前置摄像头取景,后置摄像头拍摄的图像采集模式,实现了基于后置摄像头的高成像效果的自拍。
请参考图4,其是本发明具体实施方式中提供的一种图像采集装置第二实施例的结构方框图,如图所示,该装置,包括:
初始记录单元10,设置为确认前置摄像头朝向拍摄目标采集到预览图像,记录预览图像以及采集到预览图像时移动终端的第一姿态信息;
数据获取单元20,设置为获取后置摄像头朝向拍摄目标时的移动终端的第二姿态信息和后置摄像头采集的当前图像;
提示输出单元30,设置为根据第二姿态信息与第一姿态信息的差异以及当前图像与预览图像的差异输出调整移动终端的提示,使当前图像接近预览图像;
判断采集单元40,设置为当当前图像与预览图像的差异度小于预设阈值时,保存当前图像。
其中,第一姿态信息和第二姿态信息包括陀螺仪的所有轴向的偏移角。
其中,提示输出单元30,包括:
第一提示模块31,设置为将第二姿态信息与第一姿态信息中的朝向角和俯仰角对应进行比对,根据角度差异生成调整移动终端角度的提示;
第二提示模块32,设置为分别在当前图像和预览图像中提取至少两个对应的图像特征,根据图像特征之间距离的大小关系生成调整移动终端距离的提示;
提示输出模块34,设置为输出调整移动终端的提示,使当前图像接近预览图像。
其中,提示输出单元30,还包括:
第三提示模块33,设置为根据图像特征在当前图像中和预览图像中相对位置的差异,生成调整移动终端左右或上下移动的提示。
其中,所述装置,还包括:
完成提示单元50,设置为输出图像采集完成的提示。
本实施例的图像采集装置,通过前置摄像头完成拍摄构图,并记录构图完成时移动终端的位置状态,在后置摄像头进行图像采集时,通过前置摄像头构图时记录的位置状态提示用户调整移动终端的位置,再通过后置摄像头采集图像;实现了前置摄像头取景,后置摄像头拍摄的图像采集模式,实现了基于后置摄像头的高成像效果的自拍。同时,基于陀螺仪的姿态信息的记录以及基于图像特征的调整提示生成,进一步在不改变移动终端结构的基础上,实现了基于后置摄像头的自拍过程。
上述实施例提供的图像采集装置与图像采集方法实施例属于同一构思,其具体实现过程详见图像采集方法实施例,且图像采集方法实施例中的技术特征在装置实施例中均对应适用,这里不再赘述。
需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者装置不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者装置所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者装置中还存在另外的相同要素。
上述本发明实施例序号仅仅为了描述,不代表实施例的优劣。
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端设备(可以是手机,计算机,服务器,空调器,或者网络设备等)执行本发明各个实施例所述的方法。
以上仅为本发明的优选实施例,并非因此限制本发明的专利范围,凡是 利用本发明说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本发明的专利保护范围内。
工业实用性
如上所述,本发明实施例提供的一种图像采集方法和图像采集装置具有以下有益效果:通过前置摄像头完成拍摄构图,并记录构图完成时移动终端的位置状态,在后置摄像头进行图像采集时,通过前置摄像头构图时记录的位置状态提示用户调整移动终端的位置,再通过后置摄像头采集图像;实现了前置摄像头取景,后置摄像头拍摄的图像采集模式,实现了基于后置摄像头的高成像效果的自拍。

Claims (10)

  1. 一种图像采集方法,包括:
    确认前置摄像头朝向拍摄目标采集到预览图像,记录预览图像以及采集到预览图像时移动终端的第一姿态信息;
    获取后置摄像头朝向拍摄目标时的移动终端的第二姿态信息和后置摄像头采集的当前图像;
    根据第二姿态信息与第一姿态信息的差异以及当前图像与预览图像的差异输出调整移动终端的提示,使当前图像接近预览图像;
    当所述当前图像与所述预览图像的差异度小于预设阈值时,保存当前图像。
  2. 根据权利要求1所述的方法,其中,所述第一姿态信息和第二姿态信息包括陀螺仪的所有轴向的偏移角。
  3. 根据权利要求2所述的方法,其中,所述根据第二姿态信息与第一姿态信息的差异以及当前图像与预览图像的差异输出调整移动终端的提示,使当前图像接近预览图像,包括:
    将第二姿态信息与第一姿态信息中的朝向角和俯仰角对应进行比对,根据角度差异生成调整移动终端角度的提示;
    分别在当前图像和预览图像中提取至少两个对应的图像特征,根据图像特征之间距离的大小关系生成调整移动终端距离的提示;
    输出调整移动终端的提示,使当前图像接近预览图像。
  4. 根据权利要求3所述的方法,其中,所述分别在当前图像和预览图像中提取至少两个对应的图像特征,根据图像特征之间距离的大小关系生成调整移动终端距离的提示之后,还包括:
    根据图像特征在当前图像中和预览图像中相对位置的差异,生成调整移动终端左右或上下移动的提示。
  5. 根据权利要求1所述的方法,其中,所述当所述当前图像与所述预览图像的差异度小于预设阈值时,保存当前图像之后,还包括:
    输出图像采集完成的提示。
  6. 一种图像采集装置,包括:
    初始记录单元,设置为确认前置摄像头朝向拍摄目标采集到预览图像,记录预览图像以及采集到预览图像时移动终端的第一姿态信息;
    数据获取单元,设置为获取后置摄像头朝向拍摄目标时的移动终端的第二姿态信息和后置摄像头采集的当前图像;
    提示输出单元,设置为根据第二姿态信息与第一姿态信息的差异以及当前图像与预览图像的差异输出调整移动终端的提示,使当前图像接近预览图像;
    判断采集单元,设置为当所述当前图像与所述预览图像的差异度小于预设阈值时,保存当前图像。
  7. 根据权利要求6所述的装置,其中,所述第一姿态信息和第二姿态信息包括陀螺仪的所有轴向的偏移角。
  8. 根据权利要求7所述的装置,其中,所述提示输出单元,包括:
    第一提示模块,设置为将第二姿态信息与第一姿态信息中的朝向角和俯仰角对应进行比对,根据角度差异生成调整移动终端角度的提示;
    第二提示模块,设置为分别在当前图像和预览图像中提取至少两个对应的图像特征,根据图像特征之间距离的大小关系生成调整移动终端距离的提示;
    提示输出模块,设置为输出调整移动终端的提示,使当前图像接近预览图像。
  9. 根据权利要求8所述的装置,其中,所述提示输出单元,还包括:
    第三提示模块,设置为根据图像特征在当前图像中和预览图像中相对位置的差异,生成调整移动终端左右或上下移动的提示。
  10. 根据权利要求6所述的装置,其中,所述装置,还包括:
    完成提示单元,设置为输出图像采集完成的提示。
PCT/CN2016/100142 2016-01-28 2016-09-26 一种图像采集方法和图像采集装置 WO2017128750A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201610061742.4 2016-01-28
CN201610061742.4A CN107018304A (zh) 2016-01-28 2016-01-28 一种图像采集方法和图像采集装置

Publications (1)

Publication Number Publication Date
WO2017128750A1 true WO2017128750A1 (zh) 2017-08-03

Family

ID=59397395

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/100142 WO2017128750A1 (zh) 2016-01-28 2016-09-26 一种图像采集方法和图像采集装置

Country Status (2)

Country Link
CN (1) CN107018304A (zh)
WO (1) WO2017128750A1 (zh)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112287792A (zh) * 2020-10-22 2021-01-29 深圳前海微众银行股份有限公司 采集人脸图像的方法、装置及电子设备
CN112672057A (zh) * 2020-12-25 2021-04-16 维沃移动通信有限公司 拍摄方法及装置
CN114898084A (zh) * 2022-04-18 2022-08-12 荣耀终端有限公司 视觉定位方法、设备和存储介质
CN115423695A (zh) * 2022-07-15 2022-12-02 清华大学 一种用于城市预测任务的街景图像采样方法及装置
CN115423695B (zh) * 2022-07-15 2024-05-31 清华大学 一种用于城市预测任务的街景图像采样方法及装置

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108462770B (zh) * 2018-03-21 2020-05-19 北京松果电子有限公司 后置摄像头自拍方法、装置及电子设备
CN110850872A (zh) * 2019-10-31 2020-02-28 深圳市优必选科技股份有限公司 机器人巡检方法、装置、计算机可读存储介质及机器人

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080145041A1 (en) * 2006-12-14 2008-06-19 Pentax Corporation Anti-shake apparatus
CN102946514A (zh) * 2012-11-08 2013-02-27 广东欧珀移动通信有限公司 移动终端的自拍方法和装置
CN103533247A (zh) * 2013-10-22 2014-01-22 小米科技有限责任公司 一种自拍方法、装置和终端设备
CN104639819A (zh) * 2013-11-07 2015-05-20 中兴通讯股份有限公司 一种便携终端及其实现拍照的方法
CN104935698A (zh) * 2015-06-23 2015-09-23 上海卓易科技股份有限公司 一种智能终端的拍摄方法、拍摄装置及智能手机

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080145041A1 (en) * 2006-12-14 2008-06-19 Pentax Corporation Anti-shake apparatus
CN102946514A (zh) * 2012-11-08 2013-02-27 广东欧珀移动通信有限公司 移动终端的自拍方法和装置
CN103533247A (zh) * 2013-10-22 2014-01-22 小米科技有限责任公司 一种自拍方法、装置和终端设备
CN104639819A (zh) * 2013-11-07 2015-05-20 中兴通讯股份有限公司 一种便携终端及其实现拍照的方法
CN104935698A (zh) * 2015-06-23 2015-09-23 上海卓易科技股份有限公司 一种智能终端的拍摄方法、拍摄装置及智能手机

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112287792A (zh) * 2020-10-22 2021-01-29 深圳前海微众银行股份有限公司 采集人脸图像的方法、装置及电子设备
CN112672057A (zh) * 2020-12-25 2021-04-16 维沃移动通信有限公司 拍摄方法及装置
CN114898084A (zh) * 2022-04-18 2022-08-12 荣耀终端有限公司 视觉定位方法、设备和存储介质
CN114898084B (zh) * 2022-04-18 2023-08-25 荣耀终端有限公司 视觉定位方法、设备和存储介质
CN115423695A (zh) * 2022-07-15 2022-12-02 清华大学 一种用于城市预测任务的街景图像采样方法及装置
CN115423695B (zh) * 2022-07-15 2024-05-31 清华大学 一种用于城市预测任务的街景图像采样方法及装置

Also Published As

Publication number Publication date
CN107018304A (zh) 2017-08-04

Similar Documents

Publication Publication Date Title
US11688034B2 (en) Virtual lens simulation for video and photo cropping
WO2017128750A1 (zh) 一种图像采集方法和图像采集装置
WO2017088678A1 (zh) 长曝光全景图像拍摄装置和方法
US11102413B2 (en) Camera area locking
WO2018223381A1 (zh) 一种视频防抖方法及移动设备
WO2016184131A1 (zh) 基于双摄像头拍摄图像的方法、装置及计算机存储介质
CN109690568A (zh) 一种处理方法及移动设备
WO2015024367A1 (zh) 一种拍摄图像的处理方法及装置
WO2023236508A1 (zh) 一种基于亿像素阵列式相机的图像拼接方法及系统
CN110245549A (zh) 实时面部和对象操纵
US10911677B1 (en) Multi-camera video stabilization techniques
WO2018196854A1 (zh) 一种拍照方法、拍照装置及移动终端
CN106488128B (zh) 一种自动拍照的方法及装置
JP6483661B2 (ja) 撮像制御装置、撮像制御方法およびプログラム
CN105467741A (zh) 一种全景拍照方法及终端
WO2015198478A1 (ja) 画像歪み補正装置、情報処理装置および画像歪み補正方法
US8629925B2 (en) Image processing apparatus, image processing method, and computer program
WO2021026782A1 (zh) 手持云台的控制方法、控制装置、手持云台及存储介质
WO2023206475A1 (zh) 图像处理方法、装置、电子设备及存储介质
WO2019061051A1 (zh) 一种拍照方法和拍照装置
CN107948522B (zh) 摄像头选取拍摄人物头像的方法、装置、终端及存储介质
TW201424367A (zh) 跳躍人像拍攝系統及方法

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 16887624

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

Country of ref document: EP

Kind code of ref document: A1