Camera switching method and related electronic device
AssigneeHonor Device Co., Ltd.
InventorQinghua Di
Life of this patent
Estimating the term…
Abstract
This application provides a camera switching method and related electronic device. The method includes: displaying a first interface with a preview area and a switching control on a first electronic device, where the preview area shows a first image from a first camera of the first electronic device; switching the camera to a second camera of a second electronic device at a first moment in response to a first input operation; displaying a second image from the second camera in the preview area at a second moment; responding to a second input operation on the switching control at a third moment; and displaying a third image from a third camera in the preview area at a fourth moment.
Claims17
A camera switching method applied to a first electronic device, comprising:
- displaying, by the first electronic device, a first interface, wherein the first interface comprises a preview area and a switching control, the preview area displays a first image, the first image is an image acquired by a first camera, the first camera is a camera of the first electronic device, and the first image is acquired by the first camera based on a parameter value of an image acquisition parameter;
- switching, by the first electronic device, a camera for image acquisition to a second camera at a first moment in response to a first input operation, wherein the second camera is a camera of a second electronic device;
- displaying, by the first electronic device, a second image th in the preview area at a second moment, wherein the second image is an image acquired by the second camera, and during image acquisition by the second camera, a data frame cached in a buffer carries the image acquisition parameter;
- responding to a second input operation performed on the switching control at a third moment;
- and
- displaying, by the first electronic device, a third image that in the preview area at a fourth moment, wherein the third image is an image acquired by a third camera, and the third camera is a camera of the second electronic device;
- wherein the first electronic device comprises a first application, a camera service module, a physical camera module, and a virtual camera module, and before the displaying, by the first electronic device, a first interface, the method further comprises:
- detecting a third input operation, and starting the first application,
- sending, by the camera service module, a first request message to the physical camera module,
- when it is detected that an image acquisition parameter exists in the first request message storing, by the physical camera module, the image acquisition parameter in the virtual camera module,
- invoking, by the physical camera module, the first camera to acquire the first image based on the first request message, and
- returning, by the physical camera module, a first data frame to the first application, wherein the first data frame comprises the first image and an image acquisition parameter.
A first electronic device, comprising:
- a memory, a processor, and a touch control screen, wherein the touch control screen is configured to display content;
- the memory is configured to store a computer program, and the computer program comprises program instructions;
- and the processor is configured to invoke the program instructions, so that the first electronic device performs the following operations:
- displaying a first interface, wherein the first interface comprises a preview area and a switching control, the preview area displays a first image, the first image is an image acquired by a first camera, the first camera is a camera of the first electronic device, and the first image is acquired by the first camera based on a parameter value of an image acquisition parameter;
- switching a camera for image acquisition to a second camera at a first moment in response to a first input operation, wherein the second camera is a camera of a second electronic device;
- displaying a second image in the preview area at a second moment, wherein the second image is an image acquired by the second camera, and during image acquisition by the second camera, a data frame cached in a buffer carries the image acquisition parameter;
- responding to a second input operation performed on the switching control at a third moment;
- and
- displaying a third image in the preview area at a fourth moment, wherein the third image is an image acquired by a third camera, and the third camera is a camera of the second electronic device;
- wherein the first electronic device further comprises a first application, a camera service module, a physical camera module, and a virtual camera module, and before displaying the first interface, the operations further comprise:
- detecting a third input operation, and starting the first application,
- sending, by the camera service module a first request message to the physical camera module,
- when it is detected that an image acquisition parameter exists in the first request message, storing, by the physical camera module, the image acquisition parameter in the virtual camera module,
- invoking, by the physical camera module, the first camera to acquire the first image based on the first request message, and
- returning by the physical camera module, a first data frame to the first application, wherein the first data frame comprises the first image and an image acquisition parameter.
A computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and the computer program, when executed by a processor of a first electronic device, implements a method, the method comprising:
- displaying a first interface, wherein the first interface comprises a preview area and a switching control, the preview area displays a first image, the first image is an image acquired by a first camera, the first camera is a camera of the first electronic device, and the first image is acquired by the first camera based on a parameter value of an image acquisition parameter;
- switching a camera for image acquisition to a second camera at a first moment in response to a first input operation, wherein the second camera is a camera of a second electronic device;
- displaying a second image in the preview area at a second moment, wherein the second image is an image acquired by the second camera, and during image acquisition by the second camera, a data frame cached in a buffer carries the image acquisition parameter;
- responding to a second input operation performed on the switching control at a third moment;
- and
- displaying a third image in the preview area at a fourth moment, wherein the third image is an image acquired by a third camera, and the third camera is a camera of the second electronic device;
- wherein the first electronic device comprises a first application, a camera service module, a physical camera module, and a virtual camera module, and before displaying the first interface, the method further comprises:
- detecting a third input operation, and starting the first application,
- sending, by the camera service module, a first request message to the physical camera module,
- when it is detected that an image acquisition parameter exists in the first request message, storing, by the physical camera module, the image acquisition parameter in the virtual camera module,
- invoking, by the physical camera module, the first camera to acquire the first image based on the first request message, and
- returning, by the physical camera module, a first data frame to the first application, wherein the first data frame comprises the first image and an image acquisition parameter.
Dependencies are inferred from the claim text.