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

Magnification switching method and magnification switching apparatus Download PDF

Info

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

Definitions

  • the present application relates to the field of terminals, and more specifically, to a magnification switching method and a magnification switching device.
  • terminal devices for example, mobile phones.
  • the camera realizes the zoom function through magnification switching.
  • the user starts preview shooting through the camera at a first magnification (for example, 1x). If the user wants to shoot a distant object through the terminal device, the user can click the magnification icon of the second magnification (for example, 5x) to Switch the magnification, and then preview and shoot at the second magnification.
  • a first magnification for example, 1x
  • the user can click the magnification icon of the second magnification (for example, 5x) to Switch the magnification, and then preview and shoot at the second magnification.
  • the camera's field of view jumps directly from the first magnification to the second magnification, and the user will see the preview image at the first magnification jump directly to the third magnification.
  • the preview image at double magnification will have the problem of stiff transition in the preview image, which will make the zoom effect of the terminal device poor and reduce the user experience.
  • This application provides a magnification switching method and a magnification switching device, which are conducive to achieving a smooth transition of preview images under a magnification click switching operation and improving the zoom effect of the terminal device.
  • a magnification switching method is provided, which is applied to a terminal device equipped with a camera.
  • the method includes: displaying a first preview image at a first magnification acquired by the camera.
  • L frame preview images corresponding to L transition magnifications are displayed, the L transition magnifications include L magnifications between the first magnification and the second magnification, L ⁇ 1 and is an integer .
  • the terminal device may obtain the first preview image at the first magnification.
  • the terminal device may display L frames of preview images according to L transition magnifications before displaying the second preview image. In this way, L is added before the first preview image is switched to the second preview image.
  • the frame is used for the transition of the preview image, which can make the preview image displayed by the terminal device smoothly transition, which is conducive to improving the zoom effect of the terminal device and improving the user experience.
  • the method before displaying L frame preview images corresponding to L transition magnifications in response to the user's selection operation of the second magnification, the method further includes: based on the first magnification and the second magnification, determine L transition magnifications.
  • L transition magnifications are determined based on the first magnification and the second magnification, including: based on the first magnification, the second magnification, the first magnification and the second magnification.
  • the switching duration between frames and the time interval between adjacent frames determine L transition magnifications.
  • the terminal device can determine L transition magnifications based on the switching duration between the first magnification and the second magnification and the time interval between adjacent frames. This is conducive to completing the transition from the first magnification to the first magnification within the switching duration. Smooth transition to second magnification.
  • L transition magnifications are determined based on the first magnification and the second magnification, including: based on the first magnification, the second magnification and a preset preview The number of image frames determines the L transition magnifications.
  • the camera of the terminal device includes a first camera and a second camera
  • the first preview image is from the first camera
  • the second preview image is from the Describe the second camera.
  • the method also includes: turning on the second camera. Images are acquired through the first camera and the second camera, where the images acquired by the first camera and the second camera at the same time node are captured based on the same transition magnification.
  • 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
  • the first camera is closed, and the preview image displayed before closing the first camera From the first camera.
  • the Nth frame image from the first camera is captured at the same time point and at the same magnification as the Mth frame image from the second camera, N ⁇ M ⁇ 1, and N and M are integers.
  • the second camera can acquire images based on the first magnification at the same time point as the first camera, but the terminal device displays the first preview image from the first camera, and the terminal device can acquire the image based on the first magnification with the second camera.
  • the terminal device may acquire an image based on a first magnification through a first camera, and display the first preview image from the first camera. After that, the terminal device can turn on the second camera, acquire images through the first camera and the second camera at the same time point based on the same transition magnification, and display the preview image from the first camera until the Mth image from the second camera. If 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 the preset threshold, the first camera is turned off. In this case, M ⁇ N.
  • the terminal device can output pictures through the first camera and the second camera, and close the first camera at the appropriate time. From opening the second camera to closing the first camera, the first camera and the second camera are realized. The soft switching between them is conducive to obtaining a preview image with a smoother transition.
  • a magnification switching device including an acquisition module and a processing module.
  • the acquisition module is used to: acquire the first preview image at the first magnification; and acquire the second preview image at the second magnification.
  • the processing module is used to: display the first preview image at the first magnification acquired by the camera; in response to the user's selection operation of the second magnification, display L frame 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; and display the second preview image at the second magnification acquired by the camera.
  • the processing module is configured to: determine L transition magnifications based on the first magnification and the second magnification.
  • 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 switching duration between adjacent frames. time interval, determine L transition magnifications.
  • the processing module is configured to: determine L transition magnifications based on the first magnification, the second magnification and the preset number of preview image frames.
  • the camera includes a first camera and a second camera
  • the first preview image comes from the first camera
  • the second preview image comes from the second camera.
  • the processing module is used for: turning on the second camera.
  • the acquisition module is configured to acquire images through the first camera and the second camera, where the images acquired by the first camera and the second camera at the same time node are captured based on the same transition magnification.
  • the processing module is also configured to: 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 a preset threshold, close the first camera, and close the first camera.
  • the preview image previously displayed by the camera is from the first camera.
  • the Nth frame of rabbit food from the first camera and the Mth frame of image from the second camera are captured at the same time node and based on the same magnification, N ⁇ M ⁇ 1, N and M are integers.
  • a third aspect provides another magnification switching device, including a processor, which is coupled to a memory and can be used to execute instructions in the memory to implement the method in any of the possible implementations of the first aspect.
  • the device further includes memory.
  • the device further includes a communication interface, and the processor is coupled to the communication interface.
  • the magnification switching device is a terminal device.
  • the communication interface may be a transceiver or an input/output interface.
  • the magnification switching device is a chip configured in the terminal device.
  • the communication interface may be an input/output interface.
  • a processor including: an input circuit, an output circuit and a processing circuit.
  • the processing circuit is configured to receive signals through the input circuit and transmit signals through the output circuit, so that the processor executes the method in any of the possible implementations of the first aspect.
  • 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, and the signal output by the output circuit may be, for example, but not limited to, output to and transmitted by the transmitter, and the input circuit and the output A circuit may be the same circuit that functions as an input circuit and an output circuit at different times.
  • This application does not limit the specific implementation methods of the processor and various circuits.
  • a processing device including a processor and a memory.
  • the processor is used to read instructions stored in the memory, and can receive signals through a receiver and transmit signals through a transmitter to execute the method in any of the possible implementations of the first aspect.
  • processors there are one or more processors and one or more memories.
  • the memory may be integrated with the processor, or the memory may be provided separately from the processor.
  • the memory can be a non-transitory memory, such as a read-only memory (ROM), which can be integrated on the same chip as the processor, or can be set in different On the chip, this application does not limit the type of memory and the arrangement of the memory and the processor.
  • ROM read-only memory
  • sending instruction information may be a process of outputting instruction information from the processor
  • receiving capability information may be a process of the processor receiving input capability information.
  • the data output by the processing can be output to the transmitter, and the input data received by the processor can come from the receiver.
  • the transmitter and receiver can be collectively called a transceiver.
  • the processing device in the above fifth aspect can be a chip, and the processor can be implemented by hardware or software.
  • the processor can be a logic circuit, an integrated circuit, etc.; when implemented by software,
  • the processor can be a general-purpose processor, which is implemented by reading the software code stored in the memory.
  • the memory can be integrated in the processor, or can be located outside the processor and exist independently.
  • a computer program product includes: computer program code.
  • the computer program code When the computer program code is run, it causes the computer to execute the method in any of the possible implementations of the first aspect.
  • a computer-readable storage medium stores a computer program. When the computer program is run, it causes the computer to execute the method in any of the possible implementations of the first aspect. .
  • Figure 1 is a schematic diagram of the interface of a terminal device
  • Figure 2 is a schematic diagram of the drawing principle of a point-cut operation
  • Figure 3 is a schematic flow chart of a drawing method for point-cut operation
  • Figure 4 is a schematic structural diagram of a terminal device applicable to the embodiment of the present application.
  • Figure 5 is a software structure block diagram of a terminal device applicable to the embodiment of the present application.
  • Figure 6 is a schematic diagram of the drawing principle of a point-cut operation provided by the embodiment of the present application.
  • Figure 7 is a schematic flow chart of a magnification switching method provided by an embodiment of the present application.
  • Figure 8 is a schematic flow chart of another magnification switching method provided by an embodiment of the present application.
  • Figure 9 is a schematic flow chart of yet another magnification switching method provided by an embodiment of the present application.
  • Figure 10 is a schematic interface diagram of a terminal device provided by an embodiment of the present application.
  • Figure 11 is a schematic block diagram of a magnification switching device provided by an embodiment of the present application.
  • Figure 12 is a schematic block diagram of another magnification switching device provided by an embodiment of the present application.
  • APP camera application
  • magnification click switching which can be referred to as point switching
  • Figure 1 is a schematic diagram of the interface of a terminal device. Taking the terminal device as an example of a mobile phone, Figure 1 shows the a interface, b interface and c interface of the mobile phone.
  • the a interface shows multiple applications in the mobile phone.
  • the user can click the camera icon to open the camera application. Take photos.
  • the mobile phone displays interface b, which is the shooting interface.
  • interface b includes multiple magnification icons.
  • the current magnification of the camera is 1x.
  • the user can click on different magnification icons to switch between different magnifications.
  • the user clicks on the 5x magnification icon and the mobile phone can display the c interface.
  • the magnification has been switched to 5x, and the mobile phone can obtain a preview image at a 10x magnification.
  • the mobile phone can display a preview image of the object to be photographed in the b interface through the camera at a magnification of 1x, and the camera's field of view (FOV) is maintained at 1x.
  • FOV field of view
  • the phone can display a preview image of the object to be photographed in the c interface at 5x magnification through the camera, and the camera's FOV is maintained at 10x.
  • Figure 2 is a schematic diagram of the drawing principle of a point-cut operation.
  • the camera of the mobile phone can include a main camera lens and a telephoto lens.
  • the FOV of the main camera lens is maintained at 1x magnification and continues to capture a preview image, and the preview image is displayed on the display.
  • the mobile phone can switch from the main camera lens to the telephoto lens, and the FOV of the telephoto lens remains at the 10x magnification.
  • FIG. 3 is a schematic flowchart of a drawing drawing method 300 for a point-and-cut operation.
  • Method 300 includes the following steps:
  • the first camera produces a picture at the first magnification and sends it to the display.
  • the camera application in response to the user's point-cut operation, sends a magnification switching request message to the 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.
  • the hardware abstraction layer receives the rate switching request message.
  • the hardware abstraction layer sends a camera close request message to the first camera.
  • the camera close request message is used to request to close the first camera.
  • the first camera receives the camera closing request message.
  • the hardware abstraction layer sends a camera start request message to the second camera.
  • the camera start request message is used to request to start the second camera.
  • the camera start request message includes the second magnification.
  • the second camera receives the camera start request message.
  • drawing means that the camera captures the object and obtains a preview image
  • sending and displaying means displaying the preview image on the display screen.
  • the preview image can be displayed in a preview view box built by the camera application.
  • the FOV of the camera directly jumps from the first magnification (which can be 1x in Figure 1 or Figure 2 above) to the second magnification ( It can be 5x in Figure 1 or 10x in Figure 2). This will cause the preview image seen by the user to jump and the transition will be stiff, resulting in a poor zoom effect of the camera application and a poor user experience.
  • embodiments of the present application provide a magnification switching method and a magnification switching device.
  • the terminal device can introduce multi-frame transition preview images in the process of magnification point switching to achieve magnification
  • the smooth transition of the preview image during point-and-click switching will help improve the zoom effect of the camera application, thus improving the user experience.
  • the first, second and various numerical numbers are only for 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, distinguish between different cameras, etc.
  • “at least one” refers to one or more, and “plurality” refers to two or more.
  • “And/or” describes the association of associated objects, indicating that there can be three relationships, for example, A and/or B, which can mean: A exists alone, A and B exist simultaneously, and B exists alone, where A, B can be singular or plural.
  • the character "/” generally indicates that the related objects are in an "or” relationship.
  • “At least one of the following” or similar expressions thereof refers to any combination of these items, including any combination of a single item (items) or a plurality of items (items).
  • At least one of a, b and c can mean: a, or b, or c, or a and b, or a and c, or b and c, or a, b and c, where a, b, c can be single or multiple.
  • the terminal device in the embodiment of the present application can be a handheld device, a vehicle-mounted device, etc. with a wireless connection function.
  • the terminal device can also be called a terminal (terminal), user equipment (UE), mobile station (MS) ), mobile terminal (mobile terminal, MT), etc.
  • terminals are: mobile phones, tablets, smart TVs, laptops, tablets (Pad), handheld computers, mobile Internet devices (mobile internet device, MID), virtual reality (VR) ) equipment, augmented reality (AR) equipment, wireless terminals in industrial control, wireless terminals in self-driving, wireless terminals in remote medical surgery, smart grids ( 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 protocols (session initiation protocol, SIP) telephone, wireless local loop (WLL) station, personal digital assistant (personal digital assistant, PDA), handheld device with wireless communication capabilities, computing device or other device connected to a wireless modem Processing equipment, vehicle-mounted equipment, wearable equipment, terminal equipment in the 5G network or terminal equipment in the future evolved public land mobile communication network (public land mobile network, PLMN), etc., the embodiments of the present application adopt the method for the terminal equipment Specific technologies and specific equipment forms are not limited.
  • the terminal device may also be a wearable device.
  • Wearable devices can also be called wearable smart devices. It is a general term for applying wearable technology to intelligently design daily wear and develop wearable devices, such as glasses, gloves, watches, clothing and shoes, etc.
  • 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 just hardware devices, but also achieve powerful functions through software support, data interaction, and cloud interaction.
  • wearable smart devices include full-featured, large-sized devices that can achieve complete or partial functions without relying on smartphones, such as smart watches or smart glasses, and those that only focus on a certain type of application function and need to cooperate with other devices such as smartphones.
  • the terminal device may be a device for realizing the function of the terminal device, or a device that can support the terminal device to realize the function, such as a chip system, and the device may be installed in the terminal.
  • the chip system may be composed of chips, or may include chips and other discrete devices.
  • the terminal equipment in the embodiment of this application may also be called: user equipment (UE), mobile station (MS), mobile terminal (mobile terminal, MT), access terminal, user unit, user station, Mobile station, mobile station, remote station, remote terminal, mobile device, user terminal, terminal, wireless communication equipment, user agent or user device, etc.
  • UE user equipment
  • MS mobile station
  • MT mobile terminal
  • access terminal user unit, user station, Mobile station, mobile station, remote station, remote terminal, mobile device, user terminal, terminal, wireless communication equipment, user agent or user device, etc.
  • FIG. 4 is a schematic structural diagram of a terminal device applicable to the embodiment of the present application.
  • the terminal device 400 may include: a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, and 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, headphone interface 170D, sensor 180, button 190, motor 191, indicator 192, camera 193, display screen 194, and subscriber identification module (subscriber identification module, SIM) card interface 195, etc.
  • SIM subscriber identification module
  • the processor 110 may include one or more processing units.
  • the processor 110 may include an application processor (application processor, AP), a modem processor, a graphics processing unit (GPU), and 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.
  • different processing units can be independent devices or integrated in one or more processors.
  • the terminal device 400 may also include one or more processors 110.
  • the processor may be the nerve center and command center of the terminal device 400 .
  • the processor can generate operation control signals based on the instruction opcode and timing signals to complete the control of fetching and executing instructions.
  • the processor 110 may also be provided with a memory for storing instructions and data.
  • the memory in processor 110 is cache memory.
  • the memory may hold instructions or data used or recycled by processor 110 . If the processor 110 needs to use the instructions or data again, it can be called directly from the memory. This avoids repeated access and reduces the waiting time of the processor 110, thereby improving the efficiency of the terminal device 400.
  • processor 110 may include one or more interfaces.
  • Interfaces may include integrated circuit (inter-integrated circuit, I2C) interface, integrated circuit built-in audio (inter-integrated circuit sound, I2S) interface, pulse code modulation (pulse code modulation, PCM) interface, universal asynchronous receiver and transmitter (universal asynchronous receiver/transmitter (UART) interface, mobile industry processor interface (MIPI), general-purpose input/output (GPIO) interface, subscriber identity module (SIM) interface, and /or USB interface, etc.
  • the USB interface 130 is an interface that complies with USB standard specifications, and may specifically be a Mini USB interface, a Micro USB interface, a USB Type C interface, etc.
  • 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 to play audio through them.
  • the interface connection relationships between the modules illustrated in the embodiment of the present application are schematic illustrations and do not constitute a structural limitation on the terminal device 400 .
  • the terminal device 400 may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.
  • the wireless communication function of the terminal device 400 can be implemented through the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor and the baseband processor.
  • Antenna 1 and Antenna 2 are used to transmit and receive electromagnetic wave signals.
  • Each antenna in terminal device 400 may be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve antenna utilization. For example: Antenna 1 can be reused as a diversity antenna for a wireless LAN. In other embodiments, antennas may be used in conjunction with tuning switches.
  • the mobile communication module 150 can provide wireless communication solutions including 2G/3G/4G/5G applied to the terminal device 400.
  • the mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier, etc.
  • the mobile communication module 150 can receive electromagnetic waves through the antenna 1, perform filtering, amplification and other processing on the received electromagnetic waves, and transmit them to the modem processor for demodulation.
  • the mobile communication module 150 can also amplify the signal modulated by the modem processor and convert it into electromagnetic waves through the antenna 1 for radiation.
  • at least part of the functional modules of the mobile communication module 150 may be disposed in the processor 110 .
  • 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 provided in the same device.
  • a modem processor may include a modulator and a demodulator.
  • the modulator is used to modulate the low-frequency baseband signal to be sent into a medium-high frequency signal.
  • the demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal.
  • the demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing.
  • the application processor outputs sound signals through audio devices (not limited to speaker 170A, receiver 170B, etc.), or displays images or videos through display screen 194.
  • the modem processor may be a stand-alone device.
  • the modem processor may be independent of the processor 110 and may be provided in the same device as the mobile communication module 150 or other functional modules.
  • the wireless communication module 160 can provide applications on the terminal device 400 including wireless local area networks (WLAN), Bluetooth, global navigation satellite system (global navigation satellite system, GNSS), frequency modulation (frequency modulation, FM), NFC, Infrared technology (infrared, IR) and other wireless communication solutions.
  • 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.
  • 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, etc.
  • the above-mentioned GNSS can include global positioning system (GPS), global navigation satellite system (GLONASS), Beidou navigation satellite system (BDS), quasi-zenith satellite system (quasi) -zenith satellite system (QZSS) and/or satellite based augmentation systems (SBAS).
  • GPS global positioning system
  • GLONASS global navigation satellite system
  • BDS Beidou navigation satellite system
  • QZSS quasi-zenith satellite system
  • SBAS satellite based augmentation systems
  • the terminal device 400 can implement display functions through a GPU, a display screen 194, an application processor, and the like.
  • Application processors may include NPUs and/or DPUs.
  • the GPU is an image processing microprocessor 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.
  • NPU is a neural network (NN) computing processor. By drawing on the structure of biological neural networks, such as the transmission mode between neurons in the human brain, it can quickly process input information and can continuously learn by itself.
  • the NPU can realize intelligent cognitive applications of the terminal device 400, such as image recognition, face recognition, speech recognition, text understanding, etc.
  • the DPU is also called the display sub-system (display sub-system, DSS).
  • the DPU is used to adjust the color of the display screen 194.
  • the DPU can adjust the color of the display screen through a color three-dimensional lookup table (3D look up table, 3D LUT). Adjustment.
  • the DPU can also perform image scaling, noise reduction, contrast enhancement, backlight brightness management, HDR processing, display parameter Gamma adjustment, etc.
  • the display screen 194 is used to display images, videos, etc.
  • Display 194 includes a display panel.
  • the display panel can use a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active matrix organic light emitting diode or an active matrix organic light emitting diode (active-matrix organic light emitting diode).
  • LCD liquid crystal display
  • OLED organic light-emitting diode
  • AMOLED organic light-emitting diode
  • FLED flexible light-emitting diode
  • Miniled MicroLed, Micro-oLed or quantum dot light emitting diode (QLED).
  • the terminal device 400 may include 1 or N display screens 194, where N is a positive integer greater than 1.
  • the terminal device 400 can implement 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.
  • the external memory interface 120 can 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 the data storage function. For example, save data files such as music, photos, videos, etc. on an external memory card.
  • Internal memory 121 may be used to store one or more computer programs including instructions.
  • the processor 110 can execute the above instructions stored in the internal memory 121 to cause the terminal device 400 to execute various functional applications, data processing, and the like.
  • the internal memory 121 may include a program storage area and a data storage area. Among them, the stored program area can store the operating system; the stored program area can also store one or more application programs (such as gallery, contacts, etc.). The storage data area can store data created during use of the terminal device 400 (such as photos, contacts, etc.).
  • the internal memory 121 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, universal flash storage (UFS), etc.
  • the processor 110 can cause the terminal device 400 to perform various functional applications and data processing by executing instructions stored in the internal memory 121 and/or instructions stored in a memory provided in the processor 110 .
  • the terminal device 400 can implement audio functions through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone interface 170D, and the application processor. For example, music playback, recording, etc.
  • the audio module 170 is used to convert digital audio information into an analog audio signal for output, and is also used to convert analog audio input into a digital audio signal. Audio module 170 may also be used to encode and decode audio signals. In some embodiments, the audio module 170 may be provided in the processor 110 , or some functional modules of the audio module 170 may be provided in the processor 110 .
  • Speaker 170A also called “speaker" 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 a hands-free call.
  • Receiver 170B also called “earpiece” is used to convert audio electrical signals into sound signals.
  • the voice can be heard by bringing the receiver 170B close to the human ear.
  • Microphone 170C also known as “microphone” or “microphone” is used to convert sound signals into electrical signals.
  • the user can speak close to the microphone 170C with the human mouth and input the sound signal to the microphone 170C.
  • the terminal device 400 may be provided with at least one microphone 170C.
  • the terminal device 400 may be provided with two microphones 170C, which in addition to collecting sound signals, may also implement a noise reduction function. In other embodiments, the terminal device 400 can also be equipped with three, four or more microphones 170C to collect sound signals, reduce noise, identify sound sources, and implement directional recording functions, etc.
  • the headphone interface 170D is used to connect wired headphones.
  • the headphone interface 170D can be a USB interface 130, or it can be a 3.5mm open mobile terminal platform (OMTP) standard interface, or it can be a cellular telecommunications industry association of the USA (CTIA) standard. interface.
  • OMTP open mobile terminal platform
  • CTIA cellular telecommunications industry association of the USA
  • 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, etc.
  • the software system of the terminal device 400 may adopt a layered architecture, an event-driven architecture, a microkernel architecture, a microservice architecture, or a cloud architecture.
  • the embodiment of this application takes the Android system with a layered architecture as an example to illustrate the software structure of the terminal device 400 .
  • FIG. 5 is a software structure block diagram 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 clear roles and division of labor.
  • the layers communicate through software interfaces.
  • the Android system can be divided into application layer (application, APP), application framework layer (application framework), Android runtime (Android runtime) and system library, hardware abstraction layer (HAL) ) and the kernel layer.
  • the terminal device 400 also includes hardware (eg, camera, display screen).
  • the application layer can include a series of application packages.
  • the application layer runs applications by calling the application programming interface (API) provided by the application framework layer.
  • API application programming interface
  • the application package can include applications such as camera, calendar, map, phone, music, WLAN, Bluetooth, video, social, gallery, navigation, short message, etc.
  • the application framework layer provides APIs and programming frameworks 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 API interfaces.
  • the application framework layer can include a window manager, content provider, resource manager, notification manager, view system, phone manager, etc.
  • a window manager is used to manage window programs.
  • the window manager can obtain the display size, 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 this data accessible to applications.
  • Data can include video images, audio, calls made and received, browsing history and bookmarks, phone books, etc.
  • the view system includes visual controls, such as controls that display text, controls that display pictures, etc.
  • a view system can be used to build applications.
  • the display interface can be composed of one or more views.
  • a display interface including a text message notification icon may include a view for displaying text and a view for displaying pictures.
  • the phone manager is used to provide communication functions of the terminal device 400 .
  • call status management including connected, hung up, etc.
  • the resource manager provides various resources to applications, such as localized strings, icons, pictures, layout files, video files, etc.
  • the notification manager allows applications 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.
  • the notification manager is used to notify download completion, message reminders, etc.
  • the notification manager can also be notifications that appear in the status bar at the top of the system in the form of charts or scroll bar text, such as notifications for applications running in the background, or notifications that appear on the screen in the form of conversation windows. For example, text information is prompted in the status bar, a prompt sound is emitted, the terminal device 400 vibrates, and the indicator light flashes, etc.
  • 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 contains two parts: one part is the functional functions that need to be called by the Java language used by the Java API framework, and the other part is the core library of Android.
  • the application layer and application framework layer run in virtual machines.
  • the virtual machine executes the java files of the application layer and application framework layer into binary files.
  • the virtual machine is used to perform object life cycle management, stack management, thread management, security and exception management, and garbage collection and other functions.
  • System libraries can include multiple functional modules. For example: surface manager (surface manager), media libraries (media libraries), 3D graphics processing libraries (for example: OpenGL ES), 2D graphics engines (for example: SGL), etc.
  • 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 a variety of commonly used audio and video formats, as well as static 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, composition and layer processing.
  • 2D Graphics Engine is a drawing engine for 2D drawing.
  • the hardware abstraction layer is an abstract interface of the device kernel driver, which provides application program interfaces for accessing underlying devices to higher-level Java API frameworks.
  • the 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.
  • the Android system loads a library module for that hardware component.
  • the library module includes a shearing control module and a multi-shot control module.
  • the shear control module is used to determine the magnification interval to obtain the ratio between the first magnification and the second magnification. multiple transition magnifications between.
  • the multi-camera control module is used to start or stop cameras, and to switch between cameras.
  • the kernel layer is the layer between hardware and software.
  • the kernel layer is used to drive the hardware and make the hardware work.
  • the kernel layer contains a camera driver.
  • the hardware layer includes a camera module and a display screen, where the camera module includes at least one camera.
  • terminal device in the embodiment of the present application may have the architecture shown in FIG. 4 and/or FIG. 5, but the embodiment of the present application is not limited to this.
  • the camera module of the terminal device includes a first camera and a second camera.
  • the process of magnification point switching may involve switching between the first camera and the second camera.
  • the user can use the third camera to The first camera and the second camera provide a richer video and photo experience.
  • the magnification click switching process in this scenario is introduced below with reference to Figures 6 and 7.
  • FIG. 6 is a schematic diagram of the drawing principle of a point cutting operation provided by an embodiment of the present application.
  • the terminal device as an example including a first camera (for example, a main camera lens) and a second camera (for example, a telephoto lens)
  • the first camera for example, before the user performs a magnification point-and-cut operation, the first camera
  • the FOV is maintained at 1x magnification to acquire images, and a preview image is displayed on the display.
  • the terminal device can determine the magnification interval, between the first magnification and the second magnification. Divide the gears to obtain multiple transition magnifications between 1x and 10x. As shown in Figure 6, taking the magnification interval as 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 camera of the terminal device (the first camera and/or the second camera) can sequentially obtain images according to multiple transition magnifications in order from small to large.
  • the terminal device obtains and displays the preview image at 10x to complete the smooth transition of the preview image.
  • the terminal device can start the second camera before acquiring the preview image at the first transition magnification (1.5x) after the user performs a point-and-cut operation on the second magnification.
  • the terminal device in response to the user's operation of switching from the magnification point of 1x to 10x, the terminal device first determines the magnification interval to be 0.5x, and then the terminal device determines that the next magnification after 1x is 1.5x.
  • the terminal device can make the magnification transition during the magnification transition.
  • Start the second camera to get preview images before 1.5x.
  • the first camera can sequentially obtain multi-frame transition preview images at 1.5x, 2x, 2.5x, 3x, 3.5x, and 4x, and display them in the preview view box sequentially Multi-frame transition preview image.
  • the second camera can sequentially acquire multi-frame images at 1.5x, 2x, 2.5x, 3x, 3.5x, and 4x, but these multi-frame images are not displayed in the preview view box.
  • the terminal The device can stop the first camera after displaying the preview image acquired by the first camera at 4.5x, and switch to the second camera to acquire 5x, 5.5x, 6x, 6.5x, 7x, 7.5x, 8x, 8.5x, Multi-frame images at 9x and 9.5x, and multiple-frame preview images are displayed in the preview view box in sequence.
  • the terminal device can obtain preview images at multiple transition magnifications by determining the magnification interval, and display them in the preview view box sequentially. This can achieve a smooth transition from the 1x point to 10x.
  • the preview view A preview image with smooth transition is displayed in the frame to improve the zoom effect of the terminal device.
  • the terminal device can activate the second camera to realize two-way picture output from the first camera and the second camera. This is conducive to realizing soft switching between the first camera and the second camera and easing the differences in switching.
  • the issue of stiff preview image transition caused by the camera has improved the zoom effect of the terminal device in different camera switching scenarios.
  • magnification switching method according to the embodiment of the present application will be introduced below with reference to FIG. 7 , based on the operations performed by each layer in the layered architecture.
  • Figure 7 is a schematic flow chart of a magnification switching method 700 provided by an embodiment of the present application.
  • the steps of 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.
  • the hardware abstraction layer of the terminal device 400 includes a shearing control module and a multi-camera control module.
  • Method 700 includes the following steps:
  • the first camera produces a picture at the first magnification and sends it to the display.
  • the camera application sends a magnification switching request message to the shearing control module.
  • the magnification switching request message is used to request switching from the first magnification to the second magnification.
  • the magnification switching request message includes the first magnification. and second magnification.
  • the shearing control module receives the magnification switching request message.
  • the shearing control module determines the magnification interval according to the preset parameters.
  • the preset parameters include a preset switching duration or a preset number of preview image frames.
  • 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 box after the user performs a magnification point switching operation.
  • the number of frames of the preview image indicates the number of frames of the preview image required for the transition that the terminal device can display in the preview view frame the preview image at the second magnification.
  • the switching duration is 0.1s
  • the transition time between preview images at adjacent transition magnifications is 0.02s. If you want to switch from 1x to 5x, up to 5 preview image transitions can be completed within 1s, then The terminal equipment can determine the magnification interval to be 1x, realizing the transition from 1x, 2x, 3x, 4x, and up to 5x, with a total time of 0.08s. The terminal device can also determine the magnification interval to be 2x. The first transition from 1x, 3x to 5x takes a total of 0.04s.
  • the number of preview image frames is 3 frames. If you want to switch from 1x to 5x, the terminal device can determine the magnification interval to be 1x to realize the transition from 1x, 2x, 3x, 4x, and up to 5x for preview of the transition.
  • the number of frames of the image is 3 frames.
  • the number of preview image frames is 7, and the terminal device can also determine the magnification interval to be 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 for the transition preview image is 7 frames.
  • the terminal device can determine a finer magnification interval.
  • the specific value of the magnification interval in the embodiment of the present application is not limited.
  • the shearing control module determines the transition magnification according to the magnification interval.
  • the multi-camera control module sends a camera hold request message to the first camera.
  • the camera hold request message is used to request the first camera to stay on.
  • the camera hold request message may include a transition magnification.
  • the first camera receives the camera hold request message.
  • the first camera continues to be turned on to obtain a preview image at a transition magnification.
  • the first camera sends the preview image at the transition magnification to the camera application. Accordingly, the camera application receives the preview image.
  • the camera application displays the preview image at the transition magnification in the preview view box.
  • the camera application displays the preview image obtained by the first camera in the preview view box. After switching from the first camera to the second camera, the camera application displays the preview image obtained by the second camera in the preview view box.
  • the multi-camera control module sends a camera start request message to the second camera.
  • the camera start request message is used to request to start the second camera.
  • the camera start request message may include a transition magnification.
  • the second camera receives the camera start request message.
  • the second camera is turned on to obtain a preview image at a transition magnification.
  • 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 the preset threshold.
  • the peak signal-to-noise ratio (PSNR) of the image is used as an evaluation index to evaluate the quality of the image.
  • the preset threshold is 5dB
  • the image obtained by the second camera at the target transition magnification is 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.
  • 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.
  • the shear control module can determine the first transition magnification after the first magnification of 1x based on the magnification interval. 1.5x, then the first camera obtains the preview image under 1.5x and sends it to the camera application to display the preview image under 1.5x in the preview view box, and the second camera also obtains the preview image under 1.5x but not in the preview view box show. After that, the shearing control module can determine the transition magnification after 1.5x to be 2x based on the magnification interval.
  • 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.
  • the second camera The camera also obtains the preview image at 2x but does not display it in the preview view box.
  • the first camera sequentially obtains and displays the subsequent transition magnifications (2.5x, 3x, 3.5x, 4x, 4.5x, 5x) in the preview view box.
  • the second camera sequentially acquires preview images at subsequent transition magnifications (2.5x, 3x, 3.5x, 4x, 4.5x, 5x) but does not display them in the preview view box.
  • the mean square error (MSE), signal-to-noise ratio (SNR) or mean absolute error (MAE) of the image can also be used as a criterion to evaluate the quality of the image.
  • MSE mean square error
  • SNR signal-to-noise ratio
  • MAE mean absolute error
  • the multi-camera control module sends a camera close request message to the first camera.
  • the camera close request message is used to request to close the first camera.
  • the first camera receives the camera closing request message.
  • the second camera obtains a preview image at a transition magnification after the target transition magnification.
  • S714 The second camera sends the preview image at the transition magnification after the target transition magnification to the camera application, and accordingly, the camera application receives the preview image.
  • the first camera is turned off, and the second camera continues to produce pictures and sends the preview image to the preview view box for display, thus completing the soft switching between cameras.
  • the camera application displays the preview image at the transition magnification after the target transition magnification in the preview view box.
  • the second camera obtains a 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 subsequent transition magnifications (6x, 6.5x, 7x, 7.5x, 8x, 8.5x, 9x, 9.5x), and the camera application displays the subsequent transition magnifications in the preview view box preview image until the camera app displays the preview image at the second magnification (10x) in the preview view box.
  • a smooth transition of the preview image can be achieved during the magnification point switching process, thereby improving the zoom effect of the terminal device.
  • the shearing control module can determine the transition magnification in sequence according to the magnification interval.
  • the shear control module can also directly determine multiple transition magnifications.
  • the multiple transition magnifications can be equally spaced or unequal spaced. This is not limited in the embodiment of the present application.
  • the camera module of the terminal device includes at least one camera.
  • the same camera can obtain preview images at different magnifications and display them in the preview view box, that is, There is no switching between cameras involved.
  • the magnification click switching process in this scenario is introduced below with reference to Figure 8.
  • FIG. 8 is a schematic flow chart of another magnification switching method 800 provided by an embodiment of the present application.
  • the steps of method 800 may be executed by the above-mentioned terminal device 400.
  • the camera module of the terminal device 400 may include the first camera, and the hardware abstraction layer of the terminal device 400 may include a clipping control module, but this is not limited in the embodiment of the present application.
  • Method 800 includes the following steps:
  • the first camera produces a picture at the first magnification and sends it to the display.
  • the camera application in response to the user's point and cut operation, sends a magnification switching request message to the shearing control module.
  • the magnification switching request message is used to request switching from the first magnification to the second magnification.
  • the magnification switching request message includes the first magnification. and second magnification.
  • the shearing control module receives the magnification switching request message.
  • the shearing control module determines the magnification interval according to the preset parameters.
  • the shearing control module determines the transition magnification according to the magnification interval.
  • the shearing control module sends the transition magnification to the first camera.
  • the first camera acquires the transition magnification.
  • the first camera obtains a preview image at a transition magnification.
  • the first camera sends the preview image at the transition magnification to the camera application. Accordingly, the camera application receives the preview image.
  • the camera application displays the preview image at the transition magnification in the preview view box.
  • the method of determining the magnification interval and the transition magnification may refer to the embodiment described in method 700 and will not be described again here.
  • the terminal device can respond to the user's point-and-cut operation and use the first camera to complete preview shooting at different magnifications.
  • the first camera can sequentially obtain transition preview images at multiple transition magnifications, which is beneficial to achieving magnification. Smooth transition of preview images during point-and-cut operations, improving the zoom effect of camera applications.
  • the embodiment of the present application provides yet another magnification switching method 900.
  • the method 900 can be applied to a terminal device equipped with a camera.
  • the method 900 includes the following steps:
  • S901 display the first preview image at the first magnification acquired by the camera
  • S903 Display the second preview image obtained by the camera at the second magnification.
  • the terminal device may obtain the first preview image at the first magnification.
  • the terminal device can display L frames of preview images according to the 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 helpful to improve the zoom effect of the terminal device and improve the user experience.
  • the user's selection operation of the second magnification may include the user selecting the second magnification by clicking on the magnification icon as shown in Figure 1, or may also include the user selecting the second magnification among multiple magnifications in other ways. , the embodiment of the present application does not limit this.
  • the L frame preview image is used to transition from the first preview image to the second preview image, and the L frame preview image is captured by the terminal device in chronological order.
  • the user can achieve the enlargement effect on the preview image through the selection operation of the second magnification, and the user can also achieve the reduction effect on the preview image through the selection operation of the second magnification.
  • the embodiment of the present application does not do this. limited.
  • the first magnification is 1x
  • the second magnification is 7x
  • the transition magnifications from small to large are 2x, 3x, 4x, 5x, and 6x, with a total of 5 transition magnifications.
  • the terminal device can sequentially display preview images obtained by the camera at 2x, 3x, 4x, 5x, and 6x.
  • the first magnification is 7x
  • the second magnification is 1x
  • the transition magnifications from large to small can be 6x, 5x, 4x, 3x, and 2x, with a total of 5 transition magnifications.
  • the terminal device can sequentially display preview images obtained by the camera at 6x, 5x, 4x, 3x, and 2x.
  • the method 900 further includes: determining L transition magnifications based on the first magnification and the second magnification.
  • L transition magnifications are determined based on the first magnification and the second magnification, including: based on the first magnification, the second magnification, the switching time between the first magnification and the second magnification, and the corresponding The time interval between adjacent frames determines L transition magnifications.
  • the switching duration between the first magnification and the second magnification may be the preset switching duration described in the embodiment shown in FIG. 7.
  • S703 which will not be described again here. .
  • determining L transition magnifications based on the first magnification and the second magnification includes: determining L transition magnifications based on the first magnification, the second magnification and the preset preview image frame number.
  • the preset preview image frame number may be the preset preview image frame number described in the embodiment shown in FIG. 7.
  • S703 please refer to the description of S703, which will not be described again here.
  • the camera in method 900 includes a first camera and a second camera, the first preview image comes from the first camera, and the second preview image comes from the second camera.
  • Method 900 also includes: turning on the second camera, and acquiring images through the first camera and the second camera, where the images acquired by the first camera and the second camera at the same time node are captured based on the same transition magnification.
  • 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, the first camera is closed, and the preview image displayed before closing the first camera From the first camera.
  • the Nth frame image from the first camera is captured at the same time point and based on the same transition magnification as the Mth frame image from the second camera, N ⁇ M ⁇ 1, N and M are integers.
  • the user's selection operation of the second magnification involves a scene of switching between different cameras.
  • This method of dual-channel image output through 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 features through more preview images, and switch the camera used for display at the appropriate time. , which is helpful to improve the stability of focus and the effect of smooth transition.
  • the terminal device acquires an image at a first magnification through a 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 obtain images at the transition magnification through the first camera and the second camera. In this way, the first camera and the second camera can acquire images based on the same transition magnification at the same time point, when M ⁇ N.
  • the terminal device turns on the second camera after displaying the preview image from the first camera 1x.
  • L 17 transition magnifications between 1x and 10x.
  • the first camera and the second camera can acquire images at the transition magnifications at the same time node.
  • the difference in quality of the 8th frame image of the first camera is less than or equal to the preset threshold, then the terminal device can turn off the first camera.
  • the preset threshold may be the preset threshold described in the embodiment shown in FIG. 7. For details, please refer to the description of S710, which will not be described again here.
  • the terminal device acquires an image at a first magnification through a first camera, and displays the image acquired from the first camera, that is, the first preview image.
  • the terminal device has turned on the second camera, and uses the second camera to obtain images at the first magnification but does not display the images obtained by the second camera.
  • the terminal device acquires the image at a magnification of 1x through the first camera and the second camera, and displays the image from the first camera at a magnification of 1x.
  • the terminal device can display the preview image obtained by the second camera that has been turned on to achieve a smooth transition of magnification and improve the zoom effect of the terminal device.
  • the soft switching process before the camera 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.
  • the terminal device may further include a third camera, and after the user clicks the switching operation, the second camera may be switched to the third camera.
  • the first camera is an ultra-wide-angle camera
  • the second camera is a wide-angle camera
  • the third camera is a telephoto camera. It is assumed that the magnification range supported by the ultra-wide-angle camera is -1x, and the magnification range supported by the wide-angle camera is 1x to 3.5x, the telephoto camera supports a magnification range from 4x to 7x.
  • 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.
  • the terminal device turns on the wide-angle camera and determines the transition magnification. , through dual-channel image output through the ultra-wide-angle camera and wide-angle camera, and display the preview image obtained from the wide-angle camera at the appropriate time.
  • the terminal device turns on the telephoto camera, determines the transition magnification, outputs the image through the wide-angle camera and the telephoto camera dually, and displays the image from the telephoto camera at the appropriate time. Get the preview image.
  • This two-way image output method facilitates the display of smooth transition preview images and improves the zoom effect of the terminal device.
  • Figure 10 is a schematic interface diagram of a terminal device provided by an embodiment of the present application.
  • the terminal device as a mobile phone as an example
  • Figure 10 shows the a interface, b interface and c interface of the mobile phone.
  • interface a shows multiple applications in the mobile phone.
  • the user can click the camera icon to open the camera application to take pictures.
  • the mobile phone displays interface b, which is the shooting interface.
  • interface b includes multiple magnification icons.
  • the current magnification of the camera is 1x.
  • the user can click on different magnification icons to switch between different magnifications. For example, if the user clicks the 5x magnification icon, the mobile phone can display interfaces c to f in sequence.
  • the terminal device can display the first frame of the preview image for transition.
  • the terminal device displays the second frame of the preview image for transition.
  • the terminal device displays the third frame of the preview image for transition.
  • Image in the f interface, the terminal device can display a preview image of the final 5x interface.
  • 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.
  • preview images shown in FIG. 10 is only an example. In fact, preview images corresponding to the number of frames may be displayed according to the specific number of transition magnifications. This is not limited in the embodiment of the present application.
  • magnification switching method has been described in detail with reference to FIGS. 4 to 10 .
  • magnification switching device will be described in detail with reference to FIGS. 11 and 12 .
  • Figure 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.
  • the acquisition 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 at the first magnification acquired by the camera; in response to the user's selection operation on the second magnification, display L frame preview images corresponding to L transition magnifications, where the L transition magnifications include L magnifications between the first magnification and the second magnification, L ⁇ 1 and an integer; and display the second preview image at the second magnification acquired by the camera.
  • the processing module 1120 is configured to determine L transition magnifications based on the first magnification and the second magnification.
  • the processing module 1120 is configured to determine L transition 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.
  • the processing module 1120 is configured to determine L transition magnifications based on the first magnification, the second magnification and the preset preview image frame number.
  • the camera includes a first camera and a second camera, the first preview image comes from the first camera, and the second preview image comes from the second camera.
  • the processing module 1120 is used to: turn on the second camera.
  • the acquisition module 1110 is configured to: acquire images through the first camera and the second camera, where the images acquired by the first camera and the second camera at the same time node are captured based on the same transition magnification;
  • the quality difference between the Mth frame image of the camera and the Nth frame image from the first camera is less than or equal to the preset threshold, the first camera is closed, and the preview image displayed before closing the first camera is from the first camera.
  • the Nth frame image from the first camera is captured at the same time point and at the same magnification as the Mth frame image from the second camera, N ⁇ M ⁇ 1, and N and M are integers.
  • the device 1100 can be specifically the terminal device in the above embodiment, or the functions of the terminal device in the above embodiment can be integrated in the device 1100.
  • the above functions can be implemented by hardware, or can be implemented by hardware executing corresponding software.
  • the hardware or software includes one or more modules corresponding to the above functions.
  • the apparatus 1100 may be used to execute various processes and/or steps corresponding to the terminal device in the above method embodiment.
  • the device 1100 here is embodied in the form of a functional module.
  • module may refer to an application specific integrated circuit (ASIC), an electronic circuit, a processor (such as a shared processor, a proprietary processor, or a group of processors) used to execute one or more software or firmware programs. processor, etc.) and memory, merged logic circuitry, and/or other suitable components to support the described functionality.
  • ASIC application specific integrated circuit
  • the device 1100 in Figure 11 may also be a chip or a chip system, such as a system on chip (SoC).
  • SoC system on chip
  • Figure 12 shows a schematic block diagram of another magnification switching device 1200 provided by an embodiment of the present application.
  • the device 1200 includes a processor 1210, a transceiver 1220, and a memory 1230.
  • the processor 1210, the transceiver 1220 and the memory 1230 communicate with each other through internal connection paths.
  • 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 receive a signal.
  • the device 1200 can be specifically a terminal device in the above embodiment, or the functions of the terminal device in the above embodiment can be integrated in the device 1200, and the device 1200 can be used to perform various functions corresponding to the terminal device in the above method embodiment. steps and/or processes.
  • the memory 1230 may include read-only memory and random access memory and provide 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 can be used to execute instructions stored in the memory, and when the processor executes the instructions, the processor can execute various steps and/or processes corresponding to the terminal device in the above method embodiment.
  • the processor 1210 may be a central processing unit (CPU), and the processor may also be other general-purpose processors, digital signal processors (DSP), 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.
  • DSP digital signal processors
  • ASIC application-specific integrated circuits
  • FPGA field programmable gate array
  • a general-purpose processor may be a microprocessor or the processor may be any conventional processor, etc.
  • the disclosed systems, devices and methods can be implemented in other ways.
  • the device embodiments described above are only illustrative.
  • the division of modules is only a logical function division. In actual implementation, there may be other division methods.
  • multiple modules or components may be combined or can be integrated into another system, or some features can be ignored, or not implemented.
  • the coupling or direct coupling or communication connection between each other shown or discussed may be through some interfaces, indirect coupling or communication connection of devices or modules, which may be in electrical, mechanical or other forms.
  • modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical modules, that is, they may be located in one place, or they may be distributed to multiple network modules. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
  • each functional module in each embodiment of the present application can be integrated into one processing module, or each module can exist physically alone, or two or more modules can be integrated into one module.
  • 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.
  • the technical solution of the present application is essentially or the part that contributes to the existing technology or the part of the technical solution can be embodied in the form of a software product.
  • the computer software product is stored in a storage medium, including Several instructions are used to cause a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in various embodiments of this application.
  • the aforementioned storage media include: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), magnetic disk or optical disk and other media that can store program code. .

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 priority to the Chinese patent application filed with the China Patent Office on February 24, 2022, with the application number 202210178265.5 and the application name "Magnification switching method and magnification switching device", the entire content of which is incorporated into 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 photographing functions through terminal devices (for example, mobile phones). For example, the camera realizes the zoom function through magnification switching.
例如,用户开始通过摄像头在第一倍率(例如,1x)下进行预览拍摄,如果用户想要通过终端设备拍摄远处的物体,那么用户可以通过点击第二倍率(例如,5x)的倍率图标以进行倍率切换,切换后在第二倍率下进行预览拍摄。For example, the user starts preview shooting through the camera at a first magnification (for example, 1x). If the user wants to shoot a distant object through the terminal device, the user can click the magnification icon of the second magnification (for example, 5x) to Switch the magnification, and then preview and shoot at the second magnification.
然而,由于倍率的点击切换操作发生后,摄像头的视角(field of view,FOV)是直接从第一倍率跳转到第二倍率,用户会看到第一倍率下的预览图像直接跳变到第二倍率下的预览图像,这样会存在预览图像过渡生硬的问题,使得终端设备的变焦效果较差,降低了用户的使用体验。However, after the magnification click switching operation occurs, the camera's field of view (FOV) jumps directly from the first magnification to the second magnification, and the user will see the preview image at the first magnification jump directly to the third magnification. The preview image at double magnification will have the problem of stiff transition in the preview image, which will make the zoom effect of the terminal device poor and reduce the user experience.
发明内容Contents of the invention
本申请提供一种倍率切换方法和倍率切换装置,有利于在倍率的点击切换操作下实现预览图像的平滑过渡,改善终端设备的变焦效果。This application provides a magnification switching method and a magnification switching device, which are conducive to achieving a smooth transition of preview images under a magnification click switching operation and improving the zoom effect of the 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. The method includes: displaying a first preview image at a first magnification acquired by the camera. In response to the user's selection operation on the second magnification, L frame preview images corresponding to L transition magnifications are displayed, the L transition magnifications include L magnifications between the first magnification and the second magnification, L≥1 and is an integer . Display the second preview image acquired by the camera at 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 may display L frames of preview images according to L transition magnifications before displaying the second preview image. In this way, L is added before the first preview image is switched to the second preview image. The frame is used for the transition of the preview image, which can make the preview image displayed by the terminal device smoothly transition, which is conducive to improving the zoom effect of the terminal device and improving the user experience.
结合第一方面,在第一方面的某些实现方式中,在响应于用户对第二倍率的选择操作,显示对应于L个过渡倍率的L帧预览图像之前,该方法还包括:基于第一倍率和第二倍率,确定L个过渡倍率。In connection with the first aspect, in some implementations of the first aspect, before displaying L frame preview images corresponding to L transition magnifications in response to the user's selection operation of the second magnification, the method further includes: based on the first magnification and the second magnification, determine L transition magnifications.
结合第一方面,在第一方面的某些实现方式中,基于第一倍率、第二倍率,确定L个过渡倍率,包括:基于第一倍率、第二倍率、第一倍率与第二倍率之间的切换时 长,以及相邻帧之间的时间间隔,确定L个过渡倍率。Combined with the first aspect, in some implementations of the first aspect, L transition magnifications are determined based on the first magnification and the second magnification, including: based on the first magnification, the second magnification, the first magnification and the second magnification. 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 transition magnifications based on the switching duration between the first magnification and the second magnification and the time interval between adjacent frames. This is conducive to completing the transition from the first magnification to the first magnification within the switching duration. Smooth transition to second magnification.
结合第一方面,在第一方面的某些实现方式中,基于第一倍率、第二倍率,确定L个过渡倍率,包括:基于所述第一倍率、所述第二倍率和预设的预览图像帧数,确定所述L个过渡倍率。In conjunction with the first aspect, in some implementations of the first aspect, L transition magnifications are determined based on the first magnification and the second magnification, including: 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 implementations 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 Describe the second camera. The method also includes: turning on the second camera. Images are acquired through the first camera and the second camera, where 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 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, the first camera is closed, and the preview image displayed before closing the first camera From the first camera. Among them, the Nth frame image from the first camera is captured at the same time point and at the same magnification as the Mth frame image from the second camera, N≥M≥1, and N and M are integers.
示例性地,第二摄像头可以和第一摄像头在同一时间点基于第一倍率获取图像,但是终端设备显示来自第一摄像头的第一预览图像,终端设备可以在第二摄像头基于第一倍率获取图像之前开启第二摄像头,这种情况下,M=N。For example, the second camera can acquire images based on the first magnification at the same time point as the first camera, but the terminal device displays the first preview image from the first camera, and the terminal device can acquire the image based on the first magnification with the second camera. The second camera was previously turned on. In this case, M=N.
示例性地,终端设备可以通过第一摄像头基于第一倍率获取图像,并显示来自第一摄像头的第一预览图像。在这之后,终端设备可以开启第二摄像头,通过第一摄像头和第二摄像头在同一时间点基于相同的过渡倍率获取图像,并显示来自第一摄像头的预览图像,直至来自第二摄像头的第M帧图像的质量与来自第一摄像头的第N帧图像的质量的差距小于或者等于预设阈值,关闭第一摄像头,这种情况下,M≠N。For example, the terminal device may acquire an image based on a first magnification through a first camera, and display the first preview image from the first camera. After that, the terminal device can turn on the second camera, acquire images through the first camera and the second camera at the same time point based on the same transition magnification, and display the preview image from the first camera until the Mth image from the second camera. If 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 the preset threshold, the first camera is turned off. In this case, M≠N.
在本申请中,终端设备可以通过第一摄像头和第二摄像头两路出图,在合适的时机关闭第一摄像头,从开启第二摄像头到关闭第一摄像头,实现了第一摄像头和第二摄像头之间的软切换,有利于得到过渡较为平滑的预览图像。In this application, the terminal device can output pictures through the first camera and the second camera, and close the first camera at the appropriate time. From opening the second camera to closing the first camera, the first camera and the second camera are realized. The soft switching between them is conducive to obtaining 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 acquisition module is used to: acquire the first preview image at the first magnification; and acquire the second preview image at the second magnification. The processing module is used to: display the first preview image at the first magnification acquired by the camera; in response to the user's selection operation of the second magnification, display L frame 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; and display the second preview image at the second magnification acquired by the camera.
结合第二方面,在第二方面的某些实现方式中,处理模块用于:基于第一倍率和第二倍率,确定L个过渡倍率。Combined with the second aspect, in some implementations of the second aspect, the processing module is configured to: determine L transition magnifications based on the first magnification and the second magnification.
结合第二方面,在第二方面的某些实现方式中,处理模块用于:基于第一倍率、第二倍率、第一倍率与第二倍率之间的切换时长,以及相邻帧之间的时间间隔,确定L个过渡倍率。Combined with 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 switching duration between adjacent frames. time interval, determine L transition magnifications.
结合第二方面,在第二方面的某些实现方式中,处理模块用于:基于第一倍率、 第二倍率和预设的预览图像帧数,确定L个过渡倍率。In conjunction with the second aspect, in some implementations of the second aspect, the processing module is configured to: determine L transition magnifications based on the first magnification, the second magnification and the preset number of preview image frames.
结合第二方面,在第二方面的某些实现方式中,摄像头包括第一摄像头和第二摄像头,第一预览图像来自第一摄像头,第二预览图像来自第二摄像头。处理模块用于:开启第二摄像头。获取模块用于:通过第一摄像头和第二摄像头获取图像,其中,第一摄像头和第二摄像头在同一时间节点获取到的图像是基于相同的过渡倍率拍摄到的。处理模块还用于:当来自第二摄像头的第M帧图像的质量与来自第一摄像头的第N帧图像的质量的差距小于或者等于预设阈值时,关闭第一摄像头,且在关闭第一摄像头之前显示的预览图像来自第一摄像头。其中,来自第一摄像头的第N帧兔粮与来自第二摄像头的第M帧图像在同一时间节点、基于相同的倍率拍摄到的,N≥M≥1,N、M为整数。In conjunction with the second aspect, in some implementations of the second aspect, the camera includes a first camera and a second camera, the first preview image comes from the first camera, and the second preview image comes from the second camera. The processing module is used for: turning on the second camera. The acquisition module is configured to acquire images through the first camera and the second camera, where the images acquired by the first camera and the second camera at the same time node are captured based on the same transition magnification. The processing module is also configured to: 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 a preset threshold, close the first camera, and close the first camera. The preview image previously displayed by the camera is from the first camera. Among them, the Nth frame of rabbit food from the first camera and the Mth frame of image from the second camera are captured at the same time node and based on the same magnification, N≥M≥1, N and M are integers.
第三方面,提供了另一种倍率切换装置,包括处理器,该处理器与存储器耦合,可用于执行存储器中的指令,以实现上述第一方面中任一种可能实现方式中的方法。可选地,该装置还包括存储器。可选地,该装置还包括通信接口,处理器与通信接口耦合。A third aspect provides another magnification switching device, including a processor, which is coupled to a memory and can be used to execute instructions in the memory to implement the method in any of the possible implementations of the first aspect. Optionally, the device further includes memory. Optionally, the device further includes a communication interface, and the processor is coupled to the communication interface.
在一种实现方式中,该倍率切换装置为终端设备。当该倍率切换装置为终端设备时,通信接口可以是收发器,或,输入/输出接口。In one implementation, the magnification 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, the magnification switching device is a chip configured in the terminal device. When the magnification switching device is a chip configured in a terminal device, the communication interface may be an input/output interface.
第四方面,提供了一种处理器,包括:输入电路、输出电路和处理电路。处理电路用于通过输入电路接收信号,并通过输出电路发射信号,使得处理器执行上述第一方面中任一种可能实现方式中的方法。In the fourth aspect, a processor is provided, including: an input circuit, an output circuit and a processing circuit. The processing circuit is configured to receive signals through the input circuit and transmit signals through the output circuit, so that the processor executes the method in any of the possible implementations of the first aspect.
在具体实现过程中,上述处理器可以为芯片,输入电路可以为输入管脚,输出电路可以为输出管脚,处理电路可以为晶体管、门电路、触发器和各种逻辑电路等。输入电路所接收的输入的信号可以是由例如但不限于接收器接收并输入的,输出电路所输出的信号可以是例如但不限于输出给发射器并由发射器发射的,且输入电路和输出电路可以是同一电路,该电路在不同的时刻分别用作输入电路和输出电路。本申请对处理器及各种电路的具体实现方式不作限定。In the 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, and the signal output by the output circuit may be, for example, but not limited to, output to and transmitted by the transmitter, and the input circuit and the output A circuit may be the same circuit that functions as an input circuit and an output circuit at different times. This application does not limit the specific implementation methods 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 can receive signals through a receiver and transmit signals through a transmitter to execute the method in any of the possible implementations of the first aspect.
可选地,处理器为一个或多个,存储器为一个或多个。Optionally, there are one or more processors and one or more memories.
可选地,存储器可以与处理器集成在一起,或者存储器与处理器分离设置。Alternatively, the memory may be integrated with the processor, or the memory may be provided separately from the processor.
在具体实现过程中,存储器可以为非瞬时性(non-transitory)存储器,例如只读存储器(read only memory,ROM),其可以与处理器集成在同一块芯片上,也可以分别设置在不同的芯片上,本申请对存储器的类型以及存储器与处理器的设置方式不作限定。In the specific implementation process, the memory can be a non-transitory memory, such as a read-only memory (ROM), which can be integrated on the same chip as the processor, or can be set in different On the chip, this application does not limit the type of memory and the arrangement of the memory and the processor.
应理解,相关的数据交互过程例如发送指示信息可以为从处理器输出指示信息的过程,接收能力信息可以为处理器接收输入能力信息的过程。具体地,处理输出的数据可以输出给发射器,处理器接收的输入数据可以来自接收器。其中,发射器和接收 器可以统称为收发器。It should be understood that the relevant data interaction process, for example, sending instruction information may be a process of outputting instruction information from the processor, and receiving capability information may be a process of the processor receiving input capability information. Specifically, the data output by the processing can be output to the transmitter, and the input data received by the processor can come from the receiver. Among them, the transmitter and receiver can be collectively called a transceiver.
上述第五方面中的处理装置可以是一个芯片,该处理器可以通过硬件来实现也可以通过软件来实现,当通过硬件实现时,该处理器可以是逻辑电路、集成电路等;当通过软件来实现时,该处理器可以是一个通用处理器,通过读取存储器中存储的软件代码来实现,该存储器可以集成在处理器中,可以位于该处理器之外,独立存在。The processing device in the above fifth aspect can be a chip, and the processor can be implemented by hardware or software. When implemented by hardware, the processor can be a logic circuit, an integrated circuit, etc.; when implemented by software, When implemented, the processor can be a general-purpose processor, which is implemented by reading the software code stored in the memory. The memory can be integrated in the processor, or can be located outside the processor and exist independently.
第六方面,提供了一种计算机程序产品,计算机程序产品包括:计算机程序代码,当该计算机程序代码被运行时,使得计算机执行上述第一方面中任一种可能实现方式中的方法。In a sixth aspect, a computer program product is provided. The computer program product includes: computer program code. When the computer program code is run, it causes the computer to execute the method in any of the possible implementations of the first aspect.
第七方面,提供了一种计算机可读存储介质,该计算机可读存储介质存储有计算机程序,当该计算机程序被运行时,使得计算机执行上述第一方面中任一种可能实现方式中的方法。In a seventh aspect, a computer-readable storage medium is provided. The computer-readable storage medium stores a computer program. When the computer program is run, it causes the computer to execute the method in any of the possible implementations of the first aspect. .
附图说明Description of drawings
图1是一种终端设备的界面示意图;Figure 1 is a schematic diagram of the interface of a terminal device;
图2是一种点切操作的出图原理示意图;Figure 2 is a schematic diagram of the drawing principle of a point-cut operation;
图3是一种点切操作的出图方法的示意性流程图;Figure 3 is a schematic flow chart of a drawing method for point-cut operation;
图4是本申请实施例适用的一种终端设备的结构示意图;Figure 4 is a schematic structural diagram of a terminal device applicable to the embodiment of the present application;
图5是本申请实施例适用的终端设备的一种软件结构框图;Figure 5 is a software structure block diagram of a terminal device applicable to the embodiment of the present application;
图6是本申请实施例提供的一种点切操作的出图原理示意图;Figure 6 is a schematic diagram of the drawing principle of a point-cut operation provided by the embodiment of the present application;
图7是本申请实施例提供的一种倍率切换方法的示意性流程图;Figure 7 is a schematic flow chart of a magnification switching method provided by an embodiment of the present application;
图8是本申请实施例提供的另一种倍率切换方法的示意性流程图;Figure 8 is a schematic flow chart of another magnification switching method provided by an embodiment of the present application;
图9是本申请实施例提供的再一种倍率切换方法的示意性流程图;Figure 9 is a schematic flow chart of yet another magnification switching method provided by an embodiment of the present application;
图10是本申请实施例提供的一种终端设备的界面示意图;Figure 10 is a schematic interface diagram of a terminal device provided by an embodiment of the present application;
图11是本申请实施例提供的一种倍率切换装置的示意性框图;Figure 11 is a schematic block diagram of a magnification switching device provided by an embodiment of the present application;
图12是本申请实施例提供的另一种倍率切换装置的示意性框图。Figure 12 is a schematic block diagram of another magnification switching device provided by an embodiment of the present application.
具体实施方式Detailed ways
下面将结合附图,对本申请中的技术方案进行描述。The technical solutions in this application will be described below with reference to the accompanying drawings.
在安卓(Android)生态中,用户可以使用终端设备的相机应用(application,APP)进行倍率的点击切换(可简称为点切)操作。从而可以拍摄不同距离下的物体是常见的使用场景,提高拍摄场景的丰富度。In the Android ecosystem, users can use the camera application (APP) of the terminal device to perform magnification click switching (which can be referred to as point switching). It is a common usage scenario to be able to shoot objects at different distances, improving the richness of the shooting scene.
图1是一种终端设备的界面示意图。以终端设备为手机示例,图1中示出了手机的a界面、b界面和c界面,其中,a界面示出了手机中的多个应用,示例性地,用户可以点击相机图标打开相机应用进行拍照。在用户点击相机应用后,手机显示b界面,b界面为拍摄界面。示例性地,b界面包括多个的倍率图标,当前相机的倍率为1x,用户可以点击不同的倍率图标以实现不同的倍率切换。示例性地,用户点击了5x的倍率图标,手机可以显示c界面,在c界面,倍率已经被切换至5x,手机可以获得10x的倍率下的预览图像。Figure 1 is a schematic diagram of the interface of a terminal device. Taking the terminal device as an example of a mobile phone, Figure 1 shows the a interface, b interface and c interface of the mobile phone. The a interface shows multiple applications in the mobile phone. For example, the user can click the camera icon to open the camera application. Take photos. After the user clicks on the camera application, the mobile phone displays interface b, which is the shooting interface. For example, interface b includes multiple magnification icons. The current magnification of the camera is 1x. The user can click on different magnification icons to switch between different magnifications. For example, the user clicks on the 5x magnification icon, and the mobile phone can display the c interface. In the c interface, the magnification has been switched to 5x, and the mobile phone can obtain a preview image at a 10x magnification.
在如图1所示的点切操作之前,手机可以通过摄像头在1x的倍率下在b界面中显 示待拍摄物体的预览图像,摄像头的视角(field ofview,FOV)维持在1x。在用户点击5x的倍率图标后,手机可以通过摄像头在5x的倍率下在c界面中显示待拍摄物体的预览图像,摄像头的FOV维持在10x。Before the point-and-cut operation as shown in Figure 1, the mobile phone can display a preview image of the object to be photographed in the b interface through the camera at a magnification of 1x, and the camera's field of view (FOV) is maintained at 1x. After the user clicks on the 5x magnification icon, the phone can display a preview image of the object to be photographed in the c interface at 5x magnification through the camera, and the camera's FOV is maintained at 10x.
图2是一种点切操作的出图原理示意图。以终端设备为手机为例,在图2中,手机的摄像头可以包括主摄镜头和长焦镜头。在用户执行点切操作之前,主摄镜头的FOV维持在1x的倍率持续出图获得预览图像,并且在显示屏上显示预览图像。示例性地,在如图2所示的点切时刻用户点击了10x的倍率图标进行倍率切换,此时手机可以从主摄镜头切换至长焦镜头,长焦镜头的FOV维持在10x的倍率持续出图获得切换后的预览图像,并且在显示屏上显示切换后的预览图像。Figure 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 Figure 2, the camera of the mobile phone can include a main camera lens and a telephoto lens. Before the user performs a point-and-cut operation, the FOV of the main camera lens is maintained at 1x magnification and continues to capture a preview image, and the preview image is displayed on the display. For example, at the point-cut moment shown in Figure 2, the user clicks on the 10x magnification icon to switch the magnification. At this time, the mobile phone can switch from the main camera lens to the telephoto lens, and the FOV of the telephoto lens remains at the 10x magnification. Publish the picture to obtain the preview image after the switch, and display the preview image after the switch on the display screen.
图3是一种点切操作的出图方法300的示意性流程图。方法300包括如下步骤:FIG. 3 is a schematic flowchart of a drawing drawing method 300 for a point-and-cut operation. Method 300 includes the following steps:
S301,第一摄像头在第一倍率下出图并送显。S301, the first camera produces a picture at the first magnification and sends it to the display.
S302,响应于用户的点切操作,相机应用向硬件抽象层(hardware abstraction layer,HAL)发送倍率切换请求消息,该倍率切换请求消息用于请求从第一倍率切换至第二倍率,该倍率切换请求消息包括第二倍率。相应地,硬件抽象层接收该倍率切换请求消息。S302, in response to the user's point-cut operation, the camera application sends a magnification switching request message to the 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 rate switching request message.
S303,硬件抽象层向第一摄像头发送摄像头关闭请求消息,该摄像头关闭请求消息用于请求关闭第一摄像头。相应地,第一摄像头接收该摄像头关闭请求消息。S303. The hardware abstraction layer sends a camera close request message to the first camera. The camera close request message is used to request to close the first camera. Correspondingly, the first camera receives the camera closing request message.
S304,第一摄像头关闭,停止工作。S304, the first camera is turned off and stops working.
S305,硬件抽象层向第二摄像头发送摄像头启动请求消息,该摄像头启动请求消息用于请求启动第二摄像头,该摄像头启动请求消息包括第二倍率。相应地,第二摄像头接收该摄像头启动请求消息。S305. The hardware abstraction layer sends a camera start request message to the second camera. The camera start request message is used to request to start the second camera. The camera start request message includes the second magnification. Correspondingly, the second camera receives the camera start request message.
S306,第二摄像头启动,在第二倍率下出图并送显。S306, the second camera is started, the image is taken out at the second magnification and sent to display.
其中,出图表示摄像头拍摄物体得到预览图像,送显表示在显示屏上显示预览图像。更具体地,可以在相机应用构建的预览视图框中显示预览图像。Among them, drawing means that the camera captures the object and obtains a preview image, and sending and displaying means displaying the preview image on the display screen. More specifically, the preview image can be displayed in a preview view box 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 Figure 3, after the point-cut operation occurs, the FOV of the camera directly jumps from the first magnification (which can be 1x in Figure 1 or Figure 2 above) to the second magnification ( It can be 5x in Figure 1 or 10x in Figure 2). This will cause the preview image seen by the user to jump and the transition will be stiff, resulting in a poor zoom effect of the camera application and a poor user experience.
有鉴于此,本申请实施例提供一种倍率切换方法和倍率切换装置,用户在使用终端设备的相机应用拍照预览时,终端设备可以在倍率点切的过程中引入多帧过渡预览图像,实现倍率点切时预览图像的平滑过渡,这样有利于提高相机应用的变焦效果,从而提高用户体验。In view of this, embodiments of the present application provide 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 multi-frame transition preview images in the process of magnification point switching to achieve magnification The smooth transition of the preview image during point-and-click switching will help improve the zoom effect of the camera application, thus improving the user experience.
在介绍本申请实施例提供的倍率切换方法和倍率切换装置之前,先做出以下几点说明。Before introducing the magnification switching method and magnification switching device provided by the embodiments of the present application, the following points should be explained.
第一,在下文示出的实施例中,各术语及英文缩略语,如预览图像、倍率切换请求消息、主摄镜头、长焦镜头等,均为方便描述而给出的示例性举例,不应对本申请构成任何限定。本申请并不排除在已有或未来的协议中定义其它能够实现相同或相似功能的术语的可能。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 all illustrative examples given for convenience of description. No limitations shall be imposed on 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 numerical numbers are only for 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, distinguish between 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” refers to one or more, and “plurality” refers to two or more. "And/or" describes the association of associated objects, indicating that there can be three relationships, for example, A and/or B, which can mean: A exists alone, A and B exist simultaneously, and B exists alone, where A, B can be singular or plural. The character "/" generally indicates that the related objects are in an "or" relationship. "At least one of the following" or similar expressions thereof refers to any combination of these items, including any combination of a single item (items) or a plurality of items (items). For example, at least one of a, b and c can mean: a, or b, or c, or a and b, or a and c, or b and c, or a, b and c, where 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 can be a handheld device, a vehicle-mounted device, etc. with a wireless connection function. The terminal device can also be called a terminal (terminal), user equipment (UE), mobile station (MS) ), mobile terminal (mobile terminal, MT), etc. At present, some examples of terminals are: mobile phones, tablets, smart TVs, laptops, tablets (Pad), handheld computers, mobile Internet devices (mobile internet device, MID), virtual reality (VR) ) equipment, augmented reality (AR) equipment, wireless terminals in industrial control, wireless terminals in self-driving, wireless terminals in remote medical surgery, smart grids ( 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 protocols (session initiation protocol, SIP) telephone, wireless local loop (WLL) station, personal digital assistant (personal digital assistant, PDA), handheld device with wireless communication capabilities, computing device or other device connected to a wireless modem Processing equipment, vehicle-mounted equipment, wearable equipment, terminal equipment in the 5G network or terminal equipment in the future evolved public land mobile communication network (public land mobile network, PLMN), etc., the embodiments of the present application adopt the method for the terminal equipment Specific technologies and specific equipment forms are not limited.
作为示例而非限定,在本申请实施例中,该终端设备还可以是可穿戴设备。可穿戴设备也可以称为穿戴式智能设备,是应用穿戴式技术对日常穿戴进行智能化设计、开发出可以穿戴的设备的总称,如眼镜、手套、手表、服饰及鞋等。可穿戴设备即直接穿在身上,或是整合到用户的衣服或配件的一种便携式设备。可穿戴设备不仅仅是一种硬件设备,更是通过软件支持以及数据交互、云端交互来实现强大的功能。广义穿戴式智能设备包括功能全、尺寸大、可不依赖智能手机实现完整或者部分的功能,例如:智能手表或智能眼镜等,以及只专注于某一类应用功能,需要和其它设备如智能手机配合使用,如各类进行体征监测的智能手环、智能首饰等。As an example and 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. It is a general term for applying wearable technology to intelligently design daily wear and develop wearable devices, such as glasses, gloves, watches, clothing and shoes, etc. 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 just hardware devices, but also achieve powerful functions through software support, data interaction, and cloud interaction. Broadly defined wearable smart devices include full-featured, large-sized devices that can achieve complete or partial functions without relying on smartphones, such as smart watches or smart glasses, and those that only focus on a certain type of application function and need to cooperate with other devices such as smartphones. Use, such as various types of smart bracelets, smart jewelry, etc. for physical sign monitoring.
应理解,本申请实施例中,终端设备可以是用于实现终端设备功能的装置,也可以是能够支持终端设备实现该功能的装置,例如芯片系统,该装置可以被安装在终端中。本申请实施例中,芯片系统可以由芯片构成,也可以包括芯片和其他分立器件。It should be understood that in the embodiments of the present application, the terminal device may be a device for realizing the function of the terminal device, or a device that can support the terminal device to realize the function, such as a chip system, and the device may be installed in the terminal. In the embodiments of this application, the chip system 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 this application may also be called: user equipment (UE), mobile station (MS), mobile terminal (mobile terminal, MT), access terminal, user unit, user station, Mobile station, mobile station, remote station, remote terminal, mobile device, user terminal, terminal, wireless communication equipment, 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可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件,或软件和硬件的组合实现。Figure 4 is a schematic structural diagram of a terminal device applicable to the embodiment of the present application. 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 (USB) interface 130, a charging management module 140, and 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, headphone interface 170D, sensor 180, button 190, motor 191, indicator 192, camera 193, display screen 194, and subscriber identification module (subscriber identification module, SIM) card interface 195, etc. It can be understood that the structure illustrated 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 less components than shown in the figures, or combine some components, or split some components, or arrange different components. The components illustrated may 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 (GPU), and 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. Among them, different processing units can be independent devices or integrated in one or more processors. In some embodiments, the terminal device 400 may also include one or more processors 110. The processor may be the nerve center and command center of the terminal device 400 . The processor can generate operation control signals based on the instruction opcode and timing signals to complete the control of fetching and executing instructions. The processor 110 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in processor 110 is cache memory. The memory may hold instructions or data used or recycled by processor 110 . If the processor 110 needs to use the instructions or data again, it can be called directly from the memory. This avoids repeated access and reduces the waiting time of the processor 110, thereby improving 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. Interfaces may include integrated circuit (inter-integrated circuit, I2C) interface, integrated circuit built-in audio (inter-integrated circuit sound, I2S) interface, pulse code modulation (pulse code modulation, PCM) interface, universal asynchronous receiver and transmitter (universal asynchronous receiver/transmitter (UART) interface, mobile industry processor interface (MIPI), general-purpose input/output (GPIO) interface, subscriber identity module (SIM) interface, and /or USB interface, etc. Among them, the USB interface 130 is an interface that complies with USB standard specifications, and may specifically be a Mini USB interface, a Micro USB interface, a USB Type C interface, etc. 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 to play audio through them.
可以理解的是,本申请实施例示意的各模块间的接口连接关系为示意性说明,并不构成对终端设备400的结构限定。在本申请另一些实施例中,终端设备400也可以采用上述实施例中不同的接口连接方式,或多种接口连接方式的组合。It can be understood that the interface connection relationships between the modules illustrated in the embodiment of the present application are schematic illustrations and do not constitute a structural limitation on the terminal device 400 . In other embodiments of the present application, the terminal device 400 may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.
终端设备400的无线通信功能可以通过天线1,天线2,移动通信模块150,无线通信模块160,调制解调处理器以及基带处理器等实现。天线1和天线2用于发射和接收电磁波信号。终端设备400中的每个天线可用于覆盖单个或多个通信频带。不同 的天线还可以复用,以提高天线的利用率。例如:可以将天线1复用为无线局域网的分集天线。在另外一些实施例中,天线可以和调谐开关结合使用。The wireless communication function of the terminal device 400 can be implemented through the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor and the baseband processor. Antenna 1 and Antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in terminal device 400 may be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve antenna utilization. For example: Antenna 1 can be reused as a diversity antenna for a wireless LAN. In other embodiments, antennas may be used in conjunction with tuning switches.
移动通信模块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 to the terminal device 400. The mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier, etc. The mobile communication module 150 can receive electromagnetic waves through the antenna 1, perform filtering, amplification and other processing on the received electromagnetic waves, and transmit them to the modem processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modem processor and convert it into electromagnetic waves through the antenna 1 for radiation. In some embodiments, at least part of the functional modules of the mobile communication module 150 may be disposed 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 provided in the same device.
调制解调处理器可以包括调制器和解调器。其中,调制器用于将待发送的低频基带信号调制成中高频信号。解调器用于将接收的电磁波信号解调为低频基带信号。随后解调器将解调得到的低频基带信号传送至基带处理器处理。低频基带信号经基带处理器处理后,被传递给应用处理器。应用处理器通过音频设备(不限于扬声器170A,受话器170B等)输出声音信号,或通过显示屏194显示图像或视频。在一些实施例中,调制解调处理器可以是独立的器件。在另一些实施例中,调制解调处理器可以独立于处理器110,与移动通信模块150或其他功能模块设置在同一个器件中。A modem processor may include a modulator and a demodulator. Among them, the modulator is used to modulate the low-frequency baseband signal to be sent into a medium-high frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After the low-frequency baseband signal is processed by the baseband processor, it is passed to the application processor. The application processor outputs sound signals through audio devices (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 other embodiments, the modem processor may be independent of the processor 110 and may be provided 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 applications on the terminal device 400 including wireless local area networks (WLAN), Bluetooth, global navigation satellite system (global navigation satellite system, GNSS), frequency modulation (frequency modulation, FM), NFC, Infrared technology (infrared, IR) and other wireless communication solutions. 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, etc. The above-mentioned GNSS can include global positioning system (GPS), global navigation satellite system (GLONASS), Beidou 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 display functions through a GPU, a display screen 194, an application processor, and the like. Application processors may include NPUs and/or DPUs. The GPU is an image processing microprocessor 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. NPU is a neural network (NN) computing processor. By drawing on the structure of biological neural networks, such as the transmission mode between neurons in the human brain, it can quickly process input information and can continuously learn by itself. The NPU can realize intelligent cognitive applications of the terminal device 400, such as image recognition, face recognition, speech recognition, text understanding, etc. The DPU is also called the display sub-system (display sub-system, DSS). The DPU is used to adjust the color of the display screen 194. The DPU can adjust the color of the display screen through a color three-dimensional lookup table (3D look up table, 3D LUT). Adjustment. The DPU can also perform image scaling, noise reduction, contrast enhancement, backlight brightness management, HDR processing, display parameter Gamma adjustment, etc.
显示屏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, etc. Display 194 includes a display panel. The display panel can use a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active matrix organic light emitting diode or an active matrix organic light emitting diode (active-matrix organic light emitting diode). emitting diode (AMOLED), flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-oLed or quantum dot light emitting diode (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 can implement 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 can 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 the data storage function. For example, save data files such as music, photos, videos, etc. on an external memory card.
内部存储器121可以用于存储一个或多个计算机程序,该一个或多个计算机程序包括指令。处理器110可以通过运行存储在内部存储器121的上述指令,从而使得终端设备400执行各种功能应用以及数据处理等。内部存储器121可以包括存储程序区和存储数据区。其中,存储程序区可存储操作系统;该存储程序区还可以存储一个或多个应用程序(比如图库、联系人等)等。存储数据区可存储终端设备400使用过程中所创建的数据(比如照片,联系人等)等。此外,内部存储器121可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件,闪存器件,通用闪存存储器(universal flash storage,UFS)等。在一些实施例中,处理器110可以通过运行存储在内部存储器121的指令,和/或存储在设置于处理器110中的存储器的指令,来使得终端设备400执行各种功能应用及数据处理。Internal memory 121 may be used to store one or more computer programs including instructions. The processor 110 can execute the above instructions stored in the internal memory 121 to cause the terminal device 400 to execute various functional applications, data processing, and the like. The internal memory 121 may include a program storage area and a data storage area. Among them, the stored program area can store the operating system; the stored program area can also store one or more application programs (such as gallery, contacts, etc.). The storage data area can store data created during use of the terminal device 400 (such as photos, contacts, etc.). In addition, the internal memory 121 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, universal flash storage (UFS), etc. In some embodiments, the processor 110 can cause the terminal device 400 to perform various functional applications and data processing by executing instructions stored in the internal memory 121 and/or instructions stored in a 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 can implement audio functions through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone interface 170D, and the application processor. For example, music playback, recording, etc. Among them, the audio module 170 is used to convert digital audio information into an analog audio signal for output, and is also used to convert analog audio input into a digital audio signal. Audio module 170 may also be used to encode and decode audio signals. In some embodiments, the audio module 170 may be provided in the processor 110 , or some functional modules of the audio module 170 may be provided in the processor 110 . Speaker 170A, also called "speaker", 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 a hands-free call. Receiver 170B, also called "earpiece", is used to convert audio electrical signals into sound signals. When the terminal device 400 answers a call or a voice message, the voice can be heard by bringing the receiver 170B close to the human ear. Microphone 170C, also known as "microphone" or "microphone", is used to convert sound signals into electrical signals. When making a call or sending a voice message, the user can speak close to the microphone 170C with the human mouth and input the sound signal to the microphone 170C. The terminal device 400 may be provided with at least one microphone 170C. In other embodiments, the terminal device 400 may be provided with two microphones 170C, which in addition to collecting sound signals, may also implement a noise reduction function. In other embodiments, the terminal device 400 can also be equipped with three, four or more microphones 170C to collect sound signals, reduce noise, identify sound sources, and implement directional recording functions, etc. The headphone interface 170D is used to connect wired headphones. The headphone interface 170D can be a USB interface 130, or it can be a 3.5mm open mobile terminal platform (OMTP) standard interface, or it can be 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, etc.
终端设备400的软件系统可以采用分层架构,事件驱动架构,微核架构,微服务架构,或云架构。本申请实施例以分层架构的Android系统为例,示例性说明终端设备400的软件结构。The software system of the terminal device 400 may adopt a layered architecture, an event-driven architecture, a microkernel architecture, a microservice architecture, or a cloud architecture. The embodiment of this application takes the Android system with a layered architecture 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还包括硬件(例如,摄像头,显示屏)。Figure 5 is a software structure block diagram 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 clear roles and division of labor. The layers communicate through software interfaces. In some embodiments, the Android system can be divided into application layer (application, APP), application framework layer (application framework), Android runtime (Android runtime) and system library, hardware abstraction layer (HAL) ) and the kernel layer. In some embodiments, the terminal device 400 also includes hardware (eg, camera, display screen).
应用程序层可以包括一系列应用程序包,应用程序层通过调用应用程序框架层所提供的应用程序接口(application programming interface,API)运行应用程序。如图5所示,应用程序包可以包括相机、日历、地图、电话、音乐、WLAN、蓝牙、视频、社交、图库、导航、短信息等应用程序。The application layer can include a series of application packages. The application layer runs applications by calling the application programming interface (API) provided by the application framework layer. As shown in Figure 5, the application package can include applications such as camera, calendar, map, phone, music, WLAN, Bluetooth, video, social, gallery, navigation, short message, etc.
应用程序框架层为应用程序层的应用程序提供API和编程框架。应用程序框架层包括一些预先定义的函数。框架层通过API接口将编程服务(例如,相机服务、媒体服务)提供给应用程序层调用。如图5所示,应用程序框架层可以包括窗口管理器、内容提供器、资源管理器、通知管理器、视图系统、电话管理器等。The application framework layer provides APIs and programming frameworks 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 API interfaces. As shown in Figure 5, the application framework layer can include a window manager, content provider, resource manager, notification manager, view system, phone manager, etc.
窗口管理器用于管理窗口程序。窗口管理器可以获取显示屏大小,判断是否有状态栏,锁定屏幕,截取屏幕等。A window manager is used to manage window programs. The window manager can obtain the display size, 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 this data accessible to applications. Data can include video images, audio, calls made and received, browsing history and bookmarks, phone books, etc. The view system includes visual controls, such as controls that display text, controls that display pictures, etc.
视图系统可用于构建应用程序。显示界面可以由一个或多个视图组成的。例如,包括短信通知图标的显示界面,可以包括显示文字的视图以及显示图片的视图。A view system can be used to build applications. The display interface can be composed 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 communication functions of the terminal device 400 . For example, call status management (including connected, hung up, etc.).
资源管理器为应用程序提供各种资源,比如本地化字符串,图标,图片,布局文件,视频文件等。The resource manager provides various resources to applications, such as localized strings, icons, pictures, layout files, video files, etc.
通知管理器使应用程序可以在状态栏中显示通知信息,可以用于传达告知类型的消息,可以短暂停留后自动消失,无需用户交互。比如通知管理器被用于告知下载完 成,消息提醒等。通知管理器还可以是以图表或者滚动条文本形式出现在系统顶部状态栏的通知,例如后台运行的应用程序的通知,还可以是以对话窗口形式出现在屏幕上的通知。例如在状态栏提示文本信息,发出提示音,终端设备400振动,指示灯闪烁等。The notification manager allows applications 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 download completion, message reminders, etc. The notification manager can also be notifications that appear in the status bar at the top of the system in the form of charts or scroll bar text, such as notifications for applications running in the background, or notifications that appear on the screen in the form of conversation windows. For example, text information is prompted in the status bar, a prompt sound is emitted, the terminal device 400 vibrates, and the indicator light flashes, etc.
安卓运行时包括核心库和虚拟机。安卓运行时负责安卓系统的调度和管理。核心库包含两部分:一部分是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 contains two parts: one part is the functional functions that need to be called by the Java language used by the Java API framework, and the other part is the core library of Android. The application layer and application framework layer run in virtual machines. The virtual machine executes the java files of the application layer and application framework layer into binary files. The virtual machine is used to perform object life cycle management, stack management, thread management, security and exception management, and garbage collection and other functions. System libraries can include multiple functional modules. For example: surface manager (surface manager), media libraries (media libraries), 3D graphics processing libraries (for example: OpenGL ES), 2D graphics engines (for example: 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 a variety of commonly used audio and video formats, as well as static 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, composition and layer processing. 2D Graphics Engine is a drawing engine for 2D drawing.
硬件抽象层是设备内核驱动的抽象接口,实现向更高级别的java API框架提供访问底层设备的应用程序接口。硬件抽象层可以包括多个库模块,每个模块可以为特定类型的硬件组件实现一个接口,例如,相机接口等。当框架API要求访问设备硬件时,Android系统将为该硬件组件加载库模块。示例性地,如图5所示,库模块包括剪切控制模块和多摄控制模块。The hardware abstraction layer is an abstract interface of the device kernel driver, which provides application program interfaces for accessing underlying devices to higher-level Java API frameworks. The 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 loads a library module for that hardware component. Exemplarily, as shown in Figure 5, the library module includes a shearing control module and a multi-shot control module.
在本申请实施例中,在相机应用响应了用户的倍率点切(从第一倍率切换至第二倍率)操作之后,剪切控制模块用于确定倍率间隔,得到第一倍率至第二倍率之间的多个过渡倍率。多摄控制模块用于启动或停止摄像头,并且用于实现摄像头之间的切换。In the embodiment of the present application, after the camera application responds to the user's magnification point switching (switching from the first magnification to the second magnification) operation, the shear control module is used to determine the magnification interval to obtain the ratio between the first magnification and the second magnification. multiple transition magnifications 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. For example, as shown in Figure 5, the kernel layer contains a camera driver.
硬件层包括摄像头模组和显示屏,其中,摄像头模组包括至少一个摄像头。The hardware layer includes a camera module and a display screen, where the camera module includes at least one camera.
应理解,本申请实施例中的终端设备可以具有上述图4和/或图5所示的架构,但本申请实施例对此不作限定。It should be understood that the terminal device in the embodiment of the present application may have the architecture shown in FIG. 4 and/or FIG. 5, but the embodiment of the present application is not limited to this.
在一种可能的场景中,终端设备的摄像头模组包括第一摄像头和第二摄像头,在倍率点切操作的过程中可能涉及到第一摄像头与第二摄像头之间的切换,用户可以通过第一摄像头和第二摄像头获取更加丰富的视频、拍照体验。下面结合图6和图7对本场景下的倍率点击切换过程进行介绍。In a possible scenario, the camera module of the terminal device includes a first camera and a second camera. The process of magnification point switching may involve switching between the first camera and the second camera. The user can use the third camera to The first camera and the second camera provide a richer video and photo experience. The magnification click switching process in this scenario is introduced below with reference to Figures 6 and 7.
图6是本申请实施例提供的一种点切操作的出图原理示意图。以终端设备包括第一摄像头(例如,主摄镜头)和第二摄像头(例如,长焦镜头)为例,在图6中,示例性地,在用户执行倍率的点切操作之前,第一摄像头的FOV维持在1x的倍率下获取图像,并且在显示屏上显示预览图像。FIG. 6 is a schematic diagram of the drawing principle of a point cutting operation provided by an embodiment of the present application. Taking the terminal device as an example including a first camera (for example, a main camera lens) and a second camera (for example, a telephoto lens), in FIG. 6 , for example, before the user performs a magnification point-and-cut operation, the first camera 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 point-and-cut moment shown in Figure 6, the user clicks on the 10x magnification icon to switch the magnification. After the point-and-cut operation occurs, the terminal device can determine the magnification interval, between the first magnification and the second magnification. Divide the gears to obtain multiple transition magnifications between 1x and 10x. As shown in Figure 6, taking the magnification interval as 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 camera of the terminal device (the first camera and/or the second camera) can sequentially obtain images according to multiple transition magnifications in order from small to large. The terminal device obtains and displays the preview image at 10x to complete the smooth transition of the preview image.
示例性地,终端设备可以如图6所示,在用户对第二倍率的点切操作发生之后,在获取第1个过渡倍率(1.5x)下的预览图像之前就启动第二摄像头。For example, as shown in FIG. 6 , the terminal device can start the second camera before acquiring the preview image at the first transition magnification (1.5x) after the user performs a point-and-cut operation on the second magnification.
如图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 the magnification interval to be 0.5x, and then the terminal device determines that the next magnification after 1x is 1.5x. The terminal device can make the magnification transition during the magnification transition. Start the second camera to get preview images before 1.5x. After starting the second camera, for the first camera, the first camera can sequentially obtain multi-frame transition preview images at 1.5x, 2x, 2.5x, 3x, 3.5x, and 4x, and display them in the preview view box sequentially Multi-frame transition preview image. For the second camera, the second camera can sequentially acquire multi-frame images at 1.5x, 2x, 2.5x, 3x, 3.5x, and 4x, but these multi-frame 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 quality difference between the image obtained by the second camera at a magnification of 4.5x and the quality of the image obtained by the first camera at a magnification of 4.5x is less than or equal to the preset threshold, then the terminal The device can stop the first camera after displaying the preview image acquired by the first camera at 4.5x, and switch to the second camera to acquire 5x, 5.5x, 6x, 6.5x, 7x, 7.5x, 8x, 8.5x, Multi-frame images at 9x and 9.5x, and multiple-frame preview images are displayed in the preview view box in sequence.
在本申请实施例中,终端设备可以通过确定倍率间隔从而得到多个过渡倍率下的预览图像,并依次在预览视图框中显示,这样可以实现从1x点切至10x的平滑过渡,在预览视图框中显示平滑过渡的预览图像,提高终端设备的变焦效果。In the embodiment of the present application, the terminal device can obtain preview images at multiple transition magnifications by determining the magnification interval, and display them in the preview view box sequentially. This can achieve a smooth transition from the 1x point to 10x. In the preview view A preview image with smooth transition is displayed in the frame to improve the zoom effect of the terminal device.
此外,在点切操作发生之后,终端设备可以启动第二摄像头,实现第一摄像头和第二摄像头两路出图,这样有利于实现第一摄像头和第二摄像头之间的软切换,缓解切换不同摄像头导致的预览图像过渡生硬的问题,提高了不同摄像头切换场景下终端设备的变焦效果。In addition, after the point-to-cut operation occurs, the terminal device can activate the second camera to realize two-way picture output from the first camera and the second camera. This is conducive to realizing soft switching between the first camera and the second camera and easing the differences in switching. The issue of stiff preview image transition caused by the camera has improved the zoom effect of the terminal device in different camera switching scenarios.
下面结合图7,以分层架构中各层执行的操作对本申请实施例的倍率切换方法进行介绍。The magnification switching method according to the embodiment of the present application will be introduced below with reference to FIG. 7 , based on the operations performed by each layer in the layered architecture.
图7是本申请实施例提供的一种倍率切换方法700的示意性流程图。方法700的步骤可以由上述终端设备400执行,终端设备400的摄像头模组可以包括第一摄像头和第二摄像头,终端设备400的硬件抽象层包括剪切控制模块和多摄控制模块,但本申请实施例对此不作限定。方法700包括如下步骤:Figure 7 is a schematic flow chart of a magnification switching method 700 provided by an embodiment of the present application. The steps of 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. The hardware abstraction layer of the terminal device 400 includes a shearing control module and a multi-camera control module. However, this application The embodiment does not limit this. Method 700 includes the following steps:
S701,第一摄像头在第一倍率下出图并送显。S701, the first camera produces a picture at the first magnification and sends it to the display.
S702,响应于用户的点切操作,相机应用向剪切控制模块发送倍率切换请求消息,该倍率切换请求消息用于请求从第一倍率切换至第二倍率,该倍率切换请求消息包括第一倍率和第二倍率。相应地,剪切控制模块接收该倍率切换请求消息。S702. In response to the user's point-and-cut operation, the camera application sends a magnification switching request message to the shearing control module. The magnification switching request message is used to request switching from the first magnification to the second magnification. The magnification switching request message includes the first magnification. and second magnification. Correspondingly, the shearing control module receives the magnification switching request message.
S703,剪切控制模块根据预设参数确定倍率间隔。S703, the shearing control module determines the magnification interval according to the preset parameters.
示例性地,预设参数包括预设的切换时长或者预设的预览图像帧数。其中,切换 时长表示在用户执行倍率点切操作后,终端设备从第一倍率下的预览视图切换至在预览视图框中可以显示第二倍率下的预览图像的时长限制。预览图像帧数表示终端设备可以在预览视图框中显示第二倍率下的预览图像所需要的用于过渡的预览图像的帧数。For example, the preset parameters include a preset switching duration or a preset number of preview image frames. Among them, 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 box after the user performs a magnification point switching operation. The number of frames of the preview image indicates the number of frames of the preview image required for the transition that the terminal device can display in the preview view frame the preview image at the second magnification.
示例性地,切换时长为0.1s,而相邻过渡倍率下的预览图像之间的过渡时间为0.02s,如果要从1x切换至5x,那么1s内最多可以完成5次预览图像的过渡,那么终端设备可以确定倍率间隔为1x,实现从1x、2x、3x、4x、直至5x的过渡,共用时0.08s。终端设备还可以确定倍率间隔为2x,首先从1x、3x直至5x的过渡,共用时0.04s。For example, the switching duration 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, up to 5 preview image transitions can be completed within 1s, then The terminal equipment can determine the magnification interval to be 1x, realizing the transition from 1x, 2x, 3x, 4x, and up to 5x, with a total time of 0.08s. The terminal device can also determine the magnification interval to be 2x. The first transition from 1x, 3x to 5x takes a total of 0.04s.
示例性地,预览图像帧数为3帧,如果要从1x切换至5x,那么终端设备可以确定倍率间隔为1x,实现从1x、2x、3x、4x、直至5x的过渡,用于过渡的预览图像的帧数为3帧。For example, the number of preview image frames is 3 frames. If you want to switch from 1x to 5x, the terminal device can determine the magnification interval to be 1x to realize the transition from 1x, 2x, 3x, 4x, and up to 5x for preview of the transition. The number of frames of the image is 3 frames.
示例性地,预览图像帧数为7帧,终端设备还可以确定倍率间隔为0.5x,实现从1x、1.5x、2x、2.5x、3x、3.5x、4x、4.5x直至5x的过渡,用于过渡的预览图像的帧数为7帧。For example, the number of preview image frames is 7, and the terminal device can also determine the magnification interval to be 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 for the transition preview image is 7 frames.
应理解,为了获得更加平滑的过渡效果,终端设备可以确定较为精细的倍率间隔,本申请实施例倍率间隔的具体取值不作限定。It should be understood that in order to obtain a smoother transition effect, the terminal device can determine a finer magnification interval. The specific value of the magnification interval in the embodiment of the present application is not limited.
S704,剪切控制模块根据倍率间隔,确定过渡倍率。S704, the shearing control module determines the transition magnification according to the magnification interval.
S705,多摄控制模块向第一摄像头发送摄像头保持请求消息,该摄像头保持请求消息用于请求第一摄像头保持开启状态,该摄像头保持请求消息可以包括过渡倍率。相应地,第一摄像头接收该摄像头保持请求消息。S705. The multi-camera control module sends a camera hold request message to the first camera. The camera hold request message is used to request the first camera to stay on. The camera hold request message may include a transition magnification. Correspondingly, the first camera receives the camera hold request message.
S706,第一摄像头继续开启,获得过渡倍率下的预览图像。S706, the first camera continues to be turned on to obtain a preview image at a transition magnification.
S707,第一摄像头向相机应用发送过渡倍率下的预览图像。相应地,相机应用接收该预览图像。S707, the first camera sends the preview image at the transition magnification to the camera application. Accordingly, the camera application receives the preview image.
S708,相机应用在预览视图框中显示过渡倍率下的预览图像。S708, the camera application displays the preview image at the transition magnification in the preview view box.
应理解,在由第一摄像头切换至第二摄像头之前,相机应用在预览视图框中显示的是第一摄像头获得的预览图像。在由第一摄像头切换至第二摄像头之后,相机应用在预览视图框中显示的是第二摄像头获得的预览图像。It should be understood that before switching from the first camera to the second camera, the camera application displays the preview image obtained by the first camera in the preview view box. After switching from the first camera to the second camera, the camera application displays the preview image obtained by the second camera in the preview view box.
S709,多摄控制模块向第二摄像头发送摄像头启动请求消息,该摄像头启动请求消息用于请求启动第二摄像头,该摄像头启动请求消息可以包括过渡倍率。相应地,第二摄像头接收该摄像头启动请求消息。S709: The multi-camera control module sends a camera start request message to the second camera. The camera start request message is used to request to start the second camera. The camera start request message may include a transition magnification. Correspondingly, the second camera receives the camera start request message.
S710,第二摄像头开启,获得过渡倍率下的预览图像。S710, the second camera is turned on to obtain a preview image at a transition 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 conditions, 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 the preset threshold.
示例性地,以图像的峰值信噪比(peak signal-to-noise ratio,PSNR)作为评价图像的质量的评价指标,如果预设阈值为5dB,第二摄像头在目标过渡倍率下获得的图像的PSNR为40dB,第一摄像头在目标过渡倍率下获得的图像的PSNR为43dB,差距为3dB<5dB,那么多摄控制模块可以控制第一摄像头关闭,切换至第二摄像头持续获取图像并在预览视图框中显示预览图像。For example, the peak signal-to-noise ratio (PSNR) of the image is used as an evaluation index to evaluate the quality of the image. If the preset threshold is 5dB, the image obtained by the second camera at the target transition magnification is 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 shear control module can determine the first transition magnification after the first magnification of 1x based on the magnification interval. 1.5x, then the first camera obtains the preview image under 1.5x and sends it to the camera application to display the preview image under 1.5x in the preview view box, and the second camera also obtains the preview image under 1.5x but not in the preview view box show. After that, the shearing control module can determine the transition magnification after 1.5x to be 2x based on the magnification interval. After that, 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. The second camera The camera also obtains the preview image at 2x but does not display it in the preview view box. In this cycle, the first camera sequentially obtains and displays the subsequent transition magnifications (2.5x, 3x, 3.5x, 4x, 4.5x, 5x) in the preview view box. ), the second camera sequentially acquires preview images at subsequent transition magnifications (2.5x, 3x, 3.5x, 4x, 4.5x, 5x) but does not display them in the preview view box.
示例性地,还可以以图像的均方误差(mean square error,MSE)、信噪比(signal-to-noise ratio,SNR)或者平均绝对误差(mean absolute error,MAE)作为评价图像的质量的评价指标,本申请实施例对此不作限定。For example, the mean square error (MSE), signal-to-noise ratio (SNR) or mean absolute error (MAE) of the image can also be used as a criterion to evaluate the quality of the image. The evaluation index is not limited in the embodiments of this application.
S711,多摄控制模块向第一摄像头发送摄像头关闭请求消息,该摄像头关闭请求消息用于请求关闭第一摄像头。相应地,第一摄像头接收该摄像头关闭请求消息。S711. The multi-camera control module sends a camera close request message to the first camera. The camera close request message is used to request to close the first camera. Correspondingly, the first camera receives the camera closing request message.
S712,第一摄像头关闭,停止工作。S712, the first camera is turned off and stops working.
S713,第二摄像头获得目标过渡倍率之后的过渡倍率下的预览图像。S713: The second camera obtains a preview image at a transition magnification after the target transition magnification.
S714,第二摄像头向相机应用发送目标过渡倍率之后的过渡倍率下的预览图像,相应地,相机应用接收该预览图像。S714: The second camera sends the preview image at the 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 turned off, and the second camera continues to produce pictures and sends the preview image to the preview view box for display, thus completing the soft switching between cameras.
S715,相机应用在预览视图框中显示目标过渡倍率之后的过渡倍率下的预览图像。S715, the camera application displays the preview image at the transition magnification after the target transition magnification in the preview view box.
重复执行上述S713至S715,直至相机应用在预览视图框中显示第二倍率下的预览图像。Repeat the above S713 to S715 until the camera application displays the preview image at the second magnification in the preview view box.
以倍率间隔为0.5x,第一倍率为1x,第二倍率为10x,目标倍率为5x为例,第二摄像头获取5.5x下的预览图像并将预览图像发送至预览视图框中显示,如此循环,第二摄像头依次获取之后的过渡倍率(6x、6.5x、7x、7.5x、8x、8.5x、9x、9.5x)下的预览图像,并且相机应用在预览视图框中显示之后的过渡倍率下的预览图像,直至相机应用在预览视图框中显示第二倍率(10x)下的预览图像。由此,可以在倍率点切的过程中实现预览图像的平滑过渡,提高了终端设备的变焦效果。Take 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 obtains a 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 subsequent transition magnifications (6x, 6.5x, 7x, 7.5x, 8x, 8.5x, 9x, 9.5x), and the camera application displays the subsequent transition magnifications in the preview view box preview image until the camera app displays the preview image at the second magnification (10x) in the preview view box. As a result, a smooth transition of the preview image can be achieved during the magnification point switching process, thereby improving the zoom effect of the terminal device.
在本实施例中,剪切控制模块可以根据倍率间隔依次确定过渡倍率。可选地,剪切控制模块还可以直接确定多个过渡倍率,多个过渡倍率可以是等间隔的,也可以是不等间隔的,本申请实施例对此不作限定。In this embodiment, the shearing control module can determine the transition magnification in sequence according to the magnification interval. Optionally, the shear control module can also directly determine multiple transition magnifications. The multiple transition magnifications can be equally spaced or unequal spaced. This is not limited in the embodiment of the present application.
在一种可能的场景中,终端设备的摄像头模组包括至少一个摄像头,在倍率点切操作的过程中,可以由同一个摄像头获取不同倍率下的预览图像并在预览视图框中显示,也就是不涉及到摄像头之间的切换。下面结合图8对本场景下的倍率点击切换过程进行介绍。In a possible scenario, the camera module of the terminal device includes at least one camera. During the magnification point switching operation, the same camera can obtain preview images at different magnifications and display them in the preview view box, that is, There is no switching between cameras involved. The magnification click switching process in this scenario is introduced below with reference to Figure 8.
图8是本申请实施例提供的另一种倍率切换方法800的示意性流程图。方法800的步骤可以由上述终端设备400执行,终端设备400的摄像头模组可以包括第一摄像 头,终端设备400的硬件抽象层包括剪切控制模块,但本申请实施例对此不作限定。方法800包括如下步骤:FIG. 8 is a schematic flow chart of another magnification switching method 800 provided by an embodiment of the present application. The steps of method 800 may be executed by the above-mentioned terminal device 400. The camera module of the terminal device 400 may include the first camera, and the hardware abstraction layer of the terminal device 400 may include a clipping control module, but this is not limited in the embodiment of the present application. Method 800 includes the following steps:
S801,第一摄像头在第一倍率下出图并送显。S801, the first camera produces a picture at the first magnification and sends it to the display.
S802,响应于用户的点切操作,相机应用向剪切控制模块发送倍率切换请求消息,该倍率切换请求消息用于请求从第一倍率切换至第二倍率,该倍率切换请求消息包括第一倍率和第二倍率。相应地,剪切控制模块接收该倍率切换请求消息。S802, in response to the user's point and cut operation, the camera application sends a magnification switching request message to the shearing control module. The magnification switching request message is used to request switching from the first magnification to the second magnification. The magnification switching request message includes the first magnification. and second magnification. Correspondingly, the shearing control module receives the magnification switching request message.
S803,剪切控制模块根据预设参数确定倍率间隔。S803: The shearing control module determines the magnification interval according to the preset parameters.
S804,剪切控制模块根据倍率间隔,确定过渡倍率。S804, the shearing control module determines the transition magnification according to the magnification interval.
S805,剪切控制模块向第一摄像头发送过渡倍率。相应地,第一摄像头获取过渡倍率。S805, the shearing control module sends the transition magnification to the first camera. Correspondingly, the first camera acquires the transition magnification.
S806,第一摄像头获得过渡倍率下的预览图像。S806, the first camera obtains a preview image at a transition magnification.
S807,第一摄像头向相机应用发送过渡倍率下的预览图像。相应地,相机应用接收该预览图像。S807, the first camera sends the preview image at the transition magnification to the camera application. Accordingly, the camera application receives the preview image.
S808,相机应用在预览视图框中显示过渡倍率下的预览图像。S808, the camera application displays the preview image at the transition magnification in the preview view box.
重复执行上述S804和S808,直至相机应用在预览视图框中显示第二倍率下的预览图像。Repeat the above S804 and S808 until the camera application displays the preview image at the second magnification in the preview view box.
其中,确定倍率间隔以及确定过渡倍率的方式可以参照如方法700所描述的实施例,此处不再赘述。The method of determining the magnification interval and the transition magnification may refer to the embodiment described in method 700 and will not be described again here.
在本申请实施例中,终端设备可以响应于用户的点切操作,使用第一摄像头完成不同倍率下的预览拍摄,第一摄像头可以依次在多个过渡倍率下获得过渡预览图像,有利于实现倍率点切操作过程中预览图像的平滑过渡,提高相机应用的变焦效果。In the embodiment of the present application, the terminal device can respond to the user's point-and-cut operation and use the first camera to complete preview shooting at different magnifications. The first camera can sequentially obtain transition preview images at multiple transition magnifications, which is beneficial to achieving magnification. Smooth transition of preview images during point-and-cut operations, improving the zoom effect of camera applications.
综上,本申请实施例提供了再一种倍率切换方法900,如图9所示,方法900可以应用于部署有摄像头的终端设备,方法900包括如下步骤:In summary, the embodiment of the present application provides yet another magnification switching method 900. As shown in Figure 9, the method 900 can be applied to a terminal device equipped with a camera. The method 900 includes the following steps:
S901,显示摄像头获取到的第一倍率下的第一预览图像;S901, display the first preview image at the first magnification acquired by the camera;
S902,响应于用户对第二倍率的选择操作,显示对应于L个过渡倍率的L帧预览图像,该L个过渡倍率包括处于第一倍率和第二倍率之间的L个倍率,L≥1且为整数;S902, in response to the user's selection operation on the second magnification, display L frame preview images corresponding to L transition magnifications, the L transition magnifications including L magnifications between the first magnification and the second magnification, L≥1 and is an integer;
S903,显示摄像头获取到的第二倍率下的第二预览图像。S903: Display the second preview image obtained by the camera at the second magnification.
在本申请实施例中,在用户对第二倍率的选择操作之前,终端设备可以通过在第一倍率下获得第一预览图像。在用户对第二倍率的选择操作发生之后,终端设备可以在显示第二预览图像之前根据L个过渡倍率显示L帧预览图像,起到从第一预览图像平滑过渡到第二预览图像的作用,有利于改善终端设备的变焦效果,提高用户的使用体验。In this 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 the 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 helpful to improve the zoom effect of the terminal device and improve the user experience.
其中,用户对第二倍率的选择操作,可以包括如图1所示的用户通过点击倍率图标的方式选择第二倍率,还可以包括用户以其他方式在多个倍率中选择出第二倍率的方式,本申请实施例对此不作限定。The user's selection operation of the second magnification may include the user selecting the second magnification by clicking on the magnification icon as shown in Figure 1, or may also include the user selecting the second magnification among multiple magnifications in other ways. , the embodiment of the present application does not limit this.
应理解,L帧预览图像用于从第一预览图像过渡至第二预览图像,L帧预览图像是终端设备按照时间顺序拍摄得到的。It should be understood that the L frame preview image is used to transition from the first preview image to the second preview image, and the L frame preview image is captured by the terminal device in chronological order.
还应理解,用户可以是通过对第二倍率的选择操作实现对预览图像的放大效果,用户也可以是通过对第二倍率的选择操作实现对预览图像的缩小效果,本申请实施例 对此不作限定。It should also be understood that the user can achieve the enlargement effect on the preview image through the selection operation of the second magnification, and the user can also achieve the reduction effect on the preview image through the selection operation of the second magnification. The embodiment of the present application does not do this. limited.
示例性地,第一倍率为1x,第二倍率为7x,过渡倍率从小到大依次为2x、3x、4x、5x、6x,共有5个过渡倍率。对应地,终端设备可以依次显示摄像头在2x、3x、4x、5x、6x下获取到的预览图像。For example, the first magnification is 1x, the second magnification is 7x, and the transition magnifications from small to large are 2x, 3x, 4x, 5x, and 6x, with a total of 5 transition magnifications. Correspondingly, the terminal device can sequentially display preview images obtained by the camera at 2x, 3x, 4x, 5x, and 6x.
示例性地,第一倍率为7x,第二倍率为1x,过渡倍率从大到小依次可以为6x、5x、4x、3x、2x,共有5个过渡倍率。对应地,终端设备可以依次显示摄像头在6x、5x、4x、3x、2x下获取到的预览图像。For example, the first magnification is 7x, the second magnification is 1x, and the transition magnifications from large to small can be 6x, 5x, 4x, 3x, and 2x, with a total of 5 transition magnifications. Correspondingly, the terminal device can sequentially display preview images obtained 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 transition magnifications based on the first magnification and the second magnification.
在一种可能的实现方式中,基于第一倍率和第二倍率,确定L个过渡倍率,包括:基于第一倍率、第二倍率、第一倍率与第二倍率之间的切换时长,以及相邻帧之间的时间间隔,确定L个过渡倍率。In a possible implementation, L transition magnifications are determined based on the first magnification and the second magnification, including: based on the first magnification, the second magnification, the switching time between the first magnification and the second magnification, and the corresponding 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 may be the preset switching duration described in the embodiment shown in FIG. 7. For details, please refer to the description of S703, which will not be described again here. .
在一种可能的实现方式中,基于第一倍率和第二倍率,确定L个过渡倍率,包括:基于第一倍率、第二倍率和预设的预览图像帧数,确定L个过渡倍率。In a possible implementation, determining L transition magnifications based on the first magnification and the second magnification includes: determining L transition magnifications based on the first magnification, the second magnification and the preset preview image frame number.
在本方式中,预设的预览图像帧数可以为如图7所示的实施例中所描述的预设的预览图像帧数,具体可参见对S703的描述,此处不再赘述。In this method, the preset preview image frame number may be the preset preview image frame number described in the embodiment shown in FIG. 7. For details, please refer to the description of S703, which will not be described again here.
作为一个可选的实施例,方法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 comes from the first camera, and the second preview image comes from the second camera. Method 900 also includes: turning on the second camera, and acquiring images through the first camera and the second camera, where 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 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, the first camera is closed, and the preview image displayed before closing the first camera From the first camera. Among them, the Nth frame image from the first camera is captured at the same time point and based on the same transition magnification as the Mth frame image from the second camera, N≥M≥1, N and M are integers.
在本申请实施例中,用户对第二倍率的选择操作涉及到不同摄像头之间切换的场景。这样通过第一摄像头和第二摄像头双路出图的方式有利于提高预览图像的质量,终端设备的图像算法可通过更多的预览图像进行特征优化,在适当的时候切换用于送显的摄像头,有利于提高对焦的稳定性和平滑过渡的效果。In this embodiment of the present application, the user's selection operation of the second magnification involves a scene of switching between different cameras. This method of dual-channel image output through 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 features through more preview images, and switch the camera used for display at the appropriate time. , which is helpful to improve the stability of focus and the effect of smooth transition.
在一种可能的实现方式中,终端设备通过第一摄像头在第一倍率下获取图像,并显示来自第一摄像头获取到的图像,即第一预览图像。在这之后,终端设备可以开启第二摄像头,通过第一摄像头和第二摄像头获取过渡倍率下的图像。在这种方式中,第一摄像头可以和第二摄像头在同一时间点基于相同的过渡倍率获取图像,此时M≠N。In a possible implementation, the terminal device acquires an image at a first magnification through a 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 obtain images at the transition magnification through the first camera and the second camera. In this way, the first camera and the second camera can acquire images based on the same transition magnification at the same time point, when M≠N.
以图6为例,终端设备在显示来自第一摄像头1x下的预览图像之后开启第二摄像头。在1x至10x之间共有L=17个过渡倍率,第一摄像头和第二摄像头可以在相同的时间节点,获取过渡倍率下的图像。假设M=7,N=8,即第一摄像头的第8帧图像和第二摄像头的第7帧图像对应的过渡倍率为4.5x,也就是来自第二摄像头的第7帧图像的质量与来自第一摄像头的第8帧图像的质量的差距小于或者等于预设阈值,那么 终端设备可以关闭第一摄像头。Taking Figure 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. The first camera and the second camera can acquire images at the transition magnifications at the same time node. Assume M=7, N=8, that is, the transition magnification corresponding to the 8th frame image from the first camera and the 7th frame image from the second camera is 4.5x, that is, the quality of the 7th frame image from the second camera is different from the quality of the 7th frame image from the second camera. The difference in quality of the 8th frame image of the first camera is less than or equal to the preset threshold, then the terminal device can turn off the first camera.
其中,预设阈值可以为如图7所示的实施例中所描述的预设阈值,具体可参见对S710的描述,此处不再赘述。The preset threshold may be the preset threshold described in the embodiment shown in FIG. 7. For details, please refer to the description of S710, which will not be described again here.
在另一种可能的实现方式中,终端设备通过第一摄像头在第一倍率下获取图像,并显示来自第一摄像头获取到的图像,即第一预览图像。同时,终端设备已经开启了第二摄像头,通过第二摄像头在第一倍率下获取图像但是不显示第二摄像头获取到的图像。在这种方式中,如果第二摄像头在第一倍率下获取的图像(即第一预览图像)的质量与第一摄像头在第一倍率下获取的图像的质量的差距小于或者等于预设阈值,此时M=N。In another possible implementation, the terminal device acquires an image at a first magnification through a 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 uses the second camera to obtain images at the first magnification but does not display the images obtained by the second camera. In this way, if the quality difference between the image acquired by the second camera at the first magnification (i.e., the first preview image) and the quality of the image acquired 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。Taking Figure 6 as an example, assuming that the time of starting the second camera in the figure is advanced to before the point-cut moment, the terminal device acquires the image at a magnification of 1x through the first camera and the second camera, and displays the image from the first camera at a magnification of 1x. The preview image obtained below. If the quality difference between the quality of the preview image obtained by the second camera at a magnification of 1x and the quality of the preview image obtained by the first camera at a magnification of 1x is less than or equal to the preset threshold, then the terminal device can display the image from the first camera. After the camera acquires the preview image at 1x magnification, the first camera is turned off, and then the preview image at transition magnification is acquired and displayed 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的倍率下获取到的预览图像之后,关闭第一摄像头。In the same way, N=M=2, N=M=3, N=M=4, etc. may also exist. Taking N=M=2 as an example, the terminal device obtains images through the first camera and the second camera at magnifications of 1x and 1.5x, and displays the preview images obtained from the first camera at magnifications of 1x and 1.5x. If the quality difference between the quality of the preview image obtained by the second camera at a magnification of 1.5x and the quality of the preview image obtained by the first camera at a magnification of 1.5x is less than or equal to the preset threshold, then the terminal device can display the image from After the first camera acquires the preview image 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 to achieve a smooth transition of magnification and improve the zoom effect of the terminal device.
还应理解,上述实施例中以终端设备包括第一摄像头和第二摄像头为例介绍了摄像头之前的软切换过程,但是本申请实施例对终端设备的摄像头的数量不作限定。示例性地,终端设备还可以包括第三摄像头,在用户点击切换操作发生之后,还可以由第二摄像头切换至第三摄像头。It should also be understood that in the above embodiment, the soft switching process before the camera 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. For example, the terminal device may further include a third camera, and after the user clicks the switching operation, the second camera may be switched to the third camera.
示例性地,第一摄像头为超广角摄像头,第二摄像头为广角摄像头,第三摄像头为长焦摄像头,假设超广角摄像头所支持的倍率范围为-1x,广角摄像头所支持的倍率范围为1x至3.5x,长焦摄像头所支持的倍率范围为4x至7x。For example, 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. It is assumed that the magnification range supported by the ultra-wide-angle camera is -1x, and the magnification range supported by the wide-angle camera is 1x to 3.5x, the telephoto camera supports a magnification range from 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 user clicks to switch the magnification within the magnification range supported by the wide-angle camera, the terminal device turns on the wide-angle camera and determines the transition magnification. , through dual-channel image output through the ultra-wide-angle camera and wide-angle camera, and display the preview image obtained from the wide-angle camera at the appropriate time. When the magnification switched by the user's click is within the magnification range supported by the telephoto camera, the terminal device turns on the telephoto camera, determines the transition magnification, outputs the image through the wide-angle camera and the telephoto camera dually, and displays the image from the telephoto camera at the appropriate time. Get the preview image. This two-way image output method facilitates the display of smooth transition preview images and improves 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界面的预览图像。Figure 10 is a schematic interface diagram of a terminal device provided by an embodiment of the present application. Taking the terminal device as a mobile phone as an example, Figure 10 shows the a interface, b interface and c interface of the mobile phone. Among them, 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 on the camera application, the mobile phone displays interface b, which is the shooting interface. For example, interface b includes multiple magnification icons. The current magnification of the camera is 1x. The user can click on different magnification icons to switch between different magnifications. For example, if the user clicks the 5x magnification icon, the mobile phone can display interfaces c to f in sequence. In the c interface, the terminal device can display the first frame of the preview image for transition. On the d interface, the terminal device displays the second frame of the preview image for transition. On the e interface, the terminal device displays the third frame of the preview image 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 shown in FIG. 10 is only an example. In fact, preview images corresponding to the number of frames may be displayed according to the specific number of transition magnifications. This is not limited in the embodiment of the present application.
应理解,上述各过程的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本申请实施例的实施过程构成任何限定。It should be understood that the size of the serial numbers of the above-mentioned processes does not mean the order of execution. 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 has been described in detail with reference to FIGS. 4 to 10 . Next, the magnification switching device according to the embodiment of the present application will be described in detail with reference to FIGS. 11 and 12 .
图11示出了本申请实施例提供的一种倍率切换装置1100的示意性框图,该装置1100包括获取模块1110和处理模块1120。Figure 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且为整数;以及,显示摄像头获取到的第二倍率下的第二预览图像。The acquisition 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 at the first magnification acquired by the camera; in response to the user's selection operation on the second magnification, display L frame preview images corresponding to L transition magnifications, where the L transition magnifications include L magnifications between the first magnification and the second magnification, L≥1 and an integer; and display the second preview image at the second magnification acquired by the camera.
可选地,处理模块1120用于:基于第一倍率和第二倍率,确定L个过渡倍率。Optionally, the processing module 1120 is configured to determine L transition magnifications based on the first magnification and the second magnification.
可选地,处理模块1120用于:基于第一倍率、第二倍率、第一倍率与第二倍率之间的切换时长,以及相邻帧之间的时间间隔,确定L个过渡倍率。Optionally, the processing module 1120 is configured to determine L transition 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 transition 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 comes from the first camera, and the second preview image comes from the second camera. The processing module 1120 is used to: turn on the second camera. The acquisition module 1110 is configured to: acquire images through the first camera and the second camera, where 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 quality difference between the Mth frame image of the camera and the Nth frame image from the first camera is less than or equal to the preset threshold, the first camera is closed, and the preview image displayed before closing the first camera is from the first camera. . Among them, the Nth frame image from the first camera is captured at the same time point and at the same magnification as the Mth frame 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 can understand that the device 1100 can be specifically the terminal device in the above embodiment, or the functions of the terminal device in the above embodiment can be integrated in the device 1100. The above functions can be implemented by hardware, or can be implemented by hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the above functions. The apparatus 1100 may be used to execute various processes and/or steps corresponding to the terminal device in the above method embodiment.
应理解,这里的装置1100以功能模块的形式体现。这里的术语“模块”可以指应用特有集成电路(application specific integrated circuit,ASIC)、电子电路、用于执行一个或多个软件或固件程序的处理器(例如共享处理器、专有处理器或组处理器等)和存储器、合并逻辑电路和/或其它支持所描述的功能的合适组件。在本申请的实施例,图11中的装置1100也可以是芯片或者芯片系统,例如:片上系统(system on chip,SoC)。It should be understood that the device 1100 here is embodied in the form of a functional module. The term "module" as used herein may refer to an application specific integrated circuit (ASIC), an electronic circuit, a processor (such as a shared processor, a proprietary processor, or a group of processors) used to execute one or more software or firmware programs. processor, etc.) and memory, merged logic circuitry, and/or other suitable components to support the described functionality. In this embodiment of the present application, the device 1100 in Figure 11 may also be a chip or a chip system, such as a system on chip (SoC).
图12示出了本申请实施例提供的另一种倍率切换装置1200的示意性框图。该装置1200包括处理器1210、收发器1220和存储器1230。其中,处理器1210、收发器1220和存储器1230通过内部连接通路互相通信,该存储器1230用于存储指令,该处理器1210用于执行该存储器1230存储的指令,以控制该收发器1220发送信号和/或接收信号。Figure 12 shows a schematic block diagram of another magnification switching device 1200 provided by an embodiment of the present application. The device 1200 includes a processor 1210, a transceiver 1220, and a memory 1230. Among them, the processor 1210, the transceiver 1220 and the memory 1230 communicate with each other through internal connection paths. 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 receive a signal.
应理解,装置1200可以具体为上述实施例中的终端设备,或者,上述实施例中终端设备的功能可以集成在装置1200中,装置1200可以用于执行上述方法实施例中与终端设备对应的各个步骤和/或流程。可选地,该存储器1230可以包括只读存储器和随机存取存储器,并向处理器提供指令和数据。存储器的一部分还可以包括非易失性随机存取存储器。例如,存储器还可以存储设备类型的信息。该处理器1210可以用于执行存储器中存储的指令,并且该处理器执行该指令时,该处理器可以执行上述方法实施例中与终端设备对应的各个步骤和/或流程。It should be understood that the device 1200 can be specifically a terminal device in the above embodiment, or the functions of the terminal device in the above embodiment can be integrated in the device 1200, and the device 1200 can be used to perform various functions corresponding to the terminal device in the above method embodiment. steps and/or processes. Optionally, the memory 1230 may include read-only memory and random access memory and provide 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 can be used to execute instructions stored in the memory, and when the processor executes the instructions, the processor can execute various steps and/or processes corresponding to the terminal device in the above method embodiment.
应理解,在本申请实施例中,该处理器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 (CPU), and the processor may also be other general-purpose processors, digital signal processors (DSP), 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, etc.
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的模块及算法步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。Those of ordinary skill in the art can appreciate that the modules and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented with electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Skilled artisans may implement the described functionality using different methods for each specific application, but such implementations should not be considered beyond the scope of this application.
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统、装置和模块的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working processes of the systems, devices and modules described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be described again here.
在本申请所提供的几个实施例中,应该理解到,所揭露的系统、装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述模块的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个模块或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些 接口,装置或模块的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided in this application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only illustrative. For example, the division of modules is only a logical function division. In actual implementation, there may be other division methods. For example, multiple modules or components may be combined or can be integrated into another system, or some features can be ignored, or not implemented. On the other hand, the coupling or direct coupling or communication connection between each other shown or discussed may be through some interfaces, indirect coupling or communication connection of devices or modules, which may be in electrical, mechanical or other forms.
所述作为分离部件说明的模块可以是或者也可以不是物理上分开的,作为模块显示的部件可以是或者也可以不是物理模块,即可以位于一个地方,或者也可以分布到多个网络模块上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical modules, that is, they may be located in one place, or they may be distributed to multiple network modules. Some 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 can be integrated into one processing module, or each module can exist physically alone, or two or more modules can 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 existing technology or the part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including Several instructions are used to cause a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in various embodiments of this application. The aforementioned storage media include: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), magnetic disk or optical disk and other media that can store program code. .
以上所述,仅为本申请的具体实施方式,但本申请实施例的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请实施例揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请实施例的保护范围之内。因此,本申请实施例的保护范围应所述以权利要求的保护范围为准。The above are only specific implementation modes of the present application, but the protection scope of the embodiments of the present application is not limited thereto. Any person familiar with the technical field can easily think of changes within the technical scope disclosed in the embodiments of the present application. or replacement, all should be covered by the protection scope of the embodiments of this application. Therefore, the protection scope of the embodiments of the present application shall be subject to the protection scope 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:
    显示所述摄像头获取到的第一倍率下的第一预览图像;Display the first preview image at the first magnification acquired by the camera;
    响应于用户对第二倍率的选择操作,显示对应于L个过渡倍率的L帧预览图像,所述L个过渡倍率包括处于所述第一倍率和所述第二倍率之间的L个倍率,L≥1且为整数;In response to the user's selection operation on the second magnification, displaying L frame preview images corresponding to L transition magnifications, the L transition magnifications including L magnifications between the first magnification and the second magnification, L≥1 and is an integer;
    显示所述摄像头获取到的所述第二倍率下的第二预览图像。Display the second preview image acquired by the camera at the second magnification.
  2. 根据权利要求1所述的方法,其特征在于,在所述响应于用户对第二倍率的选择操作,显示对应于L个过渡倍率的L帧预览图像之前,所述方法还包括:The method according to claim 1, characterized in that, before displaying L frame preview images corresponding to L transition magnifications in response to the user's selection operation of the second magnification, the method further includes:
    基于所述第一倍率和所述第二倍率,确定所述L个过渡倍率。The L transition magnifications are determined based on the first magnification and the second magnification.
  3. 根据权利要求2所述的方法,其特征在于,所述基于所述第一倍率、所述第二倍率,确定所述L个过渡倍率,包括:The method of claim 2, wherein determining the L transition magnifications based on the first magnification and the second magnification includes:
    基于所述第一倍率、所述第二倍率、所述第一倍率与所述第二倍率之间的切换时长,以及相邻帧之间的时间间隔,确定所述L个过渡倍率。The L transition 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 of claim 2, wherein determining the L transition magnifications based on the first magnification and the second magnification includes:
    基于所述第一倍率、所述第二倍率和预设的预览图像帧数,确定所述L个过渡倍率。The L transition 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, characterized in that the camera includes a first camera and a second camera, the first preview image is 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 through 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, the first camera is turned off, and the first camera is turned off. The previously displayed preview image comes from the first camera, wherein the N-th frame image from the first camera is captured at the same time node and based on the same magnification as the M-th frame 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 executing 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 to a memory, the memory is used to store a computer program, and when the processor calls the computer program, the device is caused to execute as follows: The method of 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, the processor is used to execute instructions stored in the memory , so that the terminal device performs the method according to any one of claims 1-5.
  9. 一种计算机可读存储介质,其特征在于,用于存储计算机程序,当所述计算机程序在计算机上运行时,使得所述计算机执行如权利要求1-5中任一项所述的方法。A computer-readable storage medium, characterized in that it is used to store a computer program, which when the computer program is run on a computer, causes the computer 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. When the computer program code is run on a computer, the computer implements the method 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 WO2023160179A1 (en) 2023-08-31
WO2023160179A9 true 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

Family Cites Families (12)

* 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
CN111510618B (en) * 2019-01-30 2022-04-05 虹软科技股份有限公司 Zooming method and electronic equipment applying same
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
CN111726528B (en) * 2020-06-24 2022-04-08 Oppo广东移动通信有限公司 Camera switching method, device, terminal and computer storage medium
CN111885305B (en) * 2020-07-28 2022-04-29 Oppo广东移动通信有限公司 Preview picture processing method and device, storage medium and electronic equipment
CN113010738B (en) * 2021-02-08 2024-01-30 维沃移动通信(杭州)有限公司 Video processing method, device, electronic equipment and readable storage medium
CN112995511B (en) * 2021-03-02 2022-11-15 Oppo广东移动通信有限公司 Camera switching method and device, electronic equipment and storage medium
CN113055592B (en) * 2021-03-11 2023-03-21 Oppo广东移动通信有限公司 Image display method and device, electronic equipment and computer readable storage medium
CN115484375A (en) * 2021-05-31 2022-12-16 华为技术有限公司 Shooting method and electronic equipment
CN113727016A (en) * 2021-06-15 2021-11-30 荣耀终端有限公司 Shooting method and electronic equipment

Also Published As

Publication number Publication date
CN116709016A (en) 2023-09-05
WO2023160179A1 (en) 2023-08-31

Similar Documents

Publication Publication Date Title
US11722449B2 (en) Notification message preview method and electronic device
CN110231905B (en) Screen capturing method and electronic equipment
EP3923617A1 (en) Method for reducing power consumption of mobile terminal and mobile terminal
WO2020155875A1 (en) Display method for electronic device, graphic user interface and electronic device
WO2020024108A1 (en) Application icon display method and terminal
CN113935898A (en) Image processing method, system, electronic device and computer readable storage medium
WO2023273543A1 (en) Folder management method and apparatus
CN114115770A (en) Display control method and related device
WO2023160179A9 (en) Magnification switching method and magnification switching apparatus
WO2020062304A1 (en) File transmission method and electronic device
CN115119048B (en) Video stream processing method and electronic equipment
WO2023000746A1 (en) Augmented reality video processing method and electronic device
CN115022982A (en) Multi-screen cooperative non-inductive access method, electronic equipment and storage medium
CN116077943B (en) Method for scheduling system resources and related device
WO2024067037A1 (en) Service calling method and system, and electronic device
CN116095220B (en) Parameter determination method and related device
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
CN116095223B (en) Notification display method and terminal device
CN116709018B (en) Zoom bar segmentation method and electronic equipment
CN116389884B (en) Thumbnail display method and terminal equipment
WO2022179371A1 (en) Tiled display method, electronic device, and system
WO2024051634A1 (en) Screen projection display method and system, and electronic device
WO2023236693A1 (en) Application icon display method and related apparatus

Legal Events

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

Ref document number: 22928427

Country of ref document: EP

Kind code of ref document: A1