Camera control method, foldable electronic device, storage medium and program product
The foldable electronic device uses a SOC and switch units to dynamically connect cameras to AO channels based on its state, addressing the limitation of limited interfaces and enabling dual AO services, thus improving user experience.
Patent Information
- Application Number
- CN202310743339.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-21
- Publication Date
- 2024-12-10
- Estimated Expiration
- 2043-06-21
AI Technical Summary
Foldable electronic devices with three cameras cannot effectively implement Always On (AO) services such as air gesture control, screen-off face detection, and flip-and-scan due to limited AO interfaces.
A foldable electronic device with a system-on-chip (SOC) and switch units that dynamically connect two cameras to AO channels based on its state, allowing both cameras to function as front cameras in different configurations, thereby enabling dual AO scenarios.
Enables dual AO services by ensuring both cameras can be used as front cameras in different device states, enhancing user experience and functionality.
Smart Images

Figure CN117714834B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of terminal technology, and in particular to a camera control method and related equipment. Background Art
[0002] An electronic device may be provided with an always on (AO) camera. The electronic device may implement some AO services based on the AO camera, and the AO services may be air gesture control services, screen-off face detection services, and flip-and-scan services. For example, in office scenarios such as word, PPT, and PDF, users can control the electronic device to display the previous or next page by waving left and right, and the page turning process may not rely on the mouse, keyboard, and user touch operations; for another example, when the electronic device is in the screen-off state, when the front camera of the electronic device captures the user's face, the electronic device may unlock the screen; for another example, when the electronic device is in the unlocked state, the user points the electronic device at a scannable code, and when the camera of the electronic device recognizes the scannable code, the code scanning process may be completed, and the electronic device may not start the camera and scan applications during this process.
[0003] In a possible implementation, taking a mobile phone as an example, the front camera and rear camera of the electronic device can both be AO cameras, and the electronic device can support dual AO services. For example, in the screen-off state, the electronic device recognizes the user's face based on the front camera to realize the function of unlocking the screen; at the same time, the rear camera of the electronic device is aimed at the scannable code to realize the function of scanning the scannable code.
[0004] However, in a possible implementation, a foldable electronic device may include three sets of cameras, for example, a front camera of the foldable electronic device in the folded state; a front camera of the foldable electronic device in the unfolded state; and a rear camera. Foldable electronic devices may not be able to implement AO services such as air gesture control, screen-off face detection, and flip-and-scan. Summary of the invention
[0005] The embodiments of the present application provide a camera control method and related devices, which are applied to the field of terminal technology. A foldable electronic device can be used to implement AO scenarios and multi-AO scenarios. For example, a user can use a foldable electronic device to simultaneously complete the screen-off face unlocking service and the flip-and-scan service, thereby improving the user experience.
[0006] In a first aspect, an embodiment of the present application proposes a foldable electronic device, which includes a first camera, a second camera, a system-on-chip (SOC), a first switch unit, and a second switch unit; wherein, when the foldable electronic device is in a folded state, the first camera is blocked by the folded screen, and the second camera is not blocked by the folded screen; the SOC includes a first interface and a second interface, the first interface supports an AO function, and the second interface is used to transmit a control signal with the first camera or the second camera; the foldable electronic device is used to control the first switch unit so that the first camera is connected to the first interface and the second camera is not connected to the first interface when the foldable electronic device is in an unfolded state and the foldable electronic device enables the AO function, and to control the second switch unit so that the first camera is connected to the second interface and the second camera is not connected to the second interface; the foldable electronic device is used to control the first switch unit so that the second camera is connected to the first interface and the first camera is not connected to the first interface when the foldable electronic device is in a folded state and the foldable electronic device enables the AO function, and to control the second switch unit so that the second camera is connected to the second interface and the first camera is not connected to the second interface. In this way, in the unfolded state, the first camera is the front camera, and the first camera is connected to the AO channel; in the folded state, the second camera is the front camera, and the second camera is connected to the AO channel to realize the multiplexing of the AO channel; this allows the foldable electronic device to use two AO cameras at the same time to realize the dual AO business scenario, enriching the usage scenarios of the foldable electronic device and improving the user experience.
[0007] In a possible implementation, the SOC further includes a third interface and a fourth interface, the third interface does not support the AO function, and the fourth interface is used to transmit control signals with the first camera or the second camera; the foldable electronic device is also used to control the first switch unit to connect the second camera to the third interface and control the second switch unit to connect the second camera to the fourth interface when the foldable electronic device is in the unfolded state and the foldable electronic device enables the AO function. In this way, when the foldable electronic device is in the unfolded state, the second camera is not blocked and can be used as a normal camera.
[0008] In a possible implementation, the first switch unit includes a first switch, a second switch, a third switch and a fourth switch, the first switch is connected between the first interface and the first camera, the second switch and the third switch are connected between the first interface and the second camera in sequence, and the fourth switch is connected between the third interface and the second camera; the second switch unit includes a fifth switch, a sixth switch, a seventh switch and an eighth switch, the fifth switch is connected between the second interface and the first camera, the sixth switch and the seventh switch are connected between the second interface and the second camera in sequence, and the eighth switch is connected between the fourth interface and the second camera; a foldable electronic device, specifically used when the foldable electronic device is in an unfolded state and the foldable electronic device enables the AO function , control the first switch to be closed and the second switch to be disconnected, so that the first camera is connected to the first interface and the second camera is not connected to the first interface; and, control the fifth switch to be closed and the sixth switch to be disconnected, so that the first camera is connected to the second interface and the second camera is not connected to the second interface; the foldable electronic device is specifically used for when the foldable electronic device is in a folded state and the foldable electronic device enables the AO function, control the second switch and the third switch to be closed, and the first switch and the fourth switch to be disconnected, so that the second camera is connected to the first interface and the first camera is not connected to the first interface; and, control the sixth switch and the seventh switch to be closed, and the fifth switch and the eighth switch to be disconnected, so that the second camera is connected to the second interface and the first camera is not connected to the second interface. In this way, the foldable electronic device can control the first switch unit and the second switch unit according to the device state, so that the first interface and the second interface are connected to the corresponding cameras, thereby realizing the AO scene.
[0009] In a possible implementation, the foldable electronic device is specifically used to control the third switch to be disconnected and the fourth switch to be closed when the foldable electronic device is in the unfolded state and the foldable electronic device enables the AO function, so that the second camera is connected to the third interface; and control the seventh switch to be disconnected and the eighth switch to be closed, so that the second camera is connected to the fourth interface. In this way, when the foldable electronic device is in the unfolded state and the foldable electronic device enables the AO function, the second camera can still be used as a normal camera.
[0010] In a possible implementation, the SOC further includes a fifth interface, which is used to transmit control signals with the first switch unit and the second switch unit; wherein, when the SOC sends a first signal to the first switch unit and the second switch unit through the fifth interface, the first switch, the fourth switch, the fifth switch and the eighth switch are closed, and the second switch, the third switch, the sixth switch and the seventh switch are disconnected; when the SOC sends a second signal to the first switch unit and the second switch unit through the fifth interface, the first switch, the fourth switch, the fifth switch and the eighth switch are disconnected, and the second switch, the third switch, the sixth switch and the seventh switch are closed. In this way, the foldable electronic device can control the control logic of the switch unit through the first signal and the second signal, so as to connect the corresponding camera to the AO channel when the device state of the foldable electronic device changes.
[0011] In a possible implementation, the foldable electronic device is further configured to control the first switch unit to connect the first camera to the third interface and control the second switch unit to connect the first camera to the fourth interface when the foldable electronic device is in the folded state and the AO function is enabled. In this way, when the foldable electronic device is in the folded state, the first camera can be used as a common camera.
[0012] In a possible implementation, the first switch unit includes a ninth switch, a tenth switch, an eleventh switch, a twelfth switch, a thirteenth switch, a fourteenth switch, a fifteenth switch, and a sixteenth switch; the ninth switch and the tenth switch are sequentially connected between the first interface and the first camera, the eleventh switch and the twelfth switch are sequentially connected between the first interface and the second camera, the thirteenth switch and the fourteenth switch are sequentially connected between the third interface and the first camera, and the fifteenth switch and the sixteenth switch are sequentially connected between the third interface and the second camera; wherein, when the foldable electronic device is in an unfolded state, the ninth switch, the tenth switch, the fifteenth switch, and the sixteenth switch are controlled to be closed, and the eleventh switch, the twelfth switch, the thirteenth switch, and the fourteenth switch are controlled to be disconnected; or, when the foldable electronic device is in a folded state, the eleventh switch, the twelfth switch, the thirteenth switch, and the fourteenth switch are controlled to be closed, and the ninth switch, the tenth switch, the fifteenth switch, and the sixteenth switch are controlled to be disconnected. In this way, the foldable electronic device can control the first switch unit so that the first interface and the third interface are connected to the camera respectively, avoiding the scene where the first camera is suspended in the folded state.
[0013] In a possible implementation, the second switch unit includes a seventeenth switch, an eighteenth switch, a nineteenth switch, a twentieth switch, a twenty-first switch, a twenty-second switch, a twenty-third switch and a twenty-fourth switch; the seventeenth switch and the eighteenth switch are sequentially connected between the second interface and the first camera, the nineteenth switch and the twenty-third switch are sequentially connected between the second interface and the second camera, the twenty-first switch and the twenty-second switch are sequentially connected between the fourth interface and the first camera, and the twenty-third switch and the twenty-fourth switch are sequentially connected between the fourth interface and the second camera; wherein, when the foldable electronic device is in an unfolded state, the seventeenth switch, the eighteenth switch, the twenty-third switch and the twenty-fourth switch are controlled to be closed, and the nineteenth switch, the twentieth switch, the twenty-first switch and the twenty-second switch are controlled to be disconnected; or, when the foldable electronic device is in a folded state, the nineteenth switch, the twentieth switch, the twenty-first switch and the twenty-second switch are controlled to be closed, and the seventeenth switch, the eighteenth switch, the twenty-third switch and the twenty-fourth switch are controlled to be disconnected. In this way, the foldable electronic device can control the second switch unit so that the second interface and the fourth interface are connected to the camera respectively, avoiding the scene in which the first camera is suspended in the folded state.
[0014] In a possible implementation, the foldable electronic device is further used to: when the foldable electronic device is in the power-on state and the foldable electronic device enables the AO function, control the first switch unit so that the first camera is connected to the first interface and the second camera is connected to the third interface; and control the second switch unit so that the first camera is connected to the second interface and the second camera is connected to the fourth interface. In this way, in the initialization stage, the foldable electronic device can simultaneously power on the first camera and the second camera and reversely to ensure that the first camera and the second camera can be used normally later.
[0015] In the second aspect, the embodiment of the present application proposes a camera control method, which is applied to the foldable electronic device of the first aspect, and the method includes: when the foldable electronic device is in an unfolded state and the foldable electronic device enables the AO function, controlling the first switch unit so that the first camera is connected to the first interface and the second camera is not connected to the first interface, and controlling the second switch unit so that the first camera is connected to the second interface and the second camera is not connected to the second interface; when the foldable electronic device is in a folded state and the foldable electronic device enables the AO function, controlling the first switch unit so that the second camera is connected to the first interface and the first camera is not connected to the first interface, and controlling the second switch unit so that the second camera is connected to the second interface and the first camera is not connected to the second interface. In this way, in the unfolded state, the first camera is the front camera, and the first camera is connected to the AO channel; in the folded state, the second camera is the front camera, and the second camera is connected to the AO channel to realize the multiplexing of the AO channel; so that the foldable electronic device can use two AO cameras at the same time, realize the scene of dual AO business, enrich the use scene of the foldable electronic device, and improve the user experience.
[0016] In a possible implementation, the method further includes: when the foldable electronic device is in the unfolded state and the foldable electronic device enables the AO function, controlling the first switch unit to connect the second camera to the third interface, and controlling the second switch unit to connect the second camera to the fourth interface. In this way, when the foldable electronic device is in the unfolded state, the second camera is not blocked and can be used as a normal camera.
[0017] In a possible implementation, the method includes: when the foldable electronic device is in an unfolded state and the foldable electronic device enables the AO function, controlling the first switch to be closed and the second switch to be disconnected, so that the first camera is connected to the first interface and the second camera is not connected to the first interface; and controlling the fifth switch to be closed and the sixth switch to be disconnected, so that the first camera is connected to the second interface and the second camera is not connected to the second interface; when the foldable electronic device is in a folded state and the foldable electronic device enables the AO function, controlling the second switch and the third switch to be closed and the first switch and the fourth switch to be disconnected, so that the second camera is connected to the first interface and the first camera is not connected to the first interface; and controlling the sixth switch and the seventh switch to be closed and the fifth switch and the eighth switch to be disconnected, so that the second camera is connected to the second interface and the first camera is not connected to the second interface. In this way, the foldable electronic device can control the first switch unit and the second switch unit according to the device state, so that the first interface and the second interface are connected to the corresponding cameras, thereby realizing the AO scene.
[0018] In a possible implementation, the method includes: when the foldable electronic device is in the unfolded state and the foldable electronic device enables the AO function, controlling the third switch to be disconnected and the fourth switch to be closed, so that the second camera is connected to the third interface; and controlling the seventh switch to be disconnected and the eighth switch to be closed, so that the second camera is connected to the fourth interface. In this way, when the foldable electronic device is in the unfolded state and the foldable electronic device enables the AO function, the second camera can still be used as a normal camera.
[0019] In a possible implementation, it also includes: the SOC sends a first signal to the first switch unit and the second switch unit to control the first switch, the fourth switch, the fifth switch and the eighth switch to be closed, and the second switch, the third switch, the sixth switch and the seventh switch to be disconnected; the SOC sends a second signal to the first switch unit and the second switch unit to control the first switch, the fourth switch, the fifth switch and the eighth switch to be disconnected, and the second switch, the third switch, the sixth switch and the seventh switch to be closed. In this way, the foldable electronic device can control the control logic of the switch unit through the first signal and the second signal, so as to connect the corresponding camera to the AO channel when the device state of the foldable electronic device changes.
[0020] In a possible implementation, the method further includes: when the foldable electronic device is in the folded state and the foldable electronic device enables the AO function, controlling the first switch unit to connect the first camera to the third interface; and controlling the second switch unit to connect the first camera to the fourth interface. In this way, when the foldable electronic device is in the folded state, the first camera can be used as a normal camera.
[0021] In a possible implementation, it includes: when the foldable electronic device is in the unfolded state, the ninth switch, the tenth switch, the fifteenth switch and the sixteenth switch are controlled to be closed, and the eleventh switch, the twelfth switch, the thirteenth switch and the fourteenth switch are controlled to be disconnected; or when the foldable electronic device is in the folded state, the eleventh switch, the twelfth switch, the thirteenth switch and the fourteenth switch are controlled to be closed, and the ninth switch, the tenth switch, the fifteenth switch and the sixteenth switch are controlled to be disconnected. In this way, the foldable electronic device can control the first switch unit so that the first interface and the third interface are connected to the camera respectively, avoiding the scene where the first camera is suspended in the folded state.
[0022] In a possible implementation, it further includes: when the foldable electronic device is in the unfolded state, the seventeenth switch, the eighteenth switch, the twenty-third switch and the twenty-fourth switch are controlled to be closed, and the nineteenth switch, the twentieth switch, the twenty-first switch and the twenty-second switch are controlled to be disconnected; or when the foldable electronic device is in the folded state, the nineteenth switch, the twentieth switch, the twenty-first switch and the twenty-second switch are controlled to be closed, and the seventeenth switch, the eighteenth switch, the twenty-third switch and the twenty-fourth switch are controlled to be disconnected. In this way, the foldable electronic device can control the second switch unit so that the second interface and the fourth interface are connected to the camera respectively, avoiding the scene where the first camera is suspended in the folded state.
[0023] In a possible implementation, it further includes: when the foldable electronic device is in the power-on state and the foldable electronic device enables the AO function, controlling the first switch unit so that the first camera is connected to the first interface and the second camera is connected to the third interface; and controlling the second switch unit so that the first camera is connected to the second interface and the second camera is connected to the fourth interface. In this way, during the initialization stage, the foldable electronic device can simultaneously power on the first camera and the second camera and reversely power on the first camera and the second camera to ensure that the first camera and the second camera can be used normally later.
[0024] In a possible implementation, it also includes: detecting that the device state of the foldable electronic device has changed; the device state includes a folded state and an unfolded state; notifying the SOC of the changed device state; based on the SOC, controlling the first camera and / or the second camera to access the interface that matches the changed device state, respectively, wherein when the changed device state is an unfolded state, the first camera matches the first interface and the second interface; when the changed device state is a folded state, the second camera can match the first interface and the second interface. In this way, the foldable electronic device can connect the camera to the corresponding interface according to the device state to realize the dual AO scene.
[0025] In a possible implementation, the SOC includes an application processor AP and a sensor hub sensorhub; based on the SOC, the first camera and / or the second camera are respectively connected to the interface matching the changed device state, including: when the foldable electronic device is switched from the folded state to the unfolded state, and the foldable electronic device enables the AO function, the sensorhub controls the first switch unit so that the second camera is not connected to the first interface, and controls the second switch unit so that the second camera is not connected to the second interface; and the sensorhub controls the first switch unit so that the first camera is connected to the first interface, and controls the second switch unit so that the first camera is connected to the second interface; or, when the foldable electronic device is switched from the folded state to the unfolded state, and the AO function is enabled, the sensorhub controls the first switch unit so that the second camera is not connected to the first interface, and controls the second switch unit so that the first camera is connected to the second interface. When the foldable electronic device is switched from an unfolded state to a folded state and the foldable electronic device enables the AO function, the sensorhub controls the first switch unit so that the first camera is not connected to the first interface, and controls the second switch unit so that the first camera is not connected to the second interface; and, the sensorhub controls the first switch unit so that the second camera is connected to the first interface, and controls the second switch unit so that the second camera is connected to the second interface; or, when the foldable electronic device is switched from a folded state to an unfolded state and the foldable electronic device enables the AO function, the AP controls the first switch unit so that the second camera is not connected to the first interface, and controls the second switch unit so that the second camera is not connected to the second interface; and, The AP controls the first switch unit to connect the first camera to the first interface, and controls the second switch unit to connect the first camera to the second interface; or, when the foldable electronic device is switched from the unfolded state to the folded state, and the foldable electronic device enables the AO function, the AP controls the first switch unit to disconnect the first camera from the first interface, and controls the second switch unit to disconnect the first camera from the second interface; and, the AP controls the first switch unit to connect the second camera to the first interface, and controls the second switch unit to connect the second camera to the second interface; or, when the foldable electronic device is switched from the folded state to the unfolded state, and the foldable electronic device enables the AO function, the sensorhub controls the first switch unit to disconnect the first camera from the first interface, and controls the second switch unit to disconnect the second camera from the second interface. The switch unit makes the second camera not connected to the first interface, and controls the second switch unit so that the second camera is not connected to the second interface; and the AP controls the first switch unit so that the first camera is connected to the first interface, and controls the second switch unit so that the first camera is connected to the second interface; or, when the foldable electronic device is switched from the unfolded state to the folded state, and the foldable electronic device enables the AO function, the sensorhub controls the first switch unit so that the first camera is not connected to the first interface, and controls the second switch unit so that the first camera is not connected to the second interface; and the AP controls the first switch unit so that the second camera is connected to the first interface, and controls the second switch unit so that the second camera is connected to the second interface;Alternatively, when the foldable electronic device is switched from a folded state to an unfolded state, and the foldable electronic device enables the AO function, the AP controls the first switch unit so that the second camera is not connected to the first interface, and controls the second switch unit so that the second camera is not connected to the second interface; and the sensorhub controls the first switch unit so that the first camera is connected to the first interface, and controls the second switch unit so that the first camera is connected to the second interface; or, when the foldable electronic device is switched from an unfolded state to a folded state, and the foldable electronic device enables the AO function, the AP controls the first switch unit so that the first camera is not connected to the first interface, and controls the second switch unit so that the first camera is not connected to the second interface; and the sensorhub controls the first switch unit so that the second camera is connected to the first interface, and controls the second switch unit so that the second camera is connected to the second interface. In this way, the foldable electronic device can switch the first camera and the second camera based on the AP or the sensorhub to realize the dual AO scene. ;
[0026] In a third aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program. When the computer program is executed by a processor, the method of the first aspect is implemented.
[0027] In a fourth aspect, an embodiment of the present application provides a computer program product, which includes a computer program. When the computer program is executed, the computer executes the method of the first aspect.
[0028] In a fifth aspect, an embodiment of the present application provides a chip, the chip including a processor, the processor being used to call a computer program in a memory to execute the method described in the first aspect.
[0029] It should be understood that the third to fifth aspects of the present application correspond to the technical solutions of the second aspect of the present application, and the beneficial effects achieved by each aspect and the corresponding feasible implementation methods are similar and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] Figure 1 A schematic diagram of the working principle of an AO camera and a normal camera in a possible implementation;
[0031] Figure 2 A schematic diagram of the structure of an inward-folding electronic device provided in an embodiment of the present application;
[0032] Figure 3 A schematic diagram of the structure of an outward-folding electronic device provided in an embodiment of the present application;
[0033] Figure 4 A schematic diagram of a scenario in which a foldable electronic device implements dual AO services in an unfolded state according to an embodiment of the present application;
[0034] Figure 5 A schematic diagram of a scenario in which a foldable electronic device implements dual AO services in a folded state according to an embodiment of the present application;
[0035] Figure 6 A schematic diagram of the structure of a foldable electronic device provided in an embodiment of the present application;
[0036] Figure 7 A schematic diagram of the structure of a first switch unit and a second switch unit provided in an embodiment of the present application;
[0037] Figure 8 A schematic diagram of the structure of a foldable electronic device provided in an embodiment of the present application;
[0038] Fig. 9 A schematic diagram of a foldable electronic device in a power-on scenario provided in an embodiment of the present application;
[0039] Fig.10 A schematic diagram of the structure of a SOC chip controlling a first switch unit and a second switch unit provided in an embodiment of the present application;
[0040] Fig.11 A schematic diagram of the structure of another first switch unit and a second switch unit provided in an embodiment of the present application;
[0041] Fig.12 A schematic diagram of the structure of another first switch unit and a second switch unit provided in an embodiment of the present application;
[0042] Fig.13 A schematic diagram of the structure of another first switch unit and a second switch unit provided in an embodiment of the present application;
[0043] Fig.14 A flowchart of a camera control method provided in an embodiment of the present application;
[0044] Fig.15 A schematic diagram of the structure of a foldable electronic device 100 provided in an embodiment of the present application;
[0045] Fig.16 A software structure block diagram of the foldable electronic device 100 provided in an embodiment of the present application;
[0046] Fig.17 A schematic diagram of the structure of a camera control device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0047] In order to clearly describe the technical solutions of the embodiments of the present application, some terms and technologies involved in the embodiments of the present application are briefly introduced below:
[0048] 1) AO (always on) technology: It is a sensing technology that enables electronic devices such as mobile devices and IoT to recognize changes in the surrounding environment and its content, and realize autonomous user interface based on the acquired information.
[0049] 2) AO camera: A camera that supports AO function. AO camera has the characteristics of low power consumption and can be in a normally open state. For example, when an electronic device is in sleep mode, ordinary cameras without AO function do not work, but AO camera can still capture images and perform simple image processing. Therefore, electronic devices can realize air gesture control, screen-off face detection, and one-touch scanning based on AO camera.
[0050] 3) Image front end (IFE): An image processor. The image data output by the sensor first reaches the IFE, which performs some color correction, downsampling, and demosaicing on the preview and video, and then processes the 3A (auto exposure (AE), auto white balance (AWE), and auto focus (AF)) data.
[0051] 4) Double data rate synchronous dynamic random access memory (DDR SDRAM, abbreviated as DDR): refers to the memory in electronic devices.
[0052] 5) Sensor hub: A technology that combines hardware and software based on a low-power microcontroller unit (MCU) and a lightweight real-time operating system (RTOS). Sensor hub can be used to connect and process data from various sensor devices, which can reduce the power consumption of electronic devices.
[0053] 6) AON-ISP: AON coprocessor, with independent image signal processor (ISP), can realize extremely low power operation of camera, faster response face unlocking, gesture control monitoring and cold start camera, etc. Among them, AON-ISP module can be set in sensorhub.
[0054] 7) Face detection (FD): It is a basic task in various face applications. Its purpose is to find the face in the image or video and give the precise location.
[0055] 8) Others
[0056] In order to facilitate the clear description of the technical solutions of the embodiments of the present application, in the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or explanations. Any embodiment or design described as "exemplary" or "for example" in the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific way.
[0057] In the embodiments of the present application, "at least one" refers to one or more, and "plurality" refers to two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, or c can represent: a, b, c, ab, ac, bc, or abc, where a, b, c can be single or multiple.
[0058] It should be noted that the "at..." in the embodiment of the present application can be the instant when a certain situation occurs, or a period of time after a certain situation occurs, and the embodiment of the present application does not specifically limit this. In addition, the display interface provided in the embodiment of the present application is only an example, and the display interface can also include more or less content.
[0059] In a possible implementation, the electronic device may be provided with an AO camera, which has the characteristic of low power consumption, so that the AO camera can still work when the electronic device is in a dormant state. Figure 1 The difference between an AO camera and a normal camera is explained. Here, a normal camera can be understood as a camera that does not support the AO function. For example, a normal camera can support functions such as taking pictures, recording videos, and making video calls.
[0060] The workflow of a common camera can be as follows Figure 1As shown in a: Before using an ordinary camera, the electronic device needs to start the ordinary camera first. For example, the electronic device can pull up the camera by starting a camera application or other applications. The electronic device collects image data based on the ordinary camera and transmits the image data to the IFE through the camera serial interface (CSI) bus; after the IFE performs color correction, downsampling, de-mosaicing and statistical 3A data on the image data, the processed image data is stored in the DDR buffer. The CPU obtains the image data from the DDR and performs subsequent processes such as data analysis or display. The electronic device can also transmit a control signal to the IFE through the control bus to instruct the electronic device to execute the subsequent corresponding process.
[0061] It should be noted that when an ordinary camera executes the above process, the electronic device needs to be in working condition.
[0062] AO camera can support AO function, and AO camera can also be used as a normal camera. The workflow of AO camera can be as follows Figure 1 As shown in b:
[0063] In one possible implementation, when the electronic device is in working state, the AO camera can be used as a normal camera. For example, the electronic device can collect image data through the AO camera and transmit the image data to the IFE through the CSI interface; the IFE processes the image data and stores the processed image data in the DDR buffer. The electronic device can also transmit a control signal to the IFE through the control bus to instruct the electronic device to execute the subsequent corresponding process. It can be seen that this process is similar to Figure 1 The workflow is similar to that of a normal camera shown in a.
[0064] In another possible implementation, the AO camera can support the AO function when the electronic device is in a dormant state. For example, taking the off-screen face detection scenario as an example, the electronic device includes a sensorhub, which can be used to receive and process sensor data with low power consumption; the sensorhub includes an FD module and an AON-ISP module, wherein the FD module is used to detect faces and the AON-ISP is used to process image data. The AO camera can collect image data, and the electronic device transmits the image data to the AON-ISP module through the CSI interface; the AON-ISP module processes the image data, and the FD module determines whether the image includes a face based on the processed image data. When a face is detected in the image, the AON-ISP module can instruct the electronic device to switch to a working state through a control signal, and the FD module transmits the processed image data to the IFE for subsequent processing.
[0065] In a possible implementation, the electronic device can control the switching of the interface of the AO camera through a switch. For example, the interface of the AO camera can be a CSI interface, an MCLK interface, and an I2C interface, etc.; the electronic device can realize the switching of the AO function and the ordinary camera function by controlling these interfaces.
[0066] Among these interfaces, some interfaces are dedicated interfaces for AO functions (AO interfaces), and some interfaces are not dedicated interfaces for AO functions. For example, taking the CSI interface as an example, an electronic device includes multiple CSI interfaces, CSI1 is an interface for implementing the AO function, and CSI2 is a common interface; a camera connected to CSI1 can be used as an AO camera to implement the AO function; a camera connected to CSI2 can be used as a common camera.
[0067] Therefore, the number of AO interfaces determines the number of AO cameras in the electronic device. In a possible implementation, the electronic device includes two groups of AO interfaces, and the electronic device may include two AO cameras, thereby realizing dual AO services.
[0068] For example, electronic devices such as candy-bar phones and tablets can support dual AO functions, and these electronic devices often include two sets of cameras (front camera and rear camera). The front camera of the electronic device can be equipped with an AO camera, and the rear camera can also be equipped with an AO camera.
[0069] However, in a possible implementation, the foldable electronic device includes an unfolded state and a folded state, and the foldable electronic device may include three sets of cameras, for example, Figure 2 As shown in a in FIG. 1 , in the unfolded state, the front camera of the foldable electronic device is camera 204; the rear camera is camera 206; Figure 2 As shown in b, in the folded state, the front camera of the foldable electronic device is camera 205, and the rear camera is camera 206; the foldable electronic device includes three sets of cameras. However, the electronic device only includes two sets of AO interfaces, so in a possible implementation, the foldable electronic device cannot realize the function of setting the three cameras as AO cameras through the two sets of AO interfaces.
[0070] In view of this, an embodiment of the present application provides a foldable electronic device, including two groups of AO channels. The foldable electronic device can connect two groups of cameras out of three groups of cameras to the two groups of AO channels respectively according to the device state, so as to realize the multiplexing of one group of AO channels, thereby obtaining a front camera supporting the AO function and a rear camera supporting the AO function; for example, Figure 2In the foldable electronic device shown, the rear camera is camera 206, and camera 206 occupies one AO channel. The front camera can correspond to camera 204 and camera 205 respectively according to the device state; in the unfolded state, camera 204 is connected to another AO channel; in the folded state, camera 205 is connected to another AO channel. In this way, in the folded state or the unfolded state, the foldable electronic device can use a front AO camera and a rear AO camera, so that the foldable electronic device can realize dual AO services.
[0071] Let's combine Figure 2 and Figure 3 The structure of the foldable electronic device in the embodiment of the present application is described.
[0072] Figure 2 A schematic diagram of the structure of a foldable electronic device in an embodiment of the present application is shown. Figure 2 As shown:
[0073] Exemplarily, the foldable electronic device may be an inward-folding electronic device. The foldable electronic device may include two device states, and the device state may include a folded state and an unfolded state.
[0074] Foldable electronic devices can be in an unfolded state, such as Figure 2 As shown in a in . The foldable electronic device may include a first folding portion 201, a second folding portion 202, and a rotating mechanism 203 located between the first folding portion and the second folding portion; wherein the first folding portion 201 is provided with a camera 204 and a camera 206, and the second folding portion is provided with a camera 205. The foldable electronic device may include a first plane and a second plane, both of which are planes perpendicular to the x-axis direction, and the x value of the first plane is greater than the x value of the second plane. The camera 204 is arranged on the first plane, and the camera 205 and the camera 206 are arranged on the second plane (as shown by the dotted line). In some embodiments, the first plane of the first folding portion 201 and the first plane of the second folding portion 202 may be an inner screen; the second plane of the second folding portion 202 may be an outer screen; the second plane of the first folding portion 201 may be a shell of the foldable electronic device.
[0075] It can be seen that when the foldable electronic device is in the unfolded state, the camera 204 can be used as a front camera, and the camera 206 can be used as a rear camera. The foldable electronic device can be switched to the folded state by bending inward.
[0076] Foldable electronic devices are in a folded state, e.g. Figure 2 b and Figure 2 In the folded state, the second folding portion 202 can be as shown in c. Figure 2As shown in b in FIG. 1 , the camera 205 is not blocked; the first folding portion can be as shown in FIG. Figure 2 As shown in c in FIG. 8 , the camera 206 is not blocked.
[0077] It can be seen that when the foldable electronic device is in a folded state, camera 205 can be used as a front camera and camera 206 can be used as a rear camera.
[0078] In an embodiment of the present application, the foldable electronic device includes a first camera and a second camera; wherein, when the foldable electronic device is in a folded state, the first camera is blocked by the folded screen, and the second camera is not blocked by the folded screen.
[0079] exist Figure 2 In the embodiment, when the foldable electronic device is in a folded state, the camera 204 is blocked by the folded screen. The first camera may correspond to the camera 204 and the second camera may correspond to the camera 205.
[0080] Figure 3 FIG. 1 shows a schematic diagram of the structure of another foldable electronic device in an embodiment of the present application. Figure 3 As shown:
[0081] Exemplarily, the foldable electronic device may be an outward-folding electronic device. The foldable electronic device may include two device states, and the device state may include a folded state and an unfolded state.
[0082] Foldable electronic devices can be in an unfolded state, such as Figure 3 As shown in a in . The foldable electronic device may include a first folding portion 301, a second folding portion 302, and a rotating mechanism 303 located between the first folding portion and the second folding portion; wherein the first folding portion 301 is provided with a camera 304 and a camera 306, and the second folding portion is provided with a camera 305. The foldable electronic device may include a first plane and a second plane, both of which are planes perpendicular to the x-axis direction, and the x value of the first plane is greater than the x value of the second plane. The cameras 304 and 305 are both arranged in the first plane, and the camera 306 is arranged in the second plane (as shown by the dotted line). In some embodiments, the first plane of the first folding portion 301 and the first plane of the second folding portion 302 may be a screen; the second plane of the second folding portion 302 and the second plane of the first folding portion 301 may be the shell of the foldable electronic device.
[0083] It can be seen that when the foldable electronic device is in the unfolded state, the camera 305 can be used as a front camera, and the camera 306 can be used as a rear camera. The foldable electronic device can be switched to the folded state by bending outward.
[0084] Foldable electronic devices are in a folded state, e.g. Figure 3 b and Figure 3 In the folded state, the first folding portion 301 can be as shown in c. Figure 3 As shown in b in FIG. 1 , the camera 304 is not blocked; the second folding portion 302 can be as shown in FIG. Figure 3 As shown in c in FIG. 3 , the camera 305 is not blocked.
[0085] It can be seen that when the foldable electronic device is in a folded state, camera 305 can be used as a front camera and camera 304 can be used as a rear camera.
[0086] In an embodiment of the present application, the foldable electronic device includes a first camera and a second camera; wherein, when the foldable electronic device is in a folded state, the first camera is blocked by the folded outer shell, and the second camera is not blocked by the folded outer shell.
[0087] exist Figure 3 In the embodiment, when the foldable electronic device is in a folded state, the camera 306 is blocked by the folded housing, the first camera may correspond to the camera 306, and the second camera may correspond to the camera 304.
[0088] The above embodiments are merely illustrative of the form of a foldable electronic device. The foldable electronic device in the embodiments of the present application may also be an electronic device with other structures, and the embodiments of the present application are not limited to this.
[0089] It should be noted that, in order to facilitate the description of the solutions of the embodiments of the present application, the subsequent embodiments are described using the foldable electronic device as an inward-folding electronic device as an example, but the solutions of the embodiments of the present application are also applicable to outward-folding electronic devices, and the embodiments of the present application will not be repeated here.
[0090] Combine the following Figure 4-Figure 5 The application scenario of the above-mentioned foldable electronic device realizing dual AO service is explained.
[0091] For example, Figure 4 A schematic diagram of an interface of a foldable electronic device provided by an embodiment of the present application is shown, such as Figure 4 As shown:
[0092] In a possible implementation, a user may scan a code using a foldable electronic device in a screen-off state, wherein the foldable electronic device is in an unfolded state; Figure 4 As shown in scene a in the figure, the user turns the front camera of the foldable electronic device with the screen off toward himself and aims the rear camera at the scannable code, and the foldable electronic device can complete the code scanning process.
[0093] In the above scenario, the interface of the foldable electronic device can be as follows: Figure 4b in Figure 4 c and Figure 4 Specifically, the unfolded foldable electronic device is in a screen-off or screen-locked state, such as Figure 4 When the foldable electronic device detects the user's face based on the image captured by the front camera, the foldable electronic device switches to the bright screen state, as shown in FIG. Figure 4 When the foldable electronic device detects a scannable code based on the image captured by the rear camera, the foldable electronic device recognizes the scannable code and displays the following Figure 4 The interface shown in d.
[0094] In an embodiment of the present application, a foldable electronic device can realize a dual AO service scenario and simplify user operations. For example, it can reduce the number of operations for users to unlock the screen and launch scannable applications, thereby improving the user experience.
[0095] For example, Figure 5 A schematic diagram of an interface of a foldable electronic device provided by an embodiment of the present application is shown, such as Figure 5 As shown:
[0096] In another possible implementation, the user may use a foldable electronic device in a screen-off state to scan the code, wherein the foldable electronic device is in a folded state; Figure 5 As shown in scene a in the figure, the user turns the front camera of the foldable electronic device with the screen off toward himself and aims the rear camera at the scannable code, and the foldable electronic device can complete the code scanning process.
[0097] In the above scenario, the interface of the foldable electronic device can be as follows: Figure 5 b in Figure 5 c and Figure 5 Specifically, the foldable electronic device in the folded state is in a screen-off or screen-locked state, such as Figure 5 When the foldable electronic device detects the user's face based on the image captured by the front camera, the foldable electronic device switches to the bright screen state, as shown in FIG. Figure 5 When the foldable electronic device detects a scannable code based on the image captured by the rear camera, the foldable electronic device recognizes the scannable code and displays the following Figure 5 The interface shown in d.
[0098] In an embodiment of the present application, a foldable electronic device can realize a dual AO service scenario and simplify user operations. For example, it can reduce the number of operations for users to unlock the screen and launch scannable applications, thereby improving the user experience.
[0099] The above embodiments illustrate the usage scenarios of the foldable electronic device in the embodiments of the present application. The structure of the foldable electronic device in the embodiments of the present application is described in detail below.
[0100] Figure 6 FIG. 1 shows a schematic diagram of a foldable electronic device provided by an embodiment of the present application. Figure 6 As shown:
[0101] The foldable electronic device includes a first camera 601, a second camera 602, a system-on-chip SOC 603, a first switch unit 604 and a second switch unit 605; wherein, when the foldable electronic device is in a folded state, the first camera 601 is blocked by the folded screen, and the second camera 602 is not blocked by the folded screen; the SOC 603 includes a first interface 6031 and a second interface 6032, the first interface 6031 supports the AO function, and the second interface 6032 is used to transmit control signals with the first camera 601 or the second camera 602.
[0102] Among them, the first camera 601 may correspond to Figure 2 The camera 204 in the inward folding electronic device, the second camera 602 may correspond to the camera 205; the first camera 601 may also correspond to Figure 3 The camera 306 in the outward folding electronic device, the second camera 602 may correspond to the camera 304.
[0103] The first interface 6031 may be an interface supporting the AO function. When a camera is connected to the first interface 6031, the camera may be used as an AO camera. The first interface 6031 may be used to transmit image data collected by the camera. The first interface 6031 may be a mobile industry processor interface (MIPI). For example, the first interface 6031 may be a CSI interface and a display serial interface (DSI).
[0104] The second interface 6032 is used to transmit control signals with the first camera 601 or the second camera 602, wherein the first interface 6031 and the second interface 6032 are connected to the same camera, for example, when the first interface 6031 is connected to the first camera 601, the second interface 6032 is used to transmit control signals with the first camera 601. When the first interface 6031 is connected to the second camera 602, the second interface 6032 is used to transmit control signals with the second camera 602. The second interface 6032 can be an integrated circuit (inter-integrated circuit, I2C) interface, a master clock (MCLK, also called a system clock (systemclock)) interface, an interrupt (int) interface, a standby (standby) interface, and a reset (reset, RST) interface, etc.
[0105] A foldable electronic device may include an unfolded state and a folded state.
[0106] In one possible implementation, a foldable electronic device is used to control the first switch unit 604 so that the first camera 601 is connected to the first interface 6031 and the second camera 602 is not connected to the first interface 6031 when the foldable electronic device is in an unfolded state and the foldable electronic device enables the AO function, and to control the second switch unit 605 so that the first camera 601 is connected to the second interface 6032 and the second camera 602 is not connected to the second interface 6032.
[0107] Among them, the foldable electronic device enabling the AO function can be understood as: the AO application of the AO service is installed in the foldable electronic device, and when the foldable electronic device runs the application in the foreground, a button for turning on the AO function can be displayed; when the foldable electronic device receives a trigger operation of the user for the button, the foldable electronic device starts the AO function. After starting the AO function, the foldable electronic device can implement the AO service. The first switch unit 604 is used to control the first camera 601 or the second camera 602 to access the first interface 6031; the second switch unit 605 is used to control the first camera 601 or the second camera 602 to access the second interface 6032.
[0108] Foldable electronic devices are Figure 2Taking the structure shown as an example, when the foldable electronic device is in the unfolded state, the camera 204 can be used as a front camera, and the camera 206 can be used as a rear camera. Two groups of AO channels are provided in the foldable electronic device, wherein the camera 204 and the camera 206 can be connected to one group of AO channels respectively, and the camera 205 can not be connected to the AO channel. Accordingly, the first camera 601 can be the camera 204, and the second camera 602 can be the camera 205. The foldable electronic device can connect the first camera 601 to the AO channel, and not connect the second camera 602 to the AO channel.
[0109] The first camera 601 is connected to the AO channel, and the foldable electronic device can connect the first camera to the first interface based on the first switch unit; and connect the first camera to the second interface based on the second switch unit.
[0110] In another possible implementation, the foldable electronic device is used to control the first switch unit 604 so that the second camera 602 is connected to the first interface 6031, and the first camera 601 is not connected to the first interface 6031, and to control the second switch unit 605 so that the second camera 602 is connected to the second interface 6032, and the first camera 601 is not connected to the second interface 6032 when the foldable electronic device is in a folded state and the AO function is enabled.
[0111] Foldable electronic devices are Figure 2 Taking the structure shown as an example, when the foldable electronic device is in a folded state, the camera 205 can be used as a front camera, the camera 206 can be used as a rear camera, and the camera 204 is blocked by the screen. Two groups of AO channels are provided in the foldable electronic device, wherein the camera 205 and the camera 206 can be connected to one group of AO channels respectively, and the camera 204 can not be connected to the AO channel. Accordingly, the first camera 601 can be the camera 204, and the second camera 602 can be the camera 205. The foldable electronic device can connect the second camera 602 to the AO channel, and does not connect the first camera 601 to the AO channel.
[0112] The second camera 602 is connected to the AO channel, and the foldable electronic device can connect the second camera to the first interface based on the first switch unit; and connect the second camera to the second interface based on the second switch unit.
[0113] It should be noted that the embodiments of the present application are described by taking the foldable electronic device as an inward-folding electronic device as an example, and the foldable electronic device provided in the embodiments of the present application can also be used in other structures, such as an outward-folding electronic device. The embodiments of the present application will not be described in detail.
[0114] In the embodiment of the present application, in the unfolded state, the foldable electronic device connects the first camera to the first interface and the second interface; in the folded state, the foldable electronic device connects the second camera to the first interface and the second interface; in this way, the foldable electronic device can use two AO cameras at the same time to realize the scenario of dual AO business, enrich the use scenarios of the foldable electronic device, and enhance the user experience.
[0115] exist Figure 6 Based on the structure of the foldable electronic device shown, in the foldable electronic device provided in an embodiment of the present application, SOC 603 also includes a third interface 6033 and a fourth interface 6034, the third interface 6033 does not support the AO function, and the fourth interface 6034 is used to transmit control signals with the first camera 601 or the second camera 602.
[0116] Among them, the third interface 6031 may be an interface that does not support the AO function. When the camera is connected to the third interface 6033, the camera can be used as a normal camera. The third interface 6033 can be used to transmit image data collected by the camera. The third interface 6033 may be a MIPI interface, for example, the third interface 6033 may be a CSI interface and a DSI interface.
[0117] The fourth interface 6034 is used to transmit control signals to the first camera 601 or the second camera 602, wherein the third interface 6033 and the fourth interface 6034 are connected to the same camera. For example, when the third interface 6033 is connected to the first camera 601, the fourth interface 6034 is used to transmit control signals to the first camera 601. When the third interface 6033 is connected to the second camera 602, the fourth interface 6034 is used to transmit control signals to the second camera 602. The fourth interface 6034 can be I 2 C interface, MCLK interface, int interface, standby interface and RST interface, etc.
[0118] In one possible implementation, the foldable electronic device is also used to control the first switch unit so that the second camera is connected to the third interface, and to control the second switch unit so that the second camera is connected to the fourth interface when the foldable electronic device is in the unfolded state and the AO function is enabled on the foldable electronic device.
[0119] Foldable electronic devices are Figure 2Taking the structure shown as an example, when the foldable electronic device is in the unfolded state, the front camera is camera 204, and the rear cameras are camera 205 and camera 206. Since camera 205 is not blocked, the foldable electronic device may still need to use camera 205, so camera 205 needs to be connected to the non-AO channel and used as a normal camera. Among them, the second camera 602 can correspond to camera 205, and the camera 205 is connected to the non-AO channel including: the foldable electronic device connects the second camera 602 to the third interface 6033 based on the first switch unit 604, and connects the second camera 602 to the fourth interface 6034 based on the second switch unit 605.
[0120] It can be understood that when the foldable electronic device is in a folded state, the first camera 601 (camera 204) is blocked by the screen, and the foldable electronic device cannot use the first camera. Therefore, the first camera 601 may be connected to a non-AO channel or may not be connected to a non-AO channel. This embodiment of the present application does not limit this.
[0121] Combine the following Figure 7 The control circuit and control principle of the first switch unit and the second switch unit in the embodiment of the present application are described as follows: Figure 7 As shown:
[0122] Exemplarily, the first switch unit 604 includes a first switch Q1, a second switch Q2, a third switch Q3 and a fourth switch Q4. The first switch Q1 is connected between the first interface 6031 and the first camera 601, the second switch Q2 and the third switch Q3 are connected between the first interface 6031 and the second camera 602 in sequence, and the fourth switch Q4 is connected between the third interface 6033 and the second camera 602.
[0123] The second switch unit 605 includes a fifth switch Q5, a sixth switch Q6, a seventh switch Q7 and an eighth switch Q8. The fifth switch Q5 is connected between the second interface 6032 and the first camera 601. The sixth switch Q6 and the seventh switch Q7 are connected between the second interface 6032 and the second camera 602 in sequence. The eighth switch Q8 is connected between the fourth interface 6034 and the second camera 602.
[0124] It should be noted that the first switch Q1 to the eighth switch Q8 can be a diode, a triode, a metal-oxide-semiconductor (MOS) transistor, a bipolar junction transistor (BJT) device or an insulated gate bipolar transistor (IGBT) device, etc. The embodiment of the present application does not limit the controllable device.
[0125] In a possible implementation, the foldable electronic device is specifically used for:
[0126] When the foldable electronic device is in the unfolded state and the AO function of the foldable electronic device is enabled, the first switch Q1 is controlled to be closed and the second switch Q2 is disconnected, so that the first camera 601 is connected to the first interface 6031, and the second camera 602 is not connected to the first interface 6031; and, the fifth switch Q5 is controlled to be closed and the sixth switch Q6 is disconnected, so that the first camera 601 is connected to the second interface 6032, and the second camera 602 is not connected to the second interface 6032.
[0127] like Figure 8 As shown in Figure a, the first switch Q1 is in a closed state, the second switch Q2 is in an open state, and the first camera 601 is connected to the first interface 6031. The fifth switch Q5 is in a closed state, the sixth switch Q6 is in an open state, and the first camera 601 is connected to the first interface 6031.
[0128] In this way, when the foldable electronic device is in the unfolded state and the foldable electronic device enables the AO function, the first camera is connected to the first interface and the second interface, and the first camera can be used as an AO camera, so that the foldable electronic device can perform AO services.
[0129] In some embodiments, since camera 205 and camera 206 are both rear-mounted physical cameras in the unfolded state, after camera 204 and camera 206 occupy an AO channel respectively, camera 205 can still be connected to a non-AO channel, so that camera 205 can be used as a normal camera.
[0130] The foldable electronic device is also specifically used for: when the foldable electronic device is in the unfolded state and the AO function of the foldable electronic device is enabled, controlling the third switch Q3 to be disconnected and the fourth switch Q4 to be closed, so that the second camera 602 is connected to the third interface 6033; and controlling the seventh switch Q7 to be disconnected and the eighth switch Q8 to be closed, so that the second camera 602 is connected to the fourth interface 6034.
[0131] In this way, when the foldable electronic device is in the unfolded state and the AO function is enabled on the foldable electronic device, the second camera can still be used as a normal camera.
[0132] In another possible implementation, the foldable electronic device is specifically used for:
[0133] When the foldable electronic device is in a folded state and the AO function is enabled, the second switch Q2 and the third switch Q3 are controlled to be closed, and the first switch Q1 and the fourth switch Q4 are disconnected, so that the second camera 602 is connected to the first interface 6031, and the first camera 601 is not connected to the first interface 6031; and, the sixth switch Q6 and the seventh switch Q7 are controlled to be closed, and the fifth switch Q5 and the eighth switch Q8 are disconnected, so that the second camera 602 is connected to the second interface 6032, and the first camera 601 is not connected to the second interface 6032.
[0134] like Figure 8 As shown in b: the second switch Q2 and the third switch Q3 are in a closed state, the first switch Q1 and the fourth switch Q4 are in an open state; the second camera 602 is connected to the first interface 6031. The sixth switch Q6 and the seventh switch Q7 are in a closed state, the fifth switch Q5 and the eighth switch Q8 are in an open state, and the second camera 602 is connected to the second interface 6032.
[0135] In this way, when the foldable electronic device is in a folded state and the AO function is enabled, the second camera is connected to the first interface and the second interface, and the second camera can be used as an AO camera, so that the foldable electronic device can perform AO services.
[0136] The present application provides a foldable electronic device. Fig. 9 As shown:
[0137] The foldable electronic device is also used to: when the foldable electronic device is in the power-on state and the AO function of the foldable electronic device is enabled, control the first switch unit so that the first camera is connected to the first interface and the second camera is connected to the third interface; and control the second switch unit so that the first camera is connected to the second interface and the second camera is connected to the fourth interface.
[0138] An exemplary foldable electronic device is specifically used for:
[0139] When the foldable electronic device is in the power-on state and the AO function of the foldable electronic device is enabled, the second switch Q2 and the third switch Q3 are controlled to be disconnected, and the first switch Q1 and the fourth switch Q4 are closed, so that the first camera 601 is connected to the first interface 6031, and the second camera 602 is connected to the third interface 6033; and the sixth switch Q6 and the seventh switch Q7 are controlled to be disconnected, and the fifth switch Q5 and the eighth switch Q8 are closed, so that the first camera is connected to the second interface 6032, and the second camera 602 is connected to the fourth interface 6034.
[0140] Alternatively, when the target application in the foldable electronic device calls the first camera and / or the second camera, and the foldable electronic device starts the AO function, the second switch Q2 and the third switch Q3 are controlled to be disconnected, and the first switch Q1 and the fourth switch Q4 are closed, so that the first camera 601 is connected to the first interface 6031, and the second camera 602 is connected to the third interface 6033; and the sixth switch Q6 and the seventh switch Q7 are controlled to be disconnected, and the fifth switch Q5 and the eighth switch Q8 are closed, so that the first camera is connected to the second interface 6032, and the second camera 602 is connected to the fourth interface 6034.
[0141] The target application may be a third-party application that supports calling the camera. For example, the target application may be a social application, a camera application, a payment application, and the like.
[0142] In some scenarios, the foldable electronic device needs to connect the first camera and the second camera to the MIPI interface at the same time. For example, after powering on, the foldable electronic device needs to initialize the first camera and the second camera. During initialization, the foldable electronic device will initialize the first camera and the second camera at the same time, so that when the device state of the foldable electronic device changes later, the first camera and the second camera can be used normally.
[0143] In other scenarios, the foldable electronic device needs to connect the first camera and the second camera to the MIPI interface at the same time. For example, a target application is installed in the foldable electronic device. When the electronic device starts the target application and pulls up the camera through the target application, the foldable electronic device needs to power on the first camera and the second camera at the same time.
[0144] It is understandable that, since the foldable electronic device includes two front physical cameras, for example, camera 204 and camera 205, when the target application calls the front camera, the foldable electronic device needs to encapsulate the first camera and the second camera into one logical camera.
[0145] This is because, for the target application, some target applications may not have the ability to distinguish the device state of the foldable electronic device. When the target application calls the front camera, the target application may not be able to determine whether the called camera is the front camera of the foldable electronic device in the unfolded state or the front camera of the foldable electronic device in the folded state. Therefore, the first camera and the second camera are packaged as a front logical camera. When the target application calls the front camera, the foldable electronic device will power on the first camera and the second camera at the same time.
[0146] In the above scenario, the first camera is connected to the first interface and the second interface, and the first camera can be used as an AO camera; the second camera is connected to the third interface and the fourth interface, and the second camera can be used as a normal camera. In this way, it can be ensured that when the foldable electronic device is turned on or the target application calls the front camera, the first camera and the second camera are both connected to the MIPI interface and the interface for transmitting control signals, so that the first camera and the second camera can be initialized or powered on at the same time in the above scenario.
[0147] In the embodiment of the present application, the foldable electronic device can control the first switch unit and the second switch unit through the fifth interface.
[0148] For example, Fig.10 A schematic diagram of the structure of a foldable electronic device according to an embodiment of the present application is shown. Fig.10 As shown:
[0149] The SOC 603 further includes a fifth interface 6035 , and the fifth interface 6035 is used to transmit control signals with the first switch unit 604 and the second switch unit 605 .
[0150] When the SOC 603 sends a first signal to the first switch unit 604 and the second switch unit 605 through the fifth interface 6035, the first switch Q1, the fourth switch Q4, the fifth switch Q5 and the eighth switch Q8 are closed, and the second switch Q2, the third switch Q3, the sixth switch Q6 and the seventh switch Q7 are opened. When the SOC 603 sends a second signal to the first switch unit 604 and the second switch unit 605 through the fifth interface 6035, the first switch Q1, the fourth switch Q4, the fifth switch Q5 and the eighth switch Q8 are opened, and the second switch Q2, the third switch Q3, the sixth switch Q6 and the seventh switch Q7 are closed.
[0151] The fifth interface may be a general purpose input output (GPIO). In the embodiment of the present application, the foldable electronic device may control the control logic of the switch unit through the first signal and the second signal, so as to connect the corresponding camera to the AO channel when the device state of the foldable electronic device changes.
[0152] In a possible implementation, the first switch Q1 to the eighth switch Q8 may be in the form of a switch combination. For example, the first switch Q1 and the second switch Q2 may be a first sub-switch unit, the third switch Q3 and the fourth switch Q4 may be a second sub-switch unit, the fifth switch Q5 and the sixth switch Q6 may be a third sub-switch unit, and the seventh switch Q7 and the eighth switch Q8 may be a fourth sub-switch unit.
[0153] like Fig.11As shown, the first switch unit 604 includes a first sub-switch unit 6041 and a second sub-switch unit 6042 , and the second switch unit 605 includes a third sub-switch unit 6051 and a fourth sub-switch unit 6052 .
[0154] Taking the first sub-switch unit 6041 as an example, the switch states of the first switch Q1 and the second switch Q2 are different, for example, the first switch Q1 is closed and the second switch Q2 is open; conversely, the first switch Q1 is open and the second switch Q2 is closed. In actual scenarios, the sub-switch unit can be a single-pole double-throw switch, or a controllable unit in other forms, which is not limited in the embodiments of the present application.
[0155] In some embodiments, the SOC 603 may send a signal to the first switch unit 604 and the second switch unit 605 through the fifth interface 6035 according to the device state of the foldable electronic device. For example, when the foldable electronic device is in an unfolded state, the SOC 603 sends a first signal; when the foldable electronic device is in a folded state, the SOC 603 sends a second signal.
[0156] The first signal may be a low level signal, and the second signal may be a high level signal.
[0157] Specifically, when the foldable electronic device is in the unfolded state, the GPIO interface of the SOC 603 sends a high-level signal to the first switch unit 604 and the second switch unit 605. The S end of the first sub-switch unit 6041 is connected to the L end, and the S end is disconnected from the H end; the S end of the second sub-switch unit 6042 is connected to the L end, and the S end is disconnected from the H end; the S end of the third sub-switch unit 6051 is connected to the L end, and the S end is disconnected from the H end; and the S end of the fourth sub-switch unit 6052 is connected to the L end, and the S end is disconnected from the H end. The first camera 601 is connected to the first interface and the second interface, and the second camera 602 is connected to the third interface and the fourth interface.
[0158] When the foldable electronic device is in the folded state, the GPIO interface of the SOC 603 sends a low-level signal to the first switch unit 604 and the second switch unit 605. The S end of the first sub-switch unit 6041 is disconnected from the L end, and the S end is connected to the H end; the S end of the second sub-switch unit 6042 is disconnected from the L end, and the S end is connected to the H end; the S end of the third sub-switch unit 6051 is disconnected from the L end, and the S end is connected to the H end; and the S end of the fourth sub-switch unit 6052 is disconnected from the L end, and the S end is connected to the H end. The second camera 602 is connected to the first interface and the second interface, and the first camera 601 is not connected to the third interface and the fourth interface.
[0159] It is understandable that when the foldable electronic device is in a folded state, the first camera 601 is not connected to the third interface and the fourth interface. The first camera is in a suspended state and the first camera cannot be used. However, in actual scenarios, the first camera in the folded state of the foldable electronic device is invisible. After the first camera is blocked by the screen, the first camera cannot be used as an AO camera or an ordinary camera. Therefore, the suspension of the first camera does not affect the foldable electronic device to achieve dual AO scenarios.
[0160] It should be noted that the second interface and the fourth interface may include I 2 C interface, int interface, MCLK interface, standby interface and RST interface. If the second interface and the fourth interface use the same I 2 C interface, and the addresses of the second interface and the fourth interface are different, then during the switching process between the folded state and the unfolded state of the foldable electronic device, the second switch unit does not need to change the I interfaces connected to the first camera and the second camera respectively. 2 C interface. In addition, during the device status switching process, the int interface can switch between the first camera and the second camera without switching. The standby interface and the RST interface need to select two independent GPIOs according to the application scenario and do not need to switch.
[0161] exist Figure 6 On the basis of the illustrated embodiment, the embodiment of the present application further provides a structure of a foldable electronic device, so that when the foldable electronic device is in a folded state, the first camera will not be suspended in the air. Fig.12 A schematic diagram of the structure of a foldable electronic device provided in an embodiment of the present application is shown. Fig.12 As shown:
[0162] The first switch unit 604 includes a ninth switch Q9, a tenth switch Q10, an eleventh switch Q11, a twelfth switch Q12, a thirteenth switch Q13, a fourteenth switch Q14, a fifteenth switch Q15 and a sixteenth switch Q16; the ninth switch Q9 and the tenth switch Q10 are connected in sequence between the first interface 6031 and the first camera 601, the eleventh switch Q11 and the twelfth switch Q12 are connected in sequence between the first interface 6031 and the second camera 602, the thirteenth switch Q13 and the fourteenth switch Q14 are connected in sequence between the third interface 6033 and the first camera 601, and the fifteenth switch Q15 and the sixteenth switch Q16 are connected in sequence between the third interface 6033 and the second camera 602.
[0163] In one possible implementation, when the foldable electronic device is in the unfolded state, the ninth switch Q9, the tenth switch Q10, the fifteenth switch Q15 and the sixteenth switch Q16 are controlled to be closed, and the eleventh switch Q11, the twelfth switch Q12, the thirteenth switch Q13 and the fourteenth switch Q14 are controlled to be opened.
[0164] In the embodiment of the present application, when the foldable electronic device is in the unfolded state, the first camera 601 is connected to the first interface 6031 and is not connected to the third interface 6033 , and the second camera 602 is connected to the third interface 6033 and is not connected to the first interface 6031 .
[0165] In another possible implementation, when the foldable electronic device is in a folded state, the eleventh switch Q11, the twelfth switch Q12, the thirteenth switch Q13 and the fourteenth switch Q14 are controlled to be closed, and the ninth switch Q9, the tenth switch Q10, the fifteenth switch Q15 and the sixteenth switch Q16 are controlled to be opened.
[0166] and Figure 7 Compared with the foldable electronic device in the shown embodiment, the foldable electronic device in the embodiment of the present application can also be used for: when the foldable electronic device is in a folded state and the foldable electronic device enables the AO function, controlling the first switch unit to connect the first camera to the third interface; and controlling the second switch unit to connect the first camera to the fourth interface.
[0167] In the embodiment of the present application, when the foldable electronic device is in a folded state, the second camera 602 is connected to the first interface 6031 and is not connected to the third interface 6033 , and the first camera 601 is connected to the third interface 6033 and is not connected to the first interface 6031 .
[0168] In some embodiments, the first switch unit may include sub-switch units, for example, the fifth sub-switch unit includes a ninth switch Q9 and an eleventh switch Q11, the sixth sub-switch unit includes a tenth switch Q10 and a fourteenth switch Q14, the seventh sub-switch unit includes a twelfth switch Q12 and a sixteenth switch Q16, and the eighth sub-switch unit includes a thirteenth switch Q13 and a fifteenth switch Q15.
[0169] For reference Fig.11 With reference to the related description in the above, the sub-switch unit will not be described repeatedly in the embodiment of the present application.
[0170] In an embodiment of the present application, the foldable electronic device can control the first switch unit through a first signal and a second signal. The first signal can be a low-level signal, and the second signal can be a high-level signal.
[0171] Specifically, when the foldable electronic device is in the unfolded state, the SOC 603 sends a low level signal to the first switch unit 604, so that the ninth switch Q9, the tenth switch Q10, the fifteenth switch Q15 and the sixteenth switch Q16 are closed, and the eleventh switch Q11, the twelfth switch Q12, the thirteenth switch Q13 and the fourteenth switch Q14 are opened. Alternatively, when the foldable electronic device is in the folded state, the SOC 603 sends a high level signal to the first switch unit 604, so that the ninth switch Q9, the tenth switch Q10, the fifteenth switch Q15 and the sixteenth switch Q16 are opened, and the eleventh switch Q11, the twelfth switch Q12, the thirteenth switch Q13 and the fourteenth switch Q14 are closed.
[0172] Fig.13 A schematic diagram of the structure of a foldable electronic device provided in an embodiment of the present application is shown. Fig.13 As shown:
[0173] Exemplarily, the second switch unit 605 includes a seventeenth switch Q17, an eighteenth switch Q18, a nineteenth switch Q19, a twentieth switch Q20, a twenty-first switch Q21, a twenty-second switch Q22, a twenty-third switch Q23 and a twenty-fourth switch Q24; the seventeenth switch Q17 and the eighteenth switch Q18 are connected in sequence between the second interface 6032 and the first camera 601, the nineteenth switch Q19 and the twenty-third switch Q20 are connected in sequence between the second interface 6032 and the second camera 602, the twenty-first switch Q21 and the twenty-second switch Q22 are connected in sequence between the fourth interface 6034 and the first camera 601, and the twenty-third switch Q23 and the twenty-fourth switch Q24 are connected in sequence between the fourth interface 6034 and the second camera 602.
[0174] In one possible implementation, when the foldable electronic device is in the unfolded state, the seventeenth switch Q17, the eighteenth switch Q18, the twenty-third switch Q23, and the twenty-fourth switch Q24 are controlled to be closed, and the nineteenth switch Q19, the twentieth switch Q20, the twenty-first switch Q21, and the twenty-second switch Q22 are controlled to be opened.
[0175] In the embodiment of the present application, when the foldable electronic device is in the unfolded state, the first camera 601 is connected to the second interface 6032 and is not connected to the fourth interface 6034 , and the second camera 602 is connected to the fourth interface 6034 and is not connected to the second interface 6032 .
[0176] In another possible implementation, when the foldable electronic device is in a folded state, the nineteenth switch Q19, the twentieth switch Q20, the twenty-first switch Q21 and the twenty-second switch Q22 are controlled to be closed, and the seventeenth switch Q17, the eighteenth switch Q18, the twenty-third switch Q23 and the twenty-fourth switch Q24 are controlled to be opened.
[0177] In the embodiment of the present application, when the foldable electronic device is in the folded state, the second camera 602 is connected to the second interface 6032 and is not connected to the fourth interface 6034, and the first camera 601 is connected to the fourth interface 6034 and is not connected to the second interface 6032.
[0178] In an embodiment of the present application, when the foldable electronic device is in an unfolded state, the first camera is connected to the AO channel, and the second camera is connected to the non-AO channel; when the foldable electronic device is in a folded state, the first camera is connected to the non-AO channel, and the second camera is connected to the AO channel; thereby enabling the foldable electronic device to support dual AO scenarios.
[0179] The above embodiments illustrate the structure of the foldable electronic device in the embodiments of the present application. Fig.14 The camera control method in the embodiment of the present application is described.
[0180] Fig.14 It is shown that the embodiment of the present application provides a camera control method, such as Fig.14 As shown:
[0181] S1401: Detecting a change in the device state of the foldable electronic device; the device state includes a folded state and an unfolded state.
[0182] The device state includes a folded state and an unfolded state, and the foldable electronic device can detect a change in the device state, for example, the foldable electronic device switches from the folded state to the unfolded state, or the foldable electronic device switches from the unfolded state to the folded state.
[0183] In some embodiments, the foldable electronic device can detect the switching of the device state through a sensor. For example, the sensor can be a magnetic sensor, and the magnetic sensor of the foldable electronic device can periodically collect magnetic sensor data, and the foldable electronic device can determine the device state of the foldable electronic device based on the analysis of the magnetic sensor data.
[0184] For another example, the sensor may be a proximity light sensor. When a high reflected light intensity is detected, the foldable electronic device is determined to be in a folded state. When a low reflected light intensity is detected, the foldable electronic device is determined to be in an unfolded state. The sensor may also be an ambient light sensor, etc. The embodiments of the present application do not list the methods for detecting the device state of the foldable electronic device one by one.
[0185] S1402: Notify the SOC of the changed device status.
[0186] SOC may include an application processor (AP) and a sensor hub; the camera driver may be a camera kernel. Among them, AP can be understood as Figure 1 The CPU shown in b
[0187] After the foldable electronic device detects that the device state has switched, the framework layer can notify and send the switched device state to the kernel layer. The camera driver receives the switched device state and then notifies the SOC of the switched device state.
[0188] Specifically, the camera driver notifies the AP side of the device state after switching; or, the camera driver notifies the sensorhub side of the device state after switching.
[0189] In a possible implementation, when the AP is in the active state, the camera driver notifies the AP side of the device status after switching; when the AP is in the standby state, the camera driver notifies the sensorhub side of the device status after switching. Figure 1 As shown, the AP is in active state, which corresponds to Figure 1 The working status of AP in standby state can correspond to Figure 1 When the foldable electronic device is in a dormant state, the foldable TV device can control the first switch unit and the second switch unit based on the AP, so that the first camera and the second camera are connected to the corresponding interface. When the foldable electronic device is in a dormant state, the foldable TV device can control the first switch unit and the second switch unit based on the sensorhub, so that the first camera and the second camera are connected to the corresponding interface.
[0190] S1403: When the foldable electronic device starts the AO function, the first camera and / or the second camera are controlled based on the SOC to access interfaces matching the changed device state.
[0191] When the changed device state is the unfolded state, the first camera matches the first interface and the second interface; when the changed device state is the folded state, the second camera can match the first interface and the second interface.
[0192] The SOC can connect the first camera and the second camera to corresponding interfaces by controlling the first switch unit and the second switch unit.
[0193] The first camera and the second camera are connected to matching interfaces, which can be understood as: when the foldable electronic device is in the unfolded state, the first camera is connected to the first interface and the second interface; when the foldable electronic device is in the folded state, the second camera is connected to the first interface and the second interface.
[0194] based on Fig.14 In an embodiment, step S1403, when the foldable electronic device starts the AO function, the first camera and / or the second camera are controlled based on the SOC to access interfaces matching the changed device state respectively, including:
[0195] S1404: The AP side controls the first camera or the second camera to power off, and controls the second camera or the first camera to power on.
[0196] Specifically, when the foldable electronic device switches from a folded state to an unfolded state and the foldable electronic device enables the AO function, the AP controls the first switch unit so that the second camera is not connected to the first interface, and controls the second switch unit so that the second camera is not connected to the second interface; and, the AP controls the first switch unit so that the first camera is connected to the first interface, and controls the second switch unit so that the first camera is connected to the second interface.
[0197] Alternatively, when the foldable electronic device is switched from the unfolded state to the folded state, and the foldable electronic device enables the AO function, the AP controls the first switch unit so that the first camera is not connected to the first interface, and controls the second switch unit so that the first camera is not connected to the second interface; and the AP controls the first switch unit so that the second camera is connected to the first interface, and controls the second switch unit so that the second camera is connected to the second interface;
[0198] It should be noted that, when the AP side receives the changed device status, the foldable electronic device switches from the folded state to the unfolded state; before the device status changes, the second camera is located on the AP side, and the second camera is connected to the first interface and the second interface; after the device changes, the AP side uses the first switch unit and the second switch unit to connect the first camera to the first interface and the second interface, and the second camera is not connected to the first interface and the second interface.
[0199] Alternatively, the AP side receives the changed device status, and the foldable electronic device switches from the unfolded state to the folded state; before the device status changes, the first camera is located on the AP side, and the first camera is connected to the first interface and the second interface; after the device changes, the AP side uses the first switch unit and the second switch unit to connect the second camera to the first interface and the second interface, and the first camera is not connected to the first interface and the second interface.
[0200] In the embodiment of the present application, the control logic of the first switch unit and the second switch unit can refer to Figure 6-Figure 13 The relevant description in the embodiments of the present invention will not be repeated here.
[0201] It is understandable that after the camera is connected to the AO channel, the camera can be used as an AO camera or as a normal camera, for example Figure 1 As shown in b, in the working state, the camera can be used as a normal camera, and in the dormant state, the camera can be used as an AO camera. Therefore, in this embodiment, before the device state changes, the second camera or the first camera is connected to the AO channel, but the second camera or the first camera is on the AP side, and the second camera or the first camera is used as a normal camera; after the device state changes, the first camera or the second camera is connected to the AO channel, but the first camera or the second camera is on the AP side, and the first camera or the second camera is used as a normal camera. Before and after the device state changes, the front camera is used as a normal camera.
[0202] S1405: The sensorhub side controls the first camera or the second camera to power off, and controls the second camera or the first camera to power on.
[0203] Specifically, when the foldable electronic device switches from a folded state to an unfolded state and the foldable electronic device enables the AO function, the sensorhub controls the first switch unit so that the second camera is not connected to the first interface, and controls the second switch unit so that the second camera is not connected to the second interface; and, the sensorhub controls the first switch unit so that the first camera is connected to the first interface, and controls the second switch unit so that the first camera is connected to the second interface.
[0204] Alternatively, when the foldable electronic device switches from an unfolded state to a folded state and the foldable electronic device enables the AO function, the sensorhub controls the first switch unit so that the first camera is not connected to the first interface, and controls the second switch unit so that the first camera is not connected to the second interface; and, the sensorhub controls the first switch unit so that the second camera is connected to the first interface, and controls the second switch unit so that the second camera is connected to the second interface.
[0205] It should be noted that when the sensorhub side receives the changed device status, the foldable electronic device switches from the folded state to the unfolded state; before the device status changes, the second camera is located on the sensorhub side, and the second camera is connected to the first interface and the second interface; after the device changes, the sensorhub side uses the first switch unit and the second switch unit to connect the first camera to the first interface and the second interface, and the second camera is not connected to the first interface and the second interface.
[0206] Alternatively, the sensorhub side receives the changed device status, and the foldable electronic device switches from the unfolded state to the folded state; before the device status changes, the first camera is located on the sensorhub side, and the first camera is connected to the first interface and the second interface; after the device changes, the sensorhub side uses the first switch unit and the second switch unit to connect the second camera to the first interface and the second interface, and the first camera is not connected to the first interface and the second interface.
[0207] It can be understood that in this embodiment, before the device state changes, the second camera or the first camera is connected to the AO channel, and the second camera or the first camera is on the sensorhub side, and the second camera or the first camera is used as the AO camera; after the device state changes, the first camera or the second camera is connected to the AO channel, and the first camera or the second camera is on the sensorhub side, and the first camera or the second camera is used as the AO camera. Before and after the device state changes, the front camera is used as the AO camera.
[0208] It should be noted that the embodiment of the present application can support receiving device status through the Framework modification interface.
[0209] S1406: The sensorhub side or the AP side controls the first camera or the second camera to power off, and the AP side or the sensorhub side controls the second camera or the first camera to power on.
[0210] Specifically, or, when the foldable electronic device is switched from a folded state to an unfolded state, and the foldable electronic device enables the AO function, the sensorhub controls the first switch unit so that the second camera is not connected to the first interface, and controls the second switch unit so that the second camera is not connected to the second interface; and the AP controls the first switch unit so that the first camera is connected to the first interface, and controls the second switch unit so that the first camera is connected to the second interface;
[0211] Alternatively, when the foldable electronic device is switched from the unfolded state to the folded state, and the foldable electronic device enables the AO function, the sensorhub controls the first switch unit so that the first camera is not connected to the first interface, and controls the second switch unit so that the first camera is not connected to the second interface; and the AP controls the first switch unit so that the second camera is connected to the first interface, and controls the second switch unit so that the second camera is connected to the second interface;
[0212] Alternatively, when the foldable electronic device is switched from a folded state to an unfolded state, and the foldable electronic device enables the AO function, the AP controls the first switch unit so that the second camera is not connected to the first interface, and controls the second switch unit so that the second camera is not connected to the second interface; and the sensorhub controls the first switch unit so that the first camera is connected to the first interface, and controls the second switch unit so that the first camera is connected to the second interface;
[0213] Alternatively, when the foldable electronic device switches from an unfolded state to a folded state and the foldable electronic device enables the AO function, the AP controls the first switch unit so that the first camera is not connected to the first interface, and controls the second switch unit so that the first camera is not connected to the second interface; and the sensorhub controls the first switch unit so that the second camera is connected to the first interface, and controls the second switch unit so that the second camera is connected to the second interface.
[0214] It should be noted that, when the sensorhub side receives the changed device status, the foldable electronic device switches from the folded state to the unfolded state; before the device status changes, the second camera is located on the sensorhub side, and the second camera is connected to the first interface and the second interface; after the device changes, the sensorhub side uses the first switch unit and the second switch unit to prevent the second camera from being connected to the first interface and the second interface; the AP side uses the first switch unit and the second switch unit to connect the first camera to the first interface and the second interface.
[0215] Alternatively, the sensorhub side receives the changed device status, and the foldable electronic device switches from the unfolded state to the folded state; before the device status changes, the first camera is located on the sensorhub side, and the first camera is connected to the first interface and the second interface; after the device changes, the sensorhub side uses the first switch unit and the second switch unit to make the first camera not connected to the first interface and the second interface; the AP side uses the first switch unit and the second switch unit to make the second camera connected to the first interface and the second interface.
[0216] It can be understood that this embodiment can correspond to the scenario where the front camera is used as an AO camera before the device state changes, and the front camera is used as a normal camera after the device state changes. For example, before the device state changes, the second camera or the first camera is connected to the AO channel, and the second camera or the first camera is on the sensorhub side, and the second camera or the first camera is used as the AO camera; after the device state changes, the first camera or the second camera is connected to the AO channel, but the first camera or the second camera is on the AP side, and the first camera or the second camera is used as a normal camera.
[0217] This embodiment takes the case where the sensorhub side controls the first camera or the second camera to power off, and the AP side controls the second camera or the first camera to power on as an example, and describes the scenario where one of the two front cameras is used as an AO camera and the other as a normal camera before and after the device state changes. This embodiment can also be that the AP side controls the first camera or the second camera to power off, and the sensorhub side controls the second camera or the first camera to power on. The control principle of this process is similar to that of the embodiment of the present application, and the embodiment of the present application will not be repeated.
[0218] It should be noted that the embodiments of the present application all take the foldable electronic device as an inward-folding electronic device as an example, and exemplarily introduce the structure of the foldable electronic device and the camera control method provided by the embodiments of the present application; the structure of the foldable electronic device and the camera control method are also applicable to outward-folding electronic devices, and specific references can be made to Figure 4-Figure 14 The relevant description in the embodiments will not be repeated in the embodiments of this application.
[0219] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.
[0220] The foldable electronic device provided in the embodiment of the present application may also satisfy the following structure, such as Fig.15 As shown:
[0221] For example, foldable electronic devices can also be called terminals, terminal equipment, user equipment (UE), mobile stations (MS), mobile terminals (MT), etc. Terminal equipment can be mobile phones, smart TVs, wearable devices, tablet computers, computers with wireless transceiver functions, virtual reality (VR) terminal equipment, augmented reality (AR) terminal equipment, wireless terminals in industrial control, wireless terminals in self-driving, wireless terminals in remote medical surgery, wireless terminals in smart grids, wireless terminals in transportation safety, wireless terminals in smart cities, wireless terminals in smart homes, etc.
[0222] Among them, wearable devices can also be called wearable smart devices, which are a general term for the intelligent design and development of wearable devices for daily wear using wearable technology, such as glasses, gloves, watches, clothing and shoes. Wearable devices are portable devices that are worn directly on the body or integrated into the user's clothes or accessories. Wearable devices are not only hardware devices, but also realize powerful functions through software support, data interaction, and cloud interaction. Broadly speaking, wearable smart devices include full-featured, large-sized, and independent of smartphones to achieve complete or partial functions, such as smart watches or smart glasses, as well as those that only focus on a certain type of application function and need to be used in conjunction with other devices such as smartphones, such as various smart bracelets and smart jewelry for vital sign monitoring.
[0223] In addition, in the embodiments of the present application, the terminal device may also be a terminal device in the Internet of Things (IoT) system. IoT is an important part of the future development of information technology. Its main technical feature is to connect objects to the network through communication technology, thereby realizing an intelligent network of human-machine interconnection and object-to-object interconnection. The embodiments of the present application do not limit the specific technology and specific device form adopted by the terminal device.
[0224] In an embodiment of the present application, the terminal device may include a hardware layer, an operating system layer running on the hardware layer, and an application layer running on the operating system layer. The hardware layer includes hardware such as a central processing unit (CPU), a memory management unit (MMU), and a memory (also called main memory). The operating system may be any one or more computer operating systems that implement business processing through processes, such as a Linux operating system, a Unix operating system, an Android operating system, an iOS operating system, or a Windows operating system. The application layer includes applications such as browsers, address books, word processing software, and instant messaging software.
[0225] In order to better understand the embodiments of the present application, the structure of the foldable electronic device in the embodiments of the present application is introduced below:
[0226] Fig.15 The structure diagram of the foldable electronic device 100 is shown. The foldable electronic device 100 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, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor, a gyroscope sensor, an air pressure sensor, a magnetic sensor 180D, an acceleration sensor, a distance sensor, a proximity light sensor, a fingerprint sensor, a temperature sensor, a touch sensor, an ambient light sensor, a bone conduction sensor, etc.
[0227] It is understood that the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the foldable electronic device 100. In other embodiments of the present application, the foldable electronic device 100 may include more or fewer components than shown in the figure, or combine some components, or split some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.
[0228] The processor 110 may include one or more processing units, for example, the processor 110 may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.
[0229] The processor 110 of the foldable electronic device 100 may also include a low-power CPU, namely a sensor hub. The main function of the sensor hub is to connect and process data from various sensor devices. It is a fast memory that can be directly accessed and occupies approximately several hundred KB of memory space. Therefore, processing sensor data through the sensor hub can reduce the operating power consumption of the electronic device.
[0230] The controller can generate operation control signals according to the instruction operation code and timing signal to complete the control of instruction fetching and execution.
[0231] The processor 110 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may store instructions or data that the processor 110 has just used or cyclically used. If the processor 110 needs to use the instruction or data again, it may be called from the memory. This avoids repeated access, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.
[0232] In some embodiments, the processor 110 may include one or more interfaces. The interface may include an integrated circuit (IC). 2 C) interface, integrated circuit built-in audio (inter-integratedcircuitsound, I 2S) interface, pulse code modulation (PCM) interface, universal asynchronous receiver / transmitter (UART) interface, mobile industry processor interface (MIPI), general-purpose input / output (GPIO) interface, subscriber identity module (SIM) interface, and / or universal serial bus (USB) interface, etc.
[0233] I 2 The I C interface is a bidirectional synchronous serial bus that includes a serial data line (SDA) and a serial clock line (SCL). In some embodiments, the processor 110 may include multiple I 2 The processor 110 can be connected to the I 2 The C bus interface is coupled to the touch sensor 180K, the charger, the flash, the camera 193, etc. For example, the processor 110 can be connected to the touch sensor 180K through the I 2 The touch sensor 180K is coupled to the processor 110 via the I 2 C bus interface communication to realize the touch function of the foldable electronic device 100. In the embodiment of the present application, the second interface and the fourth interface may include I 2 C interface, SOC can be based on I 2 C bus to send or receive control signals.
[0234] The MIPI interface can be used to connect the processor 110 with peripheral devices such as the display screen 194 and the camera 193. The MIPI interface includes a camera serial interface (CSI), a display serial interface (DSI), etc. In some embodiments, the processor 110 and the camera 193 communicate via the CSI interface to realize the shooting function of the foldable electronic device 100. The processor 110 and the display screen 194 communicate via the DSI interface to realize the display function of the foldable electronic device 100. In an embodiment of the present application, the first interface and the third interface may include a MIPI interface, and the SOC may receive image data from the camera based on the MIPI interface.
[0235] The GPIO interface can be configured by software. The GPIO interface can be configured as a control signal or as a data signal. In some embodiments, the GPIO interface can be used to connect the processor 110 with the camera 193, the display 194, the wireless communication module 160, the audio module 170, the sensor module 180, etc. The GPIO interface can also be configured as an I2C interface, an I2S interface, a UART interface, a MIPI interface, etc. In an embodiment of the present application, the fifth interface may include a GPIO interface, and the SOC may communicate with the first switch unit and the second switch unit based on the GPIO interface.
[0236] It is understandable that the interface connection relationship between the modules illustrated in the embodiment of the present application is a schematic illustration and does not constitute a structural limitation on the foldable electronic device 100. In other embodiments of the present application, the foldable electronic device 100 may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.
[0237] The foldable electronic device 100 implements the display function through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, which connects the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs that execute program instructions to generate or change display information.
[0238] The display screen 194 is used to display images, videos, etc. The display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-oLed, a quantum dot light-emitting diode (QLED), etc. In some embodiments, the foldable electronic device 100 may include 1 or N display screens 194, where N is a positive integer greater than 1.
[0239] The foldable electronic device 100 can realize the shooting function through ISP, camera 193, video codec, GPU, display screen 194 and application processor.
[0240] ISP is used to process the data fed back by camera 193. For example, when taking a photo, the shutter is opened, and the light is transmitted to the camera photosensitive element through the lens. The light signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical signal to ISP for processing and converts it into an image visible to the naked eye. ISP can also perform algorithm optimization on the noise, brightness, and skin color of the image. ISP can also optimize the exposure, color temperature and other parameters of the shooting scene. In some embodiments, ISP can be set in camera 193.
[0241] The camera 193 is used to capture still images or videos. The object generates an optical image through the lens and projects it onto the photosensitive element. The photosensitive element can be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the optical signal into an electrical signal, and then passes the electrical signal to the ISP to be converted into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in a standard RGB, YUV or other format. In some embodiments, the foldable electronic device 100 may include 1 or N cameras 193, where N is a positive integer greater than 1.
[0242] 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 also continuously self-learn. Through NPU, applications such as intelligent cognition of the foldable electronic device 100 can be realized, such as image recognition, face recognition, voice recognition, text understanding, etc.
[0243] The internal memory 121 can be used to store computer executable program codes, and the executable program codes include instructions. The internal memory 121 may include a program storage area and a data storage area. Among them, the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc. The data storage area may store data created during the use of the foldable electronic device 100 (such as audio data, a phone book, etc.), etc. In addition, the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc. The processor 110 executes various functional applications and data processing of the foldable electronic device 100 by running instructions stored in the internal memory 121 and / or instructions stored in a memory provided in the processor.
[0244] The magnetic sensor 180D includes a Hall sensor. The foldable electronic device 100 can use the magnetic sensor 180D to detect the opening and closing of the flip leather case. In some embodiments, when the foldable electronic device 100 is a flip machine, the foldable electronic device 100 can detect the opening and closing of the flip according to the magnetic sensor 180D. Then, according to the detected opening and closing state of the leather case or the opening and closing state of the flip, the characteristics such as automatic unlocking of the flip are set. In the embodiment of the present application, the foldable electronic device can use a magnetic sensor to detect the device status.
[0245] The software system of the foldable electronic device 100 may adopt a layered architecture, an event-driven architecture, a micro-core architecture, a micro-service architecture, or a cloud architecture, etc. The embodiment of the present application takes the Android system of the layered architecture as an example to exemplify the software structure of the foldable electronic device 100.
[0246] Fig.16 It is a software structure block diagram of the electronic device 100 according to an embodiment of the present application.
[0247] The layered architecture divides the software into several layers, each with a clear role and division of labor. The layers communicate with each other through software interfaces. In some embodiments, the Android system may include: application layer (applications), application framework layer (application framework), hardware abstract layer (HAL) and kernel layer (kernel), where the kernel layer may become a driver layer.
[0248] The application layer can include a series of application packages.
[0249] like Fig.16 As shown, the application package may include third-party applications and AO applications, for example, the third-party applications may be music applications, video applications, game applications, social applications, etc. The AO application may be an application that can implement AO services.
[0250] The application framework layer provides an application programming interface (API) and a programming framework for the applications in the application layer. The application framework layer includes some predefined functions.
[0251] like Fig.16 As shown, the application framework layer may include a window manager, a content provider, a resource manager, a view system, a notification manager, a camera access interface, an activity manager, and the like.
[0252] The 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, touch the screen, drag the screen, capture the screen, etc.
[0253] Content providers are used to store and retrieve data and make it accessible to applications. The data can include videos, images, audio, calls made and received, browsing history and bookmarks, phone books, etc.
[0254] The view system includes visual controls, such as controls for displaying text, controls for displaying images, etc. The view system can be used to build applications. A display interface can be composed of one or more views. For example, a display interface including a text notification icon can include a view for displaying text and a view for displaying images.
[0255] The resource manager provides various resources for applications, such as localized strings, icons, images, layout files, video files, and so on.
[0256] The notification manager enables applications to display notification information in the status bar. It can be used to convey notification-type messages and can disappear automatically 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 a notification that appears in the system top status bar in the form of a chart or scroll bar text, such as notifications of applications running in the background, or a notification that appears on the screen in the form of a dialog window. For example, a text message is displayed in the status bar, a prompt sound is emitted, the terminal device vibrates, the indicator light flashes, etc.
[0257] The activity manager is responsible for managing the startup, status, life cycle and other activities of the application. Among them, activity is an application component that can provide an interface for users to interact with the terminal device through the interface to complete a task.
[0258] The camera access interface allows applications to manage cameras and access camera devices. For example, multiple physical cameras can be encapsulated into a logical camera so that third-party applications can call them; for example, AO applications can call physical cameras through the camera access interface.
[0259] The hardware abstraction layer may include multiple library modules, such as a camera hardware abstraction layer module. The Android system may load the corresponding library module for the device hardware, thereby achieving the purpose of the application framework layer accessing the device hardware. In an embodiment of the present application, the camera hardware abstraction layer includes multiple camera devices, for example, physical camera 0, physical camera 1, physical camera 2, and physical camera 3. Among them, physical camera 0 may be a front camera set on the inner screen, which can be used as a normal camera; physical camera 1 may be a front camera set on the inner screen, which can be used as an AO camera; physical camera 2 may be a front camera set on the outer screen, which can be used as a normal camera; and physical camera 3 may be a front camera set on the outer screen, which can be used as an AO camera.
[0260] The kernel layer is a layer between hardware and software. The kernel layer is used to drive the hardware to make it work. The kernel layer may include camera device drivers, display drivers, audio drivers, etc. In an embodiment of the present application, the camera driver may include multiple physical camera drivers, for example, drivers for physical camera 0, physical camera 1, physical camera 2, and physical camera 3. Among them, physical camera 0 can be a front camera set on the inner screen, which can be used as a normal camera; physical camera 1 can be a front camera set on the inner screen, which can be used as an AO camera; physical camera 2 can be a front camera set on the outer screen, which can be used as a normal camera; and physical camera 3 can be a front camera set on the outer screen, which can be used as an AO camera.
[0261] The hardware layer may include various types of sensors, for example, the sensor may be a camera sensor, and the camera sensor includes a first camera and a second camera.
[0262] It should be noted that, in the embodiment of the present application, the workflow of the first camera and the second camera can be divided into two parts; one part is as follows: Fig.15 The other part is shown as Fig.15 As shown by the solid line in .
[0263] In some embodiments, the compatibility of some third-party applications with foldable electronic devices may be relatively low. When calling the front camera, the third-party application will not choose to call the front camera in the folded state or the front camera in the unfolded state according to the device state of the foldable electronic device. For example, if a user wants to use a social application to make a video call, the social application needs to turn on the front camera, but the social application cannot distinguish whether to start the front camera in the folded state or the front camera in the unfolded state. At this time, the social application can call the logical (front) camera through the camera access interface, for example, calling the physical camera 0 and the physical camera 2. The first camera and / or the second camera can be used as an ordinary camera. For example, an ordinary camera can be suitable for scenes such as taking pictures, recording videos and video calls.
[0264] In the usage scenario, after the first camera and / or the second camera captures image data, the image data is transmitted to the kernel layer through the CSI bus, and the drivers of the physical camera 0 and the physical camera 2 of the kernel layer report the image data to the hardware abstraction layer; the physical camera 0 and the physical camera 2 in the hardware abstraction layer transmit the image data to the social application through the logical camera in the camera access interface, so that the foldable electronic device can realize video calls based on the social application.
[0265] In other embodiments, the AO application may be a self-developed application. The compatibility of the AO application and the foldable electronic device is often high. When calling the front camera, the AO application can determine whether the front camera to be scheduled is the front camera in the folded state or the front camera in the unfolded state. Therefore, there is no need to encapsulate the physical camera as a logical camera. The AO application can call the physical camera. For example, the AO application can call the physical camera 1 and the physical camera 3 in the hardware abstraction layer through the camera access interface. The first camera and / or the second camera can be used as the AO camera. For example, the AO camera can be used in scenarios such as off-screen face detection, air gesture control, and flip-and-scan.
[0266] In the usage scenario, after the first camera and / or the second camera captures image data, the image data is transmitted to the kernel layer through the CSI bus, and the drivers of the physical camera 1 and the physical camera 3 of the kernel layer report the image data to the hardware abstraction layer; the physical camera 1 and the physical camera 3 in the hardware abstraction layer transmit the image data to the AO application through the camera access interface, so that the foldable electronic device can realize off-screen face detection, air gesture control, and flip-and-scan based on the AO application.
[0267] The camera control method of the embodiment of the present application has been described above, and the device for executing the camera control method provided by the embodiment of the present application is described below. Those skilled in the art can understand that the method and the device can be combined and referenced with each other, and the relevant device provided by the embodiment of the present application can execute the steps in the camera control method.
[0268] like Fig.17 As shown, Fig.17 A structural schematic diagram of a camera control device provided in an embodiment of the present application. The camera control device may be a terminal device in an embodiment of the present application, or a chip or chip system in the terminal device.
[0269] like Fig.17 As shown, the camera control device 1700 can be used in a communication device, a circuit, a hardware component or a chip, and the camera control device includes: a display unit 1701 and a processing unit 1702. The display unit 1701 is used to support the display step performed by the camera control device 1700; the processing unit 1702 is used to support the camera control device 1700 to perform the information processing step.
[0270] In a possible implementation, the camera control device 1700 may also include a communication unit 1703. Specifically, the communication unit is used to support the camera control device 1700 to perform the steps of sending and receiving data. The communication unit 1703 may be an input or output interface, a pin or a circuit.
[0271] In a possible embodiment, the camera control device may further include: a storage unit 1704. The processing unit 1702 and the storage unit 1704 are connected via a line. The storage unit 1704 may include one or more memories, and the memory may be a device used to store programs or data in one or more devices or circuits. The storage unit 1704 may exist independently and be connected to the processing unit 1702 of the camera control device via a communication line. The storage unit 1704 may also be integrated with the processing unit 1702.
[0272] The storage unit 1704 can store computer-executable instructions of the method in the terminal device so that the processing unit 1702 executes the method in the above embodiment. The storage unit 1704 can be a register, a cache, or a RAM, etc. The storage unit 1704 can be integrated with the processing unit 1702. The storage unit 1704 can be a read-only memory (ROM) or other types of static storage devices that can store static information and instructions, and the storage unit 1704 can be independent of the processing unit 1702.
[0273] The camera control method provided in the embodiment of the present application can be applied to electronic devices with communication functions. The electronic devices include terminal devices, and the specific device form of the terminal devices can refer to the above related descriptions, which will not be repeated here.
[0274] An embodiment of the present application provides a terminal device, which includes: a processor and a memory; the memory stores computer-executable instructions; the processor executes the computer-executable instructions stored in the memory, so that the terminal device executes the above method.
[0275] The embodiment of the present application provides a chip. The chip includes a processor, and the processor is used to call a computer program in a memory to execute the technical solution in the above embodiment. Its implementation principle and technical effect are similar to those of the above related embodiments, and will not be repeated here.
[0276] The embodiments of the present application also provide a computer-readable storage medium. The computer-readable storage medium stores a computer program. The above method is implemented when the computer program is executed by the processor. The method described in the above embodiment can be implemented in whole or in part by software, hardware, firmware, or any combination thereof. If implemented in software, the function can be stored as one or more instructions or codes on a computer-readable medium or transmitted on a computer-readable medium. Computer-readable media can include computer storage media and communication media, and can also include any medium that can transfer a computer program from one place to another. The storage medium can be any target medium that can be accessed by a computer.
[0277] In one possible implementation, a computer-readable medium may include RAM, ROM, compact disc read-only memory (CD-ROM) or other optical disk storage, disk storage or other magnetic storage devices, or any other medium that is intended to carry or store the required program code in the form of instructions or data structures and can be accessed by a computer. Moreover, any connection is appropriately referred to as a computer-readable medium. For example, if a coaxial cable, fiber optic cable, twisted pair, digital subscriber line (DSL) or wireless technology (such as infrared, radio and microwave) is used to transmit software from a website, server or other remote source, the coaxial cable, fiber optic cable, twisted pair, DSL or wireless technology such as infrared, radio and microwave are included in the definition of medium. Disks and optical disks as used herein include optical disks, laser disks, optical disks, digital versatile disks (DVD), floppy disks and Blu-ray disks, where disks usually reproduce data magnetically, while optical disks reproduce data optically using lasers. Combinations of the above should also be included in the scope of computer-readable media.
[0278] An embodiment of the present application provides a computer program product, which includes a computer program. When the computer program is executed, the computer executes the above method.
[0279] The embodiments of the present application are described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processing unit of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable device to generate a machine, so that the instructions executed by the processing unit of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0280] The above specific implementation methods further illustrate the purpose, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above are only specific implementation methods of the present invention and are not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc. made on the basis of the technical solutions of the present invention should be included in the scope of protection of the present invention.
Claims
1. A foldable electronic device, It is characterized in that The foldable electronic device comprises a first camera, a second camera, a system-on-chip (SOC), a first switch unit and a second switch unit; wherein, when the foldable electronic device is in a folded state, the first camera is blocked by the folded screen, and the second camera is not blocked by the folded screen; the SOC comprises a first interface and a second interface, the first interface supports an AO function, and the second interface is used to transmit a control signal with the first camera or the second camera; The foldable electronic device is used to control the first switch unit so that the first camera is connected to the first interface and the second camera is not connected to the first interface, and control the second switch unit so that the first camera is connected to the second interface and the second camera is not connected to the second interface when the foldable electronic device is in an unfolded state and the AO function is enabled; The foldable electronic device is configured to, when the foldable electronic device is in a folded state and the foldable electronic device enables the AO function, control the first switch unit so that the second camera is connected to the first interface and the first camera is not connected to the first interface, and control the second switch unit so that the second camera is connected to the second interface and the first camera is not connected to the second interface; The SOC further includes a fifth interface, and the fifth interface is used to transmit control signals with the first switch unit and the second switch unit to control control logics of the first switch unit and the second switch unit.
2. The foldable electronic device according to claim 1, It is characterized in that The SOC further includes a third interface and a fourth interface, the third interface does not support the AO function, and the fourth interface is used to transmit a control signal with the first camera or the second camera; The foldable electronic device is also used to control the first switch unit so that the second camera is connected to the third interface, and to control the second switch unit so that the second camera is connected to the fourth interface when the foldable electronic device is in the unfolded state and the AO function is enabled.
3. The foldable electronic device according to claim 1, It is characterized in that The first switch unit includes a first switch, a second switch, a third switch and a fourth switch, the first switch is connected between the first interface and the first camera, the second switch and the third switch are connected between the first interface and the second camera in sequence, and the fourth switch is connected between the third interface and the second camera; The second switch unit includes a fifth switch, a sixth switch, a seventh switch and an eighth switch, the fifth switch is connected between the second interface and the first camera, the sixth switch and the seventh switch are connected between the second interface and the second camera in sequence, and the eighth switch is connected between the fourth interface and the second camera; The foldable electronic device is specifically configured to control the first switch to be closed and the second switch to be opened when the foldable electronic device is in an unfolded state and the AO function is enabled, so that the first camera is connected to the first interface and the second camera is not connected to the first interface; and controlling the fifth switch to be closed and the sixth switch to be open, so that the first camera is connected to the second interface and the second camera is not connected to the second interface; The foldable electronic device is specifically used to control the second switch and the third switch to be closed, and the first switch and the fourth switch to be opened, when the foldable electronic device is in a folded state and the foldable electronic device enables the AO function, so that the second camera is connected to the first interface and the first camera is not connected to the first interface; And, the sixth switch and the seventh switch are controlled to be closed, and the fifth switch and the eighth switch are controlled to be opened, so that the second camera is connected to the second interface, and the first camera is not connected to the second interface.
4. The foldable electronic device according to claim 3, It is characterized in that The foldable electronic device is specifically used to control the third switch to be disconnected and the fourth switch to be closed, so that the second camera is connected to the third interface, and to control the seventh switch to be disconnected and the eighth switch to be closed, so that the second camera is connected to the fourth interface, when the foldable electronic device is in the unfolded state and the AO function is enabled.
5. The foldable electronic device according to any one of claims 1 to 4, It is characterized in that in, When the SOC sends a first signal to the first switch unit and the second switch unit through the fifth interface, the first switch, the fourth switch, the fifth switch and the eighth switch are closed, and the second switch, the third switch, the sixth switch and the seventh switch are opened; When the SOC sends a second signal to the first switch unit and the second switch unit through the fifth interface, the first switch, the fourth switch, the fifth switch and the eighth switch are opened, and the second switch, the third switch, the sixth switch and the seventh switch are closed.
6. The foldable electronic device according to claim 1, It is characterized in that The foldable electronic device is also used to control the first switch unit so that the first camera is connected to the third interface when the foldable electronic device is in a folded state and the foldable electronic device enables the AO function; and control the second switch unit so that the first camera is connected to the fourth interface.
7. The foldable electronic device according to claim 6, It is characterized in that The first switch unit includes a ninth switch, a tenth switch, an eleventh switch, a twelfth switch, a thirteenth switch, a fourteenth switch, a fifteenth switch and a sixteenth switch; the ninth switch and the tenth switch are sequentially connected between the first interface and the first camera, the eleventh switch and the twelfth switch are sequentially connected between the first interface and the second camera, the thirteenth switch and the fourteenth switch are sequentially connected between the third interface and the first camera, and the fifteenth switch and the sixteenth switch are sequentially connected between the third interface and the second camera; Wherein, when the foldable electronic device is in the unfolded state, the ninth switch, the tenth switch, the fifteenth switch and the sixteenth switch are controlled to be closed, and the eleventh switch, the twelfth switch, the thirteenth switch and the fourteenth switch are controlled to be opened; Alternatively, when the foldable electronic device is in a folded state, the eleventh switch, the twelfth switch, the thirteenth switch and the fourteenth switch are controlled to be closed, and the ninth switch, the tenth switch, the fifteenth switch and the sixteenth switch are controlled to be opened.
8. The foldable electronic device according to claim 6, It is characterized in that The second switch unit includes a seventeenth switch, an eighteenth switch, a nineteenth switch, a twentieth switch, a twenty-first switch, a twenty-second switch, a twenty-third switch and a twenty-fourth switch; the seventeenth switch and the eighteenth switch are sequentially connected between the second interface and the first camera, the nineteenth switch and the twenty-third switch are sequentially connected between the second interface and the second camera, the twenty-first switch and the twenty-second switch are sequentially connected between the fourth interface and the first camera, and the twenty-third switch and the twenty-fourth switch are sequentially connected between the fourth interface and the second camera; Wherein, when the foldable electronic device is in the unfolded state, the seventeenth switch, the eighteenth switch, the twenty-third switch and the twenty-fourth switch are controlled to be closed, and the nineteenth switch, the twentieth switch, the twenty-first switch and the twenty-second switch are controlled to be opened; Alternatively, when the foldable electronic device is in a folded state, the nineteenth switch, the twentieth switch, the twenty-first switch and the twenty-second switch are controlled to be closed, and the seventeenth switch, the eighteenth switch, the twenty-third switch and the twenty-fourth switch are controlled to be opened.
9. The foldable electronic device according to claim 1, It is characterized in that The foldable electronic device is also used to: when the foldable electronic device is in the power-on state and the AO function of the foldable electronic device is enabled, control the first switch unit so that the first camera is connected to the first interface and the second camera is connected to the third interface; and control the second switch unit so that the first camera is connected to the second interface and the second camera is connected to the fourth interface.
10. A camera control method, applied to the foldable electronic device according to any one of claims 1 to 9, wherein the method include: When the foldable electronic device is in an unfolded state and the foldable electronic device enables the AO function, the first switch unit is controlled so that the first camera is connected to the first interface and the second camera is not connected to the first interface, and the second switch unit is controlled so that the first camera is connected to the second interface and the second camera is not connected to the second interface; When the foldable electronic device is in a folded state and the foldable electronic device enables the AO function, the first switch unit is controlled so that the second camera is connected to the first interface, and the first camera is not connected to the first interface, and the second switch unit is controlled so that the second camera is connected to the second interface, and the first camera is not connected to the second interface.
11. The method according to claim 10, It is characterized in that The method further comprises: When the foldable electronic device is in an unfolded state and the foldable electronic device enables the AO function, the first switch unit is controlled to connect the second camera to the third interface, and the second switch unit is controlled to connect the second camera to the fourth interface.
12. The method according to claim 10, It is characterized in that The method comprises: When the foldable electronic device is in an unfolded state and the foldable electronic device enables the AO function, the first switch is controlled to be closed and the second switch is disconnected, so that the first camera is connected to the first interface and the second camera is not connected to the first interface; and the fifth switch is controlled to be closed and the sixth switch is disconnected, so that the first camera is connected to the second interface and the second camera is not connected to the second interface; When the foldable electronic device is in a folded state and the foldable electronic device enables the AO function, the second switch and the third switch are controlled to be closed, and the first switch and the fourth switch are controlled to be disconnected, so that the second camera is connected to the first interface, and the first camera is not connected to the first interface; and the sixth switch and the seventh switch are controlled to be closed, and the fifth switch and the eighth switch are controlled to be disconnected, so that the second camera is connected to the second interface, and the first camera is not connected to the second interface.
13. The method according to claim 12, It is characterized in that The method comprises: When the foldable electronic device is in an unfolded state and the foldable electronic device enables the AO function, the third switch is controlled to be disconnected and the fourth switch is controlled to be closed, so that the second camera is connected to the third interface; and the seventh switch is controlled to be disconnected and the eighth switch is controlled to be closed, so that the second camera is connected to the fourth interface.
14. The method according to any one of claims 10 to 13, It is characterized in that Also includes: The SOC sends a first signal to the first switch unit and the second switch unit to control the first switch, the fourth switch, the fifth switch and the eighth switch to be closed, and the second switch, the third switch, the sixth switch and the seventh switch to be opened; The SOC sends a second signal to the first switch unit and the second switch unit to control the first switch, the fourth switch, the fifth switch and the eighth switch to be opened, and the second switch, the third switch, the sixth switch and the seventh switch to be closed.
15. The method according to claim 10, It is characterized in that Also includes: When the foldable electronic device is in a folded state and the foldable electronic device enables the AO function, the first switch unit is controlled to enable the first camera to connect to the third interface; and the second switch unit is controlled to enable the first camera to connect to the fourth interface.
16. The method according to claim 15, It is characterized in that include: When the foldable electronic device is in an unfolded state, the ninth switch, the tenth switch, the fifteenth switch and the sixteenth switch are controlled to be closed, and the eleventh switch, the twelfth switch, the thirteenth switch and the fourteenth switch are controlled to be opened; Alternatively, when the foldable electronic device is in a folded state, the eleventh switch, the twelfth switch, the thirteenth switch and the fourteenth switch are controlled to be closed, and the ninth switch, the tenth switch, the fifteenth switch and the sixteenth switch are controlled to be opened.
17. The method according to claim 15, It is characterized in that Also includes: When the foldable electronic device is in an unfolded state, the seventeenth switch, the eighteenth switch, the twenty-third switch and the twenty-fourth switch are controlled to be closed, and the nineteenth switch, the twentieth switch, the twenty-first switch and the twenty-second switch are controlled to be opened; Alternatively, when the foldable electronic device is in a folded state, the nineteenth switch, the twentieth switch, the twenty-first switch and the twenty-second switch are controlled to be closed, and the seventeenth switch, the eighteenth switch, the twenty-third switch and the twenty-fourth switch are controlled to be opened.
18. The method according to claim 10, It is characterized in that Also includes: When the foldable electronic device is in the power-on state and the AO function is enabled, the first switch unit is controlled so that the first camera is connected to the first interface and the second camera is connected to the third interface; and the second switch unit is controlled so that the first camera is connected to the second interface and the second camera is connected to the fourth interface.
19. The method according to claim 10, It is characterized in that Also includes: Detecting a change in the device state of the foldable electronic device; the device state includes a folded state and an unfolded state; Notify the SOC of the changed device status; Based on the SOC, the first camera and / or the second camera are controlled to respectively connect to interfaces matching the changed device state, wherein when the changed device state is an unfolded state, the first camera matches the first interface and the second interface; when the changed device state is a folded state, the second camera can match the first interface and the second interface.
20. The method according to claim 19, It is characterized in that The SOC includes an application processor AP and a sensor hub sensorhub; based on the SOC, controlling the first camera and / or the second camera to access interfaces matching the changed device state respectively includes: When the foldable electronic device is switched from a folded state to an unfolded state, and the foldable electronic device enables the AO function, the sensorhub controls the first switch unit so that the second camera is not connected to the first interface, and controls the second switch unit so that the second camera is not connected to the second interface; and the sensorhub controls the first switch unit so that the first camera is connected to the first interface, and controls the second switch unit so that the first camera is connected to the second interface; Alternatively, when the foldable electronic device is switched from the unfolded state to the folded state, and the foldable electronic device enables the AO function, the sensorhub controls the first switch unit so that the first camera is not connected to the first interface, and controls the second switch unit so that the first camera is not connected to the second interface; and the sensorhub controls the first switch unit so that the second camera is connected to the first interface, and controls the second switch unit so that the second camera is connected to the second interface; Alternatively, when the foldable electronic device is switched from a folded state to an unfolded state, and the foldable electronic device enables the AO function, the AP controls the first switch unit so that the second camera is not connected to the first interface, and controls the second switch unit so that the second camera is not connected to the second interface; and the AP controls the first switch unit so that the first camera is connected to the first interface, and controls the second switch unit so that the first camera is connected to the second interface; Alternatively, when the foldable electronic device is switched from an unfolded state to a folded state, and the foldable electronic device enables the AO function, the AP controls the first switch unit so that the first camera is not connected to the first interface, and controls the second switch unit so that the first camera is not connected to the second interface; and the AP controls the first switch unit so that the second camera is connected to the first interface, and controls the second switch unit so that the second camera is connected to the second interface; Alternatively, when the foldable electronic device is switched from a folded state to an unfolded state, and the foldable electronic device enables the AO function, the sensorhub controls the first switch unit so that the second camera is not connected to the first interface, and controls the second switch unit so that the second camera is not connected to the second interface; and the AP controls the first switch unit so that the first camera is connected to the first interface, and controls the second switch unit so that the first camera is connected to the second interface; Alternatively, when the foldable electronic device is switched from the unfolded state to the folded state, and the foldable electronic device enables the AO function, the sensorhub controls the first switch unit so that the first camera is not connected to the first interface, and controls the second switch unit so that the first camera is not connected to the second interface; and the AP controls the first switch unit so that the second camera is connected to the first interface, and controls the second switch unit so that the second camera is connected to the second interface; Alternatively, when the foldable electronic device is switched from a folded state to an unfolded state, and the foldable electronic device enables the AO function, the AP controls the first switch unit so that the second camera is not connected to the first interface, and controls the second switch unit so that the second camera is not connected to the second interface; and the sensorhub controls the first switch unit so that the first camera is connected to the first interface, and controls the second switch unit so that the first camera is connected to the second interface; Alternatively, when the foldable electronic device switches from an unfolded state to a folded state, and the foldable electronic device enables the AO function, the AP controls the first switch unit so that the first camera is not connected to the first interface, and controls the second switch unit so that the first camera is not connected to the second interface; and the sensorhub controls the first switch unit so that the second camera is connected to the first interface, and controls the second switch unit so that the second camera is connected to the second interface.
21. A computer-readable storage medium storing a computer program. It is characterized in that When the computer program is executed by a processor, the method according to any one of claims 10 to 20 is implemented.
22. A computer program product, It is characterized in that The method comprises a computer program, which, when being executed, enables a computer to execute the method according to any one of claims 10 to 20.
