Camera calling method and device, electronic equipment and storage medium

By configuring logical cameras in foldable devices, remapping camera identifiers, and quickly switching cameras based on changes in folding state, the problems of slow switching speed and poor stability in existing technologies are solved, thus improving the user experience.

CN121367751APending Publication Date: 2026-01-20BEIJING XIAOMI MOBILE SOFTWARE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410979705.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-19
Publication Date
2026-01-20

AI Technical Summary

Technical Problem

In existing technologies, the camera switching speed is slow and the stability is poor when the folded state of a foldable device changes, resulting in a poor user experience.

Method used

By configuring logical cameras, the identifiers of the first and second cameras of the foldable device are remapped to the identifiers of the logical cameras, and the camera can be quickly switched to the one that is appropriate for the actual folding state based on the changes in the folding state.

Benefits of technology

It enables quick switching to the appropriate camera when the folding state of a foldable device changes, thus improving the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121367751A_ABST
    Figure CN121367751A_ABST
Patent Text Reader

Abstract

The invention relates to a camera calling method and device, electronic equipment and a storage medium. The method comprises the following steps: determining that a first screen of the foldable equipment interacts with a user; calling a target camera in response to the first application to carry out image acquisition operation on a scene in front of the first screen, and configuring a logic camera; wherein when the first screen is an outer screen of the foldable device, the target camera is a first camera associated with the outer screen, and when the first screen is an inner screen of the foldable device, the target camera is a second camera associated with the inner screen; and calling the first camera or the second camera through the logic camera based on the folding state change condition of the foldable equipment. According to the technical scheme, the camera adaptive to the actual folding state can be quickly switched on the basis of the folding state change condition of the foldable equipment, and the user experience is improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present disclosure relates to the technical field of cameras, and particularly relates to a camera calling method and device, electronic equipment and storage medium. BACKGROUND

[0002] During the user calling the front camera of the foldable device through the application, if the folding state of the foldable device changes, the actually called camera needs to be switched.

[0003] In the related art, the identification information corresponding to the camera is replaced when the folding state changes, so as to realize the switching between different cameras. However, this method needs to power on and power off different cameras, which leads to slow switching speed and poor stability between different cameras. SUMMARY

[0004] In order to overcome the problems in the related art, the present disclosure provides a camera calling method and device, electronic equipment and storage medium.

[0005] According to a first aspect of the embodiments of the present disclosure, a camera calling method is provided, and the method comprises: determining that a first screen of a foldable device interacts with a user; in response to a first application calling a target camera to perform an image acquisition operation on a scene in front of the first screen, configuring a logical camera; wherein when the first screen is an outer screen of the foldable device, the target camera is a first camera associated with the outer screen, and when the first screen is an inner screen of the foldable device, the target camera is a second camera associated with the inner screen; and the camera calls the first camera or the second camera.

[0006] In an implementation manner, the configuring the logical camera comprises: remapping camera identifications of the first camera and the second camera as an identification of the logical camera; and powering on and starting the first camera and the second camera based on the identification of the logical camera.

[0007] In an implementation manner, the calling the first camera or the second camera through the logical camera based on the folding state change of the foldable device comprises: determining, based on the folding state change, that the folding state of the foldable device does not change and is in a first folding state; selecting one of the first camera and the second camera as a first target camera based on the first folding state; and sending an image acquisition request to the first target camera to activate the first target camera, so as to call the first target camera through the logical camera.

[0008] In an optional implementation, the first folding state is a folded state, and the first target camera is the first camera; or, the first folding state is an unfolded state, and the first target camera is the second camera.

[0009] In an implementation, the calling the first camera or the second camera through the logical camera based on the folding state change of the foldable device includes: determining, based on the folding state change, that the folding state of the foldable device changes from a first folding state to a second folding state, selecting one of the first camera and the second camera as a second target camera, the second target camera in the second folding state being different from the first target camera in the first folding state; sending an image acquisition request to the second target camera and stopping sending an image acquisition request to the first target camera, to activate the second target camera and deactivate the first target camera, to call the second target camera through the logical camera.

[0010] In an optional implementation, the first folding state is a folded state, and the second folding state is an unfolded state, and the second target camera is the second camera; or, the first folding state is an unfolded state, and the second folding state is a folded state, and the second target camera is the first camera.

[0011] According to a second aspect of the embodiments of the present disclosure, a camera calling apparatus is provided, which includes: a first processing module configured to determine that a first screen of a foldable device interacts with a user; a second processing module configured to configure a logical camera in response to a first application calling a target camera to perform an image acquisition operation on a front scene of the first screen; wherein, when the first screen is an outer screen of the foldable device, the target camera is a first camera associated with the outer screen; when the first screen is an inner screen of the foldable device, the target camera is a second camera associated with the inner screen; and a third processing module configured to call the first camera or the second camera through the logical camera based on a folding state change of the foldable device.

[0012] In an implementation, the first processing module is specifically configured to: remap camera identifiers of the first camera and the second camera to an identifier of the logical camera; and start the first camera and the second camera based on the identifier of the logical camera.

[0013] In an implementation manner, the second processing module is specifically configured to: determine, based on the folding state change condition, that the folding state of the foldable device does not change and is a first folding state; select one of the first camera and the second camera as a first target camera based on the first folding state; and send an image acquisition request to the first target camera to activate the first target camera to call the first target camera through the logical camera.

[0014] In an optional implementation manner, the first folding state is a folded state, and the first target camera is the first camera; or the first folding state is an unfolded state, and the first target camera is the second camera.

[0015] In an implementation manner, the second processing module is specifically configured to: determine, based on the folding state change condition, that the folding state of the foldable device changes from a first folding state to a second folding state, select one of the first camera and the second camera as a second target camera, the second target camera in the second folding state is not the same as the first target camera in the first folding state; send an image acquisition request to the second target camera and stop sending an image acquisition request to the first target camera to activate the second target camera and deactivate the first target camera to call the second target camera through the logical camera.

[0016] In an optional implementation manner, the first folding state is a folded state, and the second folding state is an unfolded state, and the second target camera is the second camera; or the first folding state is an unfolded state, and the second folding state is a folded state, and the second target camera is the first camera.

[0017] According to a third aspect of the embodiments of the present disclosure, an electronic device is provided, including: at least one processor; and a memory connected with the at least one processor in communication; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method in the first aspect.

[0018] According to a fourth aspect of the embodiments of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to enable the computer to perform the method in the first aspect.

[0019] According to a fifth aspect of the embodiments of the present disclosure, the present disclosure provides a computer program product comprising a computer program which, when executed by a processor, implements the steps of the method of the first aspect.

[0020] The technical solutions provided by the embodiments of the present disclosure can have the following beneficial effects: when the front camera of the foldable device needs to be called, the logical camera of the foldable device can be set to call the first camera or the second camera through the logical camera based on the folding state change of the foldable device. The camera that is suitable for the actual folding state can be quickly switched based on the folding state change of the foldable device, and the user experience is improved.

[0021] It should be understood that the above general description and the following detailed description are only exemplary and explanatory, and cannot limit the present disclosure. BRIEF DESCRIPTION OF DRAWINGS

[0022] The accompanying drawings, which are incorporated into and form part of the specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.

[0023] Figure 1 is a flowchart of a camera calling method according to an exemplary embodiment.

[0024] Figure 2 is a flowchart of another camera calling method according to an exemplary embodiment.

[0025] Figure 3 is a flowchart of yet another camera calling method according to an exemplary embodiment.

[0026] Figure 4 is a flowchart of yet another camera calling method according to an exemplary embodiment.

[0027] Figure 5 is a schematic diagram of a camera calling scheme according to an exemplary embodiment.

[0028] Figure 6 is a schematic diagram of a camera calling device according to an exemplary embodiment.

[0029] Figure 7 is a block diagram of an electronic device for camera calling according to an exemplary embodiment. DETAILED DESCRIPTION

[0030] The exemplary embodiments will be described in detail herein with reference to the attached drawings. In the following description, like reference numerals refer to like elements, unless the context clearly dictates otherwise. The following description of exemplary embodiments is not representative of all possible embodiments consistent with the present application. Instead, they are merely examples of apparatuses and methods consistent with some aspects of the present application as detailed in the appended claims.

[0031] The various numbers, such as first, second, etc., referred to in the present disclosure are merely used for differentiation for the convenience of description, and are not intended to limit the scope of the embodiments of the present disclosure, nor to represent a sequence.

[0032] Figure 1 is a flowchart of a method for invoking a camera according to an exemplary embodiment. As shown in Figure 1 , the method can include, but is not limited to, the following steps.

[0033] Step S101: Determine that a first screen of a foldable device interacts with a user.

[0034] The first screen can be an inner screen or an outer screen of the foldable device.

[0035] Step S102: In response to a first application invoking a target camera to perform an image acquisition operation on a front scene of the first screen, configure a logical camera.

[0036] When the first screen is an outer screen of the foldable device, the target camera is a first camera associated with the outer screen, and when the first screen is an inner screen of the foldable device, the target camera is a second camera associated with the inner screen.

[0037] It can be understood that the foldable device can include multiple screens, and the outer screen of the foldable device refers to a screen that can interact with the user when the foldable device is in a folded state; the inner screen of the foldable device refers to a screen other than the outer screen among the screens included in the foldable device. For example, the inner screen can be a screen that is partially or entirely hidden when the foldable device is in a folded state.

[0038] It should be noted that in the embodiments of the present disclosure, the first camera associated with the outer screen can be a camera located on the surface of the outer screen when the foldable device is in a folded state; and the second camera associated with the inner screen can be a camera located on the surface of the inner screen.

[0039] In some embodiments, if the foldable device is in a folded state, the first screen can be determined to be an outer screen of the foldable device, or if the foldable device is in an unfolded state, the first screen can be determined to be an inner screen of the foldable device.

[0040] Specifically, in response to a request of the first application for the foldable device camera to perform image acquisition on a front scene of the first screen, a logical camera in the foldable device is configured.

[0041] As an example, taking the first application as an instant messaging application. In response to a user clicking a "video call" function button in the instant messaging application while using the instant messaging application, the instant messaging application calls the camera for video call, and the instant messaging application sends a request for calling the front camera to the foldable device, and at this time, the logical camera corresponding to the foldable device is configured.

[0042] As an example, taking the first application as a camera application. In response to a user clicking an icon of the camera application in the foldable device, if the camera application calls the camera to obtain image data, the camera application sends a request for calling the front camera, and at this time, the logical camera corresponding to the foldable device is configured.

[0043] The first application can be an application installed in the foldable device, or the first application can be an application capable of controlling the foldable device, for example, an application installed on another electronic device capable of controlling the foldable device.

[0044] It should be noted that in the embodiments of the present disclosure, the foldable device is a foldable device capable of folding up and down, that is, the rotation shaft of the foldable device is horizontally arranged.

[0045] Step S103: based on the folding state change of the foldable device, the first camera or the second camera is called through the logical camera.

[0046] Specifically, after obtaining the request of the first application for calling the front camera, the folding state of the foldable device is continuously monitored, so as to obtain the folding state change of the foldable device during the calling of the front camera by the first application, and based on the folding state change of the foldable device at different times, the first camera or the second camera is called through the logical camera, which is suitable for the actual folding state.

[0047] By implementing the embodiments of the present disclosure, when the front camera of the foldable device needs to be called, the logical camera of the foldable device can be set, so as to call the first camera or the second camera through the logical camera based on the folding state change of the foldable device. Based on the folding state change of the foldable device, the camera suitable for the actual folding state can be quickly switched, and the user experience is improved.

[0048] In some embodiments, the identification of the camera in the foldable device can be changed, so as to set the cameras arranged on different sides of the foldable device as a logical camera. As an example, please refer to Figure 2 ,Figure 2 is a flowchart illustrating another method for invoking a camera according to an example embodiment. As shown in Figure 2 the method can include, but is not limited to, the following steps.

[0049] Step S201: Determine that the first screen of the foldable device interacts with the user.

[0050] In embodiments of the present disclosure, step S201 can be implemented in any of the embodiments of the present disclosure respectively, and the present disclosure does not limit this nor repeat it.

[0051] Step S202: In response to the first application calling the target camera to perform an image acquisition operation on the scene in front of the first screen, remap the camera identifiers of the first camera and the second camera to the identifier of the logical camera.

[0052] Specifically, in response to the request of the first application calling the target camera to perform an image acquisition operation on the scene in front of the first screen, remap the camera identifier corresponding to the first camera and the camera identifier corresponding to the second camera to modify the camera identifier corresponding to the first camera and the camera identifier corresponding to the second camera to the identifier of the logical camera.

[0053] Wherein, the identifier of the logical camera can be pre-configured.

[0054] Step S203: Based on the identifier of the logical camera, power on the first camera and the second camera.

[0055] Specifically, based on the logical camera identifier, the logical camera is called to power on the first camera and the second camera at the same time, so as to start the first camera and the second camera at the same time.

[0056] Wherein, the first camera is at least one, and the second camera is at least one.

[0057] It should be noted that the first camera can be multiple, and when the first camera is powered on, each first camera can be powered on, or a pre-determined camera in the first camera can be powered on.

[0058] It should be noted that the second camera can be multiple, and when the second camera is powered on, each second camera can be powered on, or a pre-determined camera in the second camera can be powered on.

[0059] Step S204: Based on the change of the folding state of the foldable device, call the first camera or the second camera through the logical camera.

[0060] In the embodiments of the present disclosure, step S204 can be implemented in any of the embodiments of the present disclosure, and the embodiments of the present disclosure do not make any limitation thereto, and will not be repeated here.

[0061] By implementing the embodiments of the present disclosure, the first camera identifier of the first camera and the second camera identifier of the second camera can be remapped to the logical camera identifier, and the first camera and the second camera can be started at the same time, so that the corresponding camera is activated based on the folding state of the foldable device and the type of the camera to be called, so that the first application can call the corresponding camera to obtain an image. Based on the change of the folding state of the foldable device, the corresponding camera can be quickly switched to improve the user experience.

[0062] In some embodiments, the corresponding camera can be called through the logical camera according to the folding state of the foldable device at different times. As an example, please refer to Figure 3 , Figure 3 is a flowchart of another method for calling a camera according to an exemplary embodiment. As shown in Figure 3 , the method can include but is not limited to the following steps.

[0063] Step S301: Determine that the first screen of the foldable device interacts with the user.

[0064] In the embodiments of the present disclosure, step S301 can be implemented in any of the embodiments of the present disclosure, and the embodiments of the present disclosure do not make any limitation thereto, and will not be repeated here.

[0065] Step S302: In response to the first application calling the target camera to perform an image acquisition operation on the scene in front of the first screen, configure the logical camera.

[0066] In the embodiments of the present disclosure, step S302 can be implemented in any of the embodiments of the present disclosure, and the embodiments of the present disclosure do not make any limitation thereto, and will not be repeated here.

[0067] Step S303: Based on the folding state change, it is determined that the folding state of the foldable device has not changed and is in the first folding state.

[0068] Specifically, based on the folding state change of the foldable device, it is determined that during the calling of the front camera by the first application, the folding state of the foldable device remains unchanged in the first folding state.

[0069] In the embodiments of the present disclosure, the above-mentioned first folding state can be a folded state or an unfolded state.

[0070] Step S304: selecting one of the first camera and the second camera as a first target camera based on the first folding state.

[0071] Specifically, based on the first folding state of the foldable device, one of the first camera and the second camera on the same side of the screen currently used by the user is selected as the first target camera.

[0072] In some embodiments, the first folding state is a folded state, and the first target camera is the first camera; or, the first folding state is an unfolded state, and the first target camera is the second camera.

[0073] In the embodiments of the present disclosure, the terms “folded state” and “folding state” can be replaced with each other; the terms “unfolded state” and “unfolding state” can be replaced with each other.

[0074] As an example, in response to the folding state of the foldable device not changing, and the first folding state of the foldable device being a folded state, the first camera is selected as the first target camera.

[0075] As an example, in response to the folding state of the foldable device not changing, and the first folding state of the foldable device being an unfolded state, the second camera is selected as the first target camera.

[0076] Step S305: sending an image acquisition request to the first target camera to activate the first target camera to call the first target camera through the logical camera.

[0077] As an example, taking the first camera as the first target camera, the image acquisition request is sent to the first camera based on the identifier of the logical camera to call the first camera through the logical camera to acquire image data.

[0078] As an example, taking the second camera as the first target camera, the image acquisition request is sent to the second camera based on the identifier of the logical camera to call the first camera through the logical camera to acquire image data.

[0079] By implementing the embodiments of the present disclosure, when the folding state of the foldable device does not change, the first target camera can be selected from the first camera and the second camera based on the first folding state of the foldable device, so as to send the image acquisition request to the first target camera, thereby calling the first target camera to acquire image data. The appropriate camera can be called according to the folding state of the foldable device, thereby improving the user experience.

[0080] In some embodiments, if the folding state of the foldable device changes, the actually called camera can be switched based on the folding state change of the foldable device. As an example, please refer toFigure 4 , Figure 4 is a flowchart of still another method for invoking a camera according to an example embodiment. As shown in FIG. 13, the method can include, but is not limited to, the following steps. Figure 4

[0081] Step S401: Determine that the first screen of the foldable device interacts with the user.

[0082] In embodiments of the present disclosure, step S401 can be implemented in any of the manners described in the embodiments of the present disclosure, and the embodiments of the present disclosure do not limit this and will not be repeated.

[0083] Step S402: In response to the first application invoking the target camera to perform an image acquisition operation on the front scene of the first screen, configure a logical camera.

[0084] In embodiments of the present disclosure, step S402 can be implemented in any of the manners described in the embodiments of the present disclosure, and the embodiments of the present disclosure do not limit this and will not be repeated.

[0085] Step S403: Based on the folding state change, determine that the folding state of the foldable device changes from the first folding state to the second folding state, and select one of the first camera and the second camera as the second target camera.

[0086] In embodiments of the present disclosure, the second target camera in the second folding state is not the same as the first target camera in the first folding state.

[0087] As an example, if the first target camera is the first camera, the second target camera is the second camera.

[0088] As an example, if the first target camera is the second camera, the second target camera is the first camera.

[0089] In embodiments of the present disclosure, the second folding state described above can be a folded state or an unfolded state, and the first folding state and the second folding state are different.

[0090] As an example, if the first folding state is a folded state, the second folding state is an unfolded state.

[0091] As an example, if the first folding state is an unfolded state, the second folding state is a folded state.

[0092] ​Specifically, based on the folding state change, it is determined that the folding state of the foldable device changes from a first folding state to a second folding state during the first application calling the front camera, and one of the first camera and the second camera that is different from the first target camera is selected as the second target camera.

[0093] In some embodiments, the first folding state is a folded state, and the second folding state is an unfolded state, and the second target camera is the second camera; or, the first folding state is the unfolded state, and the second folding state is the folded state, and the second target camera is the first camera.

[0094] As an example, it is determined that the folding state of the foldable device changes from the folded state to the unfolded state, and the second camera is selected as the second target camera.

[0095] As an example, it is determined that the folding state of the foldable device changes from the unfolded state to the folded state, and the first camera is selected as the second target camera.

[0096] It should be noted that in some embodiments of the present disclosure, corresponding angle ranges can be set for the folded state and the unfolded state of the foldable device. Thus, the folding state of the foldable device can be determined according to the angle range to which the folding angle between the upper and lower parts of the foldable device belongs.

[0097] As an example, the folding angle corresponding to the unfolded state is greater than 30 degrees and less than or equal to 180 degrees, and the folding state is greater than or equal to 0 degrees and less than or equal to 30 degrees. If the folding angle of the foldable device is 180 degrees when the foldable device is in the first folding state, when the user changes the folding angle of the foldable device from 180 degrees to 120 degrees, it is determined that the folding state of the foldable device does not change; when the user changes the folding angle of the foldable device from 180 degrees to 20 degrees, it is determined that the folding state of the foldable device changes from the unfolded state to the folded state.

[0098] In some embodiments, the folding state of the foldable device can be determined to change based on the folding operation or unfolding operation of the user on the foldable device.

[0099] Step S404: sending an image acquisition request to the second target camera and stopping sending an image acquisition request to the first target camera, to activate the second target camera and deactivate the first target camera, to call the second target camera through the logical camera.

[0100] As an example, taking the first target camera as the first camera and the second target camera as the second camera. The image acquisition request is sent to the second camera, and the image acquisition request is stopped to the first camera, to activate the second camera and deactivate the first camera, to call the second camera to acquire image data.

[0101] As an example, taking the first target camera as the second camera and the second target camera as the first camera as an example. An image acquisition request is sent to the first camera, and the sending of the image acquisition request to the second camera is stopped to activate the first camera and deactivate the second camera to call the first camera to acquire image data.

[0102] It can be understood that if the folding state of the foldable device changes again, the first camera and the second camera can be controlled according to the steps provided in any embodiment of the present disclosure based on the folding state before and after the change each time the folding state of the foldable device changes.

[0103] By implementing the embodiments of the present disclosure, the second target camera can be activated and the first target camera can be deactivated when the folding state of the foldable device changes, so as to switch the called camera. Thus, based on the folding state change of the foldable device, the camera suitable for the actual folding state can be quickly switched to, and the user experience is improved.

[0104] In some embodiments of the present disclosure, the above method further comprises: determining that the first application stops calling the front camera, and powering down the first camera and the second camera.

[0105] In some embodiments of the present disclosure, before the step of configuring the logical camera, the above method further comprises: obtaining the current folding state of the foldable device; and determining that the current folding state is the folded state, and continuing to execute the step of calling the logical camera of the foldable device.

[0106] Specifically, in the case that the folding state of the foldable device is the folded state when it is determined that the first application calls the front camera, the logical camera of the foldable device and the subsequent steps in the foregoing embodiments of the present disclosure are continued to be executed.

[0107] In some embodiments of the present disclosure, the above method can further comprise: obtaining the current folding state of the foldable device; and determining that the current folding state is the unfolded state, and powering up the second camera to enable the first application to call the second camera.

[0108] Specifically, when it is determined that the first application calls the front camera, the current folding state of the foldable device is the unfolded state, and the second camera is powered up, so that the first application can call the second camera to acquire image data.

[0109] Optionally, the above method further comprises: in response to the folding state of the foldable device changing from the unfolded state to the folded state, powering up the first camera and powering down the second camera, so as to call the first camera to acquire image data.

[0110] It can be understood that if the folding state of the foldable device changes again, the power-on and power-off states of the first camera or the second camera can be adjusted again based on the folding state of the foldable device after the change each time the folding state of the foldable device changes.

[0111] Referring to Figure 5 , Figure 5 is a schematic diagram of a camera calling scheme according to an exemplary embodiment. As shown in Figure 5 , when a user needs to call a front camera (i.e., logical camera 1 shown in Figure 5 ) through an application, if the foldable device is currently in a folded state, the camera ID of the first camera (i.e., physical camera 0 shown in Figure 5 ) disposed on one side of the outer screen of the foldable device and the camera ID of the second camera (i.e., physical camera 1 shown in Figure 5 ) on one side of the inner screen are remapped to the corresponding camera ID of a virtual camera (i.e., logical camera 8 shown in Figure 5 ), and the camera is powered on; the logical camera is called through the configure_streams 8 instruction; the image data acquisition request is sent to the first camera to acquire image data using the first camera; when the folding state of the foldable device changes, if the changed folding state is an unfolded state, the image data acquisition request is sent to the second camera to acquire image data using the second camera; if the changed folding state is a folded state, the image data acquisition request is sent to the first camera to acquire image data using the first camera; after the user stops calling the front camera through the first application, the first camera and the second camera are powered off (i.e., Release physical camera 0 and Release physical camera 1 shown in Figure 5 ).

[0112] If the foldable device is currently in an unfolded state, the second camera is directly powered on through configure_streams to acquire image data using the second camera; when the folding state of the foldable device changes, the powered-on camera is powered off and the powered-off camera is powered on, thereby realizing switching of the front camera; after the user stops calling the front camera through the first application, the powered-on camera is powered off.

[0113] Referring to Figure 6 , Figure 6 is a schematic diagram of a camera calling device according to an exemplary embodiment. As shown inFigure 6 As shown, the apparatus 600 includes: a first processing module 601 configured to determine that a first screen of a foldable device interacts with a user; a second processing module 602 configured to, in response to a first application calling a target camera, configure a logical camera to perform an image capturing operation on a front scene of the first screen; and a third processing module 603 configured to, based on a folding state change of the foldable device, call a first camera or a second camera through the logical camera.

[0114] In an implementation manner, the second processing module 602 is specifically configured to: remap camera identifiers of the first camera and the second camera to an identifier of the logical camera; and based on the identifier of the logical camera, power on the first camera and the second camera.

[0115] In an implementation manner, the third processing module 603 is specifically configured to: based on the folding state change, determine that a folding state of the foldable device does not change and is a first folding state; based on the first folding state, select one of the first camera and the second camera as a first target camera; and send an image acquisition request to the first target camera to activate the first target camera, so as to call the first target camera through the logical camera.

[0116] In an optional implementation manner, the first folding state is a folded state, and the first target camera is the first camera; or, the first folding state is an unfolded state, and the first target camera is the second camera.

[0117] In an implementation manner, the third processing module 603 is specifically configured to: based on the folding state change, determine that a folding state of the foldable device changes from a first folding state to a second folding state, select one of the first camera and the second camera as a second target camera, the second target camera in the second folding state is not the same as the first target camera in the first folding state; send an image acquisition request to the second target camera and stop sending the image acquisition request to the first target camera, to activate the second target camera and deactivate the first target camera, so as to call the second target camera through the logical camera.

[0118] In an optional implementation manner, the first folding state is a folded state, the second folding state is an unfolded state, and the second target camera is the second camera; or, the first folding state is an unfolded state, the second folding state is a folded state, and the second target camera is the first camera.

[0119] By means of the device of the embodiments of the present disclosure, when the front camera of the foldable device needs to be called, the logical camera of the foldable device can be set to call the first camera or the second camera through the logical camera based on the folding state change of the foldable device. The camera that is adapted to the actual folding state can be quickly switched based on the folding state change of the foldable device, and the user experience is improved.

[0120] As to the device in the above embodiments, the specific manners in which the various modules perform operations have been described in detail in the embodiments of the method, and will not be described in detail here.

[0121] Figure 7 is a block diagram of an electronic device for camera calling according to an exemplary embodiment.

[0122] Referring to Figure 7 The electronic device 700 can include one or more of the following components: a processing component 702, a memory 704, a power supply component 706, a multimedia component 708, an input / output (I / O) interface 710, and a communication component 712.

[0123] The processing component 702 usually controls overall operations of the electronic device 700, such as operations associated with displaying, data communication, and recording operations. The processing component 702 can include one or more processors 720 to execute instructions to complete all or part of the steps of the methods described above. In addition, the processing component 702 can include one or more modules to facilitate the interaction between the processing component 702 and other components. For example, the processing component 702 can include a multimedia module to facilitate the interaction between the multimedia component 708 and the processing component 702.

[0124] The memory 704 is configured to store various types of data to support operations of the electronic device 700. Examples of these data include instructions for any application or method operating on the electronic device 700, contact data, phonebook data, messages, pictures, videos, and the like. The memory 704 can be implemented by any type of volatile or non-volatile storage devices or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk or optical disk.

[0125] The power supply component 706 provides power for various components of the electronic device 700. The power supply component 706 can include a power supply management system, one or more power supplies, and other components associated with generating, managing and distributing power for the electronic device 700.

[0126] The multimedia component 708 includes a screen providing an output interface between the electronic device 700 and a user. In some embodiments, the screen can include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen can be implemented to be a touch screen to receive an input signal from a user. The touch panel includes one or more touch sensors to sense a touch, a slide and a gesture on the touch panel. The touch sensor can not only sense a boundary of a touching or a sliding, but also detect duration and intensity of the touch or slide according to a change in voltage or current.

[0127] The input / output interface 710 provides an interface between the processing component 702 and peripheral interface modules, which can be a keypad, a click wheel, buttons, and the like.

[0128] The communication component 712 is configured to facilitate wired or wireless communication between the electronic device 700 and other devices. The electronic device 700 can access a wireless network based on a communication standard, such as WiFi, 2G, or 3G, or a combination thereof. In an example embodiment, the communication component 712 receives a broadcast signal or broadcast-related information from an external broadcasting management system via a broadcast channel. In an example embodiment, the communication component 712 also includes a near-field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology, and other technology.

[0129] In an example embodiment, the electronic device 700 can be implemented with one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, micro-controllers, microprocessors, or other electronic elements to perform the above-described methods.

[0130] In an example embodiment, a non-transitory computer-readable storage medium including instructions, such as the memory 704 including instructions, is also provided, which can be executed by the processor 720 of the electronic device 700 to complete the above-described methods. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disc, and an optical data storage device, and the like.

[0131] The present disclosure also provides a computer program product, which, when executed by a computer, implements the functions of any of the above-described method embodiments.

[0132] Other embodiments of the application will be apparent to those skilled in the art from consideration of the specification and practice of the application disclosed herein. It is intended that the specification and examples be considered as exemplary only, with the true scope and spirit of the application being indicated by the following claims.

[0133] It is to be understood that the application is not limited to the precise construction hereinafter described and as shown in the attached drawings, and that various modifications and changes can be made by those skilled in the art without departing from the scope of the application. The scope of the application is limited only by the claims that follow.

Claims

1. A method for invoking a camera, characterized in that, The method comprises: determining that a first screen of a foldable device interacts with a user; in response to a first application calling a target camera to perform an image collection operation on a front scene of the first screen, configuring a logical camera; wherein when the first screen is an outer screen of the foldable device, the target camera is a first camera associated with the outer screen; when the first screen is an inner screen of the foldable device, the target camera is a second camera associated with the inner screen; based on a folding state change of the foldable device, calling the first camera or the second camera through the logical camera.

2. The method of claim 1, wherein, The configuration of the logical camera comprises: remapping camera identifiers of the first camera and the second camera to an identifier of the logical camera; based on the identifier of the logical camera, starting the first camera and the second camera.

3. The method of claim 1, wherein, Based on the folding state change of the foldable device, the logical camera calls the first camera or the second camera, comprising: based on the folding state change, determining that the folding state of the foldable device has not changed and is in a first folding state; based on the first folding state, selecting one of the first camera and the second camera as a first target camera; sending an image acquisition request to the first target camera to activate the first target camera to call the first target camera through the logical camera.

4. The method of claim 3, wherein: the first folding state is a folded state, and the first target camera is the first camera; or the first folding state is an unfolded state, and the first target camera is the second camera.

5. The method of claim 1, wherein, Based on the folding state change of the foldable device, the logical camera calls the first camera or the second camera, comprising: based on the folding state change, determining that the folding state of the foldable device has changed from a first folding state to a second folding state, and selecting one of the first camera and the second camera as a second target camera, wherein the second target camera in the second folding state is not the same as the first target camera in the first folding state; sending an image acquisition request to the second target camera and stopping sending an image acquisition request to the first target camera to activate the second target camera and deactivate the first target camera to call the second target camera through the logical camera.

6. The method of claim 5, wherein: the first folding state is a folded state, and the second folding state is an unfolded state, and the second target camera is the second camera; or the first folding state is an unfolded state, and the second folding state is a folded state, and the second target camera is the first camera.

7. A camera invoking apparatus, characterized by comprising: The device comprises: a first processing module configured to determine that a first screen of a foldable device interacts with a user; The second processing module is configured to configure a logical camera in response to a first application calling a target camera to perform an image capturing operation on a front scene of the first screen; wherein when the first screen is an outer screen of the foldable device, the target camera is a first camera associated with the outer screen; when the first screen is an inner screen of the foldable device, the target camera is a second camera associated with the inner screen. The third processing module is configured to call the first camera or the second camera through the logical camera based on a change in a folding state of the foldable device.

8. An electronic device, comprising: The device comprises: at least one processor; and a memory connected to the at least one processor in communication; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-6.

9. A non-transitory computer-readable storage medium having stored thereon computer instructions, wherein, The computer instructions are used to enable the computer to perform the method of any one of claims 1-6.

10. A computer program product comprising a computer program which, when executed by a processor, implements the method of any one of claims 1-6.