WO2023160179A1 - Magnification switching method and magnification switching apparatus - Google Patents

Magnification switching method and magnification switching apparatus Download PDF

Info

Publication number
WO2023160179A1
WO2023160179A1 PCT/CN2022/140486 CN2022140486W WO2023160179A1 WO 2023160179 A1 WO2023160179 A1 WO 2023160179A1 CN 2022140486 W CN2022140486 W CN 2022140486W WO 2023160179 A1 WO2023160179 A1 WO 2023160179A1
Authority
WO
WIPO (PCT)
Prior art keywords
magnification
camera
terminal device
preview image
magnifications
Prior art date
Application number
PCT/CN2022/140486
Other languages
French (fr)
Chinese (zh)
Other versions
WO2023160179A9 (en
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 WO2023160179A1 publication Critical patent/WO2023160179A1/en
Publication of WO2023160179A9 publication Critical patent/WO2023160179A9/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72403User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality
    • H04M1/7243User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality with interactive means for internal management of messages
    • H04M1/72439User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality with interactive means for internal management of messages for image or video messaging
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/63Control of cameras or camera modules by using electronic viewfinders
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/67Focus control based on electronic image sensor signals
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Business, Economics & Management (AREA)
  • General Business, Economics & Management (AREA)
  • Human Computer Interaction (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Telephone Function (AREA)

Abstract

Provided in the present application are a magnification switching method and a magnification switching apparatus, which are conducive to realizing smooth transition of a preview image during a click-switching operation for a magnification, thereby improving the zooming effect of a terminal device. The method comprises: displaying a first preview image under a first magnification that is acquired by a camera; in response to a selection operation of a user for a second magnification, displaying L frames of preview images corresponding to L transition magnifications, wherein the L transition magnifications comprise L magnifications between the first magnification and the second magnification, L ≥ 1 and being an integer; and displaying a second preview image under the second magnification that is acquired by the camera.

Description

倍率切换方法和倍率切换装置Magnification switching method and magnification switching device
本申请要求于2022年02月24日提交中国专利局、申请号为202210178265.5、申请名称为“倍率切换方法和倍率切换装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese patent application with the application number 202210178265.5 and the application name "magnification switching method and magnification switching device" submitted to the China Patent Office on February 24, 2022, the entire content of which is incorporated in this application by reference .
技术领域technical field
本申请涉及终端领域,更具体地,涉及一种倍率切换方法和倍率切换装置。The present application relates to the field of terminals, and more specifically, to a magnification switching method and a magnification switching device.
背景技术Background technique
随着终端技术的不断发展,用户可以通过终端设备(例如,手机)实现越来越多的拍照功能,例如,相机通过倍率切换实现变焦功能。With the continuous development of terminal technology, users can realize more and more camera functions through terminal devices (for example, mobile phones). For example, a camera realizes a zoom function through magnification switching.
例如,用户开始通过摄像头在第一倍率(例如,1x)下进行预览拍摄,如果用户想要通过终端设备拍摄远处的物体,那么用户可以通过点击第二倍率(例如,5x)的倍率图标以进行倍率切换,切换后在第二倍率下进行预览拍摄。For example, the user starts to preview shooting at the first magnification (for example, 1x) through the camera, and if the user wants to take pictures of distant objects through the terminal device, then the user can click the magnification icon of the second magnification (for example, 5x) to Perform magnification switching, and preview shooting at the second magnification after switching.
然而,由于倍率的点击切换操作发生后,摄像头的视角(field of view,FOV)是直接从第一倍率跳转到第二倍率,用户会看到第一倍率下的预览图像直接跳变到第二倍率下的预览图像,这样会存在预览图像过渡生硬的问题,使得终端设备的变焦效果较差,降低了用户的使用体验。However, after the magnification switching operation occurs, the field of view (FOV) of the camera jumps directly from the first magnification to the second magnification, and the user will see that the preview image at the first magnification directly jumps to the second magnification. The preview image under the double magnification will have the problem that the transition of the preview image is blunt, which makes the zoom effect of the terminal device poor and reduces the user experience.
发明内容Contents of the invention
本申请提供一种倍率切换方法和倍率切换装置,有利于在倍率的点击切换操作下实现预览图像的平滑过渡,改善终端设备的变焦效果。The present application provides a magnification switching method and a magnification switching device, which are beneficial to realize a smooth transition of a preview image under a click switching operation of a magnification, and improve the zoom effect of a terminal device.
第一方面,提供了一种倍率切换方法,应用于部署有摄像头的终端设备,该方法包括:显示摄像头获取到的第一倍率下的第一预览图像。响应于用户对第二倍率的选择操作,显示对应于L个过渡倍率的L帧预览图像,L个过渡倍率包括处于第一倍率和第二倍率之间的L个倍率,L≥1且为整数。显示摄像头获取到的第二倍率下的第二预览图像。In a first aspect, a magnification switching method is provided, which is applied to a terminal device equipped with a camera, and the method includes: displaying a first preview image obtained by the camera at a first magnification. In response to the user's selection operation on the second magnification, L frames of preview images corresponding to L transition magnifications are displayed, and the L transition magnifications include L magnifications between the first magnification and the second magnification, and L≥1 and is an integer . Displaying the second preview image acquired by the camera under the second magnification.
在本申请中,在用户对第二倍率的选择操作之前,终端设备可以通过在第一倍率下获得第一预览图像。在用户对第二倍率的选择操作发生之后,终端设备可以在显示第二预览图像之前根据L个过渡倍率显示L帧预览图像,这样,在第一预览图像切换至第二预览图像之前增加了L帧用于过渡的预览图像,可以使得终端设备显示的预览图像平滑过渡,有利于改善终端设备的变焦效果,提高用户的使用体验。In this application, before the user selects the second magnification, the terminal device may obtain the first preview image at the first magnification. After the user selects the second magnification, the terminal device can display L frames of preview images according to L transitional magnifications before displaying the second preview image. In this way, before switching from the first preview image to the second preview image, L The frame is used for the transition preview image, which can make the preview image displayed on the terminal device transition smoothly, which is beneficial to improving the zoom effect of the terminal device and improving the user experience.
结合第一方面,在第一方面的某些实现方式中,在响应于用户对第二倍率的选择操作,显示对应于L个过渡倍率的L帧预览图像之前,该方法还包括:基于第一倍率和第二倍率,确定L个过渡倍率。With reference to the first aspect, in some implementations of the first aspect, before displaying L frames of preview images corresponding to L transitional magnifications in response to the user's selection operation on the second magnification, the method further includes: based on the first The magnification and the second magnification determine L transitional magnifications.
结合第一方面,在第一方面的某些实现方式中,基于第一倍率、第二倍率,确定L个过渡倍率,包括:基于第一倍率、第二倍率、第一倍率与第二倍率之间的切换时 长,以及相邻帧之间的时间间隔,确定L个过渡倍率。In combination with the first aspect, in some implementations of the first aspect, determining L transition magnifications based on the first magnification and the second magnification includes: The switching duration between frames and the time interval between adjacent frames determine L transition magnifications.
在本申请中,终端设备可以基于第一倍率与第二倍率之间的切换时长,以及相邻帧之间的时间间隔来确定L个过渡倍率,这样有利于在切换时长内完成从第一倍率至第二倍率的平滑过渡。In this application, the terminal device can determine L transitional magnifications based on the switching duration between the first magnification and the second magnification, and the time interval between adjacent frames, which is conducive to completing the transition from the first magnification within the switching duration. Smooth transition to second magnification.
结合第一方面,在第一方面的某些实现方式中,基于第一倍率、第二倍率,确定L个过渡倍率,包括:基于所述第一倍率、所述第二倍率和预设的预览图像帧数,确定所述L个过渡倍率。With reference to the first aspect, in some implementations of the first aspect, determining L transitional magnifications based on the first magnification and the second magnification includes: based on the first magnification, the second magnification, and a preset preview The number of image frames determines the L transition magnifications.
结合第一方面,在第一方面的某些实现方式中,终端设备的摄像头包括第一摄像头和第二摄像头,所述第一预览图像来自所述第一摄像头,所述第二预览图像来自所述第二摄像头。该方法还包括:开启第二摄像头。通过第一摄像头和第二摄像头获取图像,其中,第一摄像头和第二摄像头在同一时间节点获取到的图像是基于相同的过渡倍率拍摄到的。当来自第二摄像头的第M帧图像的质量与来自第一摄像头的第N帧图像的质量的差距小于或者等于预设阈值时,关闭第一摄像头,且在关闭第一摄像头之前显示的预览图像来自第一摄像头。其中,来自第一摄像头的第N帧图像是与来自第二摄像头的第M帧图像在同一时间点、基于相同的倍率拍摄得到的,N≥M≥1,N、M为整数。With reference to the first aspect, in some implementation manners of the first aspect, the camera of the terminal device includes a first camera and a second camera, the first preview image is from the first camera, and the second preview image is from the the second camera. The method also includes: turning on the second camera. The images are acquired by the first camera and the second camera, wherein the images acquired by the first camera and the second camera at the same time node are captured based on the same transition magnification. When the difference between the quality of the Mth frame image from the second camera and the quality of the Nth frame image from the first camera is less than or equal to the preset threshold, the first camera is turned off, and the preview image displayed before the first camera is turned off from the first camera. Wherein, the Nth frame of image from the first camera is taken at the same time point and based on the same magnification as the Mth frame of image from the second camera, N≥M≥1, and N and M are integers.
示例性地,第二摄像头可以和第一摄像头在同一时间点基于第一倍率获取图像,但是终端设备显示来自第一摄像头的第一预览图像,终端设备可以在第二摄像头基于第一倍率获取图像之前开启第二摄像头,这种情况下,M=N。For example, the second camera and the first camera can acquire images based on the first magnification at the same time point, but the terminal device displays the first preview image from the first camera, and the terminal device can acquire images based on the first magnification by the second camera The second camera was turned on before, in this case, M=N.
示例性地,终端设备可以通过第一摄像头基于第一倍率获取图像,并显示来自第一摄像头的第一预览图像。在这之后,终端设备可以开启第二摄像头,通过第一摄像头和第二摄像头在同一时间点基于相同的过渡倍率获取图像,并显示来自第一摄像头的预览图像,直至来自第二摄像头的第M帧图像的质量与来自第一摄像头的第N帧图像的质量的差距小于或者等于预设阈值,关闭第一摄像头,这种情况下,M≠N。Exemplarily, the terminal device may use the first camera to acquire an image based on the first magnification, and display the first preview image from the first camera. After that, the terminal device can turn on the second camera, acquire images at the same time point based on the same transition magnification through the first camera and the second camera, and display the preview image from the first camera until the Mth image from the second camera The difference between the quality of the frame image and the quality of the Nth frame image from the first camera is less than or equal to a preset threshold, and the first camera is turned off. In this case, M≠N.
在本申请中,终端设备可以通过第一摄像头和第二摄像头两路出图,在合适的时机关闭第一摄像头,从开启第二摄像头到关闭第一摄像头,实现了第一摄像头和第二摄像头之间的软切换,有利于得到过渡较为平滑的预览图像。In this application, the terminal device can output images in two ways through the first camera and the second camera, and turn off the first camera at an appropriate time. From turning on the second camera to turning off the first camera, the first camera and the second camera are realized. The soft switching between is beneficial to get a preview image with a smoother transition.
第二方面,提供了一种倍率切换装置,包括获取模块和处理模块。其中,获取模块用于:获取第一倍率下的第一预览图像;以及,获取第二倍率下的第二预览图像。处理模块用于:显示摄像头获取到的第一倍率下的第一预览图像;响应于用户对第二倍率的选择操作,显示对应于L个过渡倍率的L帧预览图像,L个过渡倍率包括处于第一倍率和第二倍率之间的L个倍率,L≥1且为整数;以及,显示摄像头获取到的第二倍率下的第二预览图像。In a second aspect, a magnification switching device is provided, including an acquisition module and a processing module. Wherein, the acquiring module is used to: acquire the first preview image under the first magnification; and acquire the second preview image under the second magnification. The processing module is used to: display the first preview image acquired by the camera at the first magnification; in response to the user's selection operation on the second magnification, display L frames of preview images corresponding to L transition magnifications, and the L transition magnifications include L magnifications between the first magnification and the second magnification, L≥1 and an integer; and displaying the second preview image acquired by the camera at the second magnification.
结合第二方面,在第二方面的某些实现方式中,处理模块用于:基于第一倍率和第二倍率,确定L个过渡倍率。With reference to the second aspect, in some implementation manners of the second aspect, the processing module is configured to: determine L transitional magnifications based on the first magnification and the second magnification.
结合第二方面,在第二方面的某些实现方式中,处理模块用于:基于第一倍率、第二倍率、第一倍率与第二倍率之间的切换时长,以及相邻帧之间的时间间隔,确定L个过渡倍率。With reference to the second aspect, in some implementations of the second aspect, the processing module is configured to: based on the first magnification, the second magnification, the switching duration between the first magnification and the second magnification, and the time between adjacent frames time interval to determine L transition magnifications.
结合第二方面,在第二方面的某些实现方式中,处理模块用于:基于第一倍率、 第二倍率和预设的预览图像帧数,确定L个过渡倍率。With reference to the second aspect, in some implementation manners of the second aspect, the processing module is configured to: determine L transitional magnifications based on the first magnification, the second magnification, and the preset preview image frame number.
结合第二方面,在第二方面的某些实现方式中,摄像头包括第一摄像头和第二摄像头,第一预览图像来自第一摄像头,第二预览图像来自第二摄像头。处理模块用于:开启第二摄像头。获取模块用于:通过第一摄像头和第二摄像头获取图像,其中,第一摄像头和第二摄像头在同一时间节点获取到的图像是基于相同的过渡倍率拍摄到的。处理模块还用于:当来自第二摄像头的第M帧图像的质量与来自第一摄像头的第N帧图像的质量的差距小于或者等于预设阈值时,关闭第一摄像头,且在关闭第一摄像头之前显示的预览图像来自第一摄像头。其中,来自第一摄像头的第N帧兔粮与来自第二摄像头的第M帧图像在同一时间节点、基于相同的倍率拍摄到的,N≥M≥1,N、M为整数。With reference to the second aspect, in some implementation manners of the second aspect, the camera includes a first camera and a second camera, the first preview image is from the first camera, and the second preview image is from the second camera. The processing module is used to: turn on the second camera. The acquiring module is used for: acquiring images through the first camera and the second camera, wherein the images acquired by the first camera and the second camera at the same time node are based on the same transition magnification. The processing module is also used for: when the difference between the quality of the Mth frame of image from the second camera and the quality of the Nth frame of image from the first camera is less than or equal to the preset threshold, turn off the first camera, and turn off the first The preview image shown before the camera is from the first camera. Wherein, the Nth frame of rabbit food from the first camera and the Mth frame of images from the second camera are captured at the same time node and based on the same magnification, N≥M≥1, and N and M are integers.
第三方面,提供了另一种倍率切换装置,包括处理器,该处理器与存储器耦合,可用于执行存储器中的指令,以实现上述第一方面中任一种可能实现方式中的方法。可选地,该装置还包括存储器。可选地,该装置还包括通信接口,处理器与通信接口耦合。In a third aspect, another magnification switching device is provided, including a processor, the processor is coupled to a memory, and can be used to execute instructions in the memory, so as to implement the method in any possible implementation manner of the first aspect above. Optionally, the device further includes a memory. Optionally, the device further includes a communication interface, and the processor is coupled to the communication interface.
在一种实现方式中,该倍率切换装置为终端设备。当该倍率切换装置为终端设备时,通信接口可以是收发器,或,输入/输出接口。In an implementation manner, the ratio switching device is a terminal device. When the magnification switching device is a terminal device, the communication interface may be a transceiver, or an input/output interface.
在另一种实现方式中,该倍率切换装置为配置于终端设备中的芯片。当该倍率切换装置为配置于终端设备中的芯片时,通信接口可以是输入/输出接口。In another implementation manner, the magnification switching device is a chip configured in a terminal device. When the magnification switching device is a chip configured in the terminal device, the communication interface may be an input/output interface.
第四方面,提供了一种处理器,包括:输入电路、输出电路和处理电路。处理电路用于通过输入电路接收信号,并通过输出电路发射信号,使得处理器执行上述第一方面中任一种可能实现方式中的方法。In a fourth aspect, a processor is provided, including: an input circuit, an output circuit, and a processing circuit. The processing circuit is configured to receive a signal through the input circuit and transmit a signal through the output circuit, so that the processor executes the method in any possible implementation manner of the first aspect above.
在具体实现过程中,上述处理器可以为芯片,输入电路可以为输入管脚,输出电路可以为输出管脚,处理电路可以为晶体管、门电路、触发器和各种逻辑电路等。输入电路所接收的输入的信号可以是由例如但不限于接收器接收并输入的,输出电路所输出的信号可以是例如但不限于输出给发射器并由发射器发射的,且输入电路和输出电路可以是同一电路,该电路在不同的时刻分别用作输入电路和输出电路。本申请对处理器及各种电路的具体实现方式不作限定。In a specific implementation process, the above-mentioned processor can be a chip, the input circuit can be an input pin, the output circuit can be an output pin, and the processing circuit can be a transistor, a gate circuit, a flip-flop, and various logic circuits. The input signal received by the input circuit may be received and input by, for example but not limited to, the receiver, the output signal of the output circuit may be, for example but not limited to, output to the transmitter and transmitted by the transmitter, and the input circuit and the output The circuit may be the same circuit, which is used as an input circuit and an output circuit respectively at different times. The present application does not limit the specific implementation manners of the processor and various circuits.
第五方面,提供了一种处理装置,包括处理器和存储器。该处理器用于读取存储器中存储的指令,并可通过接收器接收信号,通过发射器发射信号,以执行上述第一方面中任一种可能实现方式中的方法。In a fifth aspect, a processing device is provided, including a processor and a memory. The processor is used to read instructions stored in the memory, and may receive signals through the receiver and transmit signals through the transmitter, so as to execute the method in any possible implementation manner of the first aspect above.
可选地,处理器为一个或多个,存储器为一个或多个。Optionally, there are one or more processors, and one or more memories.
可选地,存储器可以与处理器集成在一起,或者存储器与处理器分离设置。Optionally, the memory may be integrated with the processor, or the memory may be separated from the processor.
在具体实现过程中,存储器可以为非瞬时性(non-transitory)存储器,例如只读存储器(read only memory,ROM),其可以与处理器集成在同一块芯片上,也可以分别设置在不同的芯片上,本申请对存储器的类型以及存储器与处理器的设置方式不作限定。In the specific implementation process, the memory can be a non-transitory (non-transitory) memory, such as a read-only memory (read only memory, ROM), which can be integrated with the processor on the same chip, or can be set in different On the chip, the application does not limit the type of the memory and the arrangement of the memory and the processor.
应理解,相关的数据交互过程例如发送指示信息可以为从处理器输出指示信息的过程,接收能力信息可以为处理器接收输入能力信息的过程。具体地,处理输出的数据可以输出给发射器,处理器接收的输入数据可以来自接收器。其中,发射器和接收 器可以统称为收发器。It should be understood that a related data interaction process such as sending indication information may be a process of outputting indication information from a processor, and receiving capability information may be a process of receiving input capability information from a processor. In particular, processed output data may be output to the transmitter, and input data received by the processor may be from the receiver. Among them, the transmitter and receiver can be collectively referred to as a transceiver.
上述第五方面中的处理装置可以是一个芯片,该处理器可以通过硬件来实现也可以通过软件来实现,当通过硬件实现时,该处理器可以是逻辑电路、集成电路等;当通过软件来实现时,该处理器可以是一个通用处理器,通过读取存储器中存储的软件代码来实现,该存储器可以集成在处理器中,可以位于该处理器之外,独立存在。The processing device in the fifth aspect above can be a chip, and the processor can be implemented by hardware or by software. When implemented by hardware, the processor can be a logic circuit, an integrated circuit, etc.; when implemented by software When implemented, the processor may be a general-purpose processor, which is realized by reading the software code stored in the memory, and the memory may be integrated in the processor, or it may be located outside the processor and exist independently.
第六方面,提供了一种计算机程序产品,计算机程序产品包括:计算机程序代码,当该计算机程序代码被运行时,使得计算机执行上述第一方面中任一种可能实现方式中的方法。In a sixth aspect, a computer program product is provided, and the computer program product includes: computer program code, when the computer program code is executed, the computer is made to execute the method in any possible implementation manner of the above first aspect.
第七方面,提供了一种计算机可读存储介质,该计算机可读存储介质存储有计算机程序,当该计算机程序被运行时,使得计算机执行上述第一方面中任一种可能实现方式中的方法。In a seventh aspect, a computer-readable storage medium is provided, the computer-readable storage medium stores a computer program, and when the computer program is executed, the computer executes the method in any possible implementation manner of the above-mentioned first aspect .
附图说明Description of drawings
图1是一种终端设备的界面示意图;FIG. 1 is a schematic diagram of an interface of a terminal device;
图2是一种点切操作的出图原理示意图;Fig. 2 is a schematic diagram of the drawing principle of a point-cut operation;
图3是一种点切操作的出图方法的示意性流程图;Fig. 3 is a schematic flow chart of a drawing method of a point-cut operation;
图4是本申请实施例适用的一种终端设备的结构示意图;FIG. 4 is a schematic structural diagram of a terminal device applicable to an embodiment of the present application;
图5是本申请实施例适用的终端设备的一种软件结构框图;FIG. 5 is a software structural block diagram of a terminal device applicable to an embodiment of the present application;
图6是本申请实施例提供的一种点切操作的出图原理示意图;Fig. 6 is a schematic diagram of the drawing principle of a point-cut operation provided by the embodiment of the present application;
图7是本申请实施例提供的一种倍率切换方法的示意性流程图;FIG. 7 is a schematic flowchart of a method for switching magnification provided by an embodiment of the present application;
图8是本申请实施例提供的另一种倍率切换方法的示意性流程图;Fig. 8 is a schematic flowchart of another magnification switching method provided by the embodiment of the present application;
图9是本申请实施例提供的再一种倍率切换方法的示意性流程图;FIG. 9 is a schematic flow chart of yet another magnification switching method provided by an embodiment of the present application;
图10是本申请实施例提供的一种终端设备的界面示意图;FIG. 10 is a schematic diagram of an interface of a terminal device provided in an embodiment of the present application;
图11是本申请实施例提供的一种倍率切换装置的示意性框图;Fig. 11 is a schematic block diagram of a magnification switching device provided by an embodiment of the present application;
图12是本申请实施例提供的另一种倍率切换装置的示意性框图。Fig. 12 is a schematic block diagram of another magnification switching device provided by an embodiment of the present application.
具体实施方式Detailed ways
下面将结合附图,对本申请中的技术方案进行描述。The technical solution in this application will be described below with reference to the accompanying drawings.
在安卓(Android)生态中,用户可以使用终端设备的相机应用(application,APP)进行倍率的点击切换(可简称为点切)操作。从而可以拍摄不同距离下的物体是常见的使用场景,提高拍摄场景的丰富度。In the Android (Android) ecosystem, a user may use a camera application (Application, APP) of a terminal device to perform a click switching (may be referred to as a point cut) operation of a magnification. Therefore, it is a common usage scenario to be able to shoot objects at different distances, which improves the richness of the shooting scene.
图1是一种终端设备的界面示意图。以终端设备为手机示例,图1中示出了手机的a界面、b界面和c界面,其中,a界面示出了手机中的多个应用,示例性地,用户可以点击相机图标打开相机应用进行拍照。在用户点击相机应用后,手机显示b界面,b界面为拍摄界面。示例性地,b界面包括多个的倍率图标,当前相机的倍率为1x,用户可以点击不同的倍率图标以实现不同的倍率切换。示例性地,用户点击了5x的倍率图标,手机可以显示c界面,在c界面,倍率已经被切换至5x,手机可以获得10x的倍率下的预览图像。FIG. 1 is a schematic diagram of an interface of a terminal device. Taking the terminal device as an example of a mobile phone, Figure 1 shows interface a, interface b, and interface c of the mobile phone, where interface a shows multiple applications in the mobile phone, for example, the user can click the camera icon to open the camera application Take a photo. After the user clicks the camera application, the mobile phone displays interface b, where interface b is a shooting interface. Exemplarily, interface b includes a plurality of magnification icons, the current camera magnification is 1x, and the user can click on different magnification icons to switch between different magnifications. Exemplarily, the user clicks the magnification icon of 5x, and the mobile phone can display the interface c. In the interface c, the magnification has been switched to 5x, and the mobile phone can obtain a preview image at the magnification of 10x.
在如图1所示的点切操作之前,手机可以通过摄像头在1x的倍率下在b界面中显 示待拍摄物体的预览图像,摄像头的视角(field ofview,FOV)维持在1x。在用户点击5x的倍率图标后,手机可以通过摄像头在5x的倍率下在c界面中显示待拍摄物体的预览图像,摄像头的FOV维持在10x。Before the point-and-click operation shown in Figure 1, the mobile phone can display a preview image of the object to be photographed in interface b at a magnification of 1x through the camera, and the field of view (FOV) of the camera is maintained at 1x. After the user clicks the 5x magnification icon, the mobile phone can display the preview image of the object to be photographed in the c interface at a 5x magnification through the camera, and the FOV of the camera is maintained at 10x.
图2是一种点切操作的出图原理示意图。以终端设备为手机为例,在图2中,手机的摄像头可以包括主摄镜头和长焦镜头。在用户执行点切操作之前,主摄镜头的FOV维持在1x的倍率持续出图获得预览图像,并且在显示屏上显示预览图像。示例性地,在如图2所示的点切时刻用户点击了10x的倍率图标进行倍率切换,此时手机可以从主摄镜头切换至长焦镜头,长焦镜头的FOV维持在10x的倍率持续出图获得切换后的预览图像,并且在显示屏上显示切换后的预览图像。Fig. 2 is a schematic diagram of the drawing principle of a point-cut operation. Taking the terminal device as a mobile phone as an example, in FIG. 2 , the camera of the mobile phone may include a main camera lens and a telephoto lens. Before the user performs a point-and-click operation, the FOV of the main camera lens is maintained at a magnification of 1x to continuously output the image to obtain a preview image, and the preview image is displayed on the display. For example, when the user clicks the magnification icon of 10x to switch the magnification at the moment of point-cutting as shown in Figure 2, the mobile phone can switch from the main camera lens to the telephoto lens, and the FOV of the telephoto lens remains at the magnification of 10x continuously. The switched preview image is obtained by outputting the image, and the switched preview image is displayed on the display screen.
图3是一种点切操作的出图方法300的示意性流程图。方法300包括如下步骤:FIG. 3 is a schematic flowchart of a drawing method 300 for a point cut operation. Method 300 includes the following steps:
S301,第一摄像头在第一倍率下出图并送显。S301, the first camera produces images at the first magnification and sends them to display.
S302,响应于用户的点切操作,相机应用向硬件抽象层(hardware abstraction layer,HAL)发送倍率切换请求消息,该倍率切换请求消息用于请求从第一倍率切换至第二倍率,该倍率切换请求消息包括第二倍率。相应地,硬件抽象层接收该倍率切换请求消息。S302, in response to the user's click operation, the camera application sends a magnification switching request message to the hardware abstraction layer (hardware abstraction layer, HAL), the magnification switching request message is used to request switching from the first magnification to the second magnification, the magnification switching The request message includes the second magnification. Correspondingly, the hardware abstraction layer receives the magnification switching request message.
S303,硬件抽象层向第一摄像头发送摄像头关闭请求消息,该摄像头关闭请求消息用于请求关闭第一摄像头。相应地,第一摄像头接收该摄像头关闭请求消息。S303. The hardware abstraction layer sends a camera shutdown request message to the first camera, where the camera shutdown request message is used to request shutdown of the first camera. Correspondingly, the first camera receives the camera shutdown request message.
S304,第一摄像头关闭,停止工作。S304, the first camera is turned off and stops working.
S305,硬件抽象层向第二摄像头发送摄像头启动请求消息,该摄像头启动请求消息用于请求启动第二摄像头,该摄像头启动请求消息包括第二倍率。相应地,第二摄像头接收该摄像头启动请求消息。S305. The hardware abstraction layer sends a camera startup request message to the second camera, where the camera startup request message is used to request startup of the second camera, and the camera startup request message includes a second magnification. Correspondingly, the second camera receives the camera start request message.
S306,第二摄像头启动,在第二倍率下出图并送显。S306, the second camera is started, and a picture is drawn at the second magnification and sent for display.
其中,出图表示摄像头拍摄物体得到预览图像,送显表示在显示屏上显示预览图像。更具体地,可以在相机应用构建的预览视图框中显示预览图像。Wherein, outputting a picture means obtaining a preview image of an object captured by the camera, and sending a display means displaying a preview image on a display screen. More specifically, the preview image can be displayed in a preview view frame built by the camera application.
应理解,在图3所示的点切操作的过程中,在点切操作发生之后摄像头的FOV直接从第一倍率(可以是上述图1或者图2中的1x)跳变到第二倍率(可以是上述图1中的5x或者图2中的10x),这样导致用户看到的预览图像会发生跳变,过渡较为生硬,从而使得相机应用的变焦效果较差,用户体验不佳。It should be understood that during the point cut operation shown in FIG. 3 , after the point cut operation occurs, the FOV of the camera directly jumps from the first magnification (which may be 1x in the above-mentioned FIG. 1 or FIG. 2 ) to the second magnification ( It can be 5x in the above-mentioned Figure 1 or 10x in Figure 2), which will cause the preview image seen by the user to jump, and the transition is relatively blunt, so that the zoom effect of the camera application is poor, and the user experience is not good.
有鉴于此,本申请实施例提供一种倍率切换方法和倍率切换装置,用户在使用终端设备的相机应用拍照预览时,终端设备可以在倍率点切的过程中引入多帧过渡预览图像,实现倍率点切时预览图像的平滑过渡,这样有利于提高相机应用的变焦效果,从而提高用户体验。In view of this, the embodiment of the present application provides a magnification switching method and a magnification switching device. When the user uses the camera application of the terminal device to take pictures and preview, the terminal device can introduce a multi-frame transition preview image in the process of magnification point-cutting to realize the magnification. The smooth transition of the preview image when clicking and cutting is beneficial to improve the zoom effect of the camera application, thereby improving the user experience.
在介绍本申请实施例提供的倍率切换方法和倍率切换装置之前,先做出以下几点说明。Before introducing the magnification switching method and the magnification switching device provided in the embodiments of the present application, the following points are explained first.
第一,在下文示出的实施例中,各术语及英文缩略语,如预览图像、倍率切换请求消息、主摄镜头、长焦镜头等,均为方便描述而给出的示例性举例,不应对本申请构成任何限定。本申请并不排除在已有或未来的协议中定义其它能够实现相同或相似功能的术语的可能。First, in the embodiments shown below, various terms and English abbreviations, such as preview image, magnification switching request message, main camera lens, telephoto lens, etc., are illustrative examples given for convenience of description, and are not Nothing should be construed as a limitation of this application. This application does not exclude the possibility of defining other terms that can achieve the same or similar functions in existing or future agreements.
第二,在下文示出的实施例中第一、第二以及各种数字编号仅为描述方便进行的 区分,并不用来限制本申请实施例的范围。例如,区分不同的预览图像,区分不同的摄像头等。Second, in the embodiments shown below, the first, second and various numbers are only for the convenience of description, and are not used to limit the scope of the embodiments of the present application. For example, distinguish between different preview images, different cameras, etc.
第三,“至少一个”是指一个或者多个,“多个”是指两个或两个以上。“和/或”,描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B的情况,其中A,B可以是单数或者复数。字符“/”一般表示前后关联对象是一种“或”的关系。“以下至少一项(个)”或其类似表达,是指的这些项中的任意组合,包括单项(个)或复数项(个)的任意组合。例如,a、b和c中的至少一项(个),可以表示:a,或b,或c,或a和b,或a和c,或b和c,或a、b和c,其中a,b,c可以是单个,也可以是多个。Third, "at least one" means one or more, and "multiple" means two or more. "And/or" describes the association relationship of associated objects, indicating that there may be three types of relationships, for example, A and/or B, which can mean: A exists alone, A and B exist at the same time, and B exists alone, where A, B can be singular or plural. The character "/" generally indicates that the contextual objects are an "or" relationship. "At least one of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one (one) of a, b and c may represent: a, or b, or c, or a and b, or a and c, or b and c, or a, b and c, wherein a, b, c can be single or multiple.
本申请实施例的终端设备可以是具有无线连接功能的手持式设备、车载设备等,该终端设备也可以称为终端(terminal)、用户设备(user equipment,UE)、移动台(mobile station,MS)、移动终端(mobile terminal,MT)等。目前,一些终端的举例为:手机(mobile phone)、平板电脑、智能电视、笔记本电脑、平板电脑(Pad)、掌上电脑、移动互联网设备(mobile internet device,MID)、虚拟现实(virtual reality,VR)设备、增强现实(augmented reality,AR)设备、工业控制(industrial control)中的无线终端、无人驾驶(selfdriving)中的无线终端、远程手术(remote medical surgery)中的无线终端、智能电网(smart grid)中的无线终端、运输安全(transportation safety)中的无线终端、智慧城市(smart city)中的无线终端、智慧家庭(smart home)中的无线终端、蜂窝电话、无绳电话、会话启动协议(session initiation protocol,SIP)电话、无线本地环路(wireless local loop,WLL)站、个人数字助理(personal digital assistant,PDA)、具有无线通信功能的手持设备、计算设备或连接到无线调制解调器的其它处理设备、车载设备、可穿戴设备,5G网络中的终端设备或者未来演进的公用陆地移动通信网络(public land mobile network,PLMN)中的终端设备等,本申请的实施例对终端设备所采用的具体技术和具体设备形态不作限定。The terminal device in the embodiment of the present application may be a handheld device with a wireless connection function, a vehicle-mounted device, etc., and the terminal device may also be called a terminal (terminal), user equipment (user equipment, UE), mobile station (mobile station, MS ), mobile terminal (mobile terminal, MT), etc. At present, examples of some terminals are: mobile phone (mobile phone), tablet computer, smart TV, notebook computer, tablet computer (Pad), handheld computer, mobile Internet device (mobile internet device, MID), virtual reality (virtual reality, VR ) equipment, augmented reality (augmented reality, AR) equipment, wireless terminals in industrial control (industrial control), wireless terminals in self-driving (selfdriving), wireless terminals in remote medical surgery (remote medical surgery), smart grid ( Wireless terminals in smart grid, wireless terminals in transportation safety, wireless terminals in smart city, wireless terminals in smart home, cellular phones, cordless phones, session initiation protocol (session initiation protocol, SIP) telephones, wireless local loop (wireless local loop, WLL) stations, personal digital assistants (personal digital assistant, PDA), handheld devices with wireless communication capabilities, computing devices, or other devices connected to wireless modems Processing equipment, vehicle-mounted equipment, wearable equipment, terminal equipment in the 5G network or terminal equipment in the public land mobile communication network (public land mobile network, PLMN) that will evolve in the future, etc., the embodiment of the present application adopts for the terminal equipment The specific technology and specific equipment form are not limited.
作为示例而非限定,在本申请实施例中,该终端设备还可以是可穿戴设备。可穿戴设备也可以称为穿戴式智能设备,是应用穿戴式技术对日常穿戴进行智能化设计、开发出可以穿戴的设备的总称,如眼镜、手套、手表、服饰及鞋等。可穿戴设备即直接穿在身上,或是整合到用户的衣服或配件的一种便携式设备。可穿戴设备不仅仅是一种硬件设备,更是通过软件支持以及数据交互、云端交互来实现强大的功能。广义穿戴式智能设备包括功能全、尺寸大、可不依赖智能手机实现完整或者部分的功能,例如:智能手表或智能眼镜等,以及只专注于某一类应用功能,需要和其它设备如智能手机配合使用,如各类进行体征监测的智能手环、智能首饰等。As an example but not a limitation, in this embodiment of the present application, the terminal device may also be a wearable device. Wearable devices can also be called wearable smart devices, which is a general term for the application of wearable technology to intelligently design daily wear and develop wearable devices, such as glasses, gloves, watches, clothing and shoes. A wearable device is a portable device that is worn directly on the body or integrated into the user's clothing or accessories. Wearable devices are not only a hardware device, but also achieve powerful functions through software support, data interaction, and cloud interaction. Generalized wearable smart devices include full-featured, large-sized, complete or partial functions without relying on smart phones, such as smart watches or smart glasses, etc., and only focus on a certain type of application functions, and need to cooperate with other devices such as smart phones Use, such as various smart bracelets and smart jewelry for physical sign monitoring.
应理解,本申请实施例中,终端设备可以是用于实现终端设备功能的装置,也可以是能够支持终端设备实现该功能的装置,例如芯片系统,该装置可以被安装在终端中。本申请实施例中,芯片系统可以由芯片构成,也可以包括芯片和其他分立器件。It should be understood that, in this embodiment of the present application, the terminal device may be a device for realizing the function of the terminal device, or may be a device capable of supporting the terminal device to realize the function, such as a chip system, and the device may be installed in the terminal. In the embodiment of the present application, the system-on-a-chip may be composed of chips, or may include chips and other discrete devices.
本申请实施例中的终端设备也可以称为:用户设备(user equipment,UE)、移动台(mobile station,MS)、移动终端(mobile terminal,MT)、接入终端、用户单元、用户站、移动站、移动台、远方站、远程终端、移动设备、用户终端、终端、无线通信设备、用户代理或用户装置等。The terminal equipment in the embodiment of the present application may also be referred to as: user equipment (user equipment, UE), mobile station (mobile station, MS), mobile terminal (mobile terminal, MT), access terminal, subscriber unit, subscriber station, Mobile station, mobile station, remote station, remote terminal, mobile device, user terminal, terminal, wireless communication device, user agent or user device, etc.
图4是本申请实施例适用的一种终端设备的结构示意图。如图4所示,该终端设备400可以包括:处理器110,外部存储器接口120,内部存储器121,通用串行总线(universal serial bus,USB)接口130,充电管理模块140,电源管理模块141,电池142,天线1,天线2,移动通信模块150,无线通信模块160,音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,传感器180,按键190,马达191,指示器192,摄像头193,显示屏194,以及用户标识模块(subscriber identification module,SIM)卡接口195等。可以理解的是,本实施例示意的结构并不构成对终端设备400的具体限定。在本申请另一些实施例中,终端设备400可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件,或软件和硬件的组合实现。FIG. 4 is a schematic structural diagram of a terminal device to which this embodiment of the present application applies. As shown in Figure 4, the terminal device 400 may include: a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (universal serial bus, USB) interface 130, a charging management module 140, a power management module 141, Battery 142, antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, audio module 170, speaker 170A, receiver 170B, microphone 170C, earphone jack 170D, sensor 180, button 190, motor 191, indicator 192, camera 193, a display screen 194, and a subscriber identification module (subscriber identification module, SIM) card interface 195, etc. It can be understood that, the structure shown in this embodiment does not constitute a specific limitation on the terminal device 400 . In other embodiments of the present application, the terminal device 400 may include more or fewer components than shown in the figure, or combine certain components, or separate certain components, or arrange different components. The illustrated components can be implemented in hardware, software, or a combination of software and hardware.
处理器110可以包括一个或多个处理单元,例如:处理器110可以包括应用处理器(application processor,AP),调制解调处理器,图形处理器(graphics processing unit,GPU),图像信号处理器(image signal processor,ISP),控制器,视频编解码器,数字信号处理器(digital signal processor,DSP),基带处理器,显示处理单元(display process unit,DPU),和/或神经网络处理器(neural-network processing unit,NPU)等。其中,不同的处理单元可以是独立的器件,也可以集成在一个或多个处理器中。在一些实施例中,终端设备400也可以包括一个或多个处理器110。其中,处理器可以是终端设备400的神经中枢和指挥中心。处理器可以根据指令操作码和时序信号,产生操作控制信号,完成取指令和执行指令的控制。处理器110中还可以设置存储器,用于存储指令和数据。在一些实施例中,处理器110中的存储器为高速缓冲存储器。该存储器可以保存处理器110用过或循环使用的指令或数据。如果处理器110需要再次使用该指令或数据,可从所述存储器中直接调用。这就避免了重复存取,减少了处理器110的等待时间,因而提高了终端设备400的效率。The processor 110 may include one or more processing units, for example: the processor 110 may include an application processor (application processor, AP), a modem processor, a graphics processing unit (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), controller, video codec, digital signal processor (digital signal processor, DSP), baseband processor, display processing unit (display process unit, DPU), and/or neural network processor (neural-network processing unit, NPU), etc. Wherein, different processing units may be independent devices, or may be integrated in one or more processors. In some embodiments, the terminal device 400 may also include one or more processors 110 . Wherein, the processor may be the nerve center and command center of the terminal device 400 . The processor can generate an operation control signal according to the instruction opcode and the timing signal, and complete the control of fetching and executing the instruction. A memory may also be provided in the processor 110 for storing instructions and data. In some embodiments, the memory in processor 110 is a cache memory. The memory may hold instructions or data used or recycled by the processor 110 . If the processor 110 needs to use the instruction or data again, it can be called directly from the memory. This avoids repeated access, reduces the waiting time of the processor 110, and thus improves the efficiency of the terminal device 400.
在一些实施例中,处理器110可以包括一个或多个接口。接口可以包括集成电路(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)接口,用户标识模块(subscriber identity module,SIM)接口,和/或USB接口等。其中,USB接口130是符合USB标准规范的接口,具体可以是Mini USB接口,Micro USB接口,USB Type C接口等。USB接口130可以用于连接充电器为终端设备400充电,也可以用于终端设备400与外围设备之间传输数据。也可以用于连接耳机,通过耳机播放音频。In some embodiments, processor 110 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 transmitter (universal asynchronous receiver/transmitter, UART) interface, mobile industry processor interface (mobile industry processor interface, MIPI), general-purpose input and output (general-purpose input/output, GPIO) interface, subscriber identity module (subscriber identity module, SIM) interface, and /or USB interface, etc. Wherein, the USB interface 130 is an interface conforming to the USB standard specification, specifically, it may be a Mini USB interface, a Micro USB interface, a USB Type C interface, and the like. The USB interface 130 can be used to connect a charger to charge the terminal device 400, and can also be used to transmit data between the terminal device 400 and peripheral devices. It can also be used to connect headphones and play audio through them.
可以理解的是,本申请实施例示意的各模块间的接口连接关系为示意性说明,并不构成对终端设备400的结构限定。在本申请另一些实施例中,终端设备400也可以采用上述实施例中不同的接口连接方式,或多种接口连接方式的组合。It can be understood that the interface connection relationship between the modules shown in the embodiment of the present application is a schematic description, and does not constitute a structural limitation of the terminal device 400 . In other embodiments of the present application, the terminal device 400 may also adopt different interface connection manners in the foregoing embodiments, or a combination of multiple interface connection manners.
终端设备400的无线通信功能可以通过天线1,天线2,移动通信模块150,无线通信模块160,调制解调处理器以及基带处理器等实现。天线1和天线2用于发射和接收电磁波信号。终端设备400中的每个天线可用于覆盖单个或多个通信频带。不同 的天线还可以复用,以提高天线的利用率。例如:可以将天线1复用为无线局域网的分集天线。在另外一些实施例中,天线可以和调谐开关结合使用。The wireless communication function of the terminal device 400 may be implemented by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, a modem processor, a baseband processor, and the like. Antenna 1 and Antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in terminal device 400 can be used to cover single or multiple communication frequency bands. Different antennas can also be multiplexed to improve antenna utilization. For example: Antenna 1 can be multiplexed as a diversity antenna of a wireless local area network. In other embodiments, the antenna may be used in conjunction with a tuning switch.
移动通信模块150可以提供应用在终端设备400上的包括2G/3G/4G/5G等无线通信的解决方案。移动通信模块150可以包括至少一个滤波器,开关,功率放大器,低噪声放大器等。移动通信模块150可以由天线1接收电磁波,并对接收的电磁波进行滤波,放大等处理,传送至调制解调处理器进行解调。移动通信模块150还可以对经调制解调处理器调制后的信号放大,经天线1转为电磁波辐射出去。在一些实施例中,移动通信模块150的至少部分功能模块可以被设置于处理器110中。在一些实施例中,移动通信模块150的至少部分功能模块可以与处理器110的至少部分模块被设置在同一个器件中。The mobile communication module 150 can provide wireless communication solutions including 2G/3G/4G/5G applied on the terminal device 400 . The mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier and the like. The mobile communication module 150 can receive electromagnetic waves through the antenna 1, filter and amplify the received electromagnetic waves, and send them to the modem processor for demodulation. The mobile communication module 150 can also amplify the signals modulated by the modem processor, and convert them into electromagnetic waves and radiate them through the antenna 1 . In some embodiments, at least part of the functional modules of the mobile communication module 150 may be set in the processor 110 . In some embodiments, at least part of the functional modules of the mobile communication module 150 and at least part of the modules of the processor 110 may be set in the same device.
调制解调处理器可以包括调制器和解调器。其中,调制器用于将待发送的低频基带信号调制成中高频信号。解调器用于将接收的电磁波信号解调为低频基带信号。随后解调器将解调得到的低频基带信号传送至基带处理器处理。低频基带信号经基带处理器处理后,被传递给应用处理器。应用处理器通过音频设备(不限于扬声器170A,受话器170B等)输出声音信号,或通过显示屏194显示图像或视频。在一些实施例中,调制解调处理器可以是独立的器件。在另一些实施例中,调制解调处理器可以独立于处理器110,与移动通信模块150或其他功能模块设置在同一个器件中。A modem processor may include a modulator and a demodulator. Wherein, the modulator is used for modulating the low-frequency baseband signal to be transmitted into a medium-high frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low frequency baseband signal. Then the demodulator sends the demodulated low-frequency baseband signal to the baseband processor for processing. The low-frequency baseband signal is passed to the application processor after being processed by the baseband processor. The application processor outputs sound signals through audio equipment (not limited to speaker 170A, receiver 170B, etc.), or displays images or videos through display screen 194 . In some embodiments, the modem processor may be a stand-alone device. In some other embodiments, the modem processor may be independent from the processor 110, and be set in the same device as the mobile communication module 150 or other functional modules.
无线通信模块160可以提供应用在终端设备400上的包括无线局域网(wireless local area networks,WLAN),蓝牙,全球导航卫星系统(global navigation satellite system,GNSS),调频(frequency modulation,FM),NFC,红外技术(infrared,IR)等无线通信的解决方案。无线通信模块160可以是集成至少一个通信处理模块的一个或多个器件。无线通信模块160经由天线2接收电磁波,将电磁波信号调频以及滤波处理,将处理后的信号发送到处理器110。无线通信模块160还可以从处理器110接收待发送的信号,对其进行调频,放大,经天线2转为电磁波辐射出去。The wireless communication module 160 can provide wireless local area networks (wireless local area networks, WLAN), Bluetooth, global navigation satellite system (global navigation satellite system, GNSS), frequency modulation (frequency modulation, FM), NFC, Solutions for wireless communication such as infrared technology (infrared, IR). The wireless communication module 160 may be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2 , frequency-modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 110 . The wireless communication module 160 can also receive the signal to be sent from the processor 110 , frequency-modulate it, amplify it, and convert it into electromagnetic waves through the antenna 2 for radiation.
在一些实施例中,终端设备400的天线1和移动通信模块150耦合,天线2和无线通信模块160耦合,使得终端设备400可以通过无线通信技术与网络以及其他设备通信。所述无线通信技术可以包括GSM,GPRS,CDMA,WCDMA,TD-SCDMA,LTE,GNSS,WLAN,NFC,FM,和/或IR技术等。上述GNSS可以包括全球卫星定位系统(global positioning system,GPS),全球导航卫星系统(global navigation satellite system,GLONASS),北斗卫星导航系统(bei dou navigation satellite system,BDS),准天顶卫星系统(quasi-zenith satellite system,QZSS)和/或星基增强系统(satellite based augmentation systems,SBAS)。In some embodiments, the antenna 1 of the terminal device 400 is coupled to the mobile communication module 150, and the antenna 2 is coupled to the wireless communication module 160, so that the terminal device 400 can communicate with the network and other devices through wireless communication technology. The wireless communication technology may include GSM, GPRS, CDMA, WCDMA, TD-SCDMA, LTE, GNSS, WLAN, NFC, FM, and/or IR technology and the like. The above-mentioned GNSS may include global positioning system (global positioning system, GPS), global navigation satellite system (global navigation satellite system, GLONASS), Beidou satellite navigation system (bei dou navigation satellite system, BDS), quasi-zenith satellite system (quasi -zenith satellite system (QZSS) and/or satellite based augmentation systems (SBAS).
终端设备400通过GPU、显示屏194以及应用处理器等可以实现显示功能。应用处理器可以包括NPU和/或DPU。GPU为图像处理的微处理器,连接显示屏194和应用处理器。GPU用于执行数学和几何计算,用于图形渲染。处理器110可包括一个或多个GPU,其执行指令以生成或改变显示信息。NPU为神经网络(neural-network,NN)计算处理器,通过借鉴生物神经网络结构,例如借鉴人脑神经元之间传递模式,对输入信息快速处理,还可以不断的自学习。通过NPU可以实现终端设备400的智能认知等应用,例如:图像识别,人脸识别,语音识别,文本理解等。DPU也称为显示 子系统(display sub-system,DSS),DPU用于对显示屏194的色彩进行调整,DPU可以通过颜色三维查找表(3D look up table,3D LUT)对显示屏的色彩进行调整。DPU还可以对画面进行缩放、降噪、对比度增强、背光亮度管理、hdr处理、显示器参数Gamma调整等处理。The terminal device 400 can implement a display function through the GPU, the display screen 194 and the application processor. Application processors may include NPUs and/or DPUs. The GPU is a microprocessor for image processing, and is connected to the display screen 194 and the application processor. GPUs are used to perform mathematical and geometric calculations for graphics rendering. Processor 110 may include one or more GPUs that execute instructions to generate or alter display information. The NPU is a neural-network (NN) computing processor. By referring to the structure of biological neural networks, such as the transfer mode between neurons in the human brain, it can quickly process input information and continuously learn by itself. Applications such as intelligent cognition of the terminal device 400 can be implemented through the NPU, such as image recognition, face recognition, speech recognition, text understanding, and the like. DPU is also called display sub-system (display sub-system, DSS), and DPU is used for adjusting the color of display screen 194, and DPU can adjust the color of display screen through color three-dimensional lookup table (3D look up table, 3D LUT). Adjustment. DPU can also perform image scaling, noise reduction, contrast enhancement, backlight brightness management, hdr processing, display parameter Gamma adjustment and other processing.
显示屏194用于显示图像,视频等。显示屏194包括显示面板。显示面板可以采用液晶显示屏(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)。在一些实施例中,终端设备400可以包括1个或N个显示屏194,N为大于1的正整数。The display screen 194 is used to display images, videos and the like. The display screen 194 includes a display panel. The display panel can adopt liquid crystal display (liquid crystal display, LCD), organic light-emitting diode (organic light-emitting diode, OLED), active-matrix organic light-emitting diode or 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 or quantum dot light emitting diodes (quantum dot light emitting diodes, QLED). In some embodiments, the terminal device 400 may include 1 or N display screens 194, where N is a positive integer greater than 1.
终端设备400可以通过ISP,一个或多个摄像头193,视频编解码器,GPU,一个或多个显示屏194以及应用处理器等实现拍摄功能。The terminal device 400 may realize the shooting function through an ISP, one or more cameras 193 , a video codec, a GPU, one or more display screens 194 , and an application processor.
外部存储器接口120可以用于连接外部存储卡,例如Micro SD卡,实现扩展终端设备400的存储能力。外部存储卡通过外部存储器接口120与处理器110通信,实现数据存储功能。例如将音乐、照片、视频等数据文件保存在外部存储卡中。The external memory interface 120 may be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the terminal device 400. The external memory card communicates with the processor 110 through the external memory interface 120 to implement a data storage function. For example, save data files such as music, photos, videos, etc. in the external memory card.
内部存储器121可以用于存储一个或多个计算机程序,该一个或多个计算机程序包括指令。处理器110可以通过运行存储在内部存储器121的上述指令,从而使得终端设备400执行各种功能应用以及数据处理等。内部存储器121可以包括存储程序区和存储数据区。其中,存储程序区可存储操作系统;该存储程序区还可以存储一个或多个应用程序(比如图库、联系人等)等。存储数据区可存储终端设备400使用过程中所创建的数据(比如照片,联系人等)等。此外,内部存储器121可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件,闪存器件,通用闪存存储器(universal flash storage,UFS)等。在一些实施例中,处理器110可以通过运行存储在内部存储器121的指令,和/或存储在设置于处理器110中的存储器的指令,来使得终端设备400执行各种功能应用及数据处理。The internal memory 121 may be used to store one or more computer programs including instructions. The processor 110 may execute the above-mentioned instructions stored in the internal memory 121, so that the terminal device 400 executes various functional applications, data processing, and the like. The internal memory 121 may include an area for storing programs and an area for storing data. Wherein, the stored program area can store an operating system; the stored program area can also store one or more application programs (such as a gallery, contacts, etc.) and the like. The storage data area can store data created during the use of the terminal device 400 (such as photos, contacts, etc.) and the like. In addition, the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, flash memory device, universal flash storage (universal flash storage, UFS) and the like. In some embodiments, the processor 110 can cause the terminal device 400 to execute various functional applications and data processing by executing instructions stored in the internal memory 121 and/or instructions stored in the memory provided in the processor 110 .
终端设备400可以通过音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,以及应用处理器等实现音频功能。例如音乐播放、录音等。其中,音频模块170用于将数字音频信息转换成模拟音频信号输出,也用于将模拟音频输入转换为数字音频信号。音频模块170还可以用于对音频信号编码和解码。在一些实施例中,音频模块170可以设置于处理器110中,或将音频模块170的部分功能模块设置于处理器110中。扬声器170A,也称“喇叭”,用于将音频电信号转换为声音信号。终端设备400可以通过扬声器170A收听音乐,或收听免提通话。受话器170B,也称“听筒”,用于将音频电信号转换成声音信号。当终端设备400接听电话或语音信息时,可以通过将受话器170B靠近人耳接听语音。麦克风170C,也称“话筒”或“传声器”,用于将声音信号转换为电信号。当拨打电话或发送语音信息时,用户可以通过人嘴靠近麦克风170C发声,将声音信号输入到麦克风170C。终端设备400可以设置至少一个麦克风170C。在另一些实施例中,终端设备400可以设置两个麦克风170C,除了采集声音信号,还可以实现降噪功能。在另一些实施例中,终端设备400还可以设置三 个,四个或更多麦克风170C,实现采集声音信号,降噪,还可以识别声音来源,实现定向录音功能等。耳机接口170D用于连接有线耳机。耳机接口170D可以是USB接口130,也可以是3.5mm的开放移动终端设备平台(open mobile terminal platform,OMTP)标准接口,还可以是美国蜂窝电信工业协会(cellular telecommunications industry association ofthe USA,CTIA)标准接口。The terminal device 400 may implement audio functions through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the earphone interface 170D, and the application processor. Such as music playback, recording, etc. Wherein, the audio module 170 is used for converting digital audio information into analog audio signal output, and is also used for converting analog audio input into digital audio signal. The audio module 170 may also be used to encode and decode audio signals. In some embodiments, the audio module 170 may be set in the processor 110 , or some functional modules of the audio module 170 may be set in the processor 110 . Speaker 170A, also referred to as a "horn", is used to convert audio electrical signals into sound signals. The terminal device 400 can listen to music through the speaker 170A, or listen to hands-free calls. Receiver 170B, also called "earpiece", is used to convert audio electrical signals into sound signals. When the terminal device 400 answers a phone call or voice information, the receiver 170B can be placed close to the human ear to listen to the voice. The microphone 170C, also called "microphone" or "microphone", is used to convert sound signals into electrical signals. When making a phone call or sending a voice message, the user can put his mouth close to the microphone 170C to make a sound, and input the sound signal to the microphone 170C. The terminal device 400 may be provided with at least one microphone 170C. In some other embodiments, the terminal device 400 may be provided with two microphones 170C, which may also implement a noise reduction function in addition to collecting sound signals. In some other embodiments, the terminal device 400 can also be provided with three, four or more microphones 170C, so as to collect sound signals, reduce noise, identify sound sources, and realize directional recording functions, etc. The earphone interface 170D is used for connecting wired earphones. The earphone interface 170D may be a USB interface 130, or a 3.5mm open mobile terminal platform (open mobile terminal platform, OMTP) standard interface, or a cellular telecommunications industry association of the USA (CTIA) standard. interface.
传感器180可以包括压力传感器180A,陀螺仪传感器180B,气压传感器180C,磁传感器180D,加速度传感器180E,距离传感器180F,接近光传感器180G,指纹传感器180H,温度传感器180J,触摸传感器180K,环境光传感器180L,骨传导传感器180M等。The sensors 180 may include a pressure sensor 180A, a gyro sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, and an ambient light sensor 180L , bone conduction sensor 180M and so on.
终端设备400的软件系统可以采用分层架构,事件驱动架构,微核架构,微服务架构,或云架构。本申请实施例以分层架构的Android系统为例,示例性说明终端设备400的软件结构。The software system of the terminal device 400 may adopt a layered architecture, an event-driven architecture, a micro-kernel architecture, a micro-service architecture, or a cloud architecture. In this embodiment of the present application, an Android system with a layered architecture is taken as an example to illustrate the software structure of the terminal device 400 .
图5是本申请实施例适用的终端设备的一种软件结构框图。分层架构将终端设备400的软件系统分成若干个层,每一层都有清晰的角色和分工。层与层之间通过软件接口通信。在一些实施例中,可以将Android系统分为应用程序层(application,APP)、应用程序框架层(application framework)、安卓运行时(Android runtime)和系统库、硬件抽象层(hardware abstraction layer,HAL)以及内核层(kernel)。在一些实施例中,终端设备400还包括硬件(例如,摄像头,显示屏)。Fig. 5 is a block diagram of a software structure of a terminal device applicable to the embodiment of the present application. The layered architecture divides the software system of the terminal device 400 into several layers, and each layer has a clear role and division of labor. Layers communicate through software interfaces. In some embodiments, the Android system can be divided into application program layer (application, APP), application program framework layer (application framework), Android runtime (Android runtime) and system library, hardware abstraction layer (hardware abstraction layer, HAL) ) and the kernel layer (kernel). In some embodiments, the terminal device 400 further includes hardware (for example, a camera, a display screen).
应用程序层可以包括一系列应用程序包,应用程序层通过调用应用程序框架层所提供的应用程序接口(application programming interface,API)运行应用程序。如图5所示,应用程序包可以包括相机、日历、地图、电话、音乐、WLAN、蓝牙、视频、社交、图库、导航、短信息等应用程序。The application program layer may include a series of application program packages, and the application program layer runs the application program by calling an application program interface (application programming interface, API) provided by the application program framework layer. As shown in FIG. 5 , the application package may include application programs such as camera, calendar, map, phone, music, WLAN, Bluetooth, video, social, gallery, navigation, and short message.
应用程序框架层为应用程序层的应用程序提供API和编程框架。应用程序框架层包括一些预先定义的函数。框架层通过API接口将编程服务(例如,相机服务、媒体服务)提供给应用程序层调用。如图5所示,应用程序框架层可以包括窗口管理器、内容提供器、资源管理器、通知管理器、视图系统、电话管理器等。The application framework layer provides API and programming framework for applications in the application layer. The application framework layer includes some predefined functions. The framework layer provides programming services (for example, camera services, media services) to the application layer through the API interface. As shown in Figure 5, the application framework layer may include a window manager, a content provider, a resource manager, a notification manager, a view system, a phone manager, and the like.
窗口管理器用于管理窗口程序。窗口管理器可以获取显示屏大小,判断是否有状态栏,锁定屏幕,截取屏幕等。A window manager is used to manage window programs. The window manager can get the size of the display screen, determine whether there is a status bar, lock the screen, capture the screen, etc.
内容提供器用来存放和获取数据,并使这些数据可以被应用程序访问。数据可以包括视频图像,音频,拨打和接听的电话,浏览历史和书签,电话簿等。视图系统包括可视控件,例如显示文字的控件,显示图片的控件等。Content providers are used to store and retrieve data and make it accessible to applications. Data can include video images, audio, calls made and received, browsing history and bookmarks, phonebook, etc. The view system includes visual controls, such as controls for displaying text, controls for displaying pictures, and so on.
视图系统可用于构建应用程序。显示界面可以由一个或多个视图组成的。例如,包括短信通知图标的显示界面,可以包括显示文字的视图以及显示图片的视图。The view system can be used to build applications. A display interface can consist of one or more views. For example, a display interface including a text message notification icon may include a view for displaying text and a view for displaying pictures.
电话管理器用于提供终端设备400的通信功能。例如通话状态的管理(包括接通,挂断等)。The phone manager is used to provide the communication function of the terminal device 400 . For example, the management of call status (including connected, hung up, etc.).
资源管理器为应用程序提供各种资源,比如本地化字符串,图标,图片,布局文件,视频文件等。The resource manager provides various resources for the application, such as localized strings, icons, pictures, layout files, video files, etc.
通知管理器使应用程序可以在状态栏中显示通知信息,可以用于传达告知类型的消息,可以短暂停留后自动消失,无需用户交互。比如通知管理器被用于告知下载完 成,消息提醒等。通知管理器还可以是以图表或者滚动条文本形式出现在系统顶部状态栏的通知,例如后台运行的应用程序的通知,还可以是以对话窗口形式出现在屏幕上的通知。例如在状态栏提示文本信息,发出提示音,终端设备400振动,指示灯闪烁等。The notification manager enables the application to display notification information in the status bar, which can be used to convey notification-type messages, and can automatically disappear after a short stay without user interaction. For example, the notification manager is used to notify the download completion, message reminder and so on. The notification manager can also be a notification that appears on the top status bar of the system in the form of a chart or scroll bar text, such as a notification of an application running in the background, or a notification that appears on the screen in the form of a dialog window. For example, a text message is displayed in the status bar, a prompt sound is issued, the terminal device 400 vibrates, and the indicator light flashes.
安卓运行时包括核心库和虚拟机。安卓运行时负责安卓系统的调度和管理。核心库包含两部分:一部分是java API框架使用的java语言需要调用的功能函数,另一部分是安卓的核心库。应用程序层和应用程序框架层运行在虚拟机中。虚拟机将应用程序层和应用程序框架层的java文件执行为二进制文件。虚拟机用于执行对象生命周期的管理,堆栈管理,线程管理,安全和异常的管理,以及垃圾回收等功能。系统库可以包括多个功能模块。例如:表面管理器(surface manager),媒体库(media libraries),三维图形处理库(例如:OpenGL ES),2D图形引擎(例如:SGL)等。The Android runtime includes core libraries and a virtual machine. The Android runtime is responsible for the scheduling and management of the Android system. The core library consists of two parts: one part is the functions that the java language used by the java API framework needs to call, and the other part is the core library of Android. The application layer and the application framework layer run in virtual machines. The virtual machine executes the java files of the application program layer and the application program framework layer as binary files. The virtual machine is used to perform functions such as object life cycle management, stack management, thread management, security and exception management, and garbage collection. A system library can include multiple function modules. For example: surface manager (surface manager), media library (media libraries), 3D graphics processing library (eg: OpenGL ES), 2D graphics engine (eg: SGL), etc.
表面管理器用于对显示子系统进行管理,并且为多个应用程序提供了2D和3D图层的融合。媒体库支持多种常用的音频,视频格式回放和录制,以及静态图像文件等。媒体库可以支持多种音视频编码格式,例如:MPEG4,H.264,MP3,AAC,AMR,JPG,PNG等。三维图形处理库用于实现三维图形绘图,图像渲染,合成和图层处理等。2D图形引擎是2D绘图的绘图引擎。The surface manager is used to manage the display subsystem and provides the fusion of 2D and 3D layers for multiple applications. The media library supports playback and recording of various commonly used audio and video formats, as well as still image files, etc. The media library can support a variety of audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc. The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing and layer processing, etc. 2D graphics engine is a drawing engine for 2D drawing.
硬件抽象层是设备内核驱动的抽象接口,实现向更高级别的java API框架提供访问底层设备的应用程序接口。硬件抽象层可以包括多个库模块,每个模块可以为特定类型的硬件组件实现一个接口,例如,相机接口等。当框架API要求访问设备硬件时,Android系统将为该硬件组件加载库模块。示例性地,如图5所示,库模块包括剪切控制模块和多摄控制模块。The hardware abstraction layer is an abstract interface driven by the device kernel, which provides an application program interface for accessing the underlying device to the higher-level java API framework. A hardware abstraction layer can include multiple library modules, each of which can implement an interface for a specific type of hardware component, for example, a camera interface, etc. When a framework API requires access to device hardware, the Android system will load library modules for that hardware component. Exemplarily, as shown in FIG. 5 , the library module includes a clipping control module and a multi-camera control module.
在本申请实施例中,在相机应用响应了用户的倍率点切(从第一倍率切换至第二倍率)操作之后,剪切控制模块用于确定倍率间隔,得到第一倍率至第二倍率之间的多个过渡倍率。多摄控制模块用于启动或停止摄像头,并且用于实现摄像头之间的切换。In the embodiment of this application, after the camera application responds to the user's magnification point cut (switching from the first magnification to the second magnification) operation, the cutting control module is used to determine the magnification interval, and obtain the distance between the first magnification and the second magnification. Multiple transition ratios between. The multi-camera control module is used to start or stop cameras, and to switch between cameras.
内核层是硬件和软件之间的层。内核层用于驱动硬件,使得硬件工作。示例性地,如图5所示,内核层包含相机驱动。The kernel layer is the layer between hardware and software. The kernel layer is used to drive the hardware and make the hardware work. Exemplarily, as shown in FIG. 5 , the kernel layer includes a camera driver.
硬件层包括摄像头模组和显示屏,其中,摄像头模组包括至少一个摄像头。The hardware layer includes a camera module and a display screen, wherein the camera module includes at least one camera.
应理解,本申请实施例中的终端设备可以具有上述图4和/或图5所示的架构,但本申请实施例对此不作限定。It should be understood that the terminal device in this embodiment of the present application may have the architecture shown in FIG. 4 and/or FIG. 5 above, but this is not limited in this embodiment of the present application.
在一种可能的场景中,终端设备的摄像头模组包括第一摄像头和第二摄像头,在倍率点切操作的过程中可能涉及到第一摄像头与第二摄像头之间的切换,用户可以通过第一摄像头和第二摄像头获取更加丰富的视频、拍照体验。下面结合图6和图7对本场景下的倍率点击切换过程进行介绍。In a possible scenario, the camera module of the terminal device includes a first camera and a second camera, and the switching between the first camera and the second camera may be involved in the process of the magnification point cut operation. The first camera and the second camera provide a richer video and camera experience. The magnification click switching process in this scenario will be introduced below with reference to FIG. 6 and FIG. 7 .
图6是本申请实施例提供的一种点切操作的出图原理示意图。以终端设备包括第一摄像头(例如,主摄镜头)和第二摄像头(例如,长焦镜头)为例,在图6中,示例性地,在用户执行倍率的点切操作之前,第一摄像头的FOV维持在1x的倍率下获取图像,并且在显示屏上显示预览图像。FIG. 6 is a schematic diagram of a drawing principle of a point cutting operation provided by an embodiment of the present application. Taking the terminal device including a first camera (for example, a main camera lens) and a second camera (for example, a telephoto lens) as an example, in FIG. The FOV is maintained at 1x magnification to acquire images, and a preview image is displayed on the display.
示例性地,在如图6所示的点切时刻,用户点击了10x的倍率图标进行倍率切换, 在点切操作发生之后,终端设备可以确定倍率间隔,在第一倍率和第二倍率之间进行档位划分,得到1x到10x之间的多个过渡倍率。如图6所示,以倍率间隔为0.5x为例,终端设备在1x之后可以得到的多个过渡倍率包括:1.5x、2x、2.5x、3x、3.5x、4x、4.5x、5x、5.5x、6x、6.5x、7x、7.5x、8x、8.5x、9x、9.5x。终端设备的摄像头(第一摄像头和/或第二摄像头)可以依次按照多个过渡倍率从小到大的顺序获得图像,终端设备直至获取并显示10x下的预览图像,完成预览图像的平滑过渡。For example, at the moment of point cut as shown in Figure 6, the user clicks the 10x magnification icon to switch between magnifications. After the point cut operation occurs, the terminal device can determine the magnification interval, between the first magnification and the second magnification Carry out gear division to get multiple transition magnifications between 1x and 10x. As shown in Figure 6, taking the magnification interval of 0.5x as an example, the multiple transition magnifications that the terminal device can obtain after 1x include: 1.5x, 2x, 2.5x, 3x, 3.5x, 4x, 4.5x, 5x, 5.5 x, 6x, 6.5x, 7x, 7.5x, 8x, 8.5x, 9x, 9.5x. The cameras (the first camera and/or the second camera) of the terminal device can sequentially obtain images according to the order of multiple transition magnifications from small to large, until the terminal device obtains and displays the preview image under 10x, and completes the smooth transition of the preview image.
示例性地,终端设备可以如图6所示,在用户对第二倍率的点切操作发生之后,在获取第1个过渡倍率(1.5x)下的预览图像之前就启动第二摄像头。Exemplarily, as shown in FIG. 6 , the terminal device may start the second camera before acquiring the preview image at the first transitional magnification (1.5x) after the user's click operation on the second magnification occurs.
如图6所示,响应于用户从1x的倍率点切至10x的操作,终端设备先确定倍率间隔为0.5x,之后终端设备确定1x之后的下一个倍率为1.5x,终端设备可以在倍率过渡到1.5x之前启动第二摄像头获取预览图像。在启动第二摄像头之后,对于第一摄像头而言,第一摄像头可以依次获取1.5x、2x、2.5x、3x、3.5x、4x下的多帧过渡预览图像,并依次在预览视图框中显示多帧过渡预览图像。对于第二摄像头而言,第二摄像头可以依次获取1.5x、2x、2.5x、3x、3.5x、4x下的多帧图像,但是这多帧图像不在预览视图框中显示。As shown in Figure 6, in response to the user’s operation of switching from the magnification point of 1x to 10x, the terminal device first determines that the magnification interval is 0.5x, and then the terminal device determines that the next magnification after 1x is 1.5x, and the terminal device can transition between magnifications. Start the second camera to get a preview image before going to 1.5x. After starting the second camera, for the first camera, the first camera can sequentially acquire multi-frame transition preview images under 1.5x, 2x, 2.5x, 3x, 3.5x, and 4x, and display them in the preview view box in sequence Multi-frame transition preview image. For the second camera, the second camera can sequentially acquire multiple frames of images at 1.5x, 2x, 2.5x, 3x, 3.5x, and 4x, but these multiple frames of images are not displayed in the preview view box.
在倍率过渡到4.5x时,如果第二摄像头在4.5x的倍率下获取的图像的质量与第一摄像头在4.5x的倍率下获取的图像的质量的差距小于或者等于预设阈值时,那么终端设备可以在显示第一摄像头在4.5x的倍率下获取的预览图像之后停止第一摄像头,切换至第二摄像头依次获取5x、5.5x、6x、6.5x、7x、7.5x、8x、8.5x、9x、9.5x下的多帧图像,并依次在预览视图框中显示多帧预览图像。When the magnification transitions to 4.5x, if the difference between the quality of the image captured by the second camera at 4.5x magnification and the quality of the image captured by the first camera at 4.5x magnification is less than or equal to the preset threshold, then the terminal The device can stop the first camera after displaying the preview image captured by the first camera at a magnification of 4.5x, and switch to the second camera to capture 5x, 5.5x, 6x, 6.5x, 7x, 7.5x, 8x, 8.5x, Multi-frame images under 9x and 9.5x, and display multi-frame preview images in the preview view box in turn.
在本申请实施例中,终端设备可以通过确定倍率间隔从而得到多个过渡倍率下的预览图像,并依次在预览视图框中显示,这样可以实现从1x点切至10x的平滑过渡,在预览视图框中显示平滑过渡的预览图像,提高终端设备的变焦效果。In the embodiment of this application, the terminal device can obtain preview images under multiple transition magnifications by determining the magnification interval, and display them in the preview view box in turn, so that a smooth transition from 1x point cut to 10x can be achieved. In the preview view A smooth transition preview image is displayed in the frame to improve the zoom effect of the terminal device.
此外,在点切操作发生之后,终端设备可以启动第二摄像头,实现第一摄像头和第二摄像头两路出图,这样有利于实现第一摄像头和第二摄像头之间的软切换,缓解切换不同摄像头导致的预览图像过渡生硬的问题,提高了不同摄像头切换场景下终端设备的变焦效果。In addition, after the point-cut operation occurs, the terminal device can start the second camera to realize two-way image output from the first camera and the second camera, which is conducive to realizing soft switching between the first camera and the second camera and alleviating differences in switching. The problem of the abrupt transition of the preview image caused by the camera has improved the zoom effect of the terminal device in different camera switching scenarios.
下面结合图7,以分层架构中各层执行的操作对本申请实施例的倍率切换方法进行介绍。The magnification switching method of the embodiment of the present application will be described below with reference to FIG. 7 by using the operations performed by each layer in the layered architecture.
图7是本申请实施例提供的一种倍率切换方法700的示意性流程图。方法700的步骤可以由上述终端设备400执行,终端设备400的摄像头模组可以包括第一摄像头和第二摄像头,终端设备400的硬件抽象层包括剪切控制模块和多摄控制模块,但本申请实施例对此不作限定。方法700包括如下步骤:FIG. 7 is a schematic flowchart of a magnification switching method 700 provided by an embodiment of the present application. The steps of the method 700 can be executed by the above-mentioned terminal device 400, the camera module of the terminal device 400 can include a first camera and a second camera, and the hardware abstraction layer of the terminal device 400 includes a clipping control module and a multi-camera control module, but this application The embodiment does not limit this. Method 700 includes the steps of:
S701,第一摄像头在第一倍率下出图并送显。For S701, the first camera produces images at the first magnification and sends them to display.
S702,响应于用户的点切操作,相机应用向剪切控制模块发送倍率切换请求消息,该倍率切换请求消息用于请求从第一倍率切换至第二倍率,该倍率切换请求消息包括第一倍率和第二倍率。相应地,剪切控制模块接收该倍率切换请求消息。S702, in response to the user's point-and-click operation, the camera application sends a magnification switching request message to the cutting control module, the magnification switching request message is used to request switching from the first magnification to the second magnification, and the magnification switching request message includes the first magnification and second magnification. Correspondingly, the cutting control module receives the magnification switching request message.
S703,剪切控制模块根据预设参数确定倍率间隔。S703, the cutting control module determines the magnification interval according to preset parameters.
示例性地,预设参数包括预设的切换时长或者预设的预览图像帧数。其中,切换 时长表示在用户执行倍率点切操作后,终端设备从第一倍率下的预览视图切换至在预览视图框中可以显示第二倍率下的预览图像的时长限制。预览图像帧数表示终端设备可以在预览视图框中显示第二倍率下的预览图像所需要的用于过渡的预览图像的帧数。Exemplarily, the preset parameters include a preset switching duration or a preset number of preview image frames. Wherein, the switching duration indicates the time limit for the terminal device to switch from the preview view at the first magnification to the preview image at the second magnification in the preview view frame after the user performs the magnification click operation. The number of frames of the preview image indicates the number of frames of the preview image used for transition required for the terminal device to display the preview image at the second magnification in the preview view frame.
示例性地,切换时长为0.1s,而相邻过渡倍率下的预览图像之间的过渡时间为0.02s,如果要从1x切换至5x,那么1s内最多可以完成5次预览图像的过渡,那么终端设备可以确定倍率间隔为1x,实现从1x、2x、3x、4x、直至5x的过渡,共用时0.08s。终端设备还可以确定倍率间隔为2x,首先从1x、3x直至5x的过渡,共用时0.04s。Exemplarily, the switching time is 0.1s, and the transition time between preview images at adjacent transition magnifications is 0.02s. If you want to switch from 1x to 5x, you can complete the transition of preview images up to 5 times within 1s, then The terminal device can determine the magnification interval as 1x, and realize the transition from 1x, 2x, 3x, 4x, to 5x, and the sharing time is 0.08s. The terminal device can also determine that the magnification interval is 2x, firstly the transition from 1x, 3x to 5x takes 0.04s.
示例性地,预览图像帧数为3帧,如果要从1x切换至5x,那么终端设备可以确定倍率间隔为1x,实现从1x、2x、3x、4x、直至5x的过渡,用于过渡的预览图像的帧数为3帧。Exemplarily, the number of frames of the preview image is 3 frames. If it is necessary to switch from 1x to 5x, then the terminal device can determine the magnification interval as 1x to realize the transition from 1x, 2x, 3x, 4x, until 5x, which is used for the preview of the transition The frame number of the image is 3 frames.
示例性地,预览图像帧数为7帧,终端设备还可以确定倍率间隔为0.5x,实现从1x、1.5x、2x、2.5x、3x、3.5x、4x、4.5x直至5x的过渡,用于过渡的预览图像的帧数为7帧。Exemplarily, the number of preview image frames is 7 frames, and the terminal device can also determine the magnification interval as 0.5x to realize the transition from 1x, 1.5x, 2x, 2.5x, 3x, 3.5x, 4x, 4.5x to 5x, using The number of frames of the preview image for the transition is 7 frames.
应理解,为了获得更加平滑的过渡效果,终端设备可以确定较为精细的倍率间隔,本申请实施例倍率间隔的具体取值不作限定。It should be understood that, in order to obtain a smoother transition effect, the terminal device may determine a finer magnification interval, and the specific value of the magnification interval in this embodiment of the present application is not limited.
S704,剪切控制模块根据倍率间隔,确定过渡倍率。S704, the cutting control module determines the transition magnification according to the magnification interval.
S705,多摄控制模块向第一摄像头发送摄像头保持请求消息,该摄像头保持请求消息用于请求第一摄像头保持开启状态,该摄像头保持请求消息可以包括过渡倍率。相应地,第一摄像头接收该摄像头保持请求消息。S705. The multi-camera control module sends a camera keeping request message to the first camera, where the camera keeping request message is used to request the first camera to keep on, and the camera keeping request message may include a transition magnification. Correspondingly, the first camera receives the camera keeping request message.
S706,第一摄像头继续开启,获得过渡倍率下的预览图像。S706, the first camera continues to be turned on to obtain a preview image at a transitional magnification.
S707,第一摄像头向相机应用发送过渡倍率下的预览图像。相应地,相机应用接收该预览图像。S707. The first camera sends the preview image under the transition magnification to the camera application. Accordingly, the camera application receives the preview image.
S708,相机应用在预览视图框中显示过渡倍率下的预览图像。S708. The camera application displays the preview image under the transition magnification in the preview view frame.
应理解,在由第一摄像头切换至第二摄像头之前,相机应用在预览视图框中显示的是第一摄像头获得的预览图像。在由第一摄像头切换至第二摄像头之后,相机应用在预览视图框中显示的是第二摄像头获得的预览图像。It should be understood that before switching from the first camera to the second camera, what the camera application displays in the preview view frame is the preview image obtained by the first camera. After switching from the first camera to the second camera, what the camera application displays in the preview view frame is the preview image obtained by the second camera.
S709,多摄控制模块向第二摄像头发送摄像头启动请求消息,该摄像头启动请求消息用于请求启动第二摄像头,该摄像头启动请求消息可以包括过渡倍率。相应地,第二摄像头接收该摄像头启动请求消息。S709, the multi-camera control module sends a camera startup request message to the second camera, where the camera startup request message is used to request startup of the second camera, and the camera startup request message may include a transition magnification. Correspondingly, the second camera receives the camera start request message.
S710,第二摄像头开启,获得过渡倍率下的预览图像。On S710, the second camera is turned on to obtain a preview image at a transitional magnification.
重复执行上述S704至S710,直至第一摄像头和第二摄像头在目标过渡倍率下获得的预览图像满足预设条件,执行下列S711至S715步骤。The above S704 to S710 are repeatedly executed until the preview images obtained by the first camera and the second camera at the target transition magnification meet the preset condition, and the following steps S711 to S715 are executed.
可选地,该预设条件可以包括:第二摄像头在目标过渡倍率下获得的图像的质量与第一摄像头在目标过渡倍率下获得的图像的质量的差距小于或者等于预设阈值。Optionally, the preset condition may include: the difference between the quality of the image obtained by the second camera at the target transition magnification and the quality of the image obtained by the first camera at the target transition magnification is less than or equal to a preset threshold.
示例性地,以图像的峰值信噪比(peak signal-to-noise ratio,PSNR)作为评价图像的质量的评价指标,如果预设阈值为5dB,第二摄像头在目标过渡倍率下获得的图像的PSNR为40dB,第一摄像头在目标过渡倍率下获得的图像的PSNR为43dB,差距为3dB<5dB,那么多摄控制模块可以控制第一摄像头关闭,切换至第二摄像头持续获取图像并在预览视图框中显示预览图像。Exemplarily, the peak signal-to-noise ratio (peak signal-to-noise ratio, PSNR) of the image is used as the evaluation indicator for evaluating the quality of the image, if the preset threshold is 5dB, the second camera obtains the image under the target transition magnification The PSNR is 40dB, the PSNR of the image obtained by the first camera at the target transition magnification is 43dB, and the difference is 3dB<5dB, then the multi-camera control module can control the first camera to turn off, switch to the second camera to continuously acquire images and display them in the preview view A preview image is displayed in the box.
以倍率间隔为0.5x,第一倍率为1x,第二倍率为10x,目标倍率为5x为例,对于S704,剪切控制模块根据倍率间隔可以确定第一倍率1x之后的第一个过渡倍率为1.5x,之后第一摄像头获得1.5x下的预览图像并发送给相机应用以在预览视图框中显示1.5x下的预览图像,第二摄像头也获得1.5x下的预览图像但不在预览视图框中显示。之后,剪切控制模块根据倍率间隔可以确定1.5x之后的过渡倍率为2x,之后第一摄像头获得2x下的预览图像并发送给相机应用以在预览视图框中显示2x下的预览图像,第二摄像头也获得2x下的预览图像但不在预览视图框中显示,如此循环,第一摄像头依次获取并在预览视图框中显示之后的过渡倍率(2.5x、3x、3.5x、4x、4.5x、5x)下的预览图像,第二摄像头依次获取之后的过渡倍率(2.5x、3x、3.5x、4x、4.5x、5x)下的预览图像但不在预览视图框中显示。Taking the magnification interval as 0.5x, the first magnification as 1x, the second magnification as 10x, and the target magnification as 5x as an example, for S704, the cutting control module can determine the first transition magnification after the first magnification 1x according to the magnification interval as 1.5x, then the first camera gets the preview image at 1.5x and sends it to the camera app to display the preview image at 1.5x in the preview view box, the second camera also gets the preview image at 1.5x but not in the preview view box show. Afterwards, the clipping control module can determine the transition magnification after 1.5x to be 2x according to the magnification interval, and then the first camera obtains the preview image at 2x and sends it to the camera application to display the preview image at 2x in the preview view box, and the second The camera also obtains the preview image under 2x but does not display it in the preview view box. In this way, the first camera obtains and displays the transition magnification in turn in the preview view box (2.5x, 3x, 3.5x, 4x, 4.5x, 5x ), the second camera sequentially acquires the preview images under the subsequent transition magnifications (2.5x, 3x, 3.5x, 4x, 4.5x, 5x), but they are not displayed in the preview view box.
示例性地,还可以以图像的均方误差(mean square error,MSE)、信噪比(signal-to-noise ratio,SNR)或者平均绝对误差(mean absolute error,MAE)作为评价图像的质量的评价指标,本申请实施例对此不作限定。Exemplarily, the mean square error (mean square error, MSE), signal-to-noise ratio (signal-to-noise ratio, SNR) or mean absolute error (mean absolute error, MAE) of the image can also be used as the quality of the evaluation image The evaluation index is not limited in this embodiment of the present application.
S711,多摄控制模块向第一摄像头发送摄像头关闭请求消息,该摄像头关闭请求消息用于请求关闭第一摄像头。相应地,第一摄像头接收该摄像头关闭请求消息。S711. The multi-camera control module sends a camera shutdown request message to the first camera, where the camera shutdown request message is used to request to turn off the first camera. Correspondingly, the first camera receives the camera shutdown request message.
S712,第一摄像头关闭,停止工作。S712, the first camera is turned off and stops working.
S713,第二摄像头获得目标过渡倍率之后的过渡倍率下的预览图像。S713. The second camera acquires a preview image at a transition magnification after the target transition magnification.
S714,第二摄像头向相机应用发送目标过渡倍率之后的过渡倍率下的预览图像,相应地,相机应用接收该预览图像。S714. The second camera sends a preview image at a transition magnification after the target transition magnification to the camera application, and accordingly, the camera application receives the preview image.
对于S711至S714,第一摄像头关闭,第二摄像头继续出图并且将预览图像送至预览视图框中显示,这样完成了摄像头之间的软切换。For S711 to S714, the first camera is closed, and the second camera continues to output pictures and send preview images to the preview view frame for display, thus completing the soft switching between cameras.
S715,相机应用在预览视图框中显示目标过渡倍率之后的过渡倍率下的预览图像。S715. The camera application displays a preview image at a transition magnification after the target transition magnification in the preview view frame.
重复执行上述S713至S715,直至相机应用在预览视图框中显示第二倍率下的预览图像。The above S713 to S715 are repeatedly executed until the camera application displays the preview image at the second magnification in the preview view frame.
以倍率间隔为0.5x,第一倍率为1x,第二倍率为10x,目标倍率为5x为例,第二摄像头获取5.5x下的预览图像并将预览图像发送至预览视图框中显示,如此循环,第二摄像头依次获取之后的过渡倍率(6x、6.5x、7x、7.5x、8x、8.5x、9x、9.5x)下的预览图像,并且相机应用在预览视图框中显示之后的过渡倍率下的预览图像,直至相机应用在预览视图框中显示第二倍率(10x)下的预览图像。由此,可以在倍率点切的过程中实现预览图像的平滑过渡,提高了终端设备的变焦效果。Taking the magnification interval as 0.5x, the first magnification is 1x, the second magnification is 10x, and the target magnification is 5x as an example, the second camera acquires the preview image at 5.5x and sends the preview image to the preview view box for display, and so on. , the second camera sequentially acquires preview images at the subsequent transitional magnifications (6x, 6.5x, 7x, 7.5x, 8x, 8.5x, 9x, 9.5x), and the camera application is displayed in the preview view box at the subsequent transitional magnifications preview image until the camera app displays a preview image at the second magnification (10x) in the preview view box. In this way, a smooth transition of the preview image can be realized during the process of magnification point-cutting, which improves the zooming effect of the terminal device.
在本实施例中,剪切控制模块可以根据倍率间隔依次确定过渡倍率。可选地,剪切控制模块还可以直接确定多个过渡倍率,多个过渡倍率可以是等间隔的,也可以是不等间隔的,本申请实施例对此不作限定。In this embodiment, the shearing control module may sequentially determine the transition magnification according to the magnification interval. Optionally, the cutting control module may also directly determine multiple transition magnifications, and the multiple transition magnifications may be equally spaced or unequally spaced, which is not limited in this embodiment of the present application.
在一种可能的场景中,终端设备的摄像头模组包括至少一个摄像头,在倍率点切操作的过程中,可以由同一个摄像头获取不同倍率下的预览图像并在预览视图框中显示,也就是不涉及到摄像头之间的切换。下面结合图8对本场景下的倍率点击切换过程进行介绍。In a possible scenario, the camera module of the terminal device includes at least one camera, and during the magnification point-cut operation, the same camera can obtain preview images at different magnifications and display them in the preview view box, that is, No switching between cameras is involved. The magnification click switching process in this scenario will be introduced below with reference to FIG. 8 .
图8是本申请实施例提供的另一种倍率切换方法800的示意性流程图。方法800的步骤可以由上述终端设备400执行,终端设备400的摄像头模组可以包括第一摄像 头,终端设备400的硬件抽象层包括剪切控制模块,但本申请实施例对此不作限定。方法800包括如下步骤:FIG. 8 is a schematic flowchart of another magnification switching method 800 provided by an embodiment of the present application. The steps of the method 800 can be executed by the above-mentioned terminal device 400, the camera module of the terminal device 400 can include a first camera, and the hardware abstraction layer of the terminal device 400 includes a clipping control module, but this embodiment of the application does not limit this. Method 800 includes the steps of:
S801,第一摄像头在第一倍率下出图并送显。In S801, the first camera produces images at the first magnification and sends them to display.
S802,响应于用户的点切操作,相机应用向剪切控制模块发送倍率切换请求消息,该倍率切换请求消息用于请求从第一倍率切换至第二倍率,该倍率切换请求消息包括第一倍率和第二倍率。相应地,剪切控制模块接收该倍率切换请求消息。S802, in response to the user's point-and-click operation, the camera application sends a magnification switching request message to the cutting control module, the magnification switching request message is used to request switching from the first magnification to the second magnification, and the magnification switching request message includes the first magnification and second magnification. Correspondingly, the cutting control module receives the magnification switching request message.
S803,剪切控制模块根据预设参数确定倍率间隔。S803, the cutting control module determines the magnification interval according to preset parameters.
S804,剪切控制模块根据倍率间隔,确定过渡倍率。S804, the cutting control module determines the transition magnification according to the magnification interval.
S805,剪切控制模块向第一摄像头发送过渡倍率。相应地,第一摄像头获取过渡倍率。S805, the cropping control module sends the transition magnification to the first camera. Correspondingly, the first camera acquires a transition magnification.
S806,第一摄像头获得过渡倍率下的预览图像。S806. The first camera acquires a preview image under a transition magnification.
S807,第一摄像头向相机应用发送过渡倍率下的预览图像。相应地,相机应用接收该预览图像。S807. The first camera sends the preview image under the transition magnification to the camera application. Accordingly, the camera application receives the preview image.
S808,相机应用在预览视图框中显示过渡倍率下的预览图像。S808, the camera application displays a preview image under a transition magnification in the preview view frame.
重复执行上述S804和S808,直至相机应用在预览视图框中显示第二倍率下的预览图像。The above S804 and S808 are repeatedly executed until the camera application displays the preview image under the second magnification in the preview view frame.
其中,确定倍率间隔以及确定过渡倍率的方式可以参照如方法700所描述的实施例,此处不再赘述。For the manner of determining the magnification interval and determining the transition magnification, reference may be made to the embodiment described in the method 700, which will not be repeated here.
在本申请实施例中,终端设备可以响应于用户的点切操作,使用第一摄像头完成不同倍率下的预览拍摄,第一摄像头可以依次在多个过渡倍率下获得过渡预览图像,有利于实现倍率点切操作过程中预览图像的平滑过渡,提高相机应用的变焦效果。In this embodiment of the application, the terminal device can use the first camera to complete preview shooting at different magnifications in response to the user's point-and-click operation, and the first camera can sequentially obtain transition preview images at multiple transition magnifications, which is conducive to realizing the Smooth transition of the preview image during point-and-cut operations, improving the zoom effect of the camera application.
综上,本申请实施例提供了再一种倍率切换方法900,如图9所示,方法900可以应用于部署有摄像头的终端设备,方法900包括如下步骤:To sum up, the embodiment of the present application provides another magnification switching method 900. As shown in FIG. 9 , the method 900 can be applied to a terminal device equipped with a camera, and the method 900 includes the following steps:
S901,显示摄像头获取到的第一倍率下的第一预览图像;S901, displaying the first preview image acquired by the camera under the first magnification;
S902,响应于用户对第二倍率的选择操作,显示对应于L个过渡倍率的L帧预览图像,该L个过渡倍率包括处于第一倍率和第二倍率之间的L个倍率,L≥1且为整数;S902, in response to the user's selection operation on the second magnification, display L frames of preview images corresponding to L transition magnifications, the L transition magnifications include L magnifications between the first magnification and the second magnification, L≥1 and is an integer;
S903,显示摄像头获取到的第二倍率下的第二预览图像。S903. Display the second preview image acquired by the camera under the second magnification.
在本申请实施例中,在用户对第二倍率的选择操作之前,终端设备可以通过在第一倍率下获得第一预览图像。在用户对第二倍率的选择操作发生之后,终端设备可以在显示第二预览图像之前根据L个过渡倍率显示L帧预览图像,起到从第一预览图像平滑过渡到第二预览图像的作用,有利于改善终端设备的变焦效果,提高用户的使用体验。In the embodiment of the present application, before the user selects the second magnification, the terminal device may obtain the first preview image at the first magnification. After the user selects the second magnification, the terminal device can display L frames of preview images according to L transition magnifications before displaying the second preview image, so as to smoothly transition from the first preview image to the second preview image, It is beneficial to improve the zooming effect of the terminal device and improve the user experience.
其中,用户对第二倍率的选择操作,可以包括如图1所示的用户通过点击倍率图标的方式选择第二倍率,还可以包括用户以其他方式在多个倍率中选择出第二倍率的方式,本申请实施例对此不作限定。Wherein, the user's selection operation of the second magnification may include the user selecting the second magnification by clicking the magnification icon as shown in Figure 1, and may also include the user selecting the second magnification from multiple magnifications in other ways. , which is not limited in this embodiment of the present application.
应理解,L帧预览图像用于从第一预览图像过渡至第二预览图像,L帧预览图像是终端设备按照时间顺序拍摄得到的。It should be understood that the L frames of preview images are used to transition from the first preview image to the second preview image, and the L frames of preview images are captured by the terminal device in chronological order.
还应理解,用户可以是通过对第二倍率的选择操作实现对预览图像的放大效果,用户也可以是通过对第二倍率的选择操作实现对预览图像的缩小效果,本申请实施例 对此不作限定。It should also be understood that the user may realize the zoom-in effect of the preview image by selecting the second magnification, or the user may realize the zoom-out effect of the preview image by selecting the second magnification. limited.
示例性地,第一倍率为1x,第二倍率为7x,过渡倍率从小到大依次为2x、3x、4x、5x、6x,共有5个过渡倍率。对应地,终端设备可以依次显示摄像头在2x、3x、4x、5x、6x下获取到的预览图像。Exemplarily, the first magnification is 1x, the second magnification is 7x, and the transition magnifications are 2x, 3x, 4x, 5x, 6x in descending order, and there are 5 transition magnifications in total. Correspondingly, the terminal device can sequentially display the preview images acquired by the camera at 2x, 3x, 4x, 5x, and 6x.
示例性地,第一倍率为7x,第二倍率为1x,过渡倍率从大到小依次可以为6x、5x、4x、3x、2x,共有5个过渡倍率。对应地,终端设备可以依次显示摄像头在6x、5x、4x、3x、2x下获取到的预览图像。Exemplarily, the first magnification is 7x, the second magnification is 1x, and the transition magnifications can be 6x, 5x, 4x, 3x, and 2x in descending order, and there are 5 transition magnifications in total. Correspondingly, the terminal device can sequentially display the preview images acquired by the camera at 6x, 5x, 4x, 3x, and 2x.
作为一个可选的实施例,在S902之前,方法900还包括:基于第一倍率和第二倍率,确定L个过渡倍率。As an optional embodiment, before S902, the method 900 further includes: determining L transitional magnifications based on the first magnification and the second magnification.
在一种可能的实现方式中,基于第一倍率和第二倍率,确定L个过渡倍率,包括:基于第一倍率、第二倍率、第一倍率与第二倍率之间的切换时长,以及相邻帧之间的时间间隔,确定L个过渡倍率。In a possible implementation manner, determining L transitional magnifications based on the first magnification and the second magnification includes: based on the first magnification, the second magnification, the switching duration between the first magnification and the second magnification, and The time interval between adjacent frames determines L transition magnifications.
在本方式中,第一倍率与第二倍率之间的切换时长可以为如图7所示的实施例中所描述的预设的切换时长,具体可参见对S703的描述,此处不再赘述。In this method, the switching duration between the first magnification and the second magnification can be the preset switching duration described in the embodiment shown in FIG. .
在一种可能的实现方式中,基于第一倍率和第二倍率,确定L个过渡倍率,包括:基于第一倍率、第二倍率和预设的预览图像帧数,确定L个过渡倍率。In a possible implementation manner, determining L transitional magnifications based on the first magnification and the second magnification includes: determining L transitional magnifications based on the first magnification, the second magnification, and a preset preview image frame number.
在本方式中,预设的预览图像帧数可以为如图7所示的实施例中所描述的预设的预览图像帧数,具体可参见对S703的描述,此处不再赘述。In this manner, the preset preview image frame number may be the preset preview image frame number described in the embodiment shown in FIG.
作为一个可选的实施例,方法900中的摄像头包括第一摄像头和第二摄像头,第一预览图像来自第一摄像头,第二预览图像来自第二摄像头。方法900还包括:开启第二摄像头,通过第一摄像头和第二摄像头获取图像,其中,第一摄像头和第二摄像头在同一时间节点获取到的图像是基于相同的过渡倍率拍摄到的。当来自第二摄像头的第M帧图像的质量与来自第一摄像头的第N帧图像的质量的差距小于或者等于预设阈值时,关闭第一摄像头,且在关闭第一摄像头之前显示的预览图像来自第一摄像头。其中,来自第一摄像头的第N帧图像是与来自第二摄像头的第M帧图像在同一时间点、基于相同的过渡倍率拍摄得到的,N≥M≥1,N、M为整数。As an optional embodiment, the camera in method 900 includes a first camera and a second camera, the first preview image is from the first camera, and the second preview image is from the second camera. The method 900 further includes: turning on the second camera, and acquiring images through the first camera and the second camera, wherein the images acquired by the first camera and the second camera at the same time node are based on the same transition magnification. When the difference between the quality of the Mth frame image from the second camera and the quality of the Nth frame image from the first camera is less than or equal to the preset threshold, the first camera is turned off, and the preview image displayed before the first camera is turned off from the first camera. Wherein, the Nth frame of image from the first camera is taken at the same time point as the Mth frame of image from the second camera based on the same transition magnification, N≥M≥1, and N and M are integers.
在本申请实施例中,用户对第二倍率的选择操作涉及到不同摄像头之间切换的场景。这样通过第一摄像头和第二摄像头双路出图的方式有利于提高预览图像的质量,终端设备的图像算法可通过更多的预览图像进行特征优化,在适当的时候切换用于送显的摄像头,有利于提高对焦的稳定性和平滑过渡的效果。In the embodiment of the present application, the user's selection operation of the second magnification involves a scene of switching between different cameras. In this way, the dual-channel output of the first camera and the second camera is conducive to improving the quality of the preview image. The image algorithm of the terminal device can optimize the characteristics of more preview images, and switch the camera used for display at an appropriate time. , which is beneficial to improve the stability of focusing and the effect of smooth transition.
在一种可能的实现方式中,终端设备通过第一摄像头在第一倍率下获取图像,并显示来自第一摄像头获取到的图像,即第一预览图像。在这之后,终端设备可以开启第二摄像头,通过第一摄像头和第二摄像头获取过渡倍率下的图像。在这种方式中,第一摄像头可以和第二摄像头在同一时间点基于相同的过渡倍率获取图像,此时M≠N。In a possible implementation manner, the terminal device acquires an image at a first magnification through the first camera, and displays the image acquired from the first camera, that is, the first preview image. After that, the terminal device can turn on the second camera, and acquire images at transitional magnifications through the first camera and the second camera. In this manner, the first camera and the second camera can acquire images based on the same transition magnification at the same time point, and M≠N at this time.
以图6为例,终端设备在显示来自第一摄像头1x下的预览图像之后开启第二摄像头。在1x至10x之间共有L=17个过渡倍率,第一摄像头和第二摄像头可以在相同的时间节点,获取过渡倍率下的图像。假设M=7,N=8,即第一摄像头的第8帧图像和第二摄像头的第7帧图像对应的过渡倍率为4.5x,也就是来自第二摄像头的第7帧图像的质量与来自第一摄像头的第8帧图像的质量的差距小于或者等于预设阈值,那么 终端设备可以关闭第一摄像头。Taking FIG. 6 as an example, the terminal device turns on the second camera after displaying the preview image from the first camera 1x. There are L=17 transition magnifications between 1x and 10x, and the first camera and the second camera can acquire images at the transition magnification at the same time node. Suppose M=7, N=8, that is, the transition magnification corresponding to the 8th frame image of the first camera and the 7th frame image of the second camera is 4.5x, that is, the quality of the 7th frame image from the second camera is the same as that from the If the quality difference of the eighth frame image of the first camera is less than or equal to the preset threshold, then the terminal device may turn off the first camera.
其中,预设阈值可以为如图7所示的实施例中所描述的预设阈值,具体可参见对S710的描述,此处不再赘述。Wherein, the preset threshold may be the preset threshold described in the embodiment shown in FIG. 7 , for details, refer to the description of S710 , which will not be repeated here.
在另一种可能的实现方式中,终端设备通过第一摄像头在第一倍率下获取图像,并显示来自第一摄像头获取到的图像,即第一预览图像。同时,终端设备已经开启了第二摄像头,通过第二摄像头在第一倍率下获取图像但是不显示第二摄像头获取到的图像。在这种方式中,如果第二摄像头在第一倍率下获取的图像(即第一预览图像)的质量与第一摄像头在第一倍率下获取的图像的质量的差距小于或者等于预设阈值,此时M=N。In another possible implementation manner, the terminal device acquires an image at a first magnification through the first camera, and displays the image acquired from the first camera, that is, the first preview image. At the same time, the terminal device has turned on the second camera, and the second camera captures an image at the first magnification but does not display the image captured by the second camera. In this manner, if the difference between the quality of the image captured by the second camera at the first magnification (that is, the first preview image) and the quality of the image captured by the first camera at the first magnification is less than or equal to the preset threshold, At this time M=N.
以图6为例,假设图中启动第二摄像头的时间提前至点切时刻之前,终端设备通过第一摄像头和第二摄像头在1x的倍率下获取图像,并显示来自第一摄像头在1x的倍率下获取到的预览图像。如果第二摄像头在1x的倍率下获取到的预览图像的质量与第一摄像头在1x的倍率下获取到的预览图像的质量的差距小于或者等于预设阈值,那么终端设备可以在显示来自第一摄像头在1x的倍率下获取到的预览图像之后,关闭第一摄像头,之后通过第二摄像头获取并显示过渡倍率下的预览图像,直至获取并显示10x下的预览图像。这种情况下,N=M=1。Take Figure 6 as an example, assuming that the start time of the second camera in the figure is advanced to before the point-cutting time, the terminal device acquires images at a magnification of 1x through the first camera and the second camera, and displays images from the first camera at a magnification of 1x. Get the preview image below. If the difference between the quality of the preview image acquired by the second camera at a magnification of 1x and the quality of the preview image acquired by the first camera at a magnification of 1x is less than or equal to the preset threshold, then the terminal device can display images from the first After the camera acquires the preview image at a magnification of 1x, turn off the first camera, and then acquire and display a preview image at a transitional magnification through the second camera until the preview image at 10x is acquired and displayed. In this case, N=M=1.
同理,还可能存在N=M=2,N=M=3,N=M=4等情况。以N=M=2为例,终端设备通过第一摄像头和第二摄像头在1x和1.5x的倍率下获取图像,并显示来自第一摄像头在1x和1.5x的倍率下获取到的预览图像,如果第二摄像头在1.5x的倍率下获取到的预览图像的质量与第一摄像头在1.5x的倍率下获取到的预览图像的质量的差距小于或者等于预设阈值,那么终端设备可以在显示来自第一摄像头在1.5x的倍率下获取到的预览图像之后,关闭第一摄像头。Similarly, situations such as N=M=2, N=M=3, N=M=4 may also exist. Taking N=M=2 as an example, the terminal device acquires images at magnifications of 1x and 1.5x through the first camera and the second camera, and displays preview images obtained from the first camera at magnifications of 1x and 1.5x, If the difference between the quality of the preview image acquired by the second camera at the magnification of 1.5x and the quality of the preview image acquired by the first camera at the magnification of 1.5x is less than or equal to the preset threshold, then the terminal device can display the image from After the preview image is acquired by the first camera at a magnification of 1.5x, the first camera is turned off.
应理解,不论M与N的取值大小如何,在第一摄像头关闭之后,终端设备可以显示已经开启的第二摄像头获取的预览图像,实现倍率的平滑过渡,改善终端设备的变焦效果。It should be understood that regardless of the values of M and N, after the first camera is turned off, the terminal device can display the preview image obtained by the second camera that has been turned on, so as to achieve a smooth transition of magnification and improve the zoom effect of the terminal device.
还应理解,上述实施例中以终端设备包括第一摄像头和第二摄像头为例介绍了摄像头之前的软切换过程,但是本申请实施例对终端设备的摄像头的数量不作限定。示例性地,终端设备还可以包括第三摄像头,在用户点击切换操作发生之后,还可以由第二摄像头切换至第三摄像头。It should also be understood that, in the foregoing embodiments, the soft switching process before the cameras is introduced by taking the terminal device including the first camera and the second camera as an example, but the embodiment of the present application does not limit the number of cameras of the terminal device. Exemplarily, the terminal device may further include a third camera, and the second camera may be switched to the third camera after the user clicks to switch.
示例性地,第一摄像头为超广角摄像头,第二摄像头为广角摄像头,第三摄像头为长焦摄像头,假设超广角摄像头所支持的倍率范围为-1x,广角摄像头所支持的倍率范围为1x至3.5x,长焦摄像头所支持的倍率范围为4x至7x。Exemplarily, the first camera is an ultra-wide-angle camera, the second camera is a wide-angle camera, and the third camera is a telephoto camera. Assume that the magnification range supported by the ultra-wide-angle camera is -1x, and the magnification range supported by the wide-angle camera is from 1x to 3.5x, the magnification range supported by the telephoto camera is 4x to 7x.
终端设备可以在倍率为-1x时开启超广角摄像头,显示来自超广角摄像头的预览图像,在用户的点击切换的倍率在广角摄像头所支持的倍率范围内时,终端设备开启广角摄像头,确定过渡倍率,通过超广角摄像头和广角摄像头双路出图,在合适时机显示来自广角摄像头获取的预览图像。在用户的点击切换的倍率在长焦摄像头所支持的倍率范围内时,终端设备开启长焦摄像头,确定过渡倍率,通过广角摄像头和长焦摄像头双路出图,在合适时机显示来自长焦摄像头获取的预览图像。通过这样两路出图的方式便于显示平滑过渡的预览图像,提高终端设备的变焦效果。The terminal device can turn on the ultra-wide-angle camera when the magnification is -1x, and display the preview image from the ultra-wide-angle camera. When the magnification switched by the user's click is within the magnification range supported by the wide-angle camera, the terminal device turns on the wide-angle camera to determine the transition magnification , through the ultra-wide-angle camera and the wide-angle camera dual output, display the preview image from the wide-angle camera at the right time. When the magnification switched by the user's click is within the magnification range supported by the telephoto camera, the terminal device will turn on the telephoto camera, determine the transition magnification, output images through the wide-angle camera and the telephoto camera, and display images from the telephoto camera at an appropriate time. Get the preview image. Through such a two-way image output method, it is convenient to display a preview image with a smooth transition, and improve the zoom effect of the terminal device.
图10是本申请实施例提供的一种终端设备的界面示意图。以终端设备为手机为例,图10中示出了手机的a界面、b界面和c界面。其中,a界面示出了手机中的多个应用,示例性地,用户可以点击相机图标打开相机应用进行拍照。在用户点击相机应用后,手机显示b界面,b界面为拍摄界面。示例性地,b界面包括多个的倍率图标,当前相机的倍率为1x,用户可以点击不同的倍率图标以实现不同的倍率切换。示例性地,用户点击了5x的倍率图标,手机可以依次显示c界面至f界面。在c界面,终端设备可以显示第一帧用于过渡的预览图像,在d界面,终端设备显示第二帧用于过渡的预览图像,在e界面,终端设备显示第三帧用于过渡的预览图像,在f界面,终端设备可以显示最终的5x界面的预览图像。FIG. 10 is a schematic diagram of an interface of a terminal device provided in an embodiment of the present application. Taking the terminal device as a mobile phone as an example, FIG. 10 shows interface a, interface b and interface c of the mobile phone. Wherein, interface a shows multiple applications in the mobile phone, for example, the user can click the camera icon to open the camera application to take pictures. After the user clicks the camera application, the mobile phone displays interface b, where interface b is a shooting interface. Exemplarily, interface b includes a plurality of magnification icons, the current camera magnification is 1x, and the user can click on different magnification icons to switch between different magnifications. Exemplarily, the user clicks the magnification icon of 5x, and the mobile phone may display interfaces c to f in sequence. On interface c, the terminal device can display the preview image of the first frame for transition, on interface d, the terminal device can display the preview image of the second frame for transition, and on interface e, the terminal device can display the preview image of the third frame for transition Image, in the f interface, the terminal device can display a preview image of the final 5x interface.
可以看到,相较于图1而言,本申请实施例提供的倍率切换方法可以在倍率的点击切换操作发生之后,为用户显示多帧用于过渡的预览图像,以此实现平滑过渡的目的,改善终端设备的变焦效果,提高用户的使用体验。It can be seen that, compared with Figure 1, the magnification switching method provided by the embodiment of the present application can display multiple frames of preview images for the transition to the user after the click switching operation of the magnification occurs, so as to achieve the purpose of smooth transition , improve the zoom effect of the terminal device, and improve the user experience.
应理解,图10中显示的预览图像的数量仅为示例,实际可以根据具体地过渡倍率的个数显示对应帧数的预览图像,本申请实施例对此不作限定。It should be understood that the number of preview images displayed in FIG. 10 is only an example, and preview images corresponding to the number of frames may actually be displayed according to the specific number of transition magnifications, which is not limited in this embodiment of the present application.
应理解,上述各过程的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本申请实施例的实施过程构成任何限定。It should be understood that the sequence numbers of the above processes do not mean the order of execution, and the execution order of each process should be determined by its functions and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present application.
上文中结合图4至图10,详细描述了根据本申请实施例的倍率切换方法,下面将结合图11和图12详细描述根据本申请实施例的倍率切换装置。The magnification switching method according to the embodiment of the present application is described in detail above with reference to FIG. 4 to FIG. 10 , and the magnification switching device according to the embodiment of the present application will be described in detail below in conjunction with FIG. 11 and FIG. 12 .
图11示出了本申请实施例提供的一种倍率切换装置1100的示意性框图,该装置1100包括获取模块1110和处理模块1120。FIG. 11 shows a schematic block diagram of a magnification switching device 1100 provided by an embodiment of the present application. The device 1100 includes an acquisition module 1110 and a processing module 1120 .
其中,获取模块1110用于:获取第一倍率下的第一预览图像;以及,获取第二倍率下的第二预览图像。处理模块1120用于:显示摄像头获取到的第一倍率下的第一预览图像;响应于用户对第二倍率的选择操作,显示对应于L个过渡倍率的L帧预览图像,L个过渡倍率包括处于第一倍率和第二倍率之间的L个倍率,L≥1且为整数;以及,显示摄像头获取到的第二倍率下的第二预览图像。Wherein, the acquiring module 1110 is configured to: acquire a first preview image at a first magnification; and acquire a second preview image at a second magnification. The processing module 1120 is configured to: display the first preview image acquired by the camera at the first magnification; in response to the user's selection operation on the second magnification, display L frames of preview images corresponding to L transitional magnifications, the L transitional magnifications include L magnifications between the first magnification and the second magnification, L≥1 and an integer; and displaying the second preview image acquired by the camera at the second magnification.
可选地,处理模块1120用于:基于第一倍率和第二倍率,确定L个过渡倍率。Optionally, the processing module 1120 is configured to: determine L transitional magnifications based on the first magnification and the second magnification.
可选地,处理模块1120用于:基于第一倍率、第二倍率、第一倍率与第二倍率之间的切换时长,以及相邻帧之间的时间间隔,确定L个过渡倍率。Optionally, the processing module 1120 is configured to: determine L transitional magnifications based on the first magnification, the second magnification, the switching duration between the first magnification and the second magnification, and the time interval between adjacent frames.
可选地,处理模块1120用于:基于第一倍率、第二倍率和预设的预览图像帧数,确定L个过渡倍率。Optionally, the processing module 1120 is configured to: determine L transitional magnifications based on the first magnification, the second magnification, and the preset preview image frame number.
可选地,摄像头包括第一摄像头和第二摄像头,第一预览图像来自第一摄像头,第二预览图像来自第二摄像头。处理模块1120用于:开启第二摄像头。获取模块1110用于:通过第一摄像头和第二摄像头获取图像,其中,第一摄像头和第二摄像头在同一时间节点获取到的图像是基于相同的过渡倍率拍摄到的;以及,当来自第二摄像头的第M帧图像的质量与来自第一摄像头的第N帧图像的质量的差距小于或者等于预设阈值时,关闭第一摄像头,且在关闭第一摄像头之前显示的预览图像来自第一摄像头。其中,来自第一摄像头的第N帧图像是与来自第二摄像头的第M帧图像在同一时间点、基于相同的倍率拍摄得到的,N≥M≥1,N、M为整数。Optionally, the camera includes a first camera and a second camera, the first preview image is from the first camera, and the second preview image is from the second camera. The processing module 1120 is configured to: turn on the second camera. The acquisition module 1110 is configured to: acquire images through the first camera and the second camera, wherein the images acquired by the first camera and the second camera at the same time node are based on the same transition magnification; When the difference between the image quality of the Mth frame image from the camera and the image quality of the Nth frame image from the first camera is less than or equal to the preset threshold, the first camera is turned off, and the preview image displayed before the first camera is turned off is from the first camera . Wherein, the Nth frame of image from the first camera is taken at the same time point and based on the same magnification as the Mth frame of image from the second camera, N≥M≥1, and N and M are integers.
在一个可选的例子中,本领域技术人员可以理解,装置1100可以具体为上述实施 例中的终端设备,或者,上述实施例中终端设备的功能可以集成在装置1100中。上述功能可以通过硬件实现,也可以通过硬件执行相应的软件实现。该硬件或软件包括一个或多个与上述功能相对应的模块。装置1100可以用于执行上述方法实施例中与终端设备对应的各个流程和/或步骤。In an optional example, those skilled in the art may understand that the apparatus 1100 may specifically be the terminal device in the foregoing embodiment, or the functions of the terminal device in the foregoing embodiment may be integrated in the apparatus 1100. The above functions can be implemented by hardware, or can be implemented by executing corresponding software by hardware. The hardware or software includes one or more modules corresponding to the above functions. Apparatus 1100 may be configured to execute various processes and/or steps corresponding to the terminal device in the foregoing method embodiments.
应理解,这里的装置1100以功能模块的形式体现。这里的术语“模块”可以指应用特有集成电路(application specific integrated circuit,ASIC)、电子电路、用于执行一个或多个软件或固件程序的处理器(例如共享处理器、专有处理器或组处理器等)和存储器、合并逻辑电路和/或其它支持所描述的功能的合适组件。在本申请的实施例,图11中的装置1100也可以是芯片或者芯片系统,例如:片上系统(system on chip,SoC)。It should be understood that the apparatus 1100 here is embodied in the form of functional modules. The term "module" here may refer to an application specific integrated circuit (ASIC), an electronic circuit, a processor (such as a shared processor, a dedicated processor, or a group processor, etc.) and memory, incorporated logic, and/or other suitable components to support the described functionality. In the embodiment of the present application, the device 1100 in FIG. 11 may also be a chip or a chip system, for example: a system on chip (system on chip, SoC).
图12示出了本申请实施例提供的另一种倍率切换装置1200的示意性框图。该装置1200包括处理器1210、收发器1220和存储器1230。其中,处理器1210、收发器1220和存储器1230通过内部连接通路互相通信,该存储器1230用于存储指令,该处理器1210用于执行该存储器1230存储的指令,以控制该收发器1220发送信号和/或接收信号。FIG. 12 shows a schematic block diagram of another magnification switching device 1200 provided by an embodiment of the present application. The apparatus 1200 includes a processor 1210 , a transceiver 1220 and a memory 1230 . Wherein, the processor 1210, the transceiver 1220 and the memory 1230 communicate with each other through an internal connection path, the memory 1230 is used to store instructions, and the processor 1210 is used to execute the instructions stored in the memory 1230 to control the transceiver 1220 to send signals and /or to receive a signal.
应理解,装置1200可以具体为上述实施例中的终端设备,或者,上述实施例中终端设备的功能可以集成在装置1200中,装置1200可以用于执行上述方法实施例中与终端设备对应的各个步骤和/或流程。可选地,该存储器1230可以包括只读存储器和随机存取存储器,并向处理器提供指令和数据。存储器的一部分还可以包括非易失性随机存取存储器。例如,存储器还可以存储设备类型的信息。该处理器1210可以用于执行存储器中存储的指令,并且该处理器执行该指令时,该处理器可以执行上述方法实施例中与终端设备对应的各个步骤和/或流程。It should be understood that the apparatus 1200 may specifically be the terminal device in the foregoing embodiments, or, the functions of the terminal device in the foregoing embodiments may be integrated into the apparatus 1200, and the apparatus 1200 may be used to execute various functions corresponding to the terminal apparatus in the foregoing method embodiments. steps and/or processes. Optionally, the memory 1230 may include read-only memory and random-access memory, and provides instructions and data to the processor. A portion of the memory may also include non-volatile random access memory. For example, the memory may also store device type information. The processor 1210 may be configured to execute instructions stored in the memory, and when the processor executes the instructions, the processor may execute various steps and/or processes corresponding to the terminal device in the foregoing method embodiments.
应理解,在本申请实施例中,该处理器1210可以是中央处理单元(central processing unit,CPU),该处理器还可以是其他通用处理器、数字信号处理器(DSP)、专用集成电路(ASIC)、现场可编程门阵列(FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。It should be understood that, in the embodiment of the present application, the processor 1210 may be a central processing unit (central processing unit, CPU), and the processor may also be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits ( ASIC), Field Programmable Gate Array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor, or the processor may be any conventional processor, or the like.
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的模块及算法步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。Those skilled in the art can appreciate that the modules and algorithm steps of the examples described in conjunction with the embodiments disclosed herein can be implemented by electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are executed by hardware or software depends on the specific application and design constraints of the technical solution. Skilled artisans may use different methods to implement the described functions for each specific application, but such implementation should not be regarded as exceeding the scope of the present application.
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统、装置和模块的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Those skilled in the art can clearly understand that for the convenience and brevity of the description, the specific working process of the above-described system, device, and module can refer to the corresponding process in the foregoing method embodiment, and details are not repeated here.
在本申请所提供的几个实施例中,应该理解到,所揭露的系统、装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述模块的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个模块或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些 接口,装置或模块的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided in this application, it should be understood that the disclosed systems, devices and methods may be implemented in other ways. For example, the device embodiments described above are only illustrative. For example, the division of the modules is only a logical function division. In actual implementation, there may be other division methods. For example, multiple modules or components can be combined or May be integrated into another system, or some features may be ignored, or not implemented. In another point, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces, and the indirect coupling or communication connection of devices or modules may be in electrical, mechanical or other forms.
所述作为分离部件说明的模块可以是或者也可以不是物理上分开的,作为模块显示的部件可以是或者也可以不是物理模块,即可以位于一个地方,或者也可以分布到多个网络模块上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。The modules described as separate components may or may not be physically separated, and the components displayed as modules may or may not be physical modules, that is, they may be located in one place, or may be distributed to multiple network modules. Part or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
另外,在本申请各个实施例中的各功能模块可以集成在一个处理模块中,也可以是各个模块单独物理存在,也可以两个或两个以上模块集成在一个模块中。In addition, each functional module in each embodiment of the present application may be integrated into one processing module, each module may exist separately physically, or two or more modules may be integrated into one module.
所述功能如果以软件功能模块的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(read-only memory,ROM)、随机存取存储器(random access memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。If the functions are implemented in the form of software function modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or the part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including Several instructions are used to make a computer device (which may be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (read-only memory, ROM), random access memory (random access memory, RAM), magnetic disk or optical disc and other media that can store program codes. .
以上所述,仅为本申请的具体实施方式,但本申请实施例的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请实施例揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请实施例的保护范围之内。因此,本申请实施例的保护范围应所述以权利要求的保护范围为准。The above is only the specific implementation of the application, but the protection scope of the embodiment of the application is not limited thereto, and any skilled person familiar with the technical field can easily think of changes within the technical scope disclosed in the embodiment of the application Or replacement, should be covered within the scope of protection of the embodiments of the present application. Therefore, the scope of protection of the embodiments of the present application should be based on the scope of protection of the claims.

Claims (10)

  1. 一种倍率切换方法,其特征在于,应用于部署有摄像头的终端设备,所述方法包括:A magnification switching method, characterized in that it is applied to a terminal device equipped with a camera, and the method includes:
    显示所述摄像头获取到的第一倍率下的第一预览图像;displaying the first preview image acquired by the camera at the first magnification;
    响应于用户对第二倍率的选择操作,显示对应于L个过渡倍率的L帧预览图像,所述L个过渡倍率包括处于所述第一倍率和所述第二倍率之间的L个倍率,L≥1且为整数;In response to the user's selection operation on the second magnification, displaying L frames of preview images corresponding to L transitional magnifications, the L transitional magnifications including L magnifications between the first magnification and the second magnification, L≥1 and is an integer;
    显示所述摄像头获取到的所述第二倍率下的第二预览图像。and displaying the second preview image acquired by the camera under the second magnification.
  2. 根据权利要求1所述的方法,其特征在于,在所述响应于用户对第二倍率的选择操作,显示对应于L个过渡倍率的L帧预览图像之前,所述方法还包括:The method according to claim 1, characterized in that, before displaying L frames of preview images corresponding to L transitional magnifications in response to the selection operation of the second magnification by the user, the method further comprises:
    基于所述第一倍率和所述第二倍率,确定所述L个过渡倍率。The L transitional magnifications are determined based on the first magnification and the second magnification.
  3. 根据权利要求2所述的方法,其特征在于,所述基于所述第一倍率、所述第二倍率,确定所述L个过渡倍率,包括:The method according to claim 2, wherein said determining said L transitional magnifications based on said first magnification and said second magnification comprises:
    基于所述第一倍率、所述第二倍率、所述第一倍率与所述第二倍率之间的切换时长,以及相邻帧之间的时间间隔,确定所述L个过渡倍率。The L transitional magnifications are determined based on the first magnification, the second magnification, the switching duration between the first magnification and the second magnification, and the time interval between adjacent frames.
  4. 根据权利要求2所述的方法,其特征在于,所述基于所述第一倍率、所述第二倍率,确定所述L个过渡倍率,包括:The method according to claim 2, wherein said determining said L transitional magnifications based on said first magnification and said second magnification comprises:
    基于所述第一倍率、所述第二倍率和预设的预览图像帧数,确定所述L个过渡倍率。The L transitional magnifications are determined based on the first magnification, the second magnification, and a preset preview image frame number.
  5. 根据权利要求1至4中任一项所述的方法,其特征在于,所述摄像头包括第一摄像头和第二摄像头,所述第一预览图像来自所述第一摄像头,所述第二预览图像来自所述第二摄像头;The method according to any one of claims 1 to 4, wherein the camera includes a first camera and a second camera, the first preview image comes from the first camera, and the second preview image from said second camera;
    所述方法还包括:The method also includes:
    开启所述第二摄像头;Turn on the second camera;
    通过所述第一摄像头和所述第二摄像头获取图像,所述第一摄像头和所述第二摄像头在同一时间节点获取到的图像是基于相同的过渡倍率拍摄到的;Images are acquired by the first camera and the second camera, and the images acquired by the first camera and the second camera at the same time node are captured based on the same transition magnification;
    当来自所述第二摄像头的第M帧图像与来自所述第一摄像头的第N帧图像的质量差距小于或者等于预设阈值时,关闭所述第一摄像头,且在关闭所述第一摄像头之前显示的预览图像来自所述第一摄像头,其中,来自所述第一摄像头的第N帧图像是与来自所述第二摄像头的第M帧图像在同一时间节点、基于相同的倍率拍摄到的,N≥M≥1,N、M为整数。When the quality difference between the Mth frame image from the second camera and the Nth frame image from the first camera is less than or equal to the preset threshold, turn off the first camera, and turn off the first camera The previously displayed preview image is from the first camera, wherein the Nth frame of image from the first camera is captured at the same time node and based on the same magnification as the Mth frame of image from the second camera , N≥M≥1, N and M are integers.
  6. 一种倍率切换装置,其特征在于,包括用于执行如权利要求1-5中任一项所述方法的模块。A magnification switching device, characterized by comprising a module for performing the method according to any one of claims 1-5.
  7. 一种倍率切换装置,其特征在于,包括:处理器,所述处理器与存储器耦合,所述存储器用于存储计算机程序,当所述处理器调用所述计算机程序时,使得所述装置执行如权利要求1-5中任一项所述的方法。A magnification switching device, characterized in that it includes: a processor, the processor is coupled with a memory, the memory is used to store a computer program, and when the processor invokes the computer program, the device executes the following steps: The method according to any one of claims 1-5.
  8. 一种终端设备,其特征在于,包括:处理器、存储器和收发器,所述存储器用于存储指令,所述收发器用于和其他设备通信,所述处理器用于执行所述存储器中存储的指令,以使所述终端设备执行如权利要求1-5中任一项所述的方法。A terminal device, characterized in that it includes: a processor, a memory, and a transceiver, the memory is used to store instructions, the transceiver is used to communicate with other devices, and the processor is used to execute the instructions stored in the memory , so that the terminal device executes the method according to any one of claims 1-5.
  9. 一种计算机可读存储介质,其特征在于,用于存储计算机程序,当所述计算机程序在计算机上运行时,使得所述计算机执行如权利要求1-5中任一项所述的方法。A computer-readable storage medium is characterized in that it is used to store a computer program, and when the computer program is run on a computer, the computer is made to execute the method according to any one of claims 1-5.
  10. 一种计算机程序产品,其特征在于,所述计算机程序产品中包括计算机程序代码,当所述计算机程序代码在计算机上运行时,使得所述计算机实现如权利要求1-5中任一项所述的方法。A computer program product, characterized in that the computer program product includes computer program code, and when the computer program code is run on a computer, the computer implements the computer program as described in any one of claims 1-5. Methods.
PCT/CN2022/140486 2022-02-24 2022-12-20 Magnification switching method and magnification switching apparatus WO2023160179A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202210178265.5 2022-02-24
CN202210178265.5A CN116709016A (en) 2022-02-24 2022-02-24 Multiplying power switching method and multiplying power switching device

Publications (2)

Publication Number Publication Date
WO2023160179A1 true WO2023160179A1 (en) 2023-08-31
WO2023160179A9 WO2023160179A9 (en) 2024-01-18

Family

ID=87764650

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/140486 WO2023160179A1 (en) 2022-02-24 2022-12-20 Magnification switching method and magnification switching apparatus

Country Status (2)

Country Link
CN (1) CN116709016A (en)
WO (1) WO2023160179A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117560574A (en) * 2024-01-10 2024-02-13 荣耀终端有限公司 Shooting method, electronic equipment and readable storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111726528A (en) * 2020-06-24 2020-09-29 Oppo广东移动通信有限公司 Camera switching method, device, terminal and computer storage medium
CN111885305A (en) * 2020-07-28 2020-11-03 Oppo广东移动通信有限公司 Preview picture processing method and device, storage medium and electronic equipment
CN112995511A (en) * 2021-03-02 2021-06-18 Oppo广东移动通信有限公司 Camera switching method and device, electronic equipment and storage medium
US20210368104A1 (en) * 2019-01-30 2021-11-25 Arcsoft Corporation Limited Zooming Method and Electronic Device Using the Same
CN115484375A (en) * 2021-05-31 2022-12-16 华为技术有限公司 Shooting method and electronic equipment

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012227886A (en) * 2011-04-22 2012-11-15 Canon Inc Imaging apparatus and control method thereof
CN111050062B (en) * 2018-10-15 2022-01-14 华为技术有限公司 Shooting method and electronic equipment
CN113728354A (en) * 2019-04-30 2021-11-30 华为技术有限公司 Image processing method and device
CN113037995A (en) * 2019-12-25 2021-06-25 华为技术有限公司 Shooting method and terminal in long-focus scene
CN113010738B (en) * 2021-02-08 2024-01-30 维沃移动通信(杭州)有限公司 Video processing method, device, electronic equipment and readable storage medium
CN113055592B (en) * 2021-03-11 2023-03-21 Oppo广东移动通信有限公司 Image display method and device, electronic equipment and computer readable storage medium
CN113727016A (en) * 2021-06-15 2021-11-30 荣耀终端有限公司 Shooting method and electronic equipment

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20210368104A1 (en) * 2019-01-30 2021-11-25 Arcsoft Corporation Limited Zooming Method and Electronic Device Using the Same
CN111726528A (en) * 2020-06-24 2020-09-29 Oppo广东移动通信有限公司 Camera switching method, device, terminal and computer storage medium
CN111885305A (en) * 2020-07-28 2020-11-03 Oppo广东移动通信有限公司 Preview picture processing method and device, storage medium and electronic equipment
CN112995511A (en) * 2021-03-02 2021-06-18 Oppo广东移动通信有限公司 Camera switching method and device, electronic equipment and storage medium
CN115484375A (en) * 2021-05-31 2022-12-16 华为技术有限公司 Shooting method and electronic equipment

Also Published As

Publication number Publication date
WO2023160179A9 (en) 2024-01-18
CN116709016A (en) 2023-09-05

Similar Documents

Publication Publication Date Title
AU2018430381B2 (en) Flexible screen display method and terminal
JP2022532102A (en) Screenshot method and electronic device
JP7355941B2 (en) Shooting method and device in long focus scenario
EP3968670A1 (en) Bluetooth-based object searching method and electronic device
CN114079893B (en) Bluetooth communication method, terminal device and computer readable storage medium
WO2020155875A1 (en) Display method for electronic device, graphic user interface and electronic device
CN113935898A (en) Image processing method, system, electronic device and computer readable storage medium
CN113973189A (en) Display content switching method, device, terminal and storage medium
CN114115770A (en) Display control method and related device
WO2023160179A1 (en) Magnification switching method and magnification switching apparatus
CN115119048B (en) Video stream processing method and electronic equipment
WO2023000746A1 (en) Augmented reality video processing method and electronic device
CN116663587A (en) Two-dimensional code identification method and identification device
CN115967851A (en) Quick photographing method, electronic device and computer readable storage medium
CN116077943B (en) Method for scheduling system resources and related device
CN116095220B (en) Parameter determination method and related device
CN116709018B (en) Zoom bar segmentation method and electronic equipment
WO2022179371A1 (en) Tiled display method, electronic device, and system
CN117479008B (en) Video processing method, electronic equipment and chip system
WO2024067037A1 (en) Service calling method and system, and electronic device
CN116389884B (en) Thumbnail display method and terminal equipment
WO2023124829A1 (en) Collaborative voice input method, electronic device, and computer-readable storage medium
CN116095219B (en) Notification display method and terminal device
EP4290375A1 (en) Display method, electronic device and system
EP4287014A1 (en) Display method, electronic device, and system

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

Country of ref document: EP

Kind code of ref document: A1