WO2022206629A1 - Photographing method, terminal device and computer-readable storage medium - Google Patents

Photographing method, terminal device and computer-readable storage medium Download PDF

Info

Publication number
WO2022206629A1
WO2022206629A1 PCT/CN2022/083207 CN2022083207W WO2022206629A1 WO 2022206629 A1 WO2022206629 A1 WO 2022206629A1 CN 2022083207 W CN2022083207 W CN 2022083207W WO 2022206629 A1 WO2022206629 A1 WO 2022206629A1
Authority
WO
WIPO (PCT)
Prior art keywords
shooting
distance
terminal device
camera
mobile phone
Prior art date
Application number
PCT/CN2022/083207
Other languages
French (fr)
Chinese (zh)
Inventor
崔瀚涛
余洋华
胡树红
袁江峰
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2022206629A1 publication Critical patent/WO2022206629A1/en

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

Landscapes

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

Abstract

The present application provides a photographing method, a terminal device and a computer-readable storage medium, and relates to the field of photography. In the method, when a terminal device starts a camera for photographing, a photographing distance between the terminal device and a photographed main body can be measured. When the terminal device receives a photographing operation of a user, and the photographing distance is less than the nearest focusing distance of the camera, the terminal device takes a first picture and enters a first photographing state. After the terminal device enters the first photographing state, the user can be guided to take the terminal device away from the photographed main body, and the zoom ratio of the camera is adjusted according to the photographing distance, such that the user is assisted in taking a second picture, in which a photographing FOV is nearly equal to that of the first picture but the image is clearer, during the process of taking the terminal device away from the photographed main body. During a photographing process, the photographing field of view of a terminal device does not jump, such that a user does not need to repeatedly adjust composition.

Description

拍摄方法、终端设备及计算机可读存储介质Shooting method, terminal device and computer-readable storage medium
本申请要求于2021年03月30日提交国家知识产权局、申请号为202110342589.3、申请名称为“拍摄方法、终端设备及计算机可读存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese patent application with the application number 202110342589.3 and the application title "Photography Method, Terminal Equipment and Computer-readable Storage Medium" filed with the State Intellectual Property Office on March 30, 2021, the entire contents of which are by reference Incorporated in this application.
技术领域technical field
本申请实施例涉及拍摄领域,尤其涉及一种拍摄方法、终端设备及计算机可读存储介质。The embodiments of the present application relate to the field of photography, and in particular, to a photography method, a terminal device, and a computer-readable storage medium.
背景技术Background technique
当用户使用终端设备对某个被拍主体(被拍主体也可以称为拍摄对象,拍摄对象可以是人或物)进行拍摄时,如果终端设备与被拍主体之间的拍摄距离小于终端设备的摄像头的最近对焦距离,由于摄像头的镜头无法对焦,终端设备拍摄的画面会出现模糊。其中,终端设备的摄像头的最近对焦距离是指摄像头的镜头能够合焦(或称为对焦)的最近拍摄距离。When a user uses a terminal device to shoot a certain subject (the subject to be photographed can also be called a subject, and the subject can be a person or an object), if the shooting distance between the terminal device and the subject is smaller than the distance between the terminal device and the subject The closest focusing distance of the camera. Since the lens of the camera cannot focus, the picture captured by the terminal device will appear blurry. The closest focusing distance of the camera of the terminal device refers to the closest shooting distance at which the lens of the camera can be in focus (or called focusing).
目前,针对上述问题,一种实现方式为:当用户使用终端设备近距离拍摄被拍主体时,终端设备可以引导用户主动调整终端设备摄像头的变焦(zoom)倍率、以及终端设备与被拍主体之间的拍摄距离,以使终端设备在摄像头可以对焦的距离范围内完成拍摄。另外一种实现方式中,终端设备上可以设置有多个摄像头,如:主摄像头和超广角摄像头,超广角摄像头的最近对焦距离小于主摄像头的最近对焦距离。当终端设备与被拍主体之间的拍摄距离小于终端设备的主摄像头的最近对焦距离时,终端设备可以从主摄像头自动切换成最近对焦距离更短的超广角摄像头进行拍摄,以实现近距离拍摄到较为清晰的画面。At present, in response to the above problems, an implementation method is: when a user uses a terminal device to photograph the subject at close range, the terminal device can guide the user to actively adjust the zoom ratio of the camera of the terminal device, and the relationship between the terminal device and the subject to be photographed. The shooting distance between the two, so that the terminal device can complete the shooting within the distance range that the camera can focus on. In another implementation manner, the terminal device may be provided with multiple cameras, such as a main camera and an ultra-wide-angle camera, and the closest focusing distance of the ultra-wide-angle camera is smaller than the closest focusing distance of the main camera. When the shooting distance between the terminal device and the subject to be photographed is less than the closest focusing distance of the main camera of the terminal device, the terminal device can automatically switch from the main camera to the ultra-wide-angle camera with a shorter closest focusing distance for shooting to achieve close-up shooting to a clearer picture.
但是,上述实现方式均会导致终端设备的拍摄视角(field of view,FOV)发生跳变,用户需要反复调整构图的问题。However, the above-mentioned implementations all cause the shooting angle of view (field of view, FOV) of the terminal device to jump, and the user needs to adjust the composition repeatedly.
发明内容SUMMARY OF THE INVENTION
为了解决上述的技术问题,本申请提供了一种拍摄方法、终端设备及计算机可读存储介质。本申请提供的技术方案,可以避免终端设备的拍摄FOV发生跳变,无需用户反复调整构图。In order to solve the above technical problems, the present application provides a photographing method, a terminal device and a computer-readable storage medium. The technical solution provided by the present application can avoid jumping of the shooting FOV of the terminal device, and does not require the user to repeatedly adjust the composition.
第一方面,本申请实施例提供了一种拍摄方法,所述方法包括:In a first aspect, an embodiment of the present application provides a photographing method, the method comprising:
终端设备在启动摄像头进行拍摄时,检测终端设备与被拍主体之间的拍摄距离;当终端设备接收到用户的拍摄操作、且拍摄距离小于摄像头的最近对焦距离时,终端设备响应于拍摄操作拍摄第一照片,并进入第一拍摄状态。When the terminal device starts the camera to shoot, the terminal device detects the shooting distance between the terminal device and the subject to be photographed; when the terminal device receives the user's shooting operation and the shooting distance is less than the closest focusing distance of the camera, the terminal device responds to the shooting operation. The first photo, and enter the first shooting state.
终端设备进入第一拍摄状态后,显示第一提示信息,第一提示信息用于提示用户将终端设备远离被拍主体;并且,根据拍摄距离,按照如下方式调整摄像头的变焦倍率:After the terminal device enters the first shooting state, the first prompt information is displayed, and the first prompt information is used to prompt the user to keep the terminal device away from the subject being photographed; and, according to the shooting distance, the zoom ratio of the camera is adjusted as follows:
当拍摄距离小于或等于第一距离阈值时,终端设备将摄像头的变焦倍率维持在第一倍率;当拍摄距离大于第一距离阈值、且小于第二距离阈值时,终端设备调整摄像头的变焦倍率随着拍摄距离的增大而逐渐增大;当拍摄距离大于或等于第二距离阈值时,终端设备将摄像头的变焦倍率维持在第二倍率。其中,第一距离阈值小于摄像头的最近对焦距离,第二距离阈值大于摄像头的最近对焦距离;第一倍率是终端设备启动摄像头进行拍摄时,摄像头的默认变焦倍率;第二倍率大于第一倍率。When the shooting distance is less than or equal to the first distance threshold, the terminal device maintains the zoom ratio of the camera at the first ratio; when the shooting distance is greater than the first distance threshold and less than the second distance threshold, the terminal device adjusts the zoom ratio of the camera to follow increases gradually as the shooting distance increases; when the shooting distance is greater than or equal to the second distance threshold, the terminal device maintains the zoom magnification of the camera at the second magnification. The first distance threshold is smaller than the closest focusing distance of the camera, and the second distance threshold is greater than the closest focusing distance of the camera; the first magnification is the default zoom magnification of the camera when the terminal device starts the camera to shoot; the second magnification is greater than the first magnification.
当终端设备进入第一拍摄状态后,在调整摄像头的变焦倍率的过程中,接收到用户的二次拍摄操作时,终端设备响应于二次拍摄操作,拍摄第二照片。After the terminal device enters the first shooting state, in the process of adjusting the zoom ratio of the camera, when receiving a second shooting operation from the user, the terminal device shoots a second photo in response to the second shooting operation.
示例性地,第一拍摄状态可以称为离远点儿拍状态,第一提示信息可以是“请再离远一点,改善画质”。Exemplarily, the first photographing state may be referred to as a far-away photographing state, and the first prompt information may be "please move further away to improve image quality".
该方法中,终端设备进入第一拍摄状态后,在用户将终端设备逐渐远离被拍主体的过程中,终端设备按照上述逻辑根据拍摄距离对摄像头的变焦倍率进行调整,可以使得终端设备的拍摄FOV在拍摄距离处于第一距离阈值至第二距离阈值的范围内时不会发生明显变化。所以,终端设备在进入第一拍摄状态后,用户在将终端设备逐渐远离被拍主体的过程中,当看到预览画面变清晰时(表明此时的拍摄距离大于或等于摄像头的最近对焦距离),可以再次进行拍摄操作,触发终端设备拍摄一张第二照片。该第二照片的拍摄FOV可以近乎等同于上述第一照片,但第二照片比第一照片更加清晰。In this method, after the terminal device enters the first shooting state, when the user gradually moves the terminal device away from the subject being photographed, the terminal device adjusts the zoom ratio of the camera according to the above-mentioned logic according to the shooting distance, so that the shooting FOV of the terminal device can be improved. No significant change occurs when the shooting distance is within the range from the first distance threshold to the second distance threshold. Therefore, after the terminal device enters the first shooting state, when the user gradually moves the terminal device away from the subject being photographed, when the preview screen becomes clear (indicating that the shooting distance at this time is greater than or equal to the closest focusing distance of the camera) , the shooting operation can be performed again to trigger the terminal device to shoot a second photo. The shooting FOV of the second photo can be nearly equal to the above-mentioned first photo, but the second photo is clearer than the first photo.
另外,该拍摄方法中,用户无需主动对摄像头的变焦倍率进行调整,用户与终端设备的交互次数较少,而且终端设备的拍摄FOV也不会发生跳变,用户无需进行二次构图。In addition, in this shooting method, the user does not need to actively adjust the zoom ratio of the camera, the number of interactions between the user and the terminal device is small, and the shooting FOV of the terminal device does not jump, and the user does not need to recompose the image.
一些实施方式中,第二倍率可以小于或等于摄像头的最大变焦倍率。In some embodiments, the second magnification may be less than or equal to the maximum zoom magnification of the camera.
例如,摄像头的最大变焦倍率为2.5X时,第二倍率可以是2X、2.5X等,第二倍率的大小不作限制。For example, when the maximum zoom magnification of the camera is 2.5X, the second magnification may be 2X, 2.5X, etc., and the size of the second magnification is not limited.
可选地,上述二次拍摄操作是用户在看到终端设备显示的预览画面清晰时进行的拍摄操作。Optionally, the above-mentioned secondary photographing operation is a photographing operation performed by the user when the user sees that the preview image displayed by the terminal device is clear.
当用户看到终端设备显示的预览画面清晰时,表明终端设备与被拍主体之间的拍摄距离大于或等于摄像头的最近对焦距离。可以理解,对于用户而言,无法感知终端设备与被拍主体之间的拍摄距离是否大于或等于摄像头的最近对焦距离,因此,用户可以直观地观察预览画面是否清晰,并在预览画面清晰时进行二次拍摄操作。When the user sees that the preview screen displayed by the terminal device is clear, it indicates that the shooting distance between the terminal device and the subject to be photographed is greater than or equal to the closest focusing distance of the camera. It can be understood that for the user, it is impossible to perceive whether the shooting distance between the terminal device and the subject to be photographed is greater than or equal to the closest focusing distance of the camera. Therefore, the user can intuitively observe whether the preview image is clear, and perform the operation when the preview image is clear. Secondary shooting operation.
可选地,所述方法还包括:终端设备进入第一拍摄状态后,当拍摄距离大于摄像头的最近对焦距离时,终端设备不再显示第一提示信息。Optionally, the method further includes: after the terminal device enters the first shooting state, when the shooting distance is greater than the closest focusing distance of the camera, the terminal device no longer displays the first prompt information.
终端设备在进入第一拍摄状态后,当用户将终端设备远离被拍主体时,拍摄距离会逐渐增大。当拍摄距离大于摄像头的最近对焦距离时,终端设备不再显示第一提示信息,可以提醒用户此时可以进行二次拍摄操作,无需再远离终端设备。After the terminal device enters the first shooting state, when the user moves the terminal device away from the subject to be shot, the shooting distance will gradually increase. When the shooting distance is greater than the closest focusing distance of the camera, the terminal device no longer displays the first prompt information, which can remind the user that the second shooting operation can be performed at this time, and there is no need to stay away from the terminal device.
可选地,所述终端设备进入第一拍摄状态后,根据拍摄距离调整摄像头的变焦倍率的步骤,包括:终端设备根据拍摄距离,以及拍摄距离和变焦倍率之间的第一对应关系,调整摄像头的变焦倍率。Optionally, after the terminal device enters the first shooting state, the step of adjusting the zoom ratio of the camera according to the shooting distance includes: the terminal device adjusts the camera according to the shooting distance and the first correspondence between the shooting distance and the zoom ratio. zoom ratio.
第一对应关系可以是预配置在终端设备中的。The first correspondence may be preconfigured in the terminal device.
一些实施方式中,所述第一对应关系中,当拍摄距离大于第一距离阈值、且小于第二距离阈值时,变焦倍率随着拍摄距离的增大呈线性增大。In some embodiments, in the first correspondence, when the shooting distance is greater than the first distance threshold and less than the second distance threshold, the zoom magnification increases linearly with the increase of the shooting distance.
另外一些实施方式中,所述第一对应关系中,当拍摄距离大于第一距离阈值、且小于第二距离阈值时,变焦倍率随着拍摄距离的增大呈非线性增大。In other embodiments, in the first correspondence, when the shooting distance is greater than the first distance threshold and less than the second distance threshold, the zoom magnification increases nonlinearly with the increase of the shooting distance.
一些实施例中,所述方法还包括:终端设备用第二照片替换第一照片。In some embodiments, the method further includes: the terminal device replaces the first photo with the second photo.
例如,如果终端设备响应于用户的二次拍摄操作,拍摄到了第二照片,则终端设备可以用第二照片替换近距离拍摄到的第一照片(第一照片较为模糊),作为最终拍摄到的照片。从而,用户可以使用终端设备拍摄到较为清晰、且拍摄FOV近乎等同于近距离拍摄的照片。For example, if the terminal device captures a second photo in response to the user's secondary capture operation, the terminal device can replace the first photo (the first photo is blurry) captured at close range with the second photo, as the final captured photo photo. Therefore, the user can use the terminal device to take a picture that is clearer and whose FOV is almost equivalent to taking a close-up picture.
另外一些实施例中,终端设备也可以不用第二照片替换第一照片。例如,终端设备 可以将第一照片和第二照片都保存,用户可以主动选择是否删除第一照片,在此不作限制。In other embodiments, the terminal device may not replace the first photo with the second photo. For example, the terminal device can save both the first photo and the second photo, and the user can actively choose whether to delete the first photo, which is not limited here.
一些实施例中,终端设备进入第一拍摄状态后,可以自动退出第一拍摄状态。In some embodiments, after the terminal device enters the first shooting state, it can automatically exit the first shooting state.
例如,一种实施方式中,所述方法还包括:终端设备进入第一拍摄状态后,当显示第一提示信息达到第一时长后,仍未接收到二次拍摄操作时,终端设备退出第一拍摄状态。For example, in one embodiment, the method further includes: after the terminal device enters the first shooting state, when the first prompt message is displayed for a first time period and the second shooting operation is still not received, the terminal device exits the first shooting state. shooting status.
示例性地,第一时长可以为5秒(S)、6S等。终端设备进入第一拍摄状态后,可以在拍摄界面中将第一提示信息显示预设的第一时长。当达到第一时长后,终端设备仍未再次接收到用户的二次拍摄操作时,终端设备可以自动退出第一拍摄状态。Exemplarily, the first duration may be 5 seconds (S), 6S, or the like. After the terminal device enters the first shooting state, the first prompt information may be displayed on the shooting interface for a preset first duration. When the terminal device has not received the user's second shooting operation again after the first time period is reached, the terminal device may automatically exit the first shooting state.
又例如,另一种实施方式中,终端设备在进入第一拍摄状态后,当连续检测到M次(M为大于0的整数,如M可以为10)拍摄距离大于上述第二距离阈值时,终端设备也可以自动退出第一拍摄状态。For another example, in another embodiment, after the terminal device enters the first shooting state, when it continuously detects M times (M is an integer greater than 0, for example, M may be 10), when the shooting distance is greater than the above-mentioned second distance threshold, The terminal device can also automatically exit the first shooting state.
另外一些实施例中,终端设备进入第一拍摄状态后,也可以由用户主动操作,触发终端设备退出第一拍摄状态。In other embodiments, after the terminal device enters the first shooting state, the user may also actively operate to trigger the terminal device to exit the first shooting state.
例如,又一种实施方式中,所述方法还包括:终端设备进入第一拍摄状态后,响应于用户主动退出第一拍摄状态的操作或者手动变焦的操作,退出第一拍摄状态。For example, in another embodiment, the method further includes: after the terminal device enters the first shooting state, exiting the first shooting state in response to the user's operation of actively exiting the first shooting state or an operation of manual zooming.
可以理解的,当终端设备退出第一拍摄状态后,摄像头的变焦倍率可以由第一拍摄状态中调整的变焦倍率切换至默认的第一倍率(如:1X)。此时,终端设备处于正常拍摄状态,终端设备显示的预览画面的清晰或模糊程度,与终端设备与被拍主体之间的拍摄距离相关。It can be understood that after the terminal device exits the first shooting state, the zoom magnification of the camera can be switched from the zoom magnification adjusted in the first shooting state to the default first magnification (eg, 1X). At this time, the terminal device is in a normal shooting state, and the degree of clarity or blur of the preview image displayed by the terminal device is related to the shooting distance between the terminal device and the subject to be photographed.
可选地,当终端设备检测到用户手动退出第一拍摄状态的次数达到预设次数(如3次)时,终端设备后续也可以不再触发进入第一拍摄状态,以保证用户的体验更好。Optionally, when the terminal device detects that the number of times that the user manually exits the first shooting state reaches a preset number of times (such as 3 times), the terminal device may not trigger to enter the first shooting state in the future, so as to ensure a better user experience. .
可选地,终端设备在进入第一拍摄状态之前,检测到用户进行了手动变焦时,也可以不再进入第一拍摄状态。Optionally, before entering the first shooting state, when the terminal device detects that the user performs manual zooming, it may not enter the first shooting state.
可选地,终端设备在进入第一拍摄状态后,根据拍摄距离对摄像头的变焦倍率进行调整时,如果终端设备将摄像头的变焦倍率调整至第二倍率,则终端设备也可以将摄像头的变焦倍率暂时锁定在第二倍率,以避免由于用户手抖使得终端设备与被拍主体的拍摄距离反复变化时,终端设备反复来回调整摄像头的变焦倍率。Optionally, when the terminal device adjusts the zoom ratio of the camera according to the shooting distance after entering the first shooting state, if the terminal device adjusts the zoom ratio of the camera to the second ratio, the terminal device can also adjust the zoom ratio of the camera. The second magnification is temporarily locked to prevent the terminal device from repeatedly adjusting the zoom magnification of the camera back and forth when the shooting distance between the terminal device and the subject to be photographed changes repeatedly due to the user's hand shaking.
可选地,所述方法还包括:当终端设备在接收到用户的拍摄操作之前,连续检测到N次拍摄距离小于第三距离阈值时,终端设备进入第二拍摄状态。N为大于0的整数;所述第三距离阈值大于所述摄像头的最近对焦距离。终端设备进入第二拍摄状态后,根据拍摄距离,按照如下方式调整摄像头的变焦倍率:Optionally, the method further includes: when the terminal device continuously detects that the shooting distance is smaller than the third distance threshold for N times before receiving the user's shooting operation, the terminal device enters the second shooting state. N is an integer greater than 0; the third distance threshold is greater than the closest focusing distance of the camera. After the terminal device enters the second shooting state, according to the shooting distance, adjust the zoom ratio of the camera as follows:
当拍摄距离大于或等于第三距离阈值时,终端设备将摄像头的变焦倍率维持在第一倍率;当拍摄距离小于第三距离阈值、且大于摄像头的最近对焦距离时,终端设备调整摄像头的变焦倍率随着拍摄距离的减小而逐渐增大;当拍摄距离小于或等于摄像头的最近对焦距离时,终端设备将摄像头的变焦倍率维持在第二倍率。When the shooting distance is greater than or equal to the third distance threshold, the terminal device maintains the zoom magnification of the camera at the first magnification; when the shooting distance is less than the third distance threshold and greater than the closest focusing distance of the camera, the terminal device adjusts the zoom magnification of the camera It gradually increases as the shooting distance decreases; when the shooting distance is less than or equal to the closest focusing distance of the camera, the terminal device maintains the zoom magnification of the camera at the second magnification.
当终端设备进入第二拍摄状态后,在调整摄像头的变焦倍率的过程中,接收到用户的拍摄操作时,终端设备响应于拍摄操作,拍摄照片。After the terminal device enters the second shooting state, in the process of adjusting the zoom ratio of the camera, when receiving a shooting operation from the user, the terminal device takes a photo in response to the shooting operation.
示例性地,第二拍摄状态可以称为放大拍状态。Exemplarily, the second photographing state may be referred to as a zoom-in photographing state.
该拍摄方法中,当终端设备在接收到用户的拍摄操作之前,连续检测到N次拍摄距离小于第三距离阈值时,表明用户有使用终端设备对被拍主体进行近距离拍摄的倾向。如果用户有使用终端设备对被拍主体进行近距离拍摄的倾向,终端设备进入第二拍摄状态。终端设备进入第二拍摄状态后,在拍摄距离大于或等于摄像头的最近对焦距离的范围内,调整摄像头的变焦倍率随着拍摄距离的减小而增大,可以使得终端设备的拍摄FOV在当前拍摄距离时,可以近乎等同于摄像头的变焦倍率为默认的第一倍率、且拍摄距离更小时的拍摄FOV。In this shooting method, when the terminal device continuously detects that the shooting distance is smaller than the third distance threshold for N times before receiving the user's shooting operation, it indicates that the user has a tendency to use the terminal device to shoot the subject at close range. If the user has a tendency to use the terminal device to take a close-up photograph of the subject being photographed, the terminal device enters the second photographing state. After the terminal device enters the second shooting state, within the range where the shooting distance is greater than or equal to the closest focusing distance of the camera, adjust the zoom ratio of the camera to increase as the shooting distance decreases, so that the shooting FOV of the terminal device is within the current shooting range. When the distance is longer, it can be almost equivalent to the shooting FOV when the zoom magnification of the camera is the default first magnification and the shooting distance is smaller.
也即,终端设备进入第二拍摄状态后,在拍摄距离大于或等于摄像头的最近对焦距离的范围内进行拍摄时,拍摄到的照片的放大效果,可以与终端设备未进入第二拍摄状态(摄像头的变焦倍率为默认的第一倍率)、且拍摄距离更小时拍摄到的照片的放大效果近乎等同(或相同)。通过这种方式,可以使得用户使用终端设备拍摄到的照片,既可以达到其想要的近距离拍摄的放大效果,也可以保证照片的清晰度。例如,假设终端设备不进入第二拍摄状态,用户使用终端设备在拍摄距离小于摄像头的最近对焦距离时拍摄到的照片为第一照片;终端设备进入第二拍摄状态,用户使用终端设备在拍摄距离大于或等于摄像头的最近对焦距离时拍摄到的照片为第二照片。则,第二照片不仅可以具有近乎等同于第一照片的放大效果,而且比第一照片更加清晰。That is, after the terminal device enters the second shooting state, when the shooting distance is greater than or equal to the closest focusing distance of the camera, the magnification effect of the captured photo may be different from that when the terminal device does not enter the second shooting state (camera). The zoom magnification is the default first magnification), and the magnification effect of the photos taken when the shooting distance is smaller is almost the same (or the same). In this way, the photos taken by the user using the terminal device can not only achieve the desired zoom-in effect of close-up shooting, but also ensure the clarity of the photos. For example, assuming that the terminal device does not enter the second shooting state, the photo taken by the user using the terminal device when the shooting distance is less than the closest focusing distance of the camera is the first photo; The photo taken when the camera is greater than or equal to the closest focusing distance of the camera is the second photo. Then, the second photo can not only have a magnification effect nearly equal to that of the first photo, but also be clearer than the first photo.
可选地,所述终端设备进入第二拍摄状态后,根据拍摄距离调整摄像头的变焦倍率的步骤,包括:终端设备根据拍摄距离,以及拍摄距离和变焦倍率之间的第二对应关系,调整摄像头的变焦倍率。Optionally, after the terminal device enters the second shooting state, the step of adjusting the zoom ratio of the camera according to the shooting distance includes: the terminal device adjusts the camera according to the shooting distance and the second correspondence between the shooting distance and the zoom ratio. zoom ratio.
第二对应关系可以是预配置在终端设备中的。The second correspondence may be preconfigured in the terminal device.
一些实施方式中,所述第二对应关系中,当拍摄距离小于第三距离阈值、且大于摄像头的最近对焦距离时,变焦倍率随着拍摄距离的减小呈线性增大。In some embodiments, in the second correspondence, when the shooting distance is less than the third distance threshold and greater than the closest focusing distance of the camera, the zoom magnification increases linearly as the shooting distance decreases.
另外一些实施方式中,所述第二对应关系中,当拍摄距离小于第三距离阈值、且大于摄像头的最近对焦距离时,变焦倍率随着拍摄距离的减小呈非线性增大。In some other implementations, in the second correspondence, when the shooting distance is less than the third distance threshold and greater than the closest focusing distance of the camera, the zoom magnification increases nonlinearly as the shooting distance decreases.
第二对应关系中,当拍摄距离小于第三距离阈值、且大于摄像头的最近对焦距离时,拍摄距离与变焦倍率之间的对应关系越接近线性关系,终端设备在靠近或远离被拍主体的过程中,拍摄FOV发生跳变的可能性越低。In the second correspondence, when the shooting distance is less than the third distance threshold and greater than the closest focusing distance of the camera, the closer the correspondence between the shooting distance and the zoom magnification is to a linear relationship, the more the terminal device is in the process of approaching or moving away from the subject being photographed. , the lower the probability of shooting FOV jumps.
一些实施例中,终端设备进入第二拍摄状态后,可以自动退出第二拍摄状态。In some embodiments, after the terminal device enters the second shooting state, it can automatically exit the second shooting state.
例如,一种实施方式中,所述方法还包括:终端设备进入第二拍摄状态后,当连续检测到M次拍摄距离大于第三距离阈值时,终端设备退出第二拍摄状态;M为大于0的整数。For example, in one embodiment, the method further includes: after the terminal device enters the second shooting state, when it is continuously detected that the shooting distance is greater than the third distance threshold for M times, the terminal device exits the second shooting state; M is greater than 0 the integer.
另外一些实施例中,终端设备进入第二拍摄状态后,用户可以主动操作,触发终端设备退出第二拍摄状态。In other embodiments, after the terminal device enters the second shooting state, the user may actively operate to trigger the terminal device to exit the second shooting state.
例如,另一种实施方式中,所述方法还包括:终端设备进入第二拍摄状态后,响应于用户主动退出第二拍摄状态的操作或者手动变焦的操作,退出第二拍摄状态。For example, in another implementation manner, the method further includes: after the terminal device enters the second shooting state, exiting the second shooting state in response to the user's operation of actively exiting the second shooting state or an operation of manual zooming.
可以理解的,当终端设备退出第二拍摄状态后,手机的摄像头的变焦倍率可以由第二拍摄状态中调整的变焦倍率切换至默认的第一倍率(如:1X)。此时,终端设备处于正常拍摄状态,终端设备显示的预览画面的清晰或模糊程度,与终端设备与被拍主体之间的拍摄距离相关。It can be understood that after the terminal device exits the second shooting state, the zoom ratio of the camera of the mobile phone can be switched from the zoom ratio adjusted in the second shooting state to the default first ratio (eg, 1X). At this time, the terminal device is in a normal shooting state, and the degree of clarity or blur of the preview image displayed by the terminal device is related to the shooting distance between the terminal device and the subject to be photographed.
可选地,当终端设备检测到用户手动退出第二拍摄状态的次数达到预设次数(如3次)时,终端设备后续也可以不再触发进入第二拍摄状态,以保证用户的体验更好。Optionally, when the terminal device detects that the number of times that the user manually exits the second shooting state reaches a preset number of times (such as 3 times), the terminal device may not trigger to enter the second shooting state in the future, so as to ensure a better user experience. .
可选地,终端设备在进入第二拍摄状态之前,检测到用户进行了手动变焦时,也可以不再进入第二拍摄状态。Optionally, before entering the second shooting state, when the terminal device detects that the user has performed manual zooming, it may not enter the second shooting state.
第二方面,本申请实施例提供一种拍摄装置,该装置可以用于实现上述第一方面所述的拍摄方法。该装置的功能可以通过硬件实现,也可以通过硬件执行相应的软件实现。硬件或软件包括一个或多个与上述功能相对应的模块或单元,例如,显示模块,相机模块。In a second aspect, an embodiment of the present application provides a photographing apparatus, which can be used to implement the photographing method described in the first aspect. The functions of the apparatus may be implemented by hardware, or by executing corresponding software by hardware. The hardware or software includes one or more modules or units corresponding to the above functions, for example, a display module, a camera module.
其中,显示模块可以包括终端设备的显示器,相机模块可以包括终端设备的处理器、以及处理器可以调用执行的程序代码(如相机应用)。显示模块和相机模块可以实现第一方面中所述的拍摄方法对应的功能。Wherein, the display module may include a display of the terminal device, and the camera module may include a processor of the terminal device, and a program code (such as a camera application) that the processor can invoke and execute. The display module and the camera module can implement the functions corresponding to the shooting method described in the first aspect.
相机模块用于在启动摄像头进行拍摄时,检测终端设备与被拍主体之间的拍摄距离;当接收到用户的拍摄操作、且拍摄距离小于摄像头的最近对焦距离时,响应于拍摄操作拍摄第一照片,并进入第一拍摄状态。The camera module is used to detect the shooting distance between the terminal device and the subject to be photographed when the camera is activated for shooting; when receiving a shooting operation from the user and the shooting distance is less than the closest focusing distance of the camera, the first shooting operation is performed in response to the shooting operation. photo, and enter the first shooting state.
显示模块用于在相机模块进入第一拍摄状态后,显示第一提示信息,第一提示信息用于提示用户将终端设备远离被拍主体。The display module is used to display first prompt information after the camera module enters the first shooting state, and the first prompt information is used to prompt the user to keep the terminal device away from the subject to be photographed.
相机模块还用于在进入第一拍摄状态后,根据拍摄距离,按照如下方式调整摄像头的变焦倍率:The camera module is also used to adjust the zoom ratio of the camera as follows according to the shooting distance after entering the first shooting state:
当拍摄距离小于或等于第一距离阈值时,将摄像头的变焦倍率维持在第一倍率;当拍摄距离大于第一距离阈值、且小于第二距离阈值时,调整摄像头的变焦倍率随着拍摄距离的增大而逐渐增大;当拍摄距离大于或等于第二距离阈值时,将摄像头的变焦倍率维持在第二倍率。其中,第一距离阈值小于摄像头的最近对焦距离,第二距离阈值大于摄像头的最近对焦距离;第一倍率是终端设备启动摄像头进行拍摄时,摄像头的默认变焦倍率;第二倍率大于第一倍率。When the shooting distance is less than or equal to the first distance threshold, the zoom magnification of the camera is maintained at the first magnification; when the shooting distance is greater than the first distance threshold and less than the second distance threshold, the zoom magnification of the camera is adjusted as the shooting distance increases. increases gradually; when the shooting distance is greater than or equal to the second distance threshold, the zoom magnification of the camera is maintained at the second magnification. The first distance threshold is smaller than the closest focusing distance of the camera, and the second distance threshold is greater than the closest focusing distance of the camera; the first magnification is the default zoom magnification of the camera when the terminal device starts the camera to shoot; the second magnification is greater than the first magnification.
当相机模块进入第一拍摄状态后,在调整摄像头的变焦倍率的过程中,相机模块还用于接收到用户的二次拍摄操作时,响应于二次拍摄操作,拍摄第二照片。After the camera module enters the first shooting state, in the process of adjusting the zoom ratio of the camera, the camera module is further configured to take a second photo in response to the second shooting operation when receiving the user's second shooting operation.
示例性地,第一拍摄状态可以称为离远点儿拍状态,第一提示信息可以是“请再离远一点,改善画质”。Exemplarily, the first photographing state may be referred to as a far-away photographing state, and the first prompt information may be "please move further away to improve image quality".
一些实施方式中,第二倍率可以小于或等于摄像头的最大变焦倍率。In some embodiments, the second magnification may be less than or equal to the maximum zoom magnification of the camera.
例如,摄像头的最大变焦倍率为2.5X时,第二倍率可以是2X、2.5X等,第二倍率的大小不作限制。For example, when the maximum zoom magnification of the camera is 2.5X, the second magnification may be 2X, 2.5X, etc., and the size of the second magnification is not limited.
可选地,上述二次拍摄操作是用户在看到终端设备显示的预览画面清晰时进行的拍摄操作。Optionally, the above-mentioned secondary photographing operation is a photographing operation performed by the user when the user sees that the preview image displayed by the terminal device is clear.
当用户看到终端设备显示的预览画面清晰时,表明终端设备与被拍主体之间的拍摄距离大于或等于摄像头的最近对焦距离。可以理解,对于用户而言,无法感知终端设备与被拍主体之间的拍摄距离是否大于或等于摄像头的最近对焦距离,因此,用户可以直观地观察预览画面是否清晰,并在预览画面清晰时进行二次拍摄操作。When the user sees that the preview screen displayed by the terminal device is clear, it indicates that the shooting distance between the terminal device and the subject to be photographed is greater than or equal to the closest focusing distance of the camera. It can be understood that for the user, it is impossible to perceive whether the shooting distance between the terminal device and the subject to be photographed is greater than or equal to the closest focusing distance of the camera. Therefore, the user can intuitively observe whether the preview image is clear, and perform the operation when the preview image is clear. Secondary shooting operation.
可选地,相机模块进入第一拍摄状态后,当拍摄距离大于摄像头的最近对焦距离时,显示模块不再显示第一提示信息。Optionally, after the camera module enters the first shooting state, when the shooting distance is greater than the closest focusing distance of the camera, the display module no longer displays the first prompt information.
可选地,相机模块具体用于,进入第一拍摄状态后,根据拍摄距离,以及拍摄距离和变焦倍率之间的第一对应关系,调整摄像头的变焦倍率。Optionally, the camera module is specifically configured to, after entering the first shooting state, adjust the zoom ratio of the camera according to the shooting distance and the first correspondence between the shooting distance and the zoom ratio.
第一对应关系可以是预配置在终端设备中的。The first correspondence may be preconfigured in the terminal device.
一些实施方式中,所述第一对应关系中,当拍摄距离大于第一距离阈值、且小于第二距离阈值时,变焦倍率随着拍摄距离的增大呈线性增大。In some embodiments, in the first correspondence, when the shooting distance is greater than the first distance threshold and less than the second distance threshold, the zoom magnification increases linearly with the increase of the shooting distance.
另外一些实施方式中,所述第一对应关系中,当拍摄距离大于第一距离阈值、且小于第二距离阈值时,变焦倍率随着拍摄距离的增大呈非线性增大。In other embodiments, in the first correspondence, when the shooting distance is greater than the first distance threshold and less than the second distance threshold, the zoom magnification increases nonlinearly with the increase of the shooting distance.
一些实施例中,相机模块还用于用第二照片替换第一照片。In some embodiments, the camera module is also used to replace the first photo with the second photo.
一种实施方式中,相机模块还用于,在进入第一拍摄状态后,当显示模块显示第一提示信息达到第一时长后,相机模块仍未接收到二次拍摄操作时,自动退出第一拍摄状态。In one embodiment, the camera module is further configured to, after entering the first shooting state, when the display module displays the first prompt information for a first time period and the camera module has not received the second shooting operation, automatically exit the first shooting state. shooting status.
另一种实施方式中,相机模块还用于,在进入第一拍摄状态后,当连续检测到M次(M为大于0的整数,如M可以为10)拍摄距离大于上述第二距离阈值时,自动退出第一拍摄状态。In another embodiment, the camera module is further configured to, after entering the first shooting state, when it is continuously detected M times (M is an integer greater than 0, for example, M can be 10) the shooting distance is greater than the above-mentioned second distance threshold to automatically exit the first shooting state.
又一种实施方式中,相机模块还用于,在进入第一拍摄状态后,响应于用户主动退出第一拍摄状态的操作或者手动变焦的操作,退出第一拍摄状态。In another embodiment, the camera module is further configured to, after entering the first shooting state, exit the first shooting state in response to the user's operation of actively exiting the first shooting state or an operation of manually zooming.
可选地,相机模块还用于,在检测到用户手动退出第一拍摄状态的次数达到预设次数(如3次)时,不再触发进入第一拍摄状态,以保证用户的体验更好。Optionally, the camera module is further configured to stop triggering to enter the first shooting state when it is detected that the number of times the user manually exits the first shooting state reaches a preset number of times (eg, 3 times), so as to ensure a better user experience.
可选地,相机模块还用于,在进入第一拍摄状态之前,检测到用户进行了手动变焦时,不再进入第一拍摄状态。Optionally, the camera module is further configured to stop entering the first shooting state when it is detected that the user has performed manual zooming before entering the first shooting state.
可选地,相机模块还用于,在进入第一拍摄状态后,根据拍摄距离对摄像头的变焦倍率进行调整时,如果将摄像头的变焦倍率调整至第二倍率,则将摄像头的变焦倍率暂时锁定在第二倍率,以避免由于用户手抖使得终端设备与被拍主体的拍摄距离反复变化时,反复来回调整摄像头的变焦倍率。Optionally, the camera module is further configured to temporarily lock the zoom ratio of the camera if the zoom ratio of the camera is adjusted to the second ratio when the zoom ratio of the camera is adjusted according to the shooting distance after entering the first shooting state. At the second magnification, the zoom magnification of the camera is repeatedly adjusted back and forth when the shooting distance between the terminal device and the subject to be photographed changes repeatedly due to the user's hand shaking.
可选地,相机模块还用于,在接收到用户的拍摄操作之前,连续检测到N次拍摄距离小于第三距离阈值时,进入第二拍摄状态。N为大于0的整数;第三距离阈值大于摄像头的最近对焦距离。并且,在进入第二拍摄状态后,根据拍摄距离,按照如下方式调整摄像头的变焦倍率:Optionally, the camera module is further configured to, before receiving the user's shooting operation, enter the second shooting state when it is continuously detected that the shooting distance is smaller than the third distance threshold for N times. N is an integer greater than 0; the third distance threshold is greater than the closest focusing distance of the camera. And, after entering the second shooting state, according to the shooting distance, adjust the zoom ratio of the camera as follows:
当拍摄距离大于或等于第三距离阈值时,将摄像头的变焦倍率维持在第一倍率;当拍摄距离小于第三距离阈值、且大于摄像头的最近对焦距离时,调整摄像头的变焦倍率随着拍摄距离的减小而逐渐增大;当拍摄距离小于或等于摄像头的最近对焦距离时,将摄像头的变焦倍率维持在第二倍率。When the shooting distance is greater than or equal to the third distance threshold, the zoom magnification of the camera is maintained at the first magnification; when the shooting distance is less than the third distance threshold and greater than the closest focusing distance of the camera, the zoom magnification of the camera is adjusted with the shooting distance When the shooting distance is less than or equal to the closest focusing distance of the camera, the zoom ratio of the camera is maintained at the second ratio.
相机模块进入第二拍摄状态后,在调整摄像头的变焦倍率的过程中,还用于在接收到用户的拍摄操作时,响应于拍摄操作,拍摄照片。After the camera module enters the second shooting state, in the process of adjusting the zoom magnification of the camera, it is also used for taking pictures in response to the shooting operation when receiving the shooting operation of the user.
示例性地,第二拍摄状态可以称为放大拍状态。Exemplarily, the second photographing state may be referred to as a zoom-in photographing state.
可选地,相机模块具体用于,进入第二拍摄状态后,根据拍摄距离,以及拍摄距离和变焦倍率之间的第二对应关系,调整摄像头的变焦倍率。Optionally, the camera module is specifically configured to, after entering the second shooting state, adjust the zoom ratio of the camera according to the shooting distance and the second correspondence between the shooting distance and the zoom ratio.
第二对应关系可以是预配置在终端设备中的。The second correspondence may be preconfigured in the terminal device.
一些实施方式中,所述第二对应关系中,当拍摄距离小于第三距离阈值、且大于摄 像头的最近对焦距离时,变焦倍率随着拍摄距离的减小呈线性增大。In some embodiments, in the second correspondence, when the shooting distance is less than the third distance threshold and greater than the closest focusing distance of the camera, the zoom magnification increases linearly as the shooting distance decreases.
另外一些实施方式中,所述第二对应关系中,当拍摄距离小于第三距离阈值、且大于摄像头的最近对焦距离时,变焦倍率随着拍摄距离的减小呈非线性增大。In some other implementations, in the second correspondence, when the shooting distance is less than the third distance threshold and greater than the closest focusing distance of the camera, the zoom magnification increases nonlinearly as the shooting distance decreases.
第二对应关系中,当拍摄距离小于第三距离阈值、且大于摄像头的最近对焦距离时,拍摄距离与变焦倍率之间的对应关系越接近线性关系,终端设备在靠近或远离被拍主体的过程中,拍摄FOV发生跳变的可能性越低。In the second correspondence, when the shooting distance is less than the third distance threshold and greater than the closest focusing distance of the camera, the closer the correspondence between the shooting distance and the zoom magnification is to a linear relationship, the more the terminal device is in the process of approaching or moving away from the subject being photographed. , the lower the probability of shooting FOV jumps.
一种实施方式中,相机模块还用于,在进入第二拍摄状态后,当连续检测到M次拍摄距离大于第三距离阈值时,退出第二拍摄状态;M为大于0的整数。In one embodiment, the camera module is further configured to, after entering the second shooting state, exit the second shooting state when it is continuously detected that the shooting distance is greater than the third distance threshold for M times; M is an integer greater than 0.
另一种实施方式中,相机模块还用于,在进入第二拍摄状态后,响应于用户主动退出第二拍摄状态的操作或者手动变焦的操作,退出第二拍摄状态。In another embodiment, the camera module is further configured to, after entering the second shooting state, exit the second shooting state in response to the user's operation of actively exiting the second shooting state or an operation of manually zooming.
可选地,相机模块还用于,在检测到用户手动退出第二拍摄状态的次数达到预设次数(如3次)时,不再触发进入第二拍摄状态,以保证用户的体验更好。Optionally, the camera module is further configured to stop triggering to enter the second shooting state when it is detected that the number of times the user manually exits the second shooting state reaches a preset number of times (eg, 3 times), so as to ensure a better user experience.
可选地,相机模块还用于,在进入第二拍摄状态之前,检测到用户进行了手动变焦时,不再进入第二拍摄状态。Optionally, the camera module is further configured to, before entering the second shooting state, no longer enter the second shooting state when it is detected that the user has performed manual zooming.
可以理解的,通过该拍摄装置,可以实现第一方面所述的拍摄方法对应的全部功能,在此不再一一赘述。It can be understood that all the functions corresponding to the shooting method described in the first aspect can be realized through the shooting device, which will not be repeated here.
第三方面,本申请实施例提供一种终端设备,包括:处理器,存储器,以及计算机程序;其中,计算机程序存储在存储器上,当计算机程序被处理器执行时,使得终端设备执行如第一方面及第一方面中任意一种实现方式所述的拍摄方法。In a third aspect, an embodiment of the present application provides a terminal device, including: a processor, a memory, and a computer program; wherein the computer program is stored in the memory, and when the computer program is executed by the processor, the terminal device executes the first The photographing method described in any one of the aspects and the implementation manner of the first aspect.
示例性地,终端设备可以是手机、平板电脑、可穿戴设备、车载设备、增强现实(augmented reality,AR)/虚拟现实(virtual reality,VR)设备、笔记本电脑、超级移动个人计算机(ultra-mobile personal computer,UMPC)、上网本、个人数字助理(personal digital assistant,PDA)等移动终端。或者,终端设备也可以是数码相机、单反相机/微单相机、运动摄像机、云台相机、无人机等专业的拍摄设备。Exemplarily, the terminal device may be a mobile phone, a tablet computer, a wearable device, an in-vehicle device, an augmented reality (AR)/virtual reality (VR) device, a notebook computer, an ultra-mobile personal computer (ultra-mobile) personal computer, UMPC), netbook, personal digital assistant (personal digital assistant, PDA) and other mobile terminals. Alternatively, the terminal device may also be a professional shooting device such as a digital camera, a single-lens reflex camera/mirror-single camera, an action camera, a PTZ camera, and a drone.
第四方面,本申请实施例提供一种计算机可读存储介质,计算机可读存储介质包括计算机程序,当计算机程序在终端设备上运行时,使得终端设备执行如第一方面及第一方面中任意一种实现方式所述的拍摄方法。In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, where the computer-readable storage medium includes a computer program, and when the computer program is run on a terminal device, the terminal device is made to execute any one of the first aspect and the first aspect. A shooting method described in an implementation manner.
第五方面,本申请实施例还提供一种计算机程序产品,包括计算机可读代码,当所述计算机可读代码在终端设备中运行时,使得终端设备执行如第一方面及第一方面中任意一种实现方式所述的拍摄方法。In a fifth aspect, the embodiments of the present application further provide a computer program product, including computer-readable codes, when the computer-readable codes are run in a terminal device, the terminal device can execute any one of the first aspect and the first aspect. A shooting method described in an implementation manner.
第二方面及第二方面的任意一种实现方式、第三方面及第三方面的任意一种实现方式、第四方面及第四方面的任意一种实现方式、第五方面及第五方面的任意一种实现方式,所对应的技术效果可参见上述第一方面及第一方面的任意一种实现方式所对应的技术效果,此处不再赘述。Any implementation manner of the second aspect and the second aspect, any implementation manner of the third aspect and the third aspect, any implementation manner of the fourth aspect and the fourth aspect, and the fifth aspect and the fifth aspect For the technical effects corresponding to any implementation manner, reference may be made to the first aspect and the technical effects corresponding to any implementation manner of the first aspect, which will not be repeated here.
应当理解的是,本申请中对技术特征、技术方案、有益效果或类似语言的描述并不是暗示在任意的单个实施例中可以实现所有的特点和优点。相反,可以理解的是对于特征或有益效果的描述意味着在至少一个实施例中包括特定的技术特征、技术方案或有益效果。因此,本说明书中对于技术特征、技术方案或有益效果的描述并不一定是指相同的实施例。进而,还可以任何适当的方式组合本实施例中所描述的技术特征、技术方案 和有益效果。本领域技术人员将会理解,无需特定实施例的一个或多个特定的技术特征、技术方案或有益效果即可实现实施例。在其他实施例中,还可在没有体现所有实施例的特定实施例中识别出额外的技术特征和有益效果。It should be understood that the description of technical features, technical solutions, beneficial effects or similar language in this application does not imply that all features and advantages may be realized in any single embodiment. On the contrary, it can be understood that the description of features or beneficial effects means that a specific technical feature, technical solution or beneficial effect is included in at least one embodiment. Therefore, descriptions of technical features, technical solutions or beneficial effects in this specification do not necessarily refer to the same embodiments. Furthermore, the technical features, technical solutions and beneficial effects described in this embodiment can also be combined in any appropriate manner. Those skilled in the art will understand that an embodiment can be implemented without one or more specific technical features, technical solutions or beneficial effects of a specific embodiment. In other embodiments, additional technical features and benefits may also be identified in specific embodiments that do not embody all embodiments.
附图说明Description of drawings
图1为一种拍摄场景的示意图;1 is a schematic diagram of a shooting scene;
图2为手机与文字“HUAWEI”之间的拍摄距离大于或等于手机摄像头的最近对焦距离时手机拍摄界面的示意图;Figure 2 is a schematic diagram of the mobile phone shooting interface when the shooting distance between the mobile phone and the text "HUAWEI" is greater than or equal to the closest focusing distance of the mobile phone camera;
图3为手机与文字“HUAWEI”之间的拍摄距离小于手机摄像头的最近对焦距离时手机拍摄界面的示意图;Figure 3 is a schematic diagram of a mobile phone shooting interface when the shooting distance between the mobile phone and the text "HUAWEI" is less than the closest focusing distance of the mobile phone camera;
图4为一种手机拍摄界面的示意图;4 is a schematic diagram of a mobile phone shooting interface;
图5为手机拍摄界面的另一示意图;Fig. 5 is another schematic diagram of the mobile phone shooting interface;
图6为手机拍摄界面的又一示意图;Fig. 6 is another schematic diagram of the mobile phone shooting interface;
图7为本申请实施例提供的终端设备的结构示意图;FIG. 7 is a schematic structural diagram of a terminal device provided by an embodiment of the present application;
图8为本申请实施例提供的拍摄方法的流程示意图;8 is a schematic flowchart of a photographing method provided by an embodiment of the present application;
图9为本申请实施例提供的手机拍摄界面的示意图;9 is a schematic diagram of a mobile phone shooting interface provided by an embodiment of the present application;
图10为本申请实施例提供的手机拍摄界面的另一示意图;10 is another schematic diagram of a mobile phone shooting interface provided by an embodiment of the present application;
图11为本申请实施例提供的拍摄距离和zoom倍率之间的一种对应关系的示意图;11 is a schematic diagram of a correspondence between a shooting distance and a zoom magnification provided by an embodiment of the application;
图12为本申请实施例提供的拍摄距离和zoom倍率之间的另一种对应关系的示意图;12 is a schematic diagram of another correspondence between the shooting distance and the zoom magnification provided by an embodiment of the present application;
图13为本申请实施例提供的拍摄方法的另一流程示意图;FIG. 13 is another schematic flowchart of the photographing method provided by the embodiment of the present application;
图14为本申请实施例提供的手机拍摄界面的又一示意图;14 is another schematic diagram of a mobile phone shooting interface provided by an embodiment of the application;
图15为本申请实施例提供的手机未进入放大拍状态、且拍摄距离为9cm时拍摄到的画面示意图;15 is a schematic diagram of a screen shot when the mobile phone provided by the embodiment of the application is not in a zoomed-in shooting state and the shooting distance is 9 cm;
图16为本申请实施例提供的手机进入放大拍状态、且拍摄距离为15cm时拍摄到的画面示意图;16 is a schematic diagram of a screen shot when the mobile phone provided by the embodiment of the application enters a zoomed-in shooting state and the shooting distance is 15 cm;
图17为本申请实施例提供的第二对应关系的示意图;17 is a schematic diagram of a second correspondence provided by an embodiment of the present application;
图18为本申请实施例提供的拍摄装置的结构示意图。FIG. 18 is a schematic structural diagram of a photographing apparatus provided by an embodiment of the present application.
具体实施方式Detailed ways
以下实施例中所使用的术语只是为了描述特定实施例的目的,而并非旨在作为对本申请的限制。如在本申请的说明书和所附权利要求书中所使用的那样,单数表达形式“一个”、“一种”、“所述”、“上述”、“该”和“这一”旨在也包括例如“一个或多个”这种表达形式,除非其上下文中明确地有相反指示。还应当理解,在本申请以下各实施例中,“至少一个”、“一个或多个”是指一个或两个以上(包含两个)。术语“和/或”,用于描述关联对象的关联关系,表示可以存在三种关系;例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B的情况,其中A、B可以是单数或者复数。字符“/”一般表示前后关联对象是一种“或”的关系。The terms used in the following embodiments are for the purpose of describing particular embodiments only, and are not intended to be limitations of the present application. As used in the specification of this application and the appended claims, the singular expressions "a," "an," "the," "above," "the," and "the" are intended to also Expressions such as "one or more" are included unless the context clearly dictates otherwise. It should also be understood that, in the following embodiments of the present application, "at least one" and "one or more" refer to one or more than two (including two). The term "and/or", used to describe the association relationship of related objects, indicates that there can be three kinds of relationships; for example, A and/or B, can indicate: A alone exists, A and B exist at the same time, and B exists alone, A and B can be singular or plural. The character "/" generally indicates that the associated objects are an "or" relationship.
在本说明书中描述的参考“一个实施例”或“一些实施例”等意味着在本申请的一个或多个实施例中包括结合该实施例描述的特定特征、结构或特点。由此,在本说明书中的不同之处出现的语句“在一个实施例中”、“在一些实施例中”、“在其他一些实施例中”、“在另外一些实施例中”等不是必然都参考相同的实施例,而是意味着“一 个或多个但不是所有的实施例”,除非是以其他方式另外特别强调。术语“包括”、“包含”、“具有”及它们的变形都意味着“包括但不限于”,除非是以其他方式另外特别强调。术语“连接”包括直接连接和间接连接,除非另外说明。References in this specification to "one embodiment" or "some embodiments" and the like mean that a particular feature, structure, or characteristic described in connection with the embodiment is included in one or more embodiments of the present application. Thus, appearances of the phrases "in one embodiment," "in some embodiments," "in other embodiments," "in other embodiments," etc. in various places in this specification are not necessarily All refer to the same embodiment, but mean "one or more but not all embodiments" unless specifically emphasized otherwise. The terms "including", "including", "having" and their variants mean "including but not limited to" unless specifically emphasized otherwise. The term "connected" includes both direct and indirect connections unless otherwise specified.
以下,术语“第一”、“第二”仅用于描述目的,而不能理解为指示或暗示相对重要性或者隐含指明所指示的技术特征的数量。由此,限定有“第一”、“第二”的特征可以明示或者隐含地包括一个或者更多个该特征。Hereinafter, the terms "first" and "second" are only used for descriptive purposes, and should not be construed as indicating or implying relative importance or implicitly indicating the number of indicated technical features. Thus, a feature defined as "first" or "second" may expressly or implicitly include one or more of that feature.
在本申请实施例中,“示例性地”或者“例如”等词用于表示作例子、例证或说明。本申请实施例中被描述为“示例性地”或者“例如”的任何实施例或设计方案不应被解释为比其它实施例或设计方案更优选或更具优势。确切而言,使用“示例性地”或者“例如”等词旨在以具体方式呈现相关概念。In the embodiments of the present application, words such as "exemplarily" or "for example" are used to represent examples, illustrations or illustrations. Any embodiment or design described in the embodiments of the present application as "exemplarily" or "such as" should not be construed as preferred or advantageous over other embodiments or designs. Rather, the use of words such as "exemplarily" or "such as" is intended to present the related concepts in a specific manner.
本申请实施例可以适用于具有拍摄功能的终端设备进行拍摄的场景,如:拍照或拍摄视频。The embodiments of the present application may be applicable to a scene where a terminal device with a shooting function performs shooting, such as: taking a picture or shooting a video.
可选地,终端设备可以是手机、平板电脑、可穿戴设备、车载设备、增强现实(augmented reality,AR)/虚拟现实(virtual reality,VR)设备、笔记本电脑、超级移动个人计算机(ultra-mobile personal computer,UMPC)、上网本、个人数字助理(personal digital assistant,PDA)等移动终端。或者,终端设备也可以是数码相机、单反相机/微单相机、运动摄像机、云台相机、无人机等专业的拍摄设备。本申请实施例对终端设备的具体类型不作限制。Optionally, the terminal device may be a mobile phone, a tablet computer, a wearable device, a vehicle-mounted device, an augmented reality (AR)/virtual reality (VR) device, a laptop computer, an ultra-mobile personal computer (ultra-mobile) personal computer, UMPC), netbook, personal digital assistant (personal digital assistant, PDA) and other mobile terminals. Alternatively, the terminal device may also be a professional shooting device such as a digital camera, a single-lens reflex camera/mirror-single camera, an action camera, a PTZ camera, and a drone. This embodiment of the present application does not limit the specific type of the terminal device.
需要说明的是,在本申请的描述中,“至少一个”是指一个或多个,“多个”是指两个以上(包括两个)。“第一”、“第二”等字样仅仅是为了区分描述,并不用于对某个特征的特别限定。“和/或”用于描述关联对象的关联关系,表示可以存在三种关系。例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。字符“/”一般表示前后关联对象是一种“或”的关系。It should be noted that, in the description of this application, "at least one" refers to one or more, and "a plurality" refers to two or more (including two). The words "first", "second" and the like are only used for distinguishing descriptions, and are not used for special limitation on a certain feature. "And/or" is used to describe the association relationship of associated objects, indicating that there are three kinds of relationships. For example, A and/or B can mean that A exists alone, A and B exist at the same time, and B exists alone. The character "/" generally indicates that the associated objects are an "or" relationship.
当用户使用终端设备对被拍主体(被拍主体也可以称为拍摄对象,拍摄对象可以是人或物)进行拍摄时,如果终端设备与被拍主体之间的拍摄距离小于终端设备的摄像头的最近对焦距离,摄像头的镜头无法对焦,终端设备拍摄得到的被拍主体画面会出现模糊。其中,终端设备的摄像头的最近对焦距离是指摄像头的镜头能够合焦(或称为对焦)的最近拍摄距离。When the user uses the terminal device to shoot the subject (the subject can also be called the subject, and the subject can be a person or an object), if the shooting distance between the terminal device and the subject is smaller than the camera of the terminal device At the shortest focusing distance, the lens of the camera cannot be focused, and the subject image captured by the terminal device will appear blurry. The closest focusing distance of the camera of the terminal device refers to the closest shooting distance at which the lens of the camera can be in focus (or called focusing).
以终端设备为手机为例,当用户使用手机对被拍主体进行近距离拍摄时,如果手机与被拍主体之间的拍摄距离小于手机的摄像头的最近对焦距离(如8cm),则手机拍摄得到的被拍主体的画面会出现模糊。Taking the terminal device as a mobile phone as an example, when the user uses the mobile phone to take a close-up shot of the subject to be photographed, if the shooting distance between the mobile phone and the subject to be photographed is less than the closest focusing distance of the camera of the mobile phone (such as 8cm), then the mobile phone can obtain The image of the subject being photographed will appear blurry.
例如,图1为一种拍摄场景的示意图。在图1所示的拍摄场景中,被拍主体可以是纸张上的文字“HUAWEI”。当用户使用手机对图1所示的拍摄场景进行拍摄时,手机可以在拍摄界面显示图1所示的拍摄场景对应的预览画面。For example, FIG. 1 is a schematic diagram of a shooting scene. In the shooting scene shown in Fig. 1, the subject to be photographed may be the text "HUAWEI" on the paper. When the user uses the mobile phone to shoot the shooting scene shown in FIG. 1 , the mobile phone can display a preview screen corresponding to the shooting scene shown in FIG. 1 on the shooting interface.
图2为手机与文字“HUAWEI”之间的拍摄距离大于或等于手机摄像头的最近对焦距离时手机拍摄界面的示意图。如图2所示,当用户使用手机对图1所示的拍摄场景进行拍摄时,如果手机与拍摄场景中的文字“HUAWEI”之间的拍摄距离大于或等于手机摄像头的最近对焦距离,则手机在拍摄界面中显示的预览画面101中的文字“HUAWEI”相对清晰。FIG. 2 is a schematic diagram of a mobile phone shooting interface when the shooting distance between the mobile phone and the text "HUAWEI" is greater than or equal to the closest focusing distance of the mobile phone camera. As shown in Figure 2, when the user uses the mobile phone to shoot the shooting scene shown in Figure 1, if the shooting distance between the mobile phone and the text "HUAWEI" in the shooting scene is greater than or equal to the closest focusing distance of the mobile phone camera, the mobile phone The text "HUAWEI" in the preview screen 101 displayed in the shooting interface is relatively clear.
图3为手机与文字“HUAWEI”之间的拍摄距离小于手机摄像头的最近对焦距离时手机拍摄界面的示意图。如图3所示,当用户使用手机对图1所示的拍摄场景进行拍摄时,如果手机与拍摄场景中的文字“HUAWEI”之间的拍摄距离小于手机摄像头的最近对焦距离,则手机在拍摄界面中显示的预览画面101中的文字“HUAWEI”较为模糊。FIG. 3 is a schematic diagram of a mobile phone shooting interface when the shooting distance between the mobile phone and the text "HUAWEI" is smaller than the closest focusing distance of the mobile phone camera. As shown in Figure 3, when the user uses a mobile phone to shoot the shooting scene shown in Figure 1, if the shooting distance between the mobile phone and the text "HUAWEI" in the shooting scene is less than the closest focusing distance of the mobile phone camera, the mobile phone is shooting The text "HUAWEI" in the preview screen 101 displayed in the interface is blurred.
目前,针对上述问题,一种实现方式为:当用户使用手机近距离拍摄被拍主体时,手机可以引导用户主动调整手机摄像头的变焦(zoom)倍率、以及手机与被拍主体之间的拍摄距离,以使手机在摄像头可以对焦的距离范围内完成拍摄。At present, in response to the above problems, an implementation method is: when a user uses a mobile phone to shoot a subject at close range, the mobile phone can guide the user to actively adjust the zoom ratio of the mobile phone camera and the shooting distance between the mobile phone and the subject. , so that the phone completes the shot within the distance where the camera can focus.
例如,图4为一种手机拍摄界面的示意图。如图4所示,当用户使用手机对图1所示的拍摄场景进行拍摄时,如果手机与文字“HUAWEI”之间的拍摄距离小于手机的摄像头的最近对焦距离,则手机可以在拍摄界面中预览画面101的左下角显示2X快捷按钮102和提示框103。提示框103中包括文字“点击此处,然后稍微后退以获取更好的对焦”。提示框103中的文字可以用于引导用户点击2X快捷按钮102,并调整手机与文字“HUAWEI”之间的拍摄距离。当用户点击2X快捷按钮102时,手机可以响应于用户点击2X快捷按钮102的操作,将摄像头的zoom倍率由默认的1X切换为2X。如:手机可以通过对焦马达控制摄像头的镜头位置,实现调整摄像头的zoom倍率。For example, FIG. 4 is a schematic diagram of a camera interface of a mobile phone. As shown in Figure 4, when the user uses the mobile phone to shoot the shooting scene shown in Figure 1, if the shooting distance between the mobile phone and the text "HUAWEI" is less than the closest focusing distance of the camera of the mobile phone, the mobile phone can be displayed in the shooting interface. A 2X shortcut button 102 and a prompt box 103 are displayed in the lower left corner of the preview screen 101 . The prompt box 103 includes the text "click here and back slightly for better focus". The text in the prompt box 103 can be used to guide the user to click the 2X shortcut button 102 and adjust the shooting distance between the mobile phone and the text "HUAWEI". When the user clicks the 2X shortcut button 102, the mobile phone can switch the zoom ratio of the camera from the default 1X to 2X in response to the operation of the user clicking the 2X shortcut button 102. For example, the mobile phone can control the lens position of the camera through the focus motor to adjust the zoom ratio of the camera.
图5为手机拍摄界面的另一示意图。如图5所示,当手机响应于用户点击2X快捷按钮102的操作,将摄像头的zoom倍率由默认的1X切换为2X后,手机拍摄界面中显示的预览画面101可以放大2倍,预览画面101会变得更加模糊。此时,手机可以在拍摄界面上显示文字提示:“请再离远一点”104。“请再离远一点”104可以引导用户将手机远离文字“HUAWEI”。当用户将手机远离文字“HUAWEI”时,手机与文字“HUAWEI”之间的拍摄距离会逐渐增大。FIG. 5 is another schematic diagram of the camera interface of the mobile phone. As shown in FIG. 5 , when the mobile phone responds to the user's operation of clicking the 2X shortcut button 102 and switches the zoom ratio of the camera from the default 1X to 2X, the preview screen 101 displayed in the mobile phone shooting interface can be enlarged by 2 times, and the preview screen 101 will become more blurry. At this time, the mobile phone may display a text prompt on the shooting interface: "Please stay away" 104 . "Please stay away" 104 can guide the user to move the phone away from the text "HUAWEI". When the user moves the phone away from the text "HUAWEI", the shooting distance between the phone and the text "HUAWEI" will gradually increase.
图6为手机拍摄界面的又一示意图。如图6所示,当手机与文字“HUAWEI”之间的拍摄距离增大至大于或等于手机摄像头的最近对焦距离时,摄像头的镜头可以正常对焦,手机拍摄界面中显示的预览画面101中的文字“HUAWEI”较为清晰。同时,由于此时摄像头的zoom倍率为2X,所以手机拍摄到的文字“HUAWEI”的画面与手机与文字“HUAWEI”之间的拍摄距离小于摄像头的最近对焦距离、且摄像头的zoom倍率为1X时手机拍摄到的文字“HUAWEI”的画面具有相同的放大效果。如:图6中显示的预览画面101与图3中显示的预览画面101具有相同的放大效果,但图6中显示的预览画面101更加清晰。FIG. 6 is another schematic diagram of a mobile phone shooting interface. As shown in Figure 6, when the shooting distance between the mobile phone and the text "HUAWEI" increases to be greater than or equal to the closest focusing distance of the mobile phone camera, the lens of the camera can focus normally. The text "HUAWEI" is relatively clear. At the same time, because the zoom ratio of the camera is 2X at this time, the shooting distance between the picture of the text "HUAWEI" captured by the mobile phone and the text "HUAWEI" is smaller than the closest focusing distance of the camera, and the zoom ratio of the camera is 1X. The picture of the text "HUAWEI" captured by the mobile phone has the same magnification effect. For example, the preview screen 101 shown in FIG. 6 has the same magnification effect as the preview screen 101 shown in FIG. 3 , but the preview screen 101 shown in FIG. 6 is clearer.
从而,通过这种方式可以使得手机能够在摄像头可以对焦的距离范围内,拍摄到较为清晰、且放大效果可以等同于近距离拍摄效果的被拍主体的画面。Therefore, in this way, the mobile phone can capture a picture of the subject being photographed that is relatively clear and whose magnification effect can be equivalent to the effect of close-up photography within the distance range that the camera can focus on.
但是这种方式中,当手机摄像头的zoom倍率由默认的1X切换为2X时,会导致手机的拍摄视角(field of view,FOV)发生跳变,用户需要重新调整手机进行二次构图的问题。例如,请参考上述图4和图5所示,预览画面101会由图4中所示突然放大至图5中所示,用户需要重新调整文字“HUAWEI”在预览画面101中的位置。However, in this method, when the zoom ratio of the mobile phone camera is switched from the default 1X to 2X, the field of view (FOV) of the mobile phone will jump, and the user needs to re-adjust the mobile phone for secondary composition. For example, referring to FIGS. 4 and 5 above, the preview screen 101 is suddenly enlarged from that shown in FIG. 4 to that shown in FIG. 5 , and the user needs to readjust the position of the text “HUAWEI” in the preview screen 101 .
另外一种实现方式中,手机上也可以设置有多个摄像头,如:主摄像头和超广角摄像头,超广角摄像头的最近对焦距离小于主摄像头的最近对焦距离。当手机与被拍主体之间的拍摄距离小于主摄像头的最近对焦距离时,手机可以从主摄像头自动切换成最近对焦距离更短的超广角摄像头进行拍摄,以实现近距离拍摄到较为清晰的画面。In another implementation manner, the mobile phone may also be provided with multiple cameras, such as a main camera and an ultra-wide-angle camera, and the closest focusing distance of the ultra-wide-angle camera is smaller than the closest focusing distance of the main camera. When the shooting distance between the mobile phone and the subject to be photographed is less than the closest focusing distance of the main camera, the mobile phone can automatically switch from the main camera to the ultra-wide-angle camera with a shorter closest focusing distance for shooting, so as to achieve a clearer picture from close-up shooting .
例如,手机的主摄像头的最近对焦距离可以为10cm,超广角摄像头的最近对焦距离可以为4cm。当手机与被拍主体之间的拍摄距离小于10cm时,手机可以从主摄像头自动切换成超广角摄像头进行拍摄。For example, the closest focusing distance of the main camera of the mobile phone can be 10cm, and the closest focusing distance of the ultra-wide-angle camera can be 4cm. When the shooting distance between the mobile phone and the subject being photographed is less than 10cm, the mobile phone can automatically switch from the main camera to the ultra-wide-angle camera for shooting.
但是,这种方式同样会导致手机的拍摄FOV会发生跳变,用户需要重新调整手机进行二次构图的问题。另外,这种方式还需要依赖于最近对焦距离更短的超广角摄像头,必须要求手机包括最近对焦距离更短的超广角摄像头才可以实现。However, this method also causes the FOV of the mobile phone to jump, and the user needs to re-adjust the mobile phone for secondary composition. In addition, this method also needs to rely on an ultra-wide-angle camera with a shorter closest focusing distance, which must be achieved by requiring the mobile phone to include an ultra-wide-angle camera with a shorter closest focusing distance.
在此背景技术下,本申请实施例提供了一种拍摄方法,可以应用于具有拍摄功能的终端设备。该方法中,当用户想要使用终端设备在拍摄距离小于摄像头的最近对焦距离的范围内,近距离拍摄一张第一照片时:终端设备可以先近距离拍摄一张第一照片,然后辅助用户在拍摄距离大于或等于摄像头的最近对焦距离的范围内,拍摄一张拍摄FOV近乎等同于第一照片、但画面更加清晰的第二照片。也即,第二照片的放大效果可以近乎等同于第一照片的近距离拍摄效果,但第二照片比第一照片更加清晰。Against this background, an embodiment of the present application provides a shooting method, which can be applied to a terminal device with a shooting function. In this method, when the user wants to use the terminal device to take a first photo at a close distance within the range where the shooting distance is less than the closest focusing distance of the camera: the terminal device can first take a first photo at a close distance, and then assist the user Within the range where the shooting distance is greater than or equal to the closest focusing distance of the camera, take a second photo with a FOV that is almost the same as the first photo, but with a clearer picture. That is, the magnification effect of the second photo can be nearly equal to the close-up shooting effect of the first photo, but the second photo is clearer than the first photo.
具体地,该拍摄方法中,终端设备在进行拍摄时,可以检测其与被拍主体之间的拍摄距离。如果终端设备在拍摄距离小于摄像头的最近对焦距离时,接收到用户的拍摄操作,则终端设备可以拍摄一张第一照片,并进入离远点儿拍状态。终端设备进入离远点儿拍状态后,可以引导用户将终端设备逐渐远离被拍主体。Specifically, in the photographing method, when the terminal device is photographing, the photographing distance between the terminal device and the subject to be photographed can be detected. If the terminal device receives the user's shooting operation when the shooting distance is less than the closest focusing distance of the camera, the terminal device can take a first photo and enter a far-away shooting state. After the terminal device enters the remote shooting state, the user can be guided to gradually move the terminal device away from the subject being photographed.
在用户将终端设备逐渐远离被拍主体的过程中,拍摄距离会逐渐增大。当拍摄距离小于或等于第一距离阈值时,终端设备可以将摄像头的zoom倍率维持在第一倍率。当拍摄距离大于第一距离阈值、且小于第二距离阈值时,终端设备可以调整摄像头的zoom倍率随着拍摄距离的增大而逐渐增大。当拍摄距离大于或等于第二距离阈值时,终端设备可以将摄像头的zoom倍率维持在第二倍率。During the process of the user gradually moving the terminal device away from the subject being photographed, the photographing distance will gradually increase. When the shooting distance is less than or equal to the first distance threshold, the terminal device may maintain the zoom magnification of the camera at the first magnification. When the shooting distance is greater than the first distance threshold and less than the second distance threshold, the terminal device may adjust the zoom magnification of the camera to gradually increase as the shooting distance increases. When the shooting distance is greater than or equal to the second distance threshold, the terminal device may maintain the zoom magnification of the camera at the second magnification.
其中,第一距离阈值小于摄像头的最近对焦距离,第二距离阈值大于摄像头的最近对焦距离。例如,摄像头的最近对焦距离为10cm时,第一距离阈值可以为8cm,第二距离阈值可以为15cm。第一距离阈值和第二距离阈值均为预设值,本申请对第一距离阈值和第二距离阈值的具体大小不作限制。The first distance threshold is smaller than the closest focusing distance of the camera, and the second distance threshold is greater than the closest focusing distance of the camera. For example, when the closest focusing distance of the camera is 10 cm, the first distance threshold may be 8 cm, and the second distance threshold may be 15 cm. The first distance threshold and the second distance threshold are both preset values, and the present application does not limit the specific sizes of the first distance threshold and the second distance threshold.
第一倍率是终端设备启动摄像头进行拍摄时,摄像头的默认变焦倍率,如1X。第二倍率可以是手机摄像头的最大zoom倍率,如:2X、2.5X等。或者,第二倍率也可以小于手机摄像头的最大zoom倍率。第二倍率大于第一倍率。本申请对摄像头的默认变焦倍率、摄像头的最大zoom倍率、以及第二倍率的大小均不作限制。The first magnification is the default zoom magnification of the camera when the terminal device starts the camera to shoot, such as 1X. The second magnification may be the maximum zoom magnification of the mobile phone camera, such as: 2X, 2.5X, etc. Alternatively, the second magnification may be smaller than the maximum zoom magnification of the mobile phone camera. The second magnification is greater than the first magnification. This application does not limit the default zoom magnification of the camera, the maximum zoom magnification of the camera, and the size of the second magnification.
该拍摄方法中,终端设备进入离远点儿拍状态后,在用户将终端设备逐渐远离被拍主体的过程中,终端设备按照上述逻辑根据拍摄距离对摄像头的zoom倍率进行调整,可以使得终端设备的拍摄FOV在拍摄距离处于第一距离阈值至第二距离阈值的范围内时不会发生明显变化。所以,终端设备在进入离远点儿拍状态后,用户在将终端设备逐渐远离被拍主体的过程中,当看到预览画面变清晰时(表明此时的拍摄距离大于或等于摄像头的最近对焦距离),可以再次进行拍摄操作,触发终端设备拍摄一张第二照片。该第二照片的拍摄FOV可以近乎等同于上述第一照片,但第二照片比第一照片更加清晰。In this shooting method, after the terminal device enters the remote shooting state, in the process that the user gradually moves the terminal device away from the subject being photographed, the terminal device adjusts the zoom ratio of the camera according to the shooting distance according to the above logic, so that the terminal device can The shooting FOV of is not significantly changed when the shooting distance is within the range from the first distance threshold to the second distance threshold. Therefore, after the terminal device enters the far-point shooting state, when the user gradually moves the terminal device away from the subject being shot, when the preview screen becomes clear (indicating that the shooting distance at this time is greater than or equal to the closest focus of the camera) distance), the shooting operation can be performed again to trigger the terminal device to take a second photo. The shooting FOV of the second photo can be nearly equal to the above-mentioned first photo, but the second photo is clearer than the first photo.
另外,该拍摄方法中,用户无需主动对摄像头的zoom倍率进行调整,用户与终端设备的交互次数较少,而且终端设备的拍摄FOV也不会发生跳变,用户无需进行二次构图。In addition, in this shooting method, the user does not need to actively adjust the zoom ratio of the camera, the number of interactions between the user and the terminal device is small, and the shooting FOV of the terminal device does not jump, and the user does not need to recompose the shot.
下面以终端设备为手机为例,结合附图对本申请实施例提供的拍摄方法进行示例性 说明。Taking the terminal device as a mobile phone as an example below, the photographing method provided by the embodiment of the present application is exemplarily described with reference to the accompanying drawings.
示例性地,以终端设备为手机为例,图7为本申请实施例提供的终端设备的结构示意图。如图7所示,手机可以包括处理器710,内部存储器721。Exemplarily, taking the terminal device as a mobile phone as an example, FIG. 7 is a schematic structural diagram of a terminal device provided by an embodiment of the present application. As shown in FIG. 7 , the mobile phone may include a processor 710 and an internal memory 721 .
处理器710可以包括一个或多个处理单元,例如:处理器710可以包括应用处理器(application processor,AP),调制解调处理器,图形处理器(graphics processing unit,GPU),图像信号处理器(image signal processor,ISP),控制器,存储器,视频编解码器,数字信号处理器(digital signal processor,DSP),基带处理器,和/或神经网络处理器(neural-network processing unit,NPU)等。其中,不同的处理单元可以是独立的器件,也可以集成在一个或多个处理器中。The processor 710 may include one or more processing units, for example, the processor 710 may include an application processor (application processor, AP), a modem processor, a graphics processor (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), controller, memory, video codec, digital signal processor (digital signal processor, DSP), baseband processor, and/or neural-network processing unit (NPU) Wait. Wherein, different processing units may be independent devices, or may be integrated in one or more processors.
其中,控制器可以是手机的神经中枢和指挥中心。控制器可以根据指令操作码和时序信号,产生操作控制信号,完成取指令和执行指令的控制。Among them, the controller can be the nerve center and command center of the mobile phone. The controller can generate an operation control signal according to the instruction operation code and timing signal, and complete the control of fetching and executing instructions.
内部存储器721可以用于存储计算机可执行程序代码,所述可执行程序代码包括指令。处理器710通过运行存储在内部存储器721的指令,从而执行手机的各种功能应用以及数据处理。例如,本申请实施例提供的拍摄方法可以通过以软件产品(如程序代码)的形式体现出来,该拍摄方法对应的程序代码可以存储在内部存储器721中,处理器710通过运行存储在内部存储器721中的该拍摄方法对应的程序代码,可以使得手机实现本申请实施例所述的拍摄方法。Internal memory 721 may be used to store computer executable program code, which includes instructions. The processor 710 executes various functional applications and data processing of the mobile phone by executing the instructions stored in the internal memory 721 . For example, the photographing method provided by the embodiments of the present application may be embodied in the form of a software product (eg, program code), the program code corresponding to the photographing method may be stored in the internal memory 721, and the processor 710 may store it in the internal memory 721 by running The program code corresponding to the shooting method in can enable the mobile phone to implement the shooting method described in the embodiments of the present application.
内部存储器721可以包括存储程序区和存储数据区。其中,存储程序区可存储操作系统,至少一个功能所需的应用程序(比如相机功能,图像播放功能等)等。存储数据区可存储手机使用过程中所创建的数据(比如图像数据,电话本等)等。此外,内部存储器721可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件,闪存器件,通用闪存存储器(universal flash storage,UFS)等。The internal memory 721 may include a storage program area and a storage data area. The storage program area may store an operating system, an application program required for at least one function (such as a camera function, an image playback function, etc.), and the like. The storage data area can store data (such as image data, phone book, etc.) created during the use of the mobile phone. In addition, the internal memory 721 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, universal flash storage (UFS), and the like.
处理器710中还可以设置存储器,用于存储指令和数据。在一些实施例中,处理器710中的存储器为高速缓冲存储器。该存储器可以保存处理器710刚用过或循环使用的指令或数据。如果处理器710需要再次使用该指令或数据,可从所述存储器中直接调用。避免了重复存取,减少了处理器710的等待时间,因而提高了系统的效率。A memory may also be provided in the processor 710 for storing instructions and data. In some embodiments, the memory in processor 710 is cache memory. This memory may hold instructions or data that have just been used or recycled by the processor 710 . If the processor 710 needs to use the instruction or data again, it can be called directly from the memory. Repeated accesses are avoided and the waiting time of the processor 710 is reduced, thereby increasing the efficiency of the system.
请继续参考图7所示,手机还可以包括外部存储器接口720,通用串行总线(universal serial bus,USB)接口730,充电管理模块740,电源管理模块741,电池742,天线1,天线2,移动通信模块750,无线通信模块760,音频模块770,扬声器770A,受话器770B,麦克风770C,耳机接口770D,传感器模块780,按键790,马达791,指示器792,摄像头793,显示屏794,以及用户标识模块(subscriber identification module,SIM)卡接口795等。Please continue to refer to FIG. 7 , the mobile phone may further include an external memory interface 720, a universal serial bus (USB) interface 730, a charging management module 740, a power management module 741, a battery 742, an antenna 1, an antenna 2, Mobile communication module 750, wireless communication module 760, audio module 770, speaker 770A, receiver 770B, microphone 770C, headphone jack 770D, sensor module 780, buttons 790, motor 791, indicator 792, camera 793, display screen 794, and user Identity module (subscriber identification module, SIM) card interface 795 and so on.
传感器模块780可以包括压力传感器780A,陀螺仪传感器780B,气压传感器780C,磁传感器780D,加速度传感器780E,距离传感器780F,接近光传感器780G,指纹传感器780H,温度传感器780J,触摸传感器780K,环境光传感器780L,骨传导传感器780M等。其中,距离传感器780F可以是激光传感器,可以用于手机在拍摄过程中,获取手机与被拍主体之间的拍摄距离。The sensor module 780 may include a pressure sensor 780A, a gyro sensor 780B, an air pressure sensor 780C, a magnetic sensor 780D, an acceleration sensor 780E, a distance sensor 780F, a proximity light sensor 780G, a fingerprint sensor 780H, a temperature sensor 780J, a touch sensor 780K, and an ambient light sensor 780L, bone conduction sensor 780M, etc. Wherein, the distance sensor 780F may be a laser sensor, which may be used for obtaining the photographing distance between the mobile phone and the subject to be photographed during the photographing process of the mobile phone.
在一些实施例中,处理器710可以包括一个或多个接口。接口可以包括集成电路(inter-integrated circuit,I2C)接口,集成电路内置音频(inter-integrated circuit sound, I2S)接口,脉冲编码调制(pulse code modulation,PCM)接口,通用异步收发传输器(universal asynchronous receiver/transmitter,UART)接口,移动产业处理器接口(mobile industry processor interface,MIPI),通用输入输出(general-purpose input/output,GPIO)接口,SIM接口,和/或USB接口等。In some embodiments, processor 710 may include one or more interfaces. The interface may include an integrated circuit (inter-integrated circuit, I2C) interface, an integrated circuit built-in audio (inter-integrated circuit sound, I2S) interface, a pulse code modulation (pulse code modulation, PCM) interface, a universal asynchronous transceiver (universal asynchronous transmitter) receiver/transmitter, UART) interface, mobile industry processor interface (MIPI), general-purpose input/output (GPIO) interface, SIM interface, and/or USB interface, etc.
手机在拍摄过程中,可以通过摄像头793捕获RAW图。例如,摄像头793可以包括镜头(lens)和传感器(sensor)。在拍摄照片或者拍摄视频时,打开快门,光线可以通过摄像头793的镜头被传递到sensor上。sensor可以将通过镜头的光信号转换为电信号,再对电信号进行A/D转换,输出对应的数字信号。该数字信号经过后续的RAW域处理、ISP处理、以及YUV域处理等,即可以得到拍摄的照片或视频画面。During the shooting process of the mobile phone, the RAW image can be captured by the camera 793. For example, the camera 793 may include a lens and a sensor. When taking photos or videos, open the shutter, and light can be transmitted to the sensor through the lens of the camera 793. The sensor can convert the optical signal passing through the lens into an electrical signal, and then perform A/D conversion on the electrical signal to output the corresponding digital signal. The digital signal undergoes subsequent RAW domain processing, ISP processing, and YUV domain processing, etc., to obtain a photographed or video image.
在一种可能的设计中,sensor的感光元件可以是电荷耦合器件(charge coupled device,CCD),sensor还包括A/D转换器。在另外一种可能的设计中,sensor的感光元件可以是互补金属氧化物半导体(complementary metal-oxide-semiconductor,CMOS)。In a possible design, the photosensitive element of the sensor may be a charge coupled device (CCD), and the sensor also includes an A/D converter. In another possible design, the photosensitive element of the sensor may be a complementary metal-oxide-semiconductor (CMOS).
显示屏794用于显示图像,视频等。例如,显示屏794可以用于显示手机拍摄界面,拍摄界面可以包括预览画面。显示屏794包括显示面板。显示面板可以采用液晶显示屏(liquid crystal display,LCD),有机发光二极管(organic light-emitting diode,OLED),有源矩阵有机发光二极体或主动矩阵有机发光二极体(active-matrix organic light emitting diode,AMOLED),柔性发光二极管(flex light-emitting diode,FLED),Miniled,MicroLed,Micro-oLed,量子点发光二极管(quantum dot light emitting diodes,QLED)等。在一些实施例中,手机可以包括1个或N个显示屏794,N为大于1的正整数。Display screen 794 is used to display images, videos, and the like. For example, the display screen 794 may be used to display a mobile phone shooting interface, and the shooting interface may include a preview screen. Display screen 794 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (active-matrix organic light). emitting diode, AMOLED), flexible light-emitting diode (flex light-emitting diode, FLED), Miniled, MicroLed, Micro-oLed, quantum dot light-emitting diode (quantum dot light emitting diodes, QLED) and so on. In some embodiments, the cell phone may include 1 or N display screens 794, where N is a positive integer greater than 1.
手机通过GPU,显示屏794,以及应用处理器等实现显示功能。GPU为图像处理的微处理器,连接显示屏794和应用处理器。GPU用于执行数学和几何计算,用于图形渲染。处理器710可包括一个或多个GPU,其执行程序指令以生成或改变显示信息。The mobile phone realizes the display function through the GPU, the display screen 794, and the application processor. The GPU is a microprocessor for image processing, and is connected to the display screen 794 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. Processor 710 may include one or more GPUs that execute program instructions to generate or alter display information.
可以理解的是,图7所示的结构并不构成对手机的具体限定。在一些实施例中,手机也可以包括比图7所示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置等。又或者,图7所示的一些部件可以以硬件,软件或软件和硬件的组合实现。It can be understood that the structure shown in FIG. 7 does not constitute a specific limitation on the mobile phone. In some embodiments, the mobile phone may also include more or less components than those shown in FIG. 7 , or combine some components, or separate some components, or different component arrangements, and the like. Alternatively, some of the components shown in FIG. 7 may be implemented in hardware, software, or a combination of software and hardware.
另外,当终端设备是其他平板电脑、可穿戴设备、车载设备、AR/VR设备、笔记本电脑、UMPC、上网本、PDA等移动终端,或者,数码相机、单反相机/微单相机、运动摄像机、云台相机、无人机等专业的拍摄设备时,这些其他终端设备的具体结构也可以参考图7所示。示例性地,其他终端设备可以是在图7给出的结构的基础上增加或减少了组件,在此不再一一赘述。In addition, when the terminal device is other tablet computers, wearable devices, vehicle-mounted devices, AR/VR devices, notebook computers, UMPCs, netbooks, PDAs and other mobile terminals, or digital cameras, SLR cameras/mirror cameras, action cameras, cloud When using professional shooting equipment such as cameras and drones, the specific structures of these other terminal equipment can also be referred to as shown in Figure 7. Exemplarily, other terminal devices may have components added or reduced on the basis of the structure given in FIG. 7 , which will not be repeated here.
还应当理解的是,终端设备(如手机)中可以运行有一个或多个拍摄应用程序,以便通过运行拍摄应用程序,实现拍摄的功能。例如,该拍摄应用程序可以包括系统级应用“相机”应用。又如,该拍摄应用程序还可以包括其他安装在终端设备中的能够用于拍摄的应用程序。It should also be understood that one or more shooting applications may run in the terminal device (such as a mobile phone), so that the shooting function can be realized by running the shooting applications. For example, the camera application may include a system-level application "camera" application. For another example, the photographing application may also include other applications installed in the terminal device that can be used for photographing.
本申请实施例中,终端设备可以仅包括一个主摄像头,也可以包括主摄像头、长焦摄像头、虚化摄像头、超广角摄像头等多个摄像头。在本申请实施例提供的拍摄方法中,终端设备仅使用主摄像头即可完成拍摄。In this embodiment of the present application, the terminal device may include only one main camera, or may include multiple cameras such as a main camera, a telephoto camera, a blur camera, and an ultra-wide-angle camera. In the shooting method provided by the embodiment of the present application, the terminal device can complete shooting only by using the main camera.
图8为本申请实施例提供的拍摄方法的流程示意图。如图8所示,该方法包括:FIG. 8 is a schematic flowchart of a photographing method provided by an embodiment of the present application. As shown in Figure 8, the method includes:
S801、手机响应于用户启动拍摄应用程序的操作,启动运行拍摄应用程序。S801. The mobile phone starts and runs the photographing application in response to the user's operation of starting the photographing application.
示例性地,用户在使用手机进行拍摄(拍照或拍视频)之前,可以先启动手机的拍摄应用程序。如:手机的拍摄应用程序可以包括相机应用,用户可以点击或触摸手机上的相机的图标,手机可以响应于用户对相机的图标的点击或触摸操作,启动运行相机应用(或者,用户还可以通过语音助手启动相机应用,不作限制)。Exemplarily, before using the mobile phone to take pictures (photographs or videos), the user may first start a photographing application of the mobile phone. For example, the shooting application of the mobile phone may include a camera application, the user can click or touch the icon of the camera on the mobile phone, and the mobile phone can start and run the camera application in response to the user's click or touch operation on the icon of the camera (or, the user can also use the The voice assistant launches the camera app, no restrictions).
手机在启动运行拍摄应用程序后,可以为用户呈现拍摄界面,同时,手机还可以通过摄像头获取当前拍摄场景对应的预览画面,并显示在拍摄界面中。如:可以执行S802。After the mobile phone starts and runs the shooting application, a shooting interface can be presented to the user, and at the same time, the mobile phone can also obtain a preview image corresponding to the current shooting scene through the camera, and display it in the shooting interface. For example, S802 can be executed.
S802、手机通过摄像头获取当前拍摄场景对应的预览画面,并通过拍摄应用程序的拍摄界面进行显示。S802, the mobile phone obtains a preview image corresponding to the current shooting scene through the camera, and displays it through the shooting interface of the shooting application.
本申请实施例中,手机在获取预览画面时,摄像头的zoom倍率为默认的第一倍率,例如第一倍率可以为1X。In the embodiment of the present application, when the mobile phone acquires the preview image, the zoom magnification of the camera is the default first magnification, for example, the first magnification may be 1X.
以当前拍摄场景为上述图1所示的场景为例,手机可以通过摄像头获取图1所示的场景中的文字“HUAWEI”对应的预览画面,并显示在拍摄界面中供用户预览。Taking the current shooting scene as the scene shown in Figure 1 as an example, the mobile phone can obtain a preview screen corresponding to the text "HUAWEI" in the scene shown in Figure 1 through the camera, and display it on the shooting interface for the user to preview.
示例性地,手机中可以配置有激光传感器、红外传感器等距离传感器,手机可以通过前述距离传感器检测手机与被拍主体之间的拍摄距离。本申请对手机检测手机与被拍主体之间的拍摄距离的具体方式不作限制。Exemplarily, a distance sensor such as a laser sensor and an infrared sensor may be configured in the mobile phone, and the mobile phone may detect the shooting distance between the mobile phone and the subject to be photographed through the aforementioned distance sensor. The present application does not limit the specific manner in which the mobile phone detects the shooting distance between the mobile phone and the subject to be photographed.
S803、手机按照第一频率检测手机与被拍主体之间的拍摄距离。S803, the mobile phone detects the shooting distance between the mobile phone and the subject to be photographed according to the first frequency.
例如,手机可以按照第一频率检测手机与图1所示的拍摄场景中的文字“HUAWEI”之间的拍摄距离。For example, the mobile phone can detect the shooting distance between the mobile phone and the text "HUAWEI" in the shooting scene shown in FIG. 1 according to the first frequency.
示例性地,第一频率可以为10次/秒、15次/秒、20次/秒等。本申请对第一频率的大小不作限制。Exemplarily, the first frequency may be 10 times/second, 15 times/second, 20 times/second, or the like. This application does not limit the size of the first frequency.
在一种可能的设计中,第一频率还可以与手机获取预览画面的帧率大小相同。例如,S802中手机获取预览画面的帧率可以为30帧每秒(frames per second,FPS),S803中第一频率可以为30次/秒。In a possible design, the first frequency may also be the same as the frame rate at which the mobile phone obtains the preview image. For example, the frame rate at which the mobile phone obtains the preview image in S802 may be 30 frames per second (FPS), and the first frequency in S803 may be 30 times/second.
当第一频率还可以与手机获取预览画面的帧率大小相同时,S803中,手机检测手机与被拍主体之间的拍摄距离时,可以针对S802手机获取的每一帧预览画面,确定出每一帧预览画面对应的手机与被拍主体之间的拍摄距离。When the first frequency can also be the same as the frame rate of the preview image obtained by the mobile phone, in S803, when the mobile phone detects the shooting distance between the mobile phone and the subject to be photographed, it can determine each frame of the preview image obtained by the mobile phone in S802. The shooting distance between the mobile phone and the subject to be photographed corresponding to a frame of preview image.
可选地,另外一些实施例中,手机也可以以非固定频率检测手机与被拍主体之间的拍摄距离。例如,手机可以在启动拍摄应用程序后的第一时刻至第N时刻中的每个时刻,分别检测手机与被拍主体之间的拍摄距离,第一时刻至第N时刻中任意两个相邻的时刻之间的间隔可以相等,也可以不相等。其中,N为大于0的整数。本申请在此不作限制。Optionally, in other embodiments, the mobile phone may also detect the shooting distance between the mobile phone and the subject to be photographed at a non-fixed frequency. For example, the mobile phone can detect the shooting distance between the mobile phone and the subject to be photographed at each time from the first time to the Nth time after the shooting application is started, and any two adjacent to the first time to the Nth time The intervals between the moments can be equal or unequal. Wherein, N is an integer greater than 0. This application is not limited here.
需要说明的是,本申请实施例中,手机启动运行拍摄应用程序后,可以同步执行上述S802和S803,不限制先后顺序。It should be noted that, in this embodiment of the present application, after the mobile phone starts and runs the photographing application, the foregoing S802 and S803 may be executed synchronously, and the sequence is not limited.
S804、手机接收用户的拍摄操作。S804, the mobile phone receives the shooting operation of the user.
示例性地,手机启动拍摄应用程序后,拍摄界面中还可以包括:拍照按键。拍照按键的实质可以为拍摄界面中显示的一个功能控件。用户的拍摄操作可以是指用户点击或触摸拍照按键的操作。当用户使用手机进行拍照时,可以点击或触摸拍照按键,手机可以响应于用户对点击或触摸拍照按键的操作,拍摄照片。Exemplarily, after the mobile phone starts the photographing application, the photographing interface may further include a photographing button. The essence of the photographing button may be a functional control displayed in the photographing interface. The user's photographing operation may refer to an operation that the user clicks or touches the photographing button. When a user uses a mobile phone to take a picture, he or she can click or touch a photographing button, and the mobile phone can take a picture in response to the user's operation of clicking or touching the photographing button.
或者,其他一些实施方式中,拍照按键的功能也可以通过手机上的其他物理按键实 现,不作限制。Alternatively, in some other embodiments, the function of the camera button can also be implemented by other physical buttons on the mobile phone, which is not limited.
本申请实施例中,当手机接收到用户的拍摄操作后,可以按照下述S805-S808所述的逻辑执行拍摄功能。In the embodiment of the present application, after the mobile phone receives the user's shooting operation, the shooting function can be executed according to the logic described in the following S805-S808.
S805、当拍摄距离小于摄像头的最近对焦距离时,手机响应于用户的拍摄操作拍摄第一照片,并进入离远点儿拍状态。S805. When the shooting distance is less than the closest focusing distance of the camera, the mobile phone shoots a first photo in response to the user's shooting operation, and enters a far-away shooting state.
例如,手机摄像头的最近对焦距离可以为10cm。当手机与文字“HUAWEI”之间的拍摄距离小于10cm时,手机可以响应于用户点击拍照按键的操作,对文字“HUAWEI”进行拍摄,得到第一照片,并进入离远点儿拍状态。For example, the closest focusing distance of a mobile phone camera can be 10cm. When the shooting distance between the mobile phone and the text "HUAWEI" is less than 10cm, the mobile phone can respond to the user's operation of clicking the camera button to shoot the text "HUAWEI", obtain the first photo, and enter the far away state.
可以理解的,由于拍摄第一照片时,手机与文字“HUAWEI”之间的拍摄距离小于手机摄像头的最近对焦距离,所以第一照片中的文字“HUAWEI”会模糊。It is understandable that when the first photo is taken, the shooting distance between the mobile phone and the text "HUAWEI" is smaller than the closest focusing distance of the mobile phone camera, so the text "HUAWEI" in the first photo will be blurred.
示例性地,图9为本申请实施例提供的手机拍摄界面的示意图。如图9所示,本申请实施例中,手机进入离远点儿拍状态后,可以在拍摄界面中显示文字提示:“离远点儿拍”105、以及“请再离远一点,改善画质”106。其中,“离远点儿拍”105可以用于提示用户手机当前的拍摄模式为离远点儿拍状态。“请再离远一点,改善画质”106可以用于提示用户将手机远离被拍主体(即,拍摄场景中的文字“HUAWEI”)。当用户将手机远离被拍主体时,手机与被拍主体之间的拍摄距离会逐渐增大。Exemplarily, FIG. 9 is a schematic diagram of a mobile phone shooting interface provided by an embodiment of the present application. As shown in FIG. 9 , in the embodiment of the present application, after the mobile phone enters the state of taking pictures from a distance, text prompts can be displayed on the shooting interface: “Take pictures from a distance” 105 and “Please stay farther away to improve the picture. quality” 106. Among them, the "shoot from a distance" 105 may be used to prompt the user that the current shooting mode of the mobile phone is the state of shooting from a distance. "Please stay away, improve image quality" 106 may be used to prompt the user to move the mobile phone away from the subject to be photographed (ie, the text "HUAWEI" in the shooting scene). When the user moves the mobile phone away from the subject to be photographed, the shooting distance between the mobile phone and the subject to be photographed will gradually increase.
本申请实施例中,手机进入离远点儿拍状态后,可以继续执行上述S802和S803。手机在继续执行上述S802和S803的过程中,针对S803中每一次检测到的拍摄距离,手机可以按照下述S806-S808所述的逻辑,根据每一次检测到的拍摄距离,自动调整摄像头的zoom倍率。In this embodiment of the present application, after the mobile phone enters the remote shooting state, the above-mentioned S802 and S803 may continue to be performed. When the mobile phone continues to perform the above S802 and S803, for each detected shooting distance in S803, the mobile phone can automatically adjust the zoom of the camera according to each detected shooting distance according to the logic described in the following S806-S808. magnification.
S806、当拍摄距离小于或等于第一距离阈值时,手机将摄像头的zoom倍率维持在第一倍率。S806, when the shooting distance is less than or equal to the first distance threshold, the mobile phone maintains the zoom magnification of the camera at the first magnification.
S807、当拍摄距离大于第一距离阈值、且小于第二距离阈值时,手机调整摄像头的zoom倍率随着拍摄距离的增大而逐渐增大。S807. When the shooting distance is greater than the first distance threshold and less than the second distance threshold, the mobile phone adjusts the zoom magnification of the camera to gradually increase as the shooting distance increases.
S808、当拍摄距离大于或等于第二距离阈值时,手机将摄像头的zoom倍率维持在第二倍率。S808. When the shooting distance is greater than or equal to the second distance threshold, the mobile phone maintains the zoom magnification of the camera at the second magnification.
S806-S808中提到的第一距离阈值、第二距离阈值、第一倍率、以及第二倍率,具体请参见前述实施例中所述,不再赘述。For details of the first distance threshold, the second distance threshold, the first magnification, and the second magnification mentioned in S806-S808, please refer to the descriptions in the foregoing embodiments, which will not be repeated.
另外,可以理解的,S807中,当拍摄距离大于第一距离阈值、且小于第二距离阈值时,手机是将摄像头的zoom倍率在第一倍率和第二倍率之间进行调整,拍摄距离越大,摄像头的zoom倍率越大;拍摄距离越小,摄像头的zoom倍率越小。In addition, it can be understood that in S807, when the shooting distance is greater than the first distance threshold and less than the second distance threshold, the mobile phone adjusts the zoom magnification of the camera between the first magnification and the second magnification, and the larger the shooting distance is. , the larger the zoom ratio of the camera; the smaller the shooting distance, the smaller the zoom ratio of the camera.
下面结合图1所示的拍摄场景,以第一倍率为1X,第二倍率为2X,第一距离阈值为8cm,第二距离阈值为15cm为例,对上述S806-S808的实现逻辑进行举例说明。In the following, in conjunction with the shooting scene shown in Figure 1, the first magnification is 1X, the second magnification is 2X, the first distance threshold is 8cm, and the second distance threshold is 15cm as an example to illustrate the implementation logic of the above S806-S808. .
示例性地,当手机对图1所示的拍摄场景进行拍摄,并按照上述S805所述的逻辑进入离远点儿拍状态后,手机根据每一次检测到的手机与文字“HUAWEI”之间的拍摄距离,自动调整摄像头的zoom倍率的具体方式可以如下。Exemplarily, when the mobile phone shoots the shooting scene shown in FIG. 1 and enters the remote shooting state according to the logic described in the above S805, the mobile phone according to each detected relationship between the mobile phone and the text "HUAWEI". The specific method of automatically adjusting the zoom ratio of the camera according to the shooting distance can be as follows.
1)当手机与文字“HUAWEI”之间的拍摄距离小于或等于8cm时,手机将摄像头的zoom倍率维持在1X。1) When the shooting distance between the mobile phone and the text "HUAWEI" is less than or equal to 8cm, the mobile phone will maintain the zoom ratio of the camera at 1X.
2)当手机与文字“HUAWEI”之间的拍摄距离大于8cm、且小于15cm时,手机调 整摄像头的zoom倍率,在1X与2X之间随着拍摄距离的增大而逐渐增大。2) When the shooting distance between the mobile phone and the text "HUAWEI" is greater than 8cm and less than 15cm, the mobile phone adjusts the zoom magnification of the camera, and gradually increases between 1X and 2X as the shooting distance increases.
也即,手机与文字“HUAWEI”之间的拍摄距离越接近15cm,摄像头的zoom倍率越接近2X。手机与文字“HUAWEI”之间的拍摄距离越接近8cm,摄像头的zoom倍率越接近1X。That is, the closer the shooting distance between the mobile phone and the text "HUAWEI" is 15cm, the closer the zoom ratio of the camera is to 2X. The closer the shooting distance between the mobile phone and the text "HUAWEI" is 8cm, the closer the zoom ratio of the camera is to 1X.
例如,手机与文字“HUAWEI”之间的拍摄距离为9cm时,手机可以将摄像头的zoom倍率调整至1.2X。手机与文字“HUAWEI”之间的拍摄距离为13cm时,手机可以将摄像头的zoom倍率调整至1.7X。手机与文字“HUAWEI”之间的拍摄距离为14cm时,手机可以将摄像头的zoom倍率调整至1.9X等。For example, when the shooting distance between the mobile phone and the text "HUAWEI" is 9cm, the mobile phone can adjust the zoom ratio of the camera to 1.2X. When the shooting distance between the mobile phone and the text "HUAWEI" is 13cm, the mobile phone can adjust the zoom ratio of the camera to 1.7X. When the shooting distance between the mobile phone and the text "HUAWEI" is 14cm, the mobile phone can adjust the zoom ratio of the camera to 1.9X, etc.
3)当手机与文字“HUAWEI”之间的拍摄距离大于或等于15cm时,手机将摄像头的zoom倍率维持在2X。3) When the shooting distance between the mobile phone and the text "HUAWEI" is greater than or equal to 15cm, the mobile phone will maintain the zoom ratio of the camera at 2X.
可以看到,手机在进入离远点儿拍状态后,通过上述S806-S808所述的逻辑,根据拍摄距离对摄像头的zoom倍率进行调整时,如果拍摄距离在大于第一距离阈值、且小于第二距离阈值的范围内,则摄像头的zoom倍率是随着拍摄距离的增大而逐渐增大的。所以,在用户将手机远离被拍主体的过程中,如果拍摄距离在大于第一距离阈值、且小于第二距离阈值的范围内逐渐增大时,手机的拍摄FOV不会产生明显的变化,例如不会减小或不会明显减小。It can be seen that after the mobile phone enters the far point shooting state, through the logic described in the above S806-S808, when adjusting the zoom ratio of the camera according to the shooting distance, if the shooting distance is greater than the first distance threshold and less than the first distance threshold. Within the range of the two distance thresholds, the zoom ratio of the camera gradually increases with the increase of the shooting distance. Therefore, when the user moves the mobile phone away from the subject to be photographed, if the shooting distance gradually increases within the range greater than the first distance threshold and less than the second distance threshold, the shooting FOV of the mobile phone will not change significantly. For example, Not reduced or not significantly reduced.
因此,手机在进入离远点儿拍状态后,当用户将手机远离被拍主体,直至拍摄距离大于摄像头的最近对焦距离、且小于第二距离阈值时(如果用户看到预览画面变清晰,则表明拍摄距离大于摄像头的最近对焦距离),用户再次进行拍摄操作触发手机拍摄到的第二照片的拍摄FOV可以近乎等同于S805中拍摄的第一照片,但第二照片比第一照片更加清晰。Therefore, after the mobile phone enters the far-point shooting state, when the user moves the mobile phone away from the subject to be photographed until the shooting distance is greater than the closest focusing distance of the camera and less than the second distance threshold (if the user sees that the preview screen becomes clear, then Indicates that the shooting distance is greater than the closest focusing distance of the camera), the user performs the shooting operation again to trigger the FOV of the second photo captured by the mobile phone, which can be almost the same as the first photo captured in S805, but the second photo is clearer than the first photo.
应当理解,当手机在进入离远点儿拍状态后,在对摄像头的zoom倍率调整的过程中,用户进行二次拍摄操作时,不论拍摄距离是否大于摄像头的最近对焦距离,手机都可以响应于用户的二次拍摄操作,拍摄第二照片。本申请实施例中,只有拍摄距离大于摄像头的最近对焦距离、且小于第二距离阈值时,手机响应于二次拍摄操作拍摄到的第二照片的拍摄FOV才可以近乎等同于S805中拍摄的第一照片,且第二照片比第一照片更加清晰。It should be understood that when the mobile phone enters the far point shooting state, during the process of adjusting the zoom ratio of the camera, when the user performs a secondary shooting operation, regardless of whether the shooting distance is greater than the camera's closest focusing distance, the mobile phone can respond to The user's secondary shooting operation is to shoot a second photo. In the embodiment of the present application, only when the shooting distance is greater than the closest focusing distance of the camera and less than the second distance threshold, the shooting FOV of the second photo shot by the mobile phone in response to the second shooting operation can be nearly equal to the first shot in S805. One photo, and the second photo is clearer than the first photo.
可选地,一些实施例中,手机在进入离远点儿拍状态后,当用户将手机远离被拍主体,直至拍摄距离大于摄像头的最近对焦距离时,手机的拍摄界面中也可以不再显示文字提示:“请再离远一点,改善画质”106,以提醒用户此时可以进行二次拍摄操作,无需再远离手机。Optionally, in some embodiments, after the mobile phone enters the far-point shooting state, when the user moves the mobile phone away from the subject to be photographed until the shooting distance is greater than the closest focusing distance of the camera, the shooting interface of the mobile phone may no longer display. A text prompt: "Please stay further away to improve the picture quality" 106 to remind the user that the second shooting operation can be performed at this time, and there is no need to stay away from the mobile phone.
例如,图10为本申请实施例提供的手机拍摄界面的另一示意图。如图10所示,手机在进入离远点儿拍状态后,当用户将手机远离被拍主体,直至拍摄距离大于摄像头的最近对焦距离时,手机拍摄界面中可以不再显示文字提示:“请再离远一点,改善画质”106。For example, FIG. 10 is another schematic diagram of a mobile phone shooting interface provided by an embodiment of the present application. As shown in Figure 10, after the mobile phone enters the far-point shooting state, when the user moves the mobile phone away from the subject to be photographed until the shooting distance is greater than the closest focusing distance of the camera, the text prompt can no longer be displayed in the mobile phone shooting interface: "Please Move further away and improve picture quality” 106.
可选地,如果手机响应于用户再次进行的拍摄操作(可以称为二次拍摄操作),拍摄到了第二照片,则手机可以用第二照片替换前述第一照片,作为最终拍摄到的照片。从而,用户可以使用手机拍摄到较为清晰、且拍摄FOV近乎等同于近距离拍摄的照片。Optionally, if the mobile phone captures a second photo in response to a shooting operation performed by the user again (which may be referred to as a secondary shooting operation), the mobile phone can replace the aforementioned first photo with the second photo as the final captured photo. Therefore, the user can use the mobile phone to take a clearer photo, and the FOV is almost equivalent to taking a close-up photo.
例如,该拍摄方法还可以包括S809-S811。For example, the photographing method may further include S809-S811.
S809、手机接收用户在看到预览画面清晰时的二次拍摄操作。S809, the mobile phone receives a secondary shooting operation performed by the user when the preview image is clear.
二次拍摄操作与上述S804中所述的拍摄操作相同,不再赘述。The secondary photographing operation is the same as the photographing operation described in the above S804, and will not be repeated here.
S810、手机响应于用户的二次拍摄操作,拍摄第二照片。S810. The mobile phone takes a second photo in response to the user's second shooting operation.
S811、手机用第二照片替换第一照片。S811. The mobile phone replaces the first photo with the second photo.
示例性地,第一照片和第二照片均可以是手机对YUV图进行编码后的照片,如:JPEG图片。Exemplarily, both the first photo and the second photo may be photos obtained by encoding a YUV image by a mobile phone, such as a JPEG image.
由上所述,本申请实施例提供的该拍摄方法中,终端设备可以在用户想要使用终端设备在拍摄距离小于摄像头的最近对焦距离的范围内,近距离拍摄一张第一照片时:先近距离拍摄一张第一照片,然后辅助用户在拍摄距离大于或等于摄像头的最近对焦距离的范围内,拍摄一张拍摄FOV近乎等同于第一照片、但画面更加清晰的第二照片。从而,用户可以使用终端设备拍摄到放大效果可以近乎等同于第一照片的近距离拍摄效果、且画面更加清晰的第二照片。From the above, in the shooting method provided by the embodiment of the present application, when the user wants to use the terminal device to shoot a first photo at a close distance within the range where the shooting distance is less than the closest focusing distance of the camera: Take a first photo at close range, and then assist the user to take a second photo with a FOV that is almost the same as the first photo but with a clearer picture within a range that is greater than or equal to the closest focusing distance of the camera. Therefore, the user can use the terminal device to take a second photo whose magnification effect can be almost equal to the close-up shooting effect of the first photo, and the picture is clearer.
另外,该拍摄方法中,用户无需主动对摄像头的zoom倍率进行调整,用户与终端设备的交互次数较少,而且终端设备的拍摄FOV也不会发生跳变,用户无需进行二次构图。In addition, in this shooting method, the user does not need to actively adjust the zoom ratio of the camera, the number of interactions between the user and the terminal device is small, and the shooting FOV of the terminal device does not jump, and the user does not need to recompose the image.
可选地,另外一些实施例中,上述图8所示的流程中也可以不包含S811。也即,手机也可以不用第二照片替换第一照片。例如,手机可以将第一照片和第二照片都保存至手机图库中,用户可以在手机图库中选择是否删除第一照片,在此不作限制。Optionally, in some other embodiments, S811 may not be included in the process shown in FIG. 8 . That is, the mobile phone may not replace the first photo with the second photo. For example, the mobile phone can save both the first photo and the second photo in the mobile phone gallery, and the user can choose whether to delete the first photo in the mobile phone gallery, which is not limited here.
可选地,本申请实施例中,上述S806-S808所述的逻辑,可以通过在手机中预配置拍摄距离和zoom倍率之间的对应关系而实现。手机进入离远点儿拍状态后,可以根据拍摄距离,查询该对应关系,对摄像头的zoom倍率进行调整。Optionally, in the embodiment of the present application, the logic described in the above S806-S808 may be implemented by preconfiguring the correspondence between the shooting distance and the zoom ratio in the mobile phone. After the mobile phone enters the far away shooting state, you can query the corresponding relationship according to the shooting distance, and adjust the zoom ratio of the camera.
一些实施方式中,拍摄距离和zoom倍率之间的对应关系中,当拍摄距离大于第一距离阈值、且小于第二距离阈值时,拍摄距离与zoom倍率之间可以是非线性关系,zoom倍率可以随着拍摄距离的增大呈非线性增大。In some embodiments, in the correspondence between the shooting distance and the zoom magnification, when the shooting distance is greater than the first distance threshold and less than the second distance threshold, there may be a nonlinear relationship between the shooting distance and the zoom magnification, and the zoom magnification may vary. It increases non-linearly with the increase of shooting distance.
例如,以第一倍率为1X,第二倍率为2X,第一距离阈值为8cm,第二距离阈值为15cm为例,图11为本申请实施例提供的拍摄距离和zoom倍率之间的一种对应关系的示意图。如图11所示,当拍摄距离大于8cm、且小于15cm时,zoom倍率是随着拍摄距离的增大而呈非线性增大的。示例性地,根据图11所示的对应关系,手机与被拍主体之间的拍摄距离为9cm时,手机可以将摄像头的zoom倍率调整至1.1X;手机与被拍主体之间的拍摄距离为10cm时,手机可以将摄像头的zoom倍率调整至1.2X;……;手机与被拍主体之间的拍摄距离为13cm时,手机可以将摄像头的zoom倍率调整至1.7X;手机与被拍主体之间的拍摄距离为14cm时,手机可以将摄像头的zoom倍率调整至1.9X等。For example, assuming that the first magnification is 1X, the second magnification is 2X, the first distance threshold is 8cm, and the second distance threshold is 15cm, as an example, FIG. 11 is an example between the shooting distance and the zoom magnification provided by the embodiment of the application. Schematic diagram of the corresponding relationship. As shown in FIG. 11 , when the shooting distance is greater than 8 cm and less than 15 cm, the zoom magnification increases nonlinearly as the shooting distance increases. Exemplarily, according to the corresponding relationship shown in Figure 11, when the shooting distance between the mobile phone and the subject to be photographed is 9cm, the mobile phone can adjust the zoom ratio of the camera to 1.1X; the shooting distance between the mobile phone and the subject to be photographed is: When the distance between the mobile phone and the subject is 13cm, the mobile phone can adjust the zoom ratio of the camera to 1.7X; the distance between the mobile phone and the subject is 1.7X. When the shooting distance is 14cm, the mobile phone can adjust the zoom ratio of the camera to 1.9X, etc.
另外一些实施方式中,拍摄距离和zoom倍率之间的对应关系中,当拍摄距离大于第一距离阈值、且小于第二距离阈值时,拍摄距离与zoom倍率之间也可以是线性关系,zoom倍率可以随着拍摄距离的增大呈线性增大。In some other embodiments, in the correspondence between the shooting distance and the zoom magnification, when the shooting distance is greater than the first distance threshold and smaller than the second distance threshold, there may also be a linear relationship between the shooting distance and the zoom magnification, and the zoom magnification It can increase linearly as the shooting distance increases.
例如,同样以第一倍率为1X,第二倍率为2X,第一距离阈值为8cm,第二距离阈值为15cm为例,图12为本申请实施例提供的拍摄距离和zoom倍率之间的另一种对应关系的示意图。如图12所示,当拍摄距离大于8cm、且小于15cm时,zoom倍率是随着拍摄距离的增大而呈线性增大的。不再一一进行举例说明。For example, also taking the first magnification as 1X, the second magnification as 2X, the first distance threshold as 8cm, and the second distance threshold as 15cm as an example, FIG. 12 is another example of the difference between the shooting distance and the zoom magnification provided by the embodiment of the application. A schematic diagram of a correspondence relationship. As shown in FIG. 12 , when the shooting distance is greater than 8 cm and less than 15 cm, the zoom magnification increases linearly with the increase of the shooting distance. No further examples will be given.
拍摄距离和zoom倍率之间的对应关系中,当拍摄距离大于第一距离阈值、且小于第 二距离阈值时,拍摄距离与zoom倍率之间是线性关系时,用户在将手机远离被拍主体的过程中,手机的拍摄FOV的变化幅度可以更小。In the correspondence between the shooting distance and the zoom magnification, when the shooting distance is greater than the first distance threshold and less than the second distance threshold, and there is a linear relationship between the shooting distance and the zoom magnification, the user is moving the mobile phone away from the subject being photographed. During the process, the change range of the shooting FOV of the mobile phone can be smaller.
需要说明的是,本申请实施例对拍摄距离和zoom倍率之间的对应关系中,当拍摄距离大于第一距离阈值、且小于第二距离阈值时,拍摄距离与zoom倍率之间呈线性关系或非线性关系并不作限制。另外,应当理解,图11和图12仅为本申请对非线性关系和线性关系的两种示例性说明。It should be noted that, in the correspondence between the shooting distance and the zoom magnification in the embodiment of the present application, when the shooting distance is greater than the first distance threshold and less than the second distance threshold, there is a linear relationship between the shooting distance and the zoom magnification or Non-linear relationships are not limiting. In addition, it should be understood that FIGS. 11 and 12 are merely two exemplary illustrations of nonlinear and linear relationships in the present application.
以上介绍了手机在接收到用户的拍摄操作,且拍摄距离小于摄像头的最近对焦距离时,手机先近距离拍摄一张第一照片,然后进入离远点儿拍状态,辅助用户在拍摄距离大于或等于摄像头的最近对焦距离的范围内,拍摄一张拍摄FOV近乎等同于第一照片、但画面更加清晰的第二照片的过程。The above describes that when the mobile phone receives the user's shooting operation and the shooting distance is less than the closest focusing distance of the camera, the mobile phone first takes a first photo at a close distance, and then enters the far point shooting state to assist the user when the shooting distance is greater than or Within the range equal to the closest focusing distance of the camera, the process of taking a second photo with FOV almost equivalent to the first photo but with a clearer picture.
可选地,在实际拍摄时,还存在手机在接收到用户的拍摄操作,且拍摄距离大于或等于摄像头的最近对焦距离的情况。针对这种情况,本申请实施例中,手机可以直接响应于用户的拍摄操作拍摄照片。Optionally, during actual shooting, there is also a situation that the mobile phone is receiving a shooting operation from the user, and the shooting distance is greater than or equal to the closest focusing distance of the camera. In view of this situation, in this embodiment of the present application, the mobile phone can take pictures directly in response to the user's taking operation.
可选地,本申请实施例中,手机在进入离远点儿拍状态后,手机可以在拍摄界面中将文字提示:“离远点儿拍”105、以及“请再离远一点,改善画质”106显示预设的第一时长,如:第一时长可以为5秒(S)、6S等。当手机进入离远点儿拍状态达到第一时长后,仍未再次接收到用户的二次拍摄操作时,手机可以自动退出离远点儿拍状态。Optionally, in the embodiment of the present application, after the mobile phone enters the far-away shooting state, the mobile phone can prompt the text in the shooting interface: "Far away and take a picture" 105, and "Please stay farther away to improve the picture. "Quality" 106 displays a preset first duration, for example, the first duration may be 5 seconds (S), 6S, and the like. When the mobile phone enters the remote shooting state for the first time period and still does not receive a second shooting operation from the user, the mobile phone can automatically exit the remote shooting state.
或者,手机在进入离远点儿拍状态后,当连续检测到M次(M为大于0的整数,如M可以为10)拍摄距离大于上述第二距离阈值时,手机也可以自动退出离远点儿拍状态。Alternatively, after the mobile phone enters the remote shooting state, when it continuously detects M times (M is an integer greater than 0, for example, M can be 10), when the shooting distance is greater than the above-mentioned second distance threshold, the mobile phone can also automatically exit the remote shooting. Shoot the state.
可以理解的,当手机退出离远点儿拍状态后,手机摄像头的zoom倍率可以由离远点儿拍状态中调整的zoom倍率切换至默认的第一倍率(如:1X)。此时,手机处于正常拍摄状态,手机的拍摄界面中显示的预览画面的清晰或模糊程度,与手机与被拍主体之间的拍摄距离相关,不再赘述。It is understandable that when the mobile phone exits the far-point shooting state, the zoom ratio of the mobile phone camera can be switched from the zoom ratio adjusted in the far-point shooting state to the default first zoom ratio (eg: 1X). At this time, the mobile phone is in a normal shooting state, and the degree of clarity or blur of the preview image displayed in the shooting interface of the mobile phone is related to the shooting distance between the mobile phone and the subject to be photographed, and will not be repeated here.
可选地,本申请实施例中,手机在进入离远点儿拍状态后,用户也可以主动进行操作,触发手机退出离远点儿拍状态。Optionally, in the embodiment of the present application, after the mobile phone enters the remote shooting state, the user may also actively operate to trigger the mobile phone to exit the remote shooting state.
例如,请参考上述图9和/或图10所示,手机进入离远点儿拍状态后,拍摄界面中显示的文字提示:“离远点儿拍”105后,还可以包括一个用于退出离远点儿拍状态的功能控件“X”107。用户可以主动点击功能控件“X”107,以触发手机退出离远点儿拍状态。For example, please refer to the above-mentioned Fig. 9 and/or Fig. 10, after the mobile phone enters the remote shooting state, the text prompt displayed in the shooting interface: after "shooting from a distance" 105, it may also include a message for exiting The function control "X" 107 of the far away state. The user can actively click the function control "X" 107 to trigger the mobile phone to exit the far-away shooting state.
又例如,用户也可以通过在手机上进行手动变焦,触发手机退出离远点儿拍状态。示例性地,请参考图9和/或图10所示,手机的拍摄界面中显示的1X及其附近的黑色圆点可以作为变焦功能控件(不同的黑色圆点对应不同的zoom倍率),用户可以点击手机拍摄界面中的变焦功能控件进行手动变焦。如:手机拍摄界面中的1X上面的第一个黑色圆点对应的zoom倍率可以为1.5X,当用户点击该1.5X功能控件时,手机可以响应于用户点击1.5X功能控件的操作,将摄像头的zoom倍率切换为1.5X。手机在进入离远点儿拍状态后,当检测到用户进行手动变焦的操作时,可以退出离远点儿拍状态。For another example, the user can also trigger the mobile phone to exit the far-point shooting state by manually zooming on the mobile phone. Exemplarily, please refer to FIG. 9 and/or FIG. 10 , the 1X and the black dots around it displayed in the camera interface of the mobile phone can be used as zoom function controls (different black dots correspond to different zoom magnifications). You can click the zoom function control in the mobile phone shooting interface to manually zoom. For example, the zoom ratio corresponding to the first black dot above 1X in the mobile phone shooting interface can be 1.5X. When the user clicks the 1.5X function control, the mobile phone can respond to the user's operation of clicking the 1.5X function control. The zoom ratio is switched to 1.5X. After the mobile phone enters the far-point shooting state, when it is detected that the user performs a manual zoom operation, it can exit the far-point shooting state.
本申请实施例对手机在进入离远点儿拍状态后,用户主动触发手机退出离远点儿拍状态的操作方式不作限制。其中,对于用户点击用于退出离远点儿拍状态的功能控件“X”107的方式,当手机检测到用户手动退出离远点儿拍状态的次数达到预设次数(如3次) 时,手机后续也可以不再触发进入离远点儿拍状态,以保证用户的体验更好。The embodiments of the present application do not limit the operation manner in which the user actively triggers the mobile phone to exit the remote shooting state after the mobile phone enters the remote shooting state. Among them, for the way in which the user clicks the function control "X" 107 for exiting the remote shooting state, when the mobile phone detects that the number of times the user manually exits the remote shooting state reaches a preset number of times (such as 3 times), In the future, the mobile phone can no longer be triggered to enter the remote shooting state to ensure a better user experience.
可选地,本申请实施例中,手机每次启动运行拍摄应用程序后,当手机在进入离远点儿拍状态之前,检测到用户进行了手动变焦时,手机也可以不再进入离远点儿拍状态。例如,手机还未进入离远点儿拍状态之前,检测到用户主动将手机摄像头的zoom倍率由默认的1X调整为了2X时,即便后续手机接收到用户的拍摄操作、且手机与被拍主体之间的拍摄距离小于摄像头的最近对焦距离时,手机在拍摄应用程序的本次运行中,也可以不再进入离远点儿拍状态。Optionally, in the embodiment of the present application, after each time the mobile phone starts and runs the shooting application, when the mobile phone detects that the user has performed manual zooming before entering the far-point shooting state, the mobile phone may no longer enter the far-point shooting state. Shooting status. For example, before the mobile phone enters the remote shooting state, when it is detected that the user actively adjusts the zoom ratio of the mobile phone camera from the default 1X to 2X, even if the subsequent mobile phone receives the user's shooting operation, and the mobile phone and the subject are photographed When the shooting distance between the two is smaller than the closest focusing distance of the camera, the mobile phone can no longer enter the far point shooting state during the current operation of the shooting application.
可选地,本申请实施例中,手机在按照前述实施例中所述的方式对摄像头的zoom倍率进行调整时,如果手机在离远点儿拍状态中,将摄像头的zoom倍率调整至第二倍率,则手机也可以将摄像头的zoom倍率暂时锁定在第二倍率,以避免由于用户手抖使得手机与被拍主体的拍摄距离反复变化时,手机反复来回调整摄像头的zoom倍率。但应当理解,当手机检测到前述实施例中所述的退出离远点儿拍状态的触发条件时,会立刻将摄像头的zoom倍率调整至默认的第一倍率。Optionally, in the embodiment of the present application, when the mobile phone adjusts the zoom magnification of the camera in the manner described in the preceding embodiments, if the mobile phone is in a far-away shooting state, the zoom magnification of the camera is adjusted to the second. The phone can also temporarily lock the zoom ratio of the camera to the second ratio, so as to avoid the phone repeatedly adjusting the zoom ratio of the camera back and forth when the shooting distance between the phone and the subject is repeatedly changed due to the user's hand shaking. However, it should be understood that when the mobile phone detects the triggering condition for exiting the remote shooting state described in the foregoing embodiment, it will immediately adjust the zoom magnification of the camera to the default first magnification.
可选地,本申请实施例提供的该拍摄方法中,终端设备在接收到用户的拍摄操作之前,还可以根据终端设备与被拍主体之间的拍摄距离,确定用户是否有使用终端设备对被拍主体进行近距离拍摄的倾向。如果用户有使用终端设备对被拍主体进行近距离拍摄的倾向,则终端设备可以进入放大拍状态。终端设备进入放大拍状态后,终端设备可以在拍摄距离大于或等于摄像头的最近对焦距离的范围内,调整摄像头的zoom倍率随着拍摄距离的减小而增大,使得终端设备的拍摄FOV在当前拍摄距离时,可以近乎等同于摄像头的zoom倍率为默认的第一倍率、且拍摄距离更小时的拍摄FOV。Optionally, in the shooting method provided in the embodiment of the present application, before the terminal device receives the shooting operation from the user, it can also determine whether the user has used the terminal device to shoot the subject according to the shooting distance between the terminal device and the subject to be shot. The tendency of the subject to take close-up shots. If the user has a tendency to use the terminal device to take a close-up photograph of the subject being photographed, the terminal device may enter a zoom-in state. After the terminal device enters the zoom-in state, the terminal device can adjust the zoom ratio of the camera to increase as the shooting distance decreases within the range that the shooting distance is greater than or equal to the closest focusing distance of the camera, so that the shooting FOV of the terminal device is within the current range. When shooting at a distance, it can be nearly equivalent to the camera's zoom magnification, which is the default first magnification, and the shooting FOV when the shooting distance is smaller.
也即,终端设备进入放大拍状态后,在拍摄距离大于或等于摄像头的最近对焦距离的范围内进行拍摄时,拍摄到的照片的放大效果,可以与终端设备未进入放大拍状态(摄像头的zoom倍率为默认的第一倍率)、且拍摄距离更小时拍摄到的照片的放大效果近乎等同(或相同)。通过这种方式,可以使得用户使用终端设备拍摄到的照片,既可以达到其想要的近距离拍摄的放大效果,也可以保证照片的清晰度。例如,假设终端设备不进入放大拍状态,用户使用终端设备在拍摄距离小于摄像头的最近对焦距离时拍摄到的照片为第一照片;终端设备进入放大拍状态,用户使用终端设备在拍摄距离大于或等于摄像头的最近对焦距离时拍摄到的照片为第二照片。则,第二照片不仅可以具有近乎等同于第一照片的放大效果,而且比第一照片更加清晰。That is to say, after the terminal device enters the zoom-in state, when the shooting distance is greater than or equal to the closest focusing distance of the camera, the zoom-in effect of the captured photo can be compared with the zoom-in state of the terminal device (the zoom of the camera). The magnification is the default first magnification), and the magnification effect of the photos taken when the shooting distance is smaller is almost the same (or the same). In this way, the photos taken by the user using the terminal device can not only achieve the desired zoom-in effect of close-up shooting, but also ensure the clarity of the photos. For example, assuming that the terminal device does not enter the zoom-in state, the photo taken by the user using the terminal device when the shooting distance is less than the closest focusing distance of the camera is the first photo; the terminal device enters the zoom-in state, and the user uses the terminal device when the shooting distance is greater than or The photo taken when it is equal to the closest focusing distance of the camera is the second photo. Then, the second photo can not only have a magnification effect nearly equal to that of the first photo, but also be clearer than the first photo.
一些实施例中,终端设备在接收到用户的拍摄操作之前,根据终端设备与被拍主体之间的拍摄距离,确定用户是否有使用终端设备对被拍主体进行近距离拍摄的倾向的方式可以包括:如果终端设备连续检测到N次拍摄距离小于第三距离阈值,则确定用户有使用终端设备对被拍主体进行近距离拍摄的倾向。否则,认为用户没有使用终端设备对被拍主体进行近距离拍摄的倾向。也即,本实施例中,终端设备连续检测到N次拍摄距离小于第三距离阈值时,终端设备可以进入放大拍状态。In some embodiments, before the terminal device receives the user's shooting operation, according to the shooting distance between the terminal device and the subject to be photographed, the method of determining whether the user has a tendency to use the terminal device to shoot the subject at close range may include: : If the terminal device continuously detects that the shooting distance is smaller than the third distance threshold for N times, it is determined that the user has a tendency to use the terminal device to shoot the subject at close range. Otherwise, it is considered that the user has no tendency to use the terminal device to take a close-up photograph of the subject being photographed. That is, in this embodiment, when the terminal device continuously detects that the shooting distance is smaller than the third distance threshold for N times, the terminal device can enter the zoom-in shooting state.
其中,第三距离阈值大于摄像头的最近对焦距离,N可以为10、11、12等大于0的整数。例如,终端设备的摄像头的最近对焦距离可以为10cm,第三距离阈值可以为20cm。第三距离阈值和N均为预设值,本申请实施例对第三距离阈值和N的大小均不作具体限制。The third distance threshold is greater than the closest focusing distance of the camera, and N may be an integer greater than 0, such as 10, 11, 12, etc. For example, the closest focusing distance of the camera of the terminal device may be 10 cm, and the third distance threshold may be 20 cm. Both the third distance threshold and N are preset values, and neither the third distance threshold nor the size of N is specifically limited in this embodiment of the present application.
下面结合图13所示的流程对该拍摄方法进行说明。图13为本申请实施例提供的拍摄方法的另一流程示意图。如图13所示,该拍摄方法可以包括S1301-S1317。其中,S1304和S1312为“或”的关系,当手机先接收到用户的拍摄操作时,手机可以执行S1304-S1311的流程。当手机在接收到用户的拍摄操作之前,先连续检测到N次拍摄距离小于第三距离阈值时,手机可以执行S1312-S1317的流程。The photographing method will be described below with reference to the flow shown in FIG. 13 . FIG. 13 is another schematic flowchart of a photographing method provided by an embodiment of the present application. As shown in FIG. 13 , the photographing method may include S1301-S1317. Wherein, S1304 and S1312 are in an "or" relationship. When the mobile phone first receives the user's shooting operation, the mobile phone can execute the process of S1304-S1311. When the mobile phone continuously detects that the shooting distance is smaller than the third distance threshold for N times before receiving the shooting operation of the user, the mobile phone may execute the process of S1312-S1317.
具体地,1301-S1311分别与前述图8中所示的S801-S811相同,不再赘述。S1312-S1317如下所述:Specifically, 1301-S1311 are respectively the same as the aforementioned S801-S811 shown in FIG. 8 , and will not be repeated here. S1312-S1317 are described below:
S1312、当连续检测到N次拍摄距离小于第三距离阈值时,手机进入放大拍状态。S1312 , when it is continuously detected that the shooting distance is smaller than the third distance threshold for N times, the mobile phone enters a zoom-in shooting state.
例如,以第三距离阈值为20cm为例。当用户想要使用手机进行近距离拍摄时,用户可能会将手机逐渐靠近被拍主体。此时,手机如果连续到N次拍摄距离小于20cm,则可以进入放大拍状态。For example, take the third distance threshold as 20cm as an example. When a user wants to use a mobile phone for close-up photography, the user may gradually bring the mobile phone closer to the subject to be photographed. At this time, if the mobile phone has N consecutive shooting distances of less than 20cm, it can enter the zoom-in shooting state.
示例性地,图14为本申请实施例提供的手机拍摄界面的又一示意图。如图14所示,本申请实施例中,手机进入放大拍状态后,可以在拍摄界面中显示文字提示:“放大拍”201。“放大拍”201可以用于提示用户手机当前的拍摄模式为放大拍状态。Exemplarily, FIG. 14 is another schematic diagram of a mobile phone camera interface provided by an embodiment of the present application. As shown in FIG. 14 , in the embodiment of the present application, after the mobile phone enters the zoom-in state, a text prompt: “zoom-in” 201 may be displayed in the shooting interface. The "zoom-in" 201 may be used to prompt the user that the current shooting mode of the mobile phone is the zoom-in state.
另外,手机刚进入放大拍状态时,摄像头的zoom倍率为默认的第一倍率(如:1X)。In addition, when the phone just enters the zoom-in state, the zoom magnification of the camera is the default first magnification (eg: 1X).
本申请实施例中,手机进入放大拍状态后,可以继续执行S1302和S1303。手机在继续执行上述S1302和S1303的过程中,针对S1303中每一次检测到的拍摄距离,手机可以按照下述S1313-S1315所述的逻辑,根据每一次检测到的拍摄距离,自动调整摄像头的zoom倍率。In this embodiment of the present application, after the mobile phone enters the zoom-in state, S1302 and S1303 may be continuously executed. In the process of continuing to execute the above S1302 and S1303, the mobile phone can automatically adjust the zoom of the camera according to each detected shooting distance according to the logic described in the following S1313-S1315 for each detected shooting distance in S1303. magnification.
S1313、当拍摄距离大于或等于第三距离阈值时,手机将摄像头的zoom倍率维持在第一倍率。S1313, when the shooting distance is greater than or equal to the third distance threshold, the mobile phone maintains the zoom magnification of the camera at the first magnification.
S1314、当拍摄距离小于第三距离阈值、且大于摄像头的最近对焦距离时,手机调整摄像头的zoom倍率随着拍摄距离的减小而逐渐增大。S1314. When the shooting distance is less than the third distance threshold and greater than the closest focusing distance of the camera, the mobile phone adjusts the zoom ratio of the camera to gradually increase as the shooting distance decreases.
S1315、当拍摄距离小于或等于摄像头的最近对焦距离时,手机将摄像头的zoom倍率维持在第二倍率。S1315. When the shooting distance is less than or equal to the closest focusing distance of the camera, the mobile phone maintains the zoom magnification of the camera at the second magnification.
S1313-S1315中提到的第三距离阈值、第一倍率、以及第二倍率,具体请参见前述实施例中所述,不再赘述。For details of the third distance threshold, the first magnification, and the second magnification mentioned in S1313-S1315, please refer to the descriptions in the foregoing embodiments, which will not be repeated.
另外,可以理解的,S1314中,当拍摄距离小于第三距离阈值、且大于摄像头的最近对焦距离时,手机是将摄像头的zoom倍率在第一倍率和第二倍率之间进行调整,拍摄距离越大,摄像头的zoom倍率越小;拍摄距离越小,摄像头的zoom倍率越大。In addition, it can be understood that in S1314, when the shooting distance is less than the third distance threshold and greater than the closest focusing distance of the camera, the mobile phone adjusts the zoom magnification of the camera between the first magnification and the second magnification. Larger, the smaller the zoom ratio of the camera; the smaller the shooting distance, the larger the zoom ratio of the camera.
下面同样结合图1所示的拍摄场景,以第一倍率为1X,第二倍率为2X,第三距离阈值为20cm,手机摄像头的最近对焦距离为10cm为例,对上述S1313-S1315的实现逻辑进行举例说明。The following also combines the shooting scene shown in Figure 1, taking the first magnification as 1X, the second magnification as 2X, the third distance threshold as 20cm, and the closest focusing distance of the mobile phone camera as 10cm as an example, the implementation logic of the above S1313-S1315 Give an example.
示例性地,当手机对图1所示的拍摄场景进行拍摄,并在接收到用户的拍摄操作之前,按照上述S1312所述的逻辑进入放大拍状态后,手机根据每一次检测到的手机与文字“HUAWEI”之间的拍摄距离,自动调整摄像头的zoom倍率的具体方式可以如下。Exemplarily, when the mobile phone shoots the shooting scene shown in FIG. 1, and before receiving the shooting operation from the user, after entering the zoom-in shooting state according to the logic described in the above S1312, the mobile phone according to each detected mobile phone and text. The specific way to automatically adjust the zoom ratio of the camera for the shooting distance between "HUAWEI" can be as follows.
1)当手机与文字“HUAWEI”之间的拍摄距离大于或等于20cm时,手机将摄像头的zoom倍率维持在1X。1) When the shooting distance between the mobile phone and the text "HUAWEI" is greater than or equal to 20cm, the mobile phone will maintain the zoom ratio of the camera at 1X.
2)当手机与文字“HUAWEI”之间的拍摄距离小于20cm、且大于10cm时,手机调 整摄像头的zoom倍率,在1X与2X之间随着拍摄距离的减小而逐渐增大。2) When the shooting distance between the mobile phone and the text "HUAWEI" is less than 20cm and greater than 10cm, the mobile phone adjusts the zoom ratio of the camera, and gradually increases between 1X and 2X as the shooting distance decreases.
也即,手机与文字“HUAWEI”之间的拍摄距离越接近10cm,摄像头的zoom倍率越接近2X。手机与文字“HUAWEI”之间的拍摄距离越接近20cm,摄像头的zoom倍率越接近1X。That is, the closer the shooting distance between the mobile phone and the text "HUAWEI" is 10cm, the closer the zoom ratio of the camera is to 2X. The closer the shooting distance between the mobile phone and the text "HUAWEI" is 20cm, the closer the zoom ratio of the camera is to 1X.
例如,手机与文字“HUAWEI”之间的拍摄距离为18cm时,手机可以将摄像头的zoom倍率调整至1.2X。手机与文字“HUAWEI”之间的拍摄距离为15cm时,手机可以将摄像头的zoom倍率调整至1.5X。手机与文字“HUAWEI”之间的拍摄距离为12cm时,手机可以将摄像头的zoom倍率调整至1.8X等。For example, when the shooting distance between the mobile phone and the text "HUAWEI" is 18cm, the mobile phone can adjust the zoom ratio of the camera to 1.2X. When the shooting distance between the mobile phone and the text "HUAWEI" is 15cm, the mobile phone can adjust the zoom ratio of the camera to 1.5X. When the shooting distance between the mobile phone and the text "HUAWEI" is 12cm, the mobile phone can adjust the zoom ratio of the camera to 1.8X, etc.
3)当手机与文字“HUAWEI”之间的拍摄距离小于或等于10cm时,手机将摄像头的zoom倍率维持在2X。3) When the shooting distance between the mobile phone and the text "HUAWEI" is less than or equal to 10cm, the mobile phone will maintain the zoom ratio of the camera at 2X.
本申请实施例中,手机在进入放大拍状态后,按照上述S1313-S1315所述的逻辑,对摄像头的zoom倍率调整的过程中,如果手机接收到用户的拍摄操作,则手机可以响应于用户的拍摄操作,进行拍摄。如:该拍摄方法还可以包括S1316-S1317。In the embodiment of the present application, after the mobile phone enters the zoom-in shooting state, according to the logic described in S1313-S1315, in the process of adjusting the zoom ratio of the camera, if the mobile phone receives the user's shooting operation, the mobile phone can respond to the user's shooting operation. Shooting operation to shoot. For example, the shooting method may further include S1316-S1317.
S1316、手机接收用户的拍摄操作。S1316, the mobile phone receives the user's shooting operation.
S1317、手机响应于用户的拍摄操作,进行拍摄。S1317 , the mobile phone shoots in response to the user's shooting operation.
具体地,用户的拍摄操作可以参考前述实施例中所述,不再赘述。Specifically, for the shooting operation of the user, reference may be made to the description in the foregoing embodiments, and details are not repeated here.
容易理解的,当手机未进入放大拍状态(摄像头的zoom倍率保持1X不变)时,如果用户将手机靠近被拍主体,则手机的拍摄FOV会有一定程度的增大。而本申请实施例中,手机进入放大拍状态后,按照上述S1313-S1315所述的方式自动调整摄像头的zoom倍率,可以使得如果用户将手机靠近被拍主体,且拍摄距离在小于第三距离阈值、且大于摄像头的最近对焦距离的范围内时,手机的拍摄FOV的增大幅度会大于手机未进入放大拍状态的增大幅度。从而,手机在当前拍摄距离时的拍摄FOV,可以近乎等同于摄像头的zoom倍率为默认的第一倍率、且拍摄距离更小时的拍摄FOV。It is easy to understand that when the mobile phone does not enter the zoom-in state (the zoom ratio of the camera remains unchanged at 1X), if the user brings the mobile phone close to the subject to be photographed, the shooting FOV of the mobile phone will increase to a certain extent. In the embodiment of the present application, after the mobile phone enters the zoomed-in shooting state, the zoom ratio of the camera is automatically adjusted according to the methods described in S1313-S1315, so that if the user moves the mobile phone close to the subject to be photographed, and the shooting distance is less than the third distance threshold , and is greater than the range of the closest focusing distance of the camera, the increase of the FOV of the mobile phone will be greater than the increase of the mobile phone when it is not in the zoomed-in shooting state. Therefore, the shooting FOV of the mobile phone at the current shooting distance can be almost equivalent to the shooting FOV when the zoom magnification of the camera is the default first magnification and the shooting distance is smaller.
因此,当手机进入放大拍状态后,用户使用手机进行拍摄时,手机可以在拍摄距离大于或等于摄像头的最近对焦距离的范围内,拍摄到放大效果与手机未进入放大拍状态、且拍摄距离小于摄像头的最近对焦距离时相同,但画面更加清晰的照片。Therefore, when the mobile phone enters the zoomed-in shooting state, when the user uses the mobile phone to shoot, the mobile phone can shoot the zoomed-in effect within the range that the shooting distance is greater than or equal to the closest focusing distance of the camera, and the mobile phone does not enter the zoomed-in shooting state, and the shooting distance is less than The camera's closest focusing distance is the same, but the picture is sharper.
示例性地,图15为本申请实施例提供的手机未进入放大拍状态、且拍摄距离为9cm时拍摄到的画面示意图。图16为本申请实施例提供的手机进入放大拍状态、且拍摄距离为15cm时拍摄到的画面示意图。Exemplarily, FIG. 15 is a schematic diagram of a screen shot when the mobile phone according to an embodiment of the present application does not enter the zoom-in shooting state and the shooting distance is 9 cm. FIG. 16 is a schematic diagram of a screen shot when the mobile phone according to an embodiment of the present application enters a zoomed-in shooting state and the shooting distance is 15 cm.
请参考图15和图16所示,当手机未进入放大拍状态、且拍摄距离为9cm时,手机拍摄到的画面中的文字“HUAWEI”较为模糊。当手机进入放大拍状态、且拍摄距离为15cm时,手机拍摄到的画面中的文字“HUAWEI”不仅较为清晰,而且可以与图15中的文字“HUAWEI”具有相同的放大效果。Please refer to Figure 15 and Figure 16. When the mobile phone is not in the zoom-in state and the shooting distance is 9cm, the text "HUAWEI" in the picture captured by the mobile phone is relatively blurred. When the mobile phone enters the zoom-in state and the shooting distance is 15cm, the text "HUAWEI" in the picture captured by the mobile phone is not only clearer, but also has the same magnification effect as the text "HUAWEI" in Figure 15.
上述图13所示的实施例中,S1304-S1311的流程可以适用于当手机还未进入放大拍状态,且手机与被拍主体之间的拍摄距离小于摄像头的最近对焦距离时,手机接收到用户的拍摄操作的场景。S1312-S1315所述的流程,可以适用于手机在接收到用户的拍摄操作前,就已经进入放大拍状态的场景。In the embodiment shown in FIG. 13 above, the process of S1304-S1311 can be applied to when the mobile phone has not entered the zoomed-in shooting state, and the shooting distance between the mobile phone and the subject to be photographed is less than the closest focusing distance of the camera, the mobile phone receives the user the scene of the shooting operation. The processes described in S1312-S1315 can be applied to the scene where the mobile phone has entered the zoom-in shooting state before receiving the user's shooting operation.
例如,当手机还未进入放大拍状态时,用户可能突然将手机靠近被拍主体,使得手机与被拍主体之间的拍摄距离小于摄像头的最近对焦距离。或者,手机刚启动运行拍摄 应用程序时,手机与被拍主体之间的拍摄距离已经小于摄像头的最近对焦距离,此时手机也还未进入放大拍状态。对于这两种情况,手机接收到用户的拍摄操作时,均可以按照S1304-S1311的流程执行拍摄功能。For example, when the mobile phone has not yet entered the zoom-in shooting state, the user may suddenly bring the mobile phone close to the subject to be photographed, so that the shooting distance between the mobile phone and the subject to be photographed is smaller than the closest focusing distance of the camera. Or, when the mobile phone just starts and runs the shooting application, the shooting distance between the mobile phone and the subject to be photographed is already smaller than the closest focusing distance of the camera, and the mobile phone has not yet entered the zoom-in shooting state. In both cases, when the mobile phone receives the user's shooting operation, it can perform the shooting function according to the process of S1304-S1311.
可选地,本申请实施例中,当手机进入放大拍状态后,用户使用手机进行拍摄时,由于手机与被拍主体之间的拍摄距离在变化时,手机可以随时按照S1312-S1315所述的逻辑自动调整摄像头的zoom倍率,所以,用户与手机的交互次数较少,而且用户在将手机靠近被拍主体的过程中,手机的拍摄FOV也不会发生跳变,用户也不用再进行二次构图。Optionally, in this embodiment of the present application, after the mobile phone enters the zoomed-in shooting state, when the user uses the mobile phone to shoot, since the shooting distance between the mobile phone and the subject to be photographed changes, the mobile phone can follow the steps described in S1312-S1315 at any time. The logic automatically adjusts the zoom ratio of the camera, so the number of interactions between the user and the mobile phone is less, and the FOV of the mobile phone will not jump when the user moves the mobile phone close to the subject to be photographed, and the user does not need to do it twice. composition.
可选地,上述图13所示的实施例中,S1313-S1315所述的逻辑,也可以通过在手机中预配置拍摄距离和zoom倍率之间的对应关系而实现。手机进入放大拍状态后,可以根据拍摄距离,查询该对应关系,对摄像头的zoom倍率进行调整。Optionally, in the embodiment shown in FIG. 13 above, the logic described in S1313-S1315 may also be implemented by preconfiguring the correspondence between the shooting distance and the zoom ratio in the mobile phone. After the mobile phone enters the zoom-in state, you can query the corresponding relationship according to the shooting distance, and adjust the zoom ratio of the camera.
应当理解,实现S1313-S1315所述的逻辑时拍摄距离和zoom倍率之间的对应关系,与实现上述S806-S808所述的逻辑关系时拍摄距离和zoom倍率之间的对应关系不同。It should be understood that the correspondence between the shooting distance and the zoom magnification when implementing the logic described in S1313-S1315 is different from the corresponding relationship between the shooting distance and the zoom magnification when implementing the logic described in S806-S808.
为便于区分,实现上述S806-S808所述的逻辑关系时拍摄距离和zoom倍率之间的对应关系可以称为第一对应关系,实现S1313-S1315所述的逻辑时拍摄距离和zoom倍率之间的对应关系可以称为第二对应关系。For ease of distinction, the correspondence between the shooting distance and the zoom magnification when the logical relationship described in S806-S808 is realized can be called the first correspondence, and the relationship between the shooting distance and the zoom magnification when the logic described in S1313-S1315 is realized. The correspondence relationship may be referred to as a second correspondence relationship.
一些实施方式中,第二对应关系中,当拍摄距离小于第三距离阈值、且大于摄像头的最近对焦距离时,拍摄距离与zoom倍率之间可以是线性关系,zoom倍率可以随着拍摄距离的减小呈线性增大。In some embodiments, in the second correspondence, when the shooting distance is less than the third distance threshold and greater than the closest focusing distance of the camera, there may be a linear relationship between the shooting distance and the zoom magnification, and the zoom magnification may decrease as the shooting distance decreases. Small increases linearly.
例如,以第一倍率为1X,第二倍率为2X,第三距离阈值为20cm,手机摄像头的最近对焦距离为10cm为例,图17为本申请实施例提供的第二对应关系的示意图。如图17所示,当拍摄距离小于20cm、且大于10cm时,zoom倍率是随着拍摄距离的减小而呈线性增大的。示例性地,根据图17所示的对应关系,手机与被拍主体之间的拍摄距离为19cm时,手机可以将摄像头的zoom倍率调整至1.1X;手机与被拍主体之间的拍摄距离为18cm时,手机可以将摄像头的zoom倍率调整至1.2X;……;手机与被拍主体之间的拍摄距离为12cm时,手机可以将摄像头的zoom倍率调整至1.8X;手机与被拍主体之间的拍摄距离为11cm时,手机可以将摄像头的zoom倍率调整至1.9X等。For example, assuming that the first magnification is 1X, the second magnification is 2X, the third distance threshold is 20cm, and the closest focusing distance of the mobile phone camera is 10cm as an example, FIG. 17 is a schematic diagram of the second correspondence provided by the embodiment of the present application. As shown in FIG. 17 , when the shooting distance is less than 20 cm and greater than 10 cm, the zoom magnification increases linearly as the shooting distance decreases. Exemplarily, according to the correspondence shown in Figure 17, when the shooting distance between the mobile phone and the subject to be photographed is 19cm, the mobile phone can adjust the zoom ratio of the camera to 1.1X; the shooting distance between the mobile phone and the subject to be photographed is At 18cm, the mobile phone can adjust the zoom ratio of the camera to 1.2X; ...; when the shooting distance between the mobile phone and the subject is 12cm, the mobile phone can adjust the zoom ratio of the camera to 1.8X; the distance between the mobile phone and the subject is 1.8X; When the shooting distance is 11cm, the mobile phone can adjust the zoom ratio of the camera to 1.9X, etc.
第二对应关系中,当拍摄距离小于第三距离阈值、且大于摄像头的最近对焦距离时,拍摄距离与zoom倍率之间的对应关系越接近线性关系,手机在靠近或远离被拍主体的过程中,拍摄FOV发生跳变的可能性越低。In the second correspondence, when the shooting distance is less than the third distance threshold and greater than the closest focusing distance of the camera, the correspondence between the shooting distance and the zoom ratio is closer to a linear relationship, and the mobile phone is in the process of approaching or moving away from the subject being photographed. , the lower the probability of shooting FOV jumps.
另外一些实施方式中,第二对应关系中,当拍摄距离小于第三距离阈值、且大于摄像头的最近对焦距离时,拍摄距离与zoom倍率之间也可以是非线性关系,zoom倍率可以随着拍摄距离的减小呈非线性增大。在此不再赘述。In some other embodiments, in the second correspondence, when the shooting distance is less than the third distance threshold and greater than the closest focusing distance of the camera, the relationship between the shooting distance and the zoom magnification may also be non-linear, and the zoom magnification may vary with the shooting distance. decreases in a non-linear manner. It is not repeated here.
需要说明的是,本申请实施例对第二对应关系中,当拍摄距离小于第三距离阈值、且大于摄像头的最近对焦距离时,拍摄距离与zoom倍率之间呈线性关系或非线性关系并不作限制。另外,应当理解,图17仅为本申请对线性关系的示例性说明。It should be noted that, in the second correspondence in the embodiment of the present application, when the shooting distance is less than the third distance threshold and greater than the closest focusing distance of the camera, the linear or nonlinear relationship between the shooting distance and the zoom magnification does not make any difference. limit. In addition, it should be understood that FIG. 17 is merely an exemplary illustration of the linear relationship in the present application.
可选地,与前述实施例中手机进入放大拍状态的方式类似,本申请实施例中,手机在进入放大拍状态后,当连续检测到M次拍摄距离大于第三距离阈值时,手机可以自动退出放大拍状态。M为大于0的整数,M可以等于N,也可以不等于N,如M可以为 10次,此处对M的大小不作限制。Optionally, similar to the manner in which the mobile phone enters the zoom-in shooting state in the foregoing embodiment, in the embodiment of the present application, after the mobile phone enters the zoom-in shooting state, when it is continuously detected that the shooting distance is greater than the third distance threshold for M times, the mobile phone can automatically Exit the zoom-in state. M is an integer greater than 0, M may be equal to or not equal to N, for example, M may be 10 times, and the size of M is not limited here.
可以理解的,当手机退出放大拍状态后,手机的摄像头的zoom倍率可以由放大拍状态中调整的zoom倍率切换至默认的第一倍率(如:1X)。此时,手机处于正常拍摄状态,手机的拍摄界面中显示的预览画面的清晰或模糊程度,与手机与被拍主体之间的拍摄距离相关,不再赘述。It is understandable that after the mobile phone exits the zoom-in state, the zoom ratio of the camera of the mobile phone can be switched from the zoom ratio adjusted in the zoom-in state to the default first magnification (eg 1X). At this time, the mobile phone is in a normal shooting state, and the degree of clarity or blur of the preview image displayed in the shooting interface of the mobile phone is related to the shooting distance between the mobile phone and the subject to be photographed, and will not be repeated here.
上述说明了手机自动退出放大拍状态的情况。可选地,本申请实施例中,手机在进入放大拍状态后,用户也可以主动进行操作,触发手机退出放大拍状态。The above describes the situation that the mobile phone automatically exits the zoom-in shooting state. Optionally, in the embodiment of the present application, after the mobile phone enters the zoom-in shooting state, the user may also actively operate to trigger the mobile phone to exit the zoom-in shooting state.
例如,请参考图14和/或图16所示,本申请实施例中,手机进入放大拍状态后,拍摄界面中显示的文字提示:“放大拍”201后,还可以包括一个用于退出放大拍状态的功能控件“X”202(可以理解,功能控件“X”202和上述功能控件“X”107虽然在拍摄界面中呈现的形式相同,但其功能不同)。用户可以主动点击功能控件“X”202,以触发手机退出放大拍状态。For example, please refer to FIG. 14 and/or FIG. 16 , in the embodiment of the present application, after the mobile phone enters the zoom-in state, the text prompt displayed in the shooting interface: after “zoom-in” 201, a text prompt for exiting zoom-in may also be included. The function control "X" 202 in the shooting state (it can be understood that although the function control "X" 202 and the above-mentioned function control "X" 107 have the same form in the shooting interface, their functions are different). The user can actively click the function control "X" 202 to trigger the mobile phone to exit the zoom-in shooting state.
又例如,用户也可以通过在手机上进行手动变焦,触发手机退出放大拍状态。示例性地,请参考图14和/或图16所示,手机的拍摄界面中显示的1X、1.5X、及其附近的黑色圆点等可以作为变焦功能控件(不同的黑色圆点对应不同的zoom倍率),用户可以点击手机拍摄界面中的变焦功能控件进行手动变焦。如:当用户点击手机拍摄界面中的1.5X功能控件时,手机可以响应于用户点击1.5X功能控件的操作,将摄像头的zoom倍率切换为1.5X。手机在进入放大拍状态后,当检测到用户进行手动变焦的操作时,可以退出放大拍状态。For another example, the user can also trigger the mobile phone to exit the zoom-in shooting state by manually zooming on the mobile phone. Exemplarily, please refer to FIG. 14 and/or FIG. 16 , the 1X, 1.5X, and black dots around them displayed in the camera interface of the mobile phone can be used as zoom function controls (different black dots correspond to different zoom ratio), the user can click the zoom function control in the mobile phone shooting interface to manually zoom. For example, when the user clicks the 1.5X function control in the mobile phone shooting interface, the mobile phone can switch the zoom ratio of the camera to 1.5X in response to the user's operation of clicking the 1.5X function control. After the mobile phone enters the zoom-in shooting state, when it is detected that the user performs a manual zooming operation, it can exit the zoom-in shooting state.
本申请实施例对手机在进入放大拍状态后,用户主动触发手机退出放大拍状态的操作方式不作限制。其中,对于用户点击用于退出放大拍状态的功能控件“X”202的方式,当手机检测到用户手动退出放大拍状态的次数达到预设次数(如3次)时,手机后续可以不再触发进入放大拍状态,以保证用户的体验更好。This embodiment of the present application does not limit the operation manner in which the user actively triggers the mobile phone to exit the zoom-in state after the mobile phone enters the zoom-in state. Among them, for the way in which the user clicks the function control "X" 202 for exiting the zoom-in shooting state, when the mobile phone detects that the number of times the user manually exits the zoom-in shooting state reaches a preset number of times (for example, 3 times), the mobile phone can no longer trigger the subsequent operation. Enter the zoom-in state to ensure a better user experience.
可选地,本申请实施例中,手机每次启动运行拍摄应用程序后,当手机在进入放大拍状态之前,检测到用户进行了手动变焦时,手机也可以不再进入放大拍状态。例如,手机还未进入放大拍状态之前,检测到用户主动将手机摄像头的zoom倍率由默认的1X调整为了2X时,即便后续手机再连续检测到N次拍摄距离小于第三距离阈值,手机在拍摄应用程序的本次运行中,也可以不再进入放大拍状态。Optionally, in this embodiment of the present application, after each time the mobile phone starts and runs the shooting application, when the mobile phone detects that the user has performed manual zooming before entering the zoom-in state, the mobile phone may not enter the zoom-in state. For example, before the mobile phone enters the zoom-in shooting state, when it is detected that the user actively adjusts the zoom ratio of the mobile phone camera from the default 1X to 2X, even if the subsequent mobile phone continuously detects that the shooting distance is smaller than the third distance threshold for N times, the mobile phone is shooting In the current running of the application, you can no longer enter the zoom-in state.
前述实施例中,主要针对手机在接收到用户的拍摄操作之前进入放大拍状态、以及手机未进入放大拍状态之前,先接收到用户的拍摄操作的场景,分别进行了说明。其中,对于手机还未进入放大拍状态、接收到用户的拍摄操作的场景,手机在检测到拍摄距离小于摄像头的最近对焦距离时,手机会进入离远点儿拍状态,辅助用户进行后续拍摄。In the foregoing embodiments, the scenarios where the mobile phone enters the zoom-in state before receiving the user's shooting operation and the mobile phone receives the user's shooting operation before the mobile phone does not enter the zoom-in state are described respectively. Among them, for the scene where the mobile phone has not yet entered the zoomed-in shooting state and has received the user's shooting operation, when the mobile phone detects that the shooting distance is less than the closest focusing distance of the camera, the mobile phone will enter the far point shooting state to assist the user in subsequent shooting.
可选地,本申请另外一些实施例中,对于手机还未进入放大拍状态、接收到用户的拍摄操作的场景,手机在检测到拍摄距离小于摄像头的最近对焦距离时,也可以先响应于用户的拍摄操作拍摄第一照片,但不进入离远点儿拍状态。在拍摄第一照片后,手机可以在拍摄界面显示文字提示:“请再离远一点,改善画质”。文字提示:“请再离远一点,改善画质”可以用于提示用户将手机远离被拍主体。当手机检测到拍摄距离大于第四距离阈值时,手机可以自动再拍摄一张第二照片,并用第二照片替换第一照片。Optionally, in some other embodiments of the present application, for a scene where the mobile phone has not yet entered the zoomed-in shooting state and has received a shooting operation from the user, when the mobile phone detects that the shooting distance is smaller than the closest focusing distance of the camera, it can also respond to the user first. The shooting operation takes the first picture, but does not enter the remote shooting state. After taking the first photo, the mobile phone can display a text prompt on the shooting interface: "Please stay further away to improve the picture quality". Text prompt: "Please stay further away to improve the picture quality" can be used to prompt the user to move the phone away from the subject being photographed. When the mobile phone detects that the shooting distance is greater than the fourth distance threshold, the mobile phone can automatically take another second photo and replace the first photo with the second photo.
其中,第四距离阈值大于或等于摄像头的最近对焦距离。例如,摄像头的最近对焦 距离为10cm时,第四距离阈值可以为12cm。Wherein, the fourth distance threshold is greater than or equal to the closest focusing distance of the camera. For example, when the closest focusing distance of the camera is 10cm, the fourth distance threshold may be 12cm.
本实施例中,由于手机拍摄第二照片时的拍摄距离在摄像头的对焦范围内,所以第二照片比第一照片更为清晰。In this embodiment, since the shooting distance when the mobile phone takes the second photo is within the focus range of the camera, the second photo is clearer than the first photo.
可选地,由于手机拍摄第二照片时的拍摄距离大于拍摄第一照片时的拍摄距离,所以第二照片的构图范围会大于第一照片的构图范围。为保证第二照片的构图范围与第一照片一致,本实施例中,手机还可以将第一照片和第二照片一起输入人工智能(artifcial intelligence,AI)融合算法,对第一照片和第二照片的构图重叠区域进行融合,生成第三照片作为最终的拍摄照片。Optionally, since the shooting distance when the mobile phone takes the second photo is greater than the shooting distance when the first photo is taken, the composition range of the second photo will be larger than the composition range of the first photo. In order to ensure that the composition range of the second photo is consistent with the first photo, in this embodiment, the mobile phone can also input the first photo and the second photo into an artificial intelligence (artifcial intelligence, AI) fusion algorithm, and the first photo and the second photo The overlapping areas of the composition of the photos are fused to generate a third photo as the final shot.
示例性地,可以将第一照片和第二照片编码前的YUV图进行融合,以实现对第一照片和第二照片的构图重叠区域进行融合。例如,第一照片编码前的YUV图可以为YUV1,第二照片编码前的YUV图可以为YUV2,可以将YUV1和YUV2送入AI融合算法,对构图重叠区域进行融合,得到YUV3。然后,手机可以对YUV3进行编码,得到第三照片。Exemplarily, the YUV images of the first photo and the second photo before encoding may be fused, so as to realize the fusion of the overlapping regions of the compositions of the first photo and the second photo. For example, the YUV image before encoding of the first photo can be YUV1, and the YUV image before encoding of the second photo can be YUV2. YUV1 and YUV2 can be sent to the AI fusion algorithm to fuse the overlapping areas of the composition to obtain YUV3. Then, the phone can encode YUV3 to get the third photo.
AI融合算法对YUV1和YUV2进行融合的步骤可以包括:根据YUV1和YUV2各自对应的手机与被拍主体之间的拍摄距离,判断YUV2与YUV1的放大倍率差异。对YUV1和YUV2进行特征点匹配,配准YUV1在YUV2中的重叠区域。将YUV2与YUV1的重叠区域Y通道融合到YUV1中。The step of fusing YUV1 and YUV2 by the AI fusion algorithm may include: judging the difference in magnification between YUV2 and YUV1 according to the shooting distance between the mobile phone corresponding to YUV1 and YUV2 and the subject being photographed. Perform feature point matching on YUV1 and YUV2, and register the overlapping area of YUV1 in YUV2. The Y channel of the overlapping region of YUV2 and YUV1 is fused into YUV1.
可选地,本实施例中,手机可以在拍摄界面将文字“请再离远一点,改善画质”显示预设的第二时长,如:2S。当第二时长内,手机再次接收到用户的拍摄操作时,手机可以不再执行自动拍摄第二照片的流程,仅保留第一照片即可。Optionally, in this embodiment, the mobile phone may display the text "Please stay further away and improve the picture quality" on the shooting interface for a preset second duration, such as 2S. When the mobile phone receives the user's shooting operation again within the second time period, the mobile phone may no longer perform the process of automatically shooting the second photo, and only the first photo may be retained.
最后,需要说明的是,本申请前述实施例中提到的放大拍状态、离远点儿拍状态,仅为本申请实施例中为了方便阐述方案的实现定义的名词,在其他一些实施例中,也可以用其他名词进行定义,如:离远点儿拍状态可以是第一拍摄状态、放大拍状态可以是第二拍摄状态等,在此不作限制。另外,前述提到的拍摄界面中显示的文字提示:“放大拍”201、“离远点儿拍”105、以及“请再离远一点,改善画质”106等,同样均为示例性说明,在其他一些实施例中,这些文字也可以被替换为其他具有类似含义的文字,在此也不作限制。Finally, it should be noted that the zoomed-in shooting state and the distant shooting state mentioned in the foregoing embodiments of the present application are only terms defined in the embodiments of the present application for the convenience of explaining the implementation of the solution. In other embodiments, , can also be defined by other terms, such as: the far point shooting state may be the first shooting state, the zooming shooting state may be the second shooting state, etc., which are not limited here. In addition, the text prompts displayed in the above-mentioned shooting interface: "zoom in and shoot" 201, "shoot from a distance" 105, and "please stay further away and improve the image quality" 106, etc., are also exemplary descriptions. , in some other embodiments, these words can also be replaced with other words with similar meanings, which are not limited here.
本申请实施例中,“请再离远一点,改善画质”106可以称为第一提示信息。In this embodiment of the present application, "Please stay further away and improve the image quality" 106 may be referred to as the first prompt message.
对应于前述实施例中所述的拍摄方法,本申请实施例还提供一种拍摄装置,可以应用于终端设备,实现本申请实施例所述的拍摄方法。该装置的功能可以通过硬件实现,也可以通过硬件执行相应的软件实现。硬件或软件包括一个或多个与上述功能相对应的模块或单元。Corresponding to the photographing methods described in the foregoing embodiments, the embodiments of the present application further provide a photographing apparatus, which can be applied to a terminal device to implement the photographing methods described in the embodiments of the present application. The functions of the apparatus may be implemented by hardware, or by executing corresponding software by hardware. The hardware or software includes one or more modules or units corresponding to the above functions.
图18为本申请实施例提供的拍摄装置的结构示意图。如图18所示,该拍摄装置可以包括:显示模块1801和相机模块1802。FIG. 18 is a schematic structural diagram of a photographing apparatus provided by an embodiment of the present application. As shown in FIG. 18 , the photographing apparatus may include: a display module 1801 and a camera module 1802 .
其中,显示模块1801可以包括终端设备的显示器,相机模块1802可以包括终端设备的处理器、以及处理器可以调用执行的程序代码(如相机应用)。显示模块1801和相机模块1802可以实现前述实施例中所述的拍摄方法对应的功能。The display module 1801 may include a display of a terminal device, and the camera module 1802 may include a processor of the terminal device, and program code (eg, a camera application) that the processor can invoke and execute. The display module 1801 and the camera module 1802 can implement the functions corresponding to the shooting methods described in the foregoing embodiments.
相机模块1802用于在启动摄像头进行拍摄时,检测终端设备与被拍主体之间的拍摄距离;当接收到用户的拍摄操作、且拍摄距离小于摄像头的最近对焦距离时,响应于拍 摄操作拍摄第一照片,并进入第一拍摄状态。The camera module 1802 is used to detect the shooting distance between the terminal device and the subject to be photographed when the camera is activated to shoot; when receiving a shooting operation from the user and the shooting distance is less than the closest focusing distance of the camera, it will shoot the first in response to the shooting operation. a photo, and enter the first shooting state.
显示模块1801用于在相机模块1802进入第一拍摄状态后,显示第一提示信息,第一提示信息用于提示用户将终端设备远离被拍主体。The display module 1801 is used to display the first prompt information after the camera module 1802 enters the first shooting state, and the first prompt information is used to prompt the user to keep the terminal device away from the subject being photographed.
相机模块1802还用于在进入第一拍摄状态后,根据拍摄距离,按照如下方式调整摄像头的变焦倍率:The camera module 1802 is further configured to adjust the zoom ratio of the camera in the following manner according to the shooting distance after entering the first shooting state:
当拍摄距离小于或等于第一距离阈值时,将摄像头的变焦倍率维持在第一倍率;当拍摄距离大于第一距离阈值、且小于第二距离阈值时,调整摄像头的变焦倍率随着拍摄距离的增大而逐渐增大;当拍摄距离大于或等于第二距离阈值时,将摄像头的变焦倍率维持在第二倍率。其中,第一距离阈值小于摄像头的最近对焦距离,第二距离阈值大于摄像头的最近对焦距离;第一倍率是终端设备启动摄像头进行拍摄时,摄像头的默认变焦倍率;第二倍率大于第一倍率。When the shooting distance is less than or equal to the first distance threshold, the zoom magnification of the camera is maintained at the first magnification; when the shooting distance is greater than the first distance threshold and less than the second distance threshold, the zoom magnification of the camera is adjusted as the shooting distance increases. increases gradually; when the shooting distance is greater than or equal to the second distance threshold, the zoom magnification of the camera is maintained at the second magnification. The first distance threshold is smaller than the closest focusing distance of the camera, and the second distance threshold is greater than the closest focusing distance of the camera; the first magnification is the default zoom magnification of the camera when the terminal device starts the camera to shoot; the second magnification is greater than the first magnification.
当相机模块1802进入第一拍摄状态后,在调整摄像头的变焦倍率的过程中,相机模块1802还用于接收到用户的二次拍摄操作时,响应于二次拍摄操作,拍摄第二照片。After the camera module 1802 enters the first shooting state, in the process of adjusting the zoom ratio of the camera, the camera module 1802 is further configured to take a second photo in response to the second shooting operation when receiving the user's second shooting operation.
示例性地,第一拍摄状态可以称为离远点儿拍状态,第一提示信息可以是“请再离远一点,改善画质”。Exemplarily, the first photographing state may be referred to as a far-away photographing state, and the first prompt information may be "please move further away to improve image quality".
一些实施方式中,第二倍率可以小于或等于摄像头的最大变焦倍率。In some embodiments, the second magnification may be less than or equal to the maximum zoom magnification of the camera.
例如,摄像头的最大变焦倍率为2.5X时,第二倍率可以是2X、2.5X等,第二倍率的大小不作限制。For example, when the maximum zoom magnification of the camera is 2.5X, the second magnification may be 2X, 2.5X, etc., and the size of the second magnification is not limited.
可选地,上述二次拍摄操作是用户在看到终端设备显示的预览画面清晰时进行的拍摄操作。Optionally, the above-mentioned secondary photographing operation is a photographing operation performed by the user when the user sees that the preview image displayed by the terminal device is clear.
当用户看到终端设备显示的预览画面清晰时,表明终端设备与被拍主体之间的拍摄距离大于或等于摄像头的最近对焦距离。可以理解,对于用户而言,无法感知终端设备与被拍主体之间的拍摄距离是否大于或等于摄像头的最近对焦距离,因此,用户可以直观地观察预览画面是否清晰,并在预览画面清晰时进行二次拍摄操作。When the user sees that the preview screen displayed by the terminal device is clear, it indicates that the shooting distance between the terminal device and the subject to be photographed is greater than or equal to the closest focusing distance of the camera. It can be understood that for the user, it is impossible to perceive whether the shooting distance between the terminal device and the subject to be photographed is greater than or equal to the closest focusing distance of the camera. Therefore, the user can intuitively observe whether the preview image is clear, and perform the operation when the preview image is clear. Secondary shooting operation.
可选地,相机模块1802进入第一拍摄状态后,当拍摄距离大于摄像头的最近对焦距离时,显示模块1801不再显示第一提示信息。Optionally, after the camera module 1802 enters the first shooting state, when the shooting distance is greater than the closest focusing distance of the camera, the display module 1801 no longer displays the first prompt information.
可选地,相机模块1802具体用于,进入第一拍摄状态后,根据拍摄距离,以及拍摄距离和变焦倍率之间的第一对应关系,调整摄像头的变焦倍率。Optionally, the camera module 1802 is specifically configured to, after entering the first shooting state, adjust the zoom ratio of the camera according to the shooting distance and the first correspondence between the shooting distance and the zoom ratio.
第一对应关系可以是预配置在终端设备中的。The first correspondence may be preconfigured in the terminal device.
一些实施方式中,所述第一对应关系中,当拍摄距离大于第一距离阈值、且小于第二距离阈值时,变焦倍率随着拍摄距离的增大呈线性增大。In some embodiments, in the first correspondence, when the shooting distance is greater than the first distance threshold and less than the second distance threshold, the zoom magnification increases linearly with the increase of the shooting distance.
另外一些实施方式中,所述第一对应关系中,当拍摄距离大于第一距离阈值、且小于第二距离阈值时,变焦倍率随着拍摄距离的增大呈非线性增大。In other embodiments, in the first correspondence, when the shooting distance is greater than the first distance threshold and less than the second distance threshold, the zoom magnification increases nonlinearly with the increase of the shooting distance.
一些实施例中,相机模块1802还用于用第二照片替换第一照片。In some embodiments, the camera module 1802 is also used to replace the first photo with the second photo.
一种实施方式中,相机模块1802还用于,在进入第一拍摄状态后,当显示模块1801显示第一提示信息达到第一时长后,相机模块1802仍未接收到二次拍摄操作时,自动退出第一拍摄状态。In one embodiment, the camera module 1802 is further configured to, after entering the first shooting state, when the display module 1801 displays the first prompt information for the first time period, and the camera module 1802 has not received the second shooting operation, automatically Exit the first shooting state.
另一种实施方式中,相机模块1802还用于,在进入第一拍摄状态后,当连续检测到M次(M为大于0的整数,如M可以为10)拍摄距离大于上述第二距离阈值时,自动 退出第一拍摄状态。In another embodiment, the camera module 1802 is further configured to, after entering the first shooting state, when it is continuously detected M times (M is an integer greater than 0, for example, M can be 10) the shooting distance is greater than the above-mentioned second distance threshold , automatically exit the first shooting state.
又一种实施方式中,相机模块1802还用于,在进入第一拍摄状态后,响应于用户主动退出第一拍摄状态的操作或者手动变焦的操作,退出第一拍摄状态。In yet another embodiment, the camera module 1802 is further configured to, after entering the first shooting state, exit the first shooting state in response to the user's operation of actively exiting the first shooting state or an operation of manually zooming.
可选地,相机模块1802还用于,在检测到用户手动退出第一拍摄状态的次数达到预设次数(如3次)时,不再触发进入第一拍摄状态,以保证用户的体验更好。Optionally, the camera module 1802 is further configured to, when it is detected that the number of times the user manually exits the first shooting state reaches a preset number of times (such as 3 times), no longer triggers entering the first shooting state, so as to ensure a better user experience. .
可选地,相机模块1802还用于,在进入第一拍摄状态之前,检测到用户进行了手动变焦时,不再进入第一拍摄状态。Optionally, the camera module 1802 is further configured to stop entering the first shooting state when it is detected that the user performs manual zooming before entering the first shooting state.
可选地,相机模块1802还用于,在进入第一拍摄状态后,根据拍摄距离对摄像头的变焦倍率进行调整时,如果将摄像头的变焦倍率调整至第二倍率,则将摄像头的变焦倍率暂时锁定在第二倍率,以避免由于用户手抖使得终端设备与被拍主体的拍摄距离反复变化时,反复来回调整摄像头的变焦倍率。Optionally, the camera module 1802 is further configured to, after entering the first shooting state, when adjusting the zoom ratio of the camera according to the shooting distance, if the zoom ratio of the camera is adjusted to the second ratio, the zoom ratio of the camera is temporarily adjusted. It is locked at the second magnification to avoid repeatedly adjusting the zoom magnification of the camera back and forth when the shooting distance between the terminal device and the subject to be photographed changes repeatedly due to the user's hand shaking.
可选地,相机模块1802还用于,在接收到用户的拍摄操作之前,连续检测到N次拍摄距离小于第三距离阈值时,进入第二拍摄状态。N为大于0的整数;第三距离阈值大于摄像头的最近对焦距离。并且,在进入第二拍摄状态后,根据拍摄距离,按照如下方式调整摄像头的变焦倍率:Optionally, the camera module 1802 is further configured to, before receiving the user's shooting operation, enter the second shooting state when it is continuously detected that the shooting distance is smaller than the third distance threshold for N times. N is an integer greater than 0; the third distance threshold is greater than the closest focusing distance of the camera. And, after entering the second shooting state, according to the shooting distance, adjust the zoom ratio of the camera as follows:
当拍摄距离大于或等于第三距离阈值时,将摄像头的变焦倍率维持在第一倍率;当拍摄距离小于第三距离阈值、且大于摄像头的最近对焦距离时,调整摄像头的变焦倍率随着拍摄距离的减小而逐渐增大;当拍摄距离小于或等于摄像头的最近对焦距离时,将摄像头的变焦倍率维持在第二倍率。When the shooting distance is greater than or equal to the third distance threshold, the zoom magnification of the camera is maintained at the first magnification; when the shooting distance is less than the third distance threshold and greater than the closest focusing distance of the camera, the zoom magnification of the camera is adjusted with the shooting distance When the shooting distance is less than or equal to the closest focusing distance of the camera, the zoom ratio of the camera is maintained at the second ratio.
相机模块1802进入第二拍摄状态后,在调整摄像头的变焦倍率的过程中,还用于在接收到用户的拍摄操作时,响应于拍摄操作,拍摄照片。After the camera module 1802 enters the second shooting state, in the process of adjusting the zoom ratio of the camera, it is also used to take a picture in response to the shooting operation when receiving the shooting operation of the user.
示例性地,第二拍摄状态可以称为放大拍状态。Exemplarily, the second photographing state may be referred to as a zoom-in photographing state.
可选地,相机模块1802具体用于,进入第二拍摄状态后,根据拍摄距离,以及拍摄距离和变焦倍率之间的第二对应关系,调整摄像头的变焦倍率。Optionally, the camera module 1802 is specifically configured to, after entering the second shooting state, adjust the zoom ratio of the camera according to the shooting distance and the second correspondence between the shooting distance and the zoom ratio.
第二对应关系可以是预配置在终端设备中的。The second correspondence may be preconfigured in the terminal device.
一些实施方式中,所述第二对应关系中,当拍摄距离小于第三距离阈值、且大于摄像头的最近对焦距离时,变焦倍率随着拍摄距离的减小呈线性增大。In some embodiments, in the second correspondence, when the shooting distance is less than the third distance threshold and greater than the closest focusing distance of the camera, the zoom magnification increases linearly as the shooting distance decreases.
另外一些实施方式中,所述第二对应关系中,当拍摄距离小于第三距离阈值、且大于摄像头的最近对焦距离时,变焦倍率随着拍摄距离的减小呈非线性增大。In some other implementations, in the second correspondence, when the shooting distance is less than the third distance threshold and greater than the closest focusing distance of the camera, the zoom magnification increases nonlinearly as the shooting distance decreases.
第二对应关系中,当拍摄距离小于第三距离阈值、且大于摄像头的最近对焦距离时,拍摄距离与变焦倍率之间的对应关系越接近线性关系,终端设备在靠近或远离被拍主体的过程中,拍摄FOV发生跳变的可能性越低。In the second correspondence, when the shooting distance is less than the third distance threshold and greater than the closest focusing distance of the camera, the closer the correspondence between the shooting distance and the zoom magnification is to a linear relationship, the more the terminal device is in the process of approaching or moving away from the subject being photographed. , the lower the probability of shooting FOV jumps.
一种实施方式中,相机模块1802还用于,在进入第二拍摄状态后,当连续检测到M次拍摄距离大于第三距离阈值时,退出第二拍摄状态;M为大于0的整数。In one embodiment, the camera module 1802 is further configured to, after entering the second shooting state, exit the second shooting state when it is continuously detected that the shooting distance is greater than the third distance threshold for M times; M is an integer greater than 0.
另一种实施方式中,相机模块1802还用于,在进入第二拍摄状态后,响应于用户主动退出第二拍摄状态的操作或者手动变焦的操作,退出第二拍摄状态。In another embodiment, the camera module 1802 is further configured to, after entering the second shooting state, exit the second shooting state in response to the user's operation of actively exiting the second shooting state or an operation of manually zooming.
可选地,相机模块1802还用于,在检测到用户手动退出第二拍摄状态的次数达到预设次数(如3次)时,不再触发进入第二拍摄状态,以保证用户的体验更好。Optionally, the camera module 1802 is further configured to, when it is detected that the number of times the user manually exits the second shooting state reaches a preset number of times (such as 3 times), no longer triggers entering the second shooting state, so as to ensure a better user experience. .
可选地,相机模块1802还用于,在进入第二拍摄状态之前,检测到用户进行了手动 变焦时,不再进入第二拍摄状态。Optionally, the camera module 1802 is further configured to, before entering the second shooting state, no longer enter the second shooting state when it is detected that the user has performed manual zooming.
可以理解的,通过该拍摄装置,可以实现前述实施例所述的拍摄方法对应的全部功能,在此不再一一赘述。It can be understood that all the functions corresponding to the shooting methods described in the foregoing embodiments can be realized by the shooting device, which will not be repeated here.
应理解以上装置中单元(或称为模块)的划分仅仅是一种逻辑功能的划分,实际实现时可以全部或部分集成到一个物理实体上,也可以物理上分开。且装置中的单元可以全部以软件通过处理元件调用的形式实现;也可以全部以硬件的形式实现;还可以部分单元以软件通过处理元件调用的形式实现,部分单元以硬件的形式实现。It should be understood that the division of units (or referred to as modules) in the above apparatus is only a division of logical functions, and in actual implementation, it may be fully or partially integrated into a physical entity, or may be physically separated. And all the units in the device can be realized in the form of software calling through the processing element; also can all be realized in the form of hardware; some units can also be realized in the form of software calling through the processing element, and some units can be realized in the form of hardware.
例如,各个单元可以为单独设立的处理元件,也可以集成在装置的某一个芯片中实现,此外,也可以以程序的形式存储于存储器中,由装置的某一个处理元件调用并执行该单元的功能。此外这些单元全部或部分可以集成在一起,也可以独立实现。这里所述的处理元件又可以称为处理器,可以是一种具有信号的处理能力的集成电路。在实现过程中,上述方法的各步骤或以上各个单元可以通过处理器元件中的硬件的集成逻辑电路实现或者以软件通过处理元件调用的形式实现。For example, each unit can be a separately established processing element, or can be integrated in a certain chip of the device to be implemented, and can also be stored in the memory in the form of a program, which can be called by a certain processing element of the device and execute the unit's processing. Function. In addition, all or part of these units can be integrated together, and can also be implemented independently. The processing element described here may also be called a processor, which may be an integrated circuit with signal processing capability. In the implementation process, each step of the above method or each of the above units may be implemented by an integrated logic circuit of hardware in the processor element or implemented in the form of software being invoked by the processing element.
在一个例子中,以上装置中的单元可以是被配置成实施以上方法的一个或多个集成电路,例如:一个或多个专用集成电路(application specific integrated circuit,ASIC),或,一个或多个数字信号处理器(digital signal process,DSP),或,一个或者多个现场可编辑逻辑门阵列(field programmable gate array,FPGA),或这些集成电路形式中至少两种的组合。In one example, the units in the above apparatus may be one or more integrated circuits configured to implement the above method, eg, one or more application specific integrated circuits (ASICs), or, one or more A digital signal processor (DSP), or, one or more field programmable gate arrays (FPGA), or a combination of at least two of these integrated circuit forms.
再如,当装置中的单元可以通过处理元件调度程序的形式实现时,该处理元件可以是通用处理器,例如中央处理器(central processing unit,CPU)或其它可以调用程序的处理器。再如,这些单元可以集成在一起,以片上系统(system-on-a-chip,SOC)的形式实现。For another example, when a unit in the apparatus can be implemented in the form of a processing element scheduler, the processing element can be a general-purpose processor, such as a central processing unit (central processing unit, CPU) or other processors that can invoke programs. For another example, these units can be integrated together and implemented in the form of a system-on-a-chip (SOC).
在一种实现中,以上装置实现以上方法中各个对应步骤的单元可以通过处理元件调度程序的形式实现。例如,该装置可以包括处理元件和存储元件,处理元件调用存储元件存储的程序,以执行以上方法实施例所述的方法。存储元件可以为与处理元件处于同一芯片上的存储元件,即片内存储元件。In one implementation, the unit of the above apparatus for implementing each corresponding step in the above method may be implemented in the form of a processing element scheduler. For example, the apparatus may include a processing element and a storage element, and the processing element invokes a program stored in the storage element to execute the method described in the above method embodiments. The storage element may be a storage element on the same chip as the processing element, ie, an on-chip storage element.
在另一种实现中,用于执行以上方法的程序可以在与处理元件处于不同芯片上的存储元件,即片外存储元件。此时,处理元件从片外存储元件调用或加载程序于片内存储元件上,以调用并执行以上方法实施例所述的方法。In another implementation, the program for performing the above method may be in a storage element on a different chip from the processing element, ie, an off-chip storage element. At this time, the processing element calls or loads the program from the off-chip storage element to the on-chip storage element, so as to call and execute the methods described in the above method embodiments.
例如,本申请实施例还可以提供一种终端设备,可以包括:处理器,存储器,以及计算机程序;其中,计算机程序存储在存储器上,当计算机程序被处理器执行时,使得终端设备执行如前述实施例中所述的拍摄方法。该存储器可以位于该终端设备之内,也可以位于该终端设备之外。且该处理器包括一个或多个。For example, an embodiment of the present application may further provide a terminal device, which may include: a processor, a memory, and a computer program; wherein, the computer program is stored in the memory, and when the computer program is executed by the processor, the terminal device executes as described above. Shooting method described in the embodiment. The memory may be located within the terminal device or outside the terminal device. And the processor includes one or more.
示例性地,终端设备可以是手机、平板电脑、可穿戴设备、车载设备、增强现实(augmented reality,AR)/虚拟现实(virtual reality,VR)设备、笔记本电脑、超级移动个人计算机(ultra-mobile personal computer,UMPC)、上网本、个人数字助理(personal digital assistant,PDA)等移动终端。或者,终端设备也可以是数码相机、单反相机/微单相机、运动摄像机、云台相机、无人机等专业的拍摄设备。Exemplarily, the terminal device may be a mobile phone, a tablet computer, a wearable device, an in-vehicle device, an augmented reality (AR)/virtual reality (VR) device, a notebook computer, an ultra-mobile personal computer (ultra-mobile) personal computer, UMPC), netbook, personal digital assistant (personal digital assistant, PDA) and other mobile terminals. Alternatively, the terminal device may also be a professional shooting device such as a digital camera, a single-lens reflex camera/mirror-single camera, an action camera, a PTZ camera, and a drone.
在又一种实现中,该装置实现以上方法中各个步骤的单元可以是被配置成一个或多 个处理元件,这里的处理元件可以为集成电路,例如:一个或多个ASIC,或,一个或多个DSP,或,一个或者多个FPGA,或者这些类集成电路的组合。这些集成电路可以集成在一起,构成芯片。In yet another implementation, the unit of the apparatus implementing each step in the above method may be configured as one or more processing elements, where the processing elements may be integrated circuits, such as: one or more ASICs, or, one or more Multiple DSPs, or, one or more FPGAs, or a combination of these types of integrated circuits. These integrated circuits can be integrated together to form chips.
例如,本申请实施例还提供一种芯片,该芯片可以应用于上述终端设备。芯片包括一个或多个接口电路和一个或多个处理器;接口电路和处理器通过线路互联;处理器通过接口电路从电子设备的存储器接收并执行计算机指令,以实现如前述实施例所述的拍摄方法。For example, an embodiment of the present application further provides a chip, which can be applied to the above-mentioned terminal device. The chip includes one or more interface circuits and one or more processors; the interface circuit and the processor are interconnected by lines; the processor receives and executes computer instructions from the memory of the electronic device through the interface circuit, so as to realize the above-mentioned embodiments. Shooting method.
本申请实施例还提供一种计算机程序产品,包括计算机可读代码,当计算机可读代码在的终端设备中运行时,使得终端设备实现如前述实施例所述的拍摄方法。Embodiments of the present application further provide a computer program product, including computer-readable codes, when the computer-readable codes are executed in a terminal device, the terminal device can implement the shooting methods described in the foregoing embodiments.
通过以上的实施方式的描述,所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将装置的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。From the description of the above embodiments, those skilled in the art can clearly understand that for the convenience and brevity of the description, only the division of the above functional modules is used as an example for illustration. In practical applications, the above functions can be allocated as required. It is completed by different functional modules, that is, the internal structure of the device is divided into different functional modules, so as to complete all or part of the functions described above.
在本申请所提供的几个实施例中,应该理解到,所揭露的装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述模块或单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个装置,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided in this application, it should be understood that the disclosed apparatus and method may be implemented in other manners. For example, the device embodiments described above are only illustrative. For example, the division of the modules or units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components may be Incorporation may either be integrated into another device, or some features may be omitted, or not implemented. On the other hand, the shown or discussed mutual coupling or direct coupling or communication connection may be through some interfaces, indirect coupling or communication connection of devices or units, and may be in electrical, mechanical or other forms.
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是一个物理单元或多个物理单元,即可以位于一个地方,或者也可以分布到多个不同地方。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described as separate components may or may not be physically separated, and the components shown as units may be one physical unit or multiple physical units, that is, they may be located in one place, or may be distributed to multiple different places . Some or all of the units may be selected according to actual needs to achieve the purpose of the solution in this embodiment.
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit. The above-mentioned integrated units may be implemented in the form of hardware, or may be implemented in the form of software functional units.
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个可读取存储介质中。If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it may be stored in a readable storage medium.
基于这样的理解,本申请实施例的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,如:程序。该软件产品存储在一个程序产品,如计算机可读存储介质中,包括若干指令用以使得一个设备(可以是单片机,芯片等)或处理器(processor)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、ROM、RAM、磁碟或者光盘等各种可以存储程序代码的介质。Based on this understanding, the technical solutions of the embodiments of the present application essentially or contribute to the prior art, or all or part of the technical solutions may be embodied in the form of software products, such as programs. The software product is stored in a program product, such as a computer-readable storage medium, and includes several instructions to cause a device (which may be a single-chip microcomputer, a chip, etc.) or a processor (processor) to execute all of the methods described in the various embodiments of the present application. or part of the steps. The aforementioned storage medium includes: a U disk, a removable hard disk, a ROM, a RAM, a magnetic disk, or an optical disk and other mediums that can store program codes.
例如,本申请实施例还可以提供一种计算机可读存储介质,其上存储有计算机程序指令。当计算机程序指令被电子设备执行时,使得电子设备实现如前述实施例所述的拍摄方法。For example, the embodiments of the present application may further provide a computer-readable storage medium on which computer program instructions are stored. When the computer program instructions are executed by the electronic device, the electronic device is made to implement the photographing method described in the foregoing embodiments.
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何在本申请揭露的技术范围内的变化或替换,都应涵盖在本申请的保护范围之内。因此, 本申请的保护范围应以所述权利要求的保护范围为准。The above are only specific embodiments of the present application, but the protection scope of the present application is not limited to this, and any changes or substitutions within the technical scope disclosed in the present application should be covered within the protection scope of the present application. . Therefore, the protection scope of the present application should be subject to the protection scope of the claims.

Claims (14)

  1. 一种拍摄方法,其特征在于,所述方法包括:A shooting method, characterized in that the method comprises:
    终端设备在启动摄像头进行拍摄时,检测终端设备与被拍主体之间的拍摄距离;When the terminal device starts the camera to shoot, it detects the shooting distance between the terminal device and the subject to be photographed;
    当所述终端设备接收到用户的拍摄操作、且所述拍摄距离小于所述摄像头的最近对焦距离时,所述终端设备响应于所述拍摄操作拍摄第一照片,并进入第一拍摄状态;When the terminal device receives the user's shooting operation and the shooting distance is less than the closest focusing distance of the camera, the terminal device shoots a first photo in response to the shooting operation, and enters a first shooting state;
    所述终端设备进入所述第一拍摄状态后,显示第一提示信息,所述第一提示信息用于提示用户将所述终端设备远离所述被拍主体;并且,根据所述拍摄距离,按照如下方式调整所述摄像头的变焦倍率:After the terminal device enters the first shooting state, first prompt information is displayed, and the first prompt information is used to prompt the user to keep the terminal device away from the subject to be photographed; and, according to the shooting distance, according to Adjust the zoom ratio of the camera as follows:
    当所述拍摄距离小于或等于第一距离阈值时,所述终端设备将所述摄像头的变焦倍率维持在第一倍率;当所述拍摄距离大于所述第一距离阈值、且小于第二距离阈值时,所述终端设备调整所述摄像头的变焦倍率随着所述拍摄距离的增大而逐渐增大;当所述拍摄距离大于或等于所述第二距离阈值时,所述终端设备将所述摄像头的变焦倍率维持在第二倍率;When the shooting distance is less than or equal to the first distance threshold, the terminal device maintains the zoom magnification of the camera at the first magnification; when the shooting distance is greater than the first distance threshold and less than the second distance threshold , the terminal device adjusts the zoom magnification of the camera to gradually increase as the shooting distance increases; when the shooting distance is greater than or equal to the second distance threshold, the terminal device adjusts the The zoom magnification of the camera is maintained at the second magnification;
    其中,所述第一距离阈值小于所述摄像头的最近对焦距离,所述第二距离阈值大于所述摄像头的最近对焦距离;所述第一倍率是所述终端设备启动所述摄像头进行拍摄时,所述摄像头的默认变焦倍率;所述第二倍率大于所述第一倍率;Wherein, the first distance threshold is smaller than the closest focusing distance of the camera, and the second distance threshold is greater than the closest focusing distance of the camera; the first magnification is when the terminal device starts the camera to shoot, the default zoom magnification of the camera; the second magnification is greater than the first magnification;
    当所述终端设备进入所述第一拍摄状态后,在调整所述摄像头的变焦倍率的过程中,接收到用户的二次拍摄操作时,所述终端设备响应于所述二次拍摄操作,拍摄第二照片。After the terminal device enters the first shooting state, in the process of adjusting the zoom ratio of the camera, when receiving a second shooting operation from the user, the terminal device responds to the second shooting operation and shoots Second photo.
  2. 根据权利要求1所述的方法,其特征在于,所述第二倍率小于或等于所述摄像头的最大变焦倍率。The method according to claim 1, wherein the second magnification is less than or equal to the maximum zoom magnification of the camera.
  3. 根据权利要求1或2所述的方法,其特征在于,所述二次拍摄操作是用户在看到所述终端设备显示的预览画面清晰时进行的拍摄操作。The method according to claim 1 or 2, wherein the secondary photographing operation is a photographing operation performed by the user when the user sees that the preview image displayed by the terminal device is clear.
  4. 根据权利要求1或2所述的方法,其特征在于,所述方法还包括:The method according to claim 1 or 2, wherein the method further comprises:
    所述终端设备进入所述第一拍摄状态后,当所述拍摄距离大于所述摄像头的最近对焦距离时,所述终端设备不再显示所述第一提示信息。After the terminal device enters the first shooting state, when the shooting distance is greater than the closest focusing distance of the camera, the terminal device no longer displays the first prompt information.
  5. 根据权利要求1-4任一项所述的方法,其特征在于,所述终端设备进入所述第一拍摄状态后,根据所述拍摄距离调整所述摄像头的变焦倍率的步骤,包括:The method according to any one of claims 1-4, wherein after the terminal device enters the first shooting state, the step of adjusting the zoom ratio of the camera according to the shooting distance includes:
    所述终端设备根据所述拍摄距离,以及拍摄距离和变焦倍率之间的第一对应关系,调整所述摄像头的变焦倍率;The terminal device adjusts the zoom ratio of the camera according to the shooting distance and the first correspondence between the shooting distance and the zoom ratio;
    所述第一对应关系中,当拍摄距离大于所述第一距离阈值、且小于所述第二距离阈值时,变焦倍率随着拍摄距离的增大呈线性增大,或者呈非线性增大。In the first correspondence, when the shooting distance is greater than the first distance threshold and less than the second distance threshold, the zoom magnification increases linearly or non-linearly as the shooting distance increases.
  6. 根据权利要求1-5任一项所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 1-5, wherein the method further comprises:
    所述终端设备用所述第二照片替换所述第一照片。The terminal device replaces the first photo with the second photo.
  7. 根据权利要求1-6任一项所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 1-6, wherein the method further comprises:
    所述终端设备进入所述第一拍摄状态后,当显示所述第一提示信息达到第一时长后,仍未接收到所述二次拍摄操作时,所述终端设备退出所述第一拍摄状态。After the terminal device enters the first shooting state, the terminal device exits the first shooting state when the second shooting operation is not received after displaying the first prompt information for a first duration .
  8. 根据权利要求1-7任一项所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 1-7, wherein the method further comprises:
    所述终端设备进入所述第一拍摄状态后,响应于用户主动退出所述第一拍摄状态的操作或者手动变焦的操作,退出所述第一拍摄状态。After the terminal device enters the first shooting state, the terminal device exits the first shooting state in response to the user's operation of actively exiting the first shooting state or an operation of manually zooming.
  9. 根据权利要求1-8任一项所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 1-8, wherein the method further comprises:
    当所述终端设备在接收到用户的拍摄操作之前,连续检测到N次所述拍摄距离小于第三距离阈值时,所述终端设备进入第二拍摄状态;N为大于0的整数;所述第三距离阈值大于所述摄像头的最近对焦距离;When the terminal device continuously detects that the shooting distance is smaller than the third distance threshold for N times before receiving the shooting operation from the user, the terminal device enters the second shooting state; N is an integer greater than 0; The three distance thresholds are greater than the closest focusing distance of the camera;
    所述终端设备进入所述第二拍摄状态后,根据所述拍摄距离,按照如下方式调整所述摄像头的变焦倍率:After the terminal device enters the second shooting state, according to the shooting distance, the zoom ratio of the camera is adjusted as follows:
    当所述拍摄距离大于或等于所述第三距离阈值时,所述终端设备将所述摄像头的变焦倍率维持在所述第一倍率;当所述拍摄距离小于所述第三距离阈值、且大于所述摄像头的最近对焦距离时,所述终端设备调整所述摄像头的变焦倍率随着所述拍摄距离的减小而逐渐增大;当所述拍摄距离小于或等于所述摄像头的最近对焦距离时,所述终端设备将所述摄像头的变焦倍率维持在所述第二倍率;When the shooting distance is greater than or equal to the third distance threshold, the terminal device maintains the zoom magnification of the camera at the first magnification; when the shooting distance is less than the third distance threshold and greater than When the closest focusing distance of the camera, the terminal device adjusts the zoom magnification of the camera to gradually increase as the shooting distance decreases; when the shooting distance is less than or equal to the closest focusing distance of the camera , the terminal device maintains the zoom magnification of the camera at the second magnification;
    当所述终端设备进入所述第二拍摄状态后,在调整所述摄像头的变焦倍率的过程中,接收到用户的拍摄操作时,所述终端设备响应于所述拍摄操作,拍摄照片。After the terminal device enters the second shooting state, in the process of adjusting the zoom ratio of the camera, when receiving a shooting operation from the user, the terminal device takes a photo in response to the shooting operation.
  10. 根据权利要求9所述的方法,其特征在于,所述终端设备进入所述第二拍摄状态后,根据所述拍摄距离调整所述摄像头的变焦倍率的步骤,包括:The method according to claim 9, wherein after the terminal device enters the second shooting state, the step of adjusting the zoom ratio of the camera according to the shooting distance comprises:
    所述终端设备根据所述拍摄距离,以及拍摄距离和变焦倍率之间的第二对应关系,调整所述摄像头的变焦倍率;The terminal device adjusts the zoom ratio of the camera according to the shooting distance and the second correspondence between the shooting distance and the zoom ratio;
    所述第二对应关系中,当拍摄距离小于所述第三距离阈值、且大于所述摄像头的最近对焦距离时,变焦倍率随着拍摄距离的减小呈线性增大,或者呈非线性增大。In the second correspondence, when the shooting distance is less than the third distance threshold and greater than the closest focusing distance of the camera, the zoom magnification increases linearly or non-linearly as the shooting distance decreases. .
  11. 根据权利要求9或10所述的方法,其特征在于,所述方法还包括:The method according to claim 9 or 10, wherein the method further comprises:
    所述终端设备进入所述第二拍摄状态后,当连续检测到M次所述拍摄距离大于所述第三距离阈值时,所述终端设备退出所述第二拍摄状态;M为大于0的整数。After the terminal device enters the second shooting state, when it is continuously detected that the shooting distance is greater than the third distance threshold for M times, the terminal device exits the second shooting state; M is an integer greater than 0 .
  12. 根据权利要求9-11任一项所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 9-11, wherein the method further comprises:
    所述终端设备进入所述第二拍摄状态后,响应于用户主动退出所述第二拍摄状态的操作或者手动变焦的操作,退出所述第二拍摄状态。After the terminal device enters the second shooting state, the terminal device exits the second shooting state in response to the user's operation of actively exiting the second shooting state or an operation of manually zooming.
  13. 一种终端设备,其特征在于,包括:处理器,存储器,以及计算机程序;A terminal device, comprising: a processor, a memory, and a computer program;
    其中,所述计算机程序存储在所述存储器上,当所述计算机程序被所述处理器执行时,使得所述终端设备执行如权利要求1-12任一项所述的方法。Wherein, the computer program is stored on the memory, and when the computer program is executed by the processor, the terminal device is made to execute the method according to any one of claims 1-12.
  14. 一种计算机可读存储介质,所述计算机可读存储介质包括计算机程序,其特征在于,当所述计算机程序在终端设备上运行时,使得所述终端设备执行如权利要求1-12任一项所述的方法。A computer-readable storage medium, the computer-readable storage medium comprising a computer program, characterized in that, when the computer program is run on a terminal device, the terminal device is made to execute any one of claims 1-12 the method described.
PCT/CN2022/083207 2021-03-30 2022-03-25 Photographing method, terminal device and computer-readable storage medium WO2022206629A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110342589.3A CN115150540B (en) 2021-03-30 2021-03-30 Shooting method, terminal device and computer readable storage medium
CN202110342589.3 2021-03-30

Publications (1)

Publication Number Publication Date
WO2022206629A1 true WO2022206629A1 (en) 2022-10-06

Family

ID=83403262

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/083207 WO2022206629A1 (en) 2021-03-30 2022-03-25 Photographing method, terminal device and computer-readable storage medium

Country Status (2)

Country Link
CN (1) CN115150540B (en)
WO (1) WO2022206629A1 (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5291233A (en) * 1989-01-30 1994-03-01 Minolta Camera Kabushiki Kaisha Camera having an auto zoom function
US5892543A (en) * 1995-06-05 1999-04-06 United Parcel Service Of America, Inc. Imaging system including an auto zoom controller
CN107408008A (en) * 2015-12-30 2017-11-28 深圳市大疆灵眸科技有限公司 Zoom control method, system, device and memory, aircraft
CN107529011A (en) * 2017-08-23 2017-12-29 珠海安联锐视科技股份有限公司 A kind of motorized zoom lenses control system and method
CN110248081A (en) * 2018-10-12 2019-09-17 华为技术有限公司 Image capture method and electronic equipment

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005292443A (en) * 2004-03-31 2005-10-20 Nec Saitama Ltd Close-photographing controller for camera
JP2014138290A (en) * 2013-01-17 2014-07-28 Sharp Corp Imaging device and imaging method
CN106773103B (en) * 2016-11-25 2019-06-21 中国航空工业集团公司洛阳电光设备研究所 A kind of zoom lens focal plane position fast determination method
CN112351197B (en) * 2020-09-25 2022-10-21 南京酷派软件技术有限公司 Shooting parameter adjusting method and device, storage medium and electronic equipment

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5291233A (en) * 1989-01-30 1994-03-01 Minolta Camera Kabushiki Kaisha Camera having an auto zoom function
US5892543A (en) * 1995-06-05 1999-04-06 United Parcel Service Of America, Inc. Imaging system including an auto zoom controller
CN107408008A (en) * 2015-12-30 2017-11-28 深圳市大疆灵眸科技有限公司 Zoom control method, system, device and memory, aircraft
CN107529011A (en) * 2017-08-23 2017-12-29 珠海安联锐视科技股份有限公司 A kind of motorized zoom lenses control system and method
CN110248081A (en) * 2018-10-12 2019-09-17 华为技术有限公司 Image capture method and electronic equipment

Also Published As

Publication number Publication date
CN115150540A (en) 2022-10-04
CN115150540B (en) 2023-10-24

Similar Documents

Publication Publication Date Title
WO2022262260A1 (en) Photographing method and electronic device
EP3326360B1 (en) Image capturing apparatus and method of operating the same
WO2022262344A1 (en) Photographing method and electronic device
JP7178402B2 (en) Image processing method, device, apparatus and medium based on multiple imaging modules
WO2022062318A1 (en) Photographing method and device
US8648960B2 (en) Digital photographing apparatus and control method thereof
US20230328356A1 (en) Photographing Method and Device
WO2021219141A1 (en) Photographing method, graphic user interface, and electronic device
US20080122951A1 (en) Image capturing apparatus, control method therefor, program, and storage medium
WO2022252780A1 (en) Photographing method and electronic device
WO2015180683A1 (en) Mobile terminal, method and device for setting image pickup parameters, and computer storage medium
WO2024087804A1 (en) Camera switching method and electronic device
US9001254B2 (en) Digital photographing apparatus and method of controlling the same
CN117177062A (en) Camera switching method and electronic equipment
US20120050601A1 (en) Method of controlling digital photographing apparatus and digital photographing apparatus
US9635247B2 (en) Method of displaying a photographing mode by using lens characteristics, computer-readable storage medium of recording the method and an electronic apparatus
WO2023142830A1 (en) Camera switching method, and electronic device
WO2022206629A1 (en) Photographing method, terminal device and computer-readable storage medium
WO2022095878A1 (en) Photographing method and apparatus, and electronic device and readable storage medium
US11212458B2 (en) Display control apparatus, display control method, and storage medium
CN117278839A (en) Shooting method, electronic equipment and storage medium
WO2023273836A1 (en) Photographing method, apparatus, and device, and storage medium
WO2022105928A1 (en) Image capturing method and electronic device
US11553135B2 (en) Display control apparatus including an eye approach detector and a sightline detector and a control method for starting image display
CN115314606A (en) Image pickup apparatus

Legal Events

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

Ref document number: 22778811

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

Country of ref document: EP

Kind code of ref document: A1