Camera module switching method and device, equipment, storage medium and chip
By acquiring and analyzing the sensing data in the terminal device and automatically switching the camera module, the problem of manual operation of lens switching in the prior art is solved, and the smoothness of the terminal device is improved and the operation convenience of the terminal device is improved.
Patent Information
- Application Number
- CN202311002252.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-09
- Publication Date
- 2025-02-18
- Estimated Expiration
- 2043-08-09
AI Technical Summary
In existing terminal devices, lens switching requires manual operation by users, resulting in reduced fluency in use and inconvenient operation.
By acquiring the first sensing data and the second sensing data, the screen states of the first and second screens are determined, and the corresponding camera modules are automatically switched according to these states.
It realizes automatic and intelligent switching of camera modules in terminal devices, improving the smoothness of use and operation convenience.
Smart Images

Figure CN119484739A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of terminal technology, and in particular to a camera module switching method, device, equipment, storage medium and chip. Background Art
[0002] With the continuous development of terminal technology and display technology, terminal devices with foldable display screens have emerged. At present, the camera function is a common function provided by terminal devices. Users can make video calls, take photos or record videos through the lens on the terminal device. Terminal devices with foldable screens are equipped with inner and outer screen lenses. The current existing lens switching solution is to manually switch the inner and outer screen lenses according to user needs. However, this lens switching solution requires manual operation by the user, which greatly reduces the fluency of terminal use and is not convenient to operate. Summary of the invention
[0003] In order to overcome the problems existing in the related art, the present disclosure provides a camera module switching method, device, equipment, storage medium and chip to solve the technical problems existing in the above-mentioned related art such as reduced fluency of terminal use and inconvenient operation.
[0004] According to a first aspect of an embodiment of the present disclosure, a camera module switching method is provided, including:
[0005] Acquire first sensor data and second sensor data, wherein the first sensor data is obtained by monitoring the screen state of the first screen based on the first sensor, and the second sensor data is obtained by monitoring the screen state of the second screen based on the second sensor;
[0006] Determining respective screen states of the first screen and the second screen based on the first sensing data and the second sensing data;
[0007] Based on the respective screen states of the first screen and the second screen, a first camera module corresponding to the first screen and a second camera module corresponding to the second screen are switched.
[0008] In some embodiments, the first sensor data and the second sensor data respectively include acceleration data, and determining the screen states of the first screen and the second screen based on the first sensor data and the second sensor data includes:
[0009] Decomposing and calculating the acceleration data in the target sensing data to obtain a target angle between gravity components in the first axis direction and the second axis direction corresponding to the acceleration data;
[0010] Performing conversion processing on the target angle to obtain a screen state of a target screen corresponding to the target sensing data;
[0011] Among them, the first axis direction and the second axis direction are two axis directions of the plane coordinate system where the target screen is located, the target sensing data includes the first sensing data or the second sensing data, the target screen includes the first screen or the second screen, and the screen state is used to indicate the angle between the target screen and the ground.
[0012] In some embodiments, the screen state includes any one of the following: a first state, a second state, a third state and a fourth state, wherein different screen states are used to indicate that the processed target angle is located in different preset angle intervals, and the processed target angle is the angle between the target screen and the ground.
[0013] In some embodiments, the screen state further includes a fifth state, and the method further includes:
[0014] Determining whether the target sensing data meets a preset posture condition;
[0015] If yes, continue to execute the step of decomposing and calculating the acceleration data in the target sensing data; otherwise, determine that the screen state of the target screen is the fifth state;
[0016] Among them, the preset posture condition includes that the modulus value of the acceleration data in the target sensor data is not within a preset range interval, and / or, the angle between the gravity component of the acceleration data in the target sensor data in the third axis direction and the center of gravity of the target screen in the preset gravity direction is in a preset first interval, and the third axis direction is the axis direction perpendicular to the plane coordinate system where the target screen is located.
[0017] In some embodiments, the switching process of the first camera module corresponding to the first screen and the second camera module corresponding to the second screen based on the respective screen states of the first screen and the second screen includes:
[0018] When the screen states of the first screen and the second screen respectively meet a preset state condition, switching processing is performed on a first camera module corresponding to the first screen and a second camera module corresponding to the second screen;
[0019] The preset state condition includes a screen state indication of the target screen, wherein the angle between the target screen and the ground is in a preset second interval, and the screen angle between the first screen and the second screen is in a preset third interval.
[0020] In some embodiments, the preset state condition is that the screen states of the first screen and the second screen respectively include the second state and the fifth state; or, the preset state condition is that the screen states of the first screen and the second screen respectively include the fourth state and the fifth state.
[0021] In some embodiments, if the first camera module is an external screen camera module and the second camera module is an internal screen camera module, the switching process of the first camera module corresponding to the first screen and the second camera module corresponding to the second screen includes:
[0022] When the preset state condition is that the screen states of the first screen and the second screen respectively include the second state and the fifth state, the first camera module is switched to the second camera module to use the second camera module for shooting; or
[0023] When the preset state condition is that the screen states of the first screen and the second screen respectively include the fourth state and the fifth state, the second camera module is switched to the first camera module to adopt the first camera module for shooting.
[0024] In some embodiments, the method further comprises:
[0025] Output the target state; or,
[0026] When the screen states of the first screen and the second screen do not satisfy a preset state condition, a target state is output, where the target state is determined according to the screen states of the first screen and the second screen.
[0027] In some embodiments, before determining the respective screen states of the first screen and the second screen based on the first sensing data and the second sensing data, the method further includes:
[0028] determining a screen angle between the first screen and the second screen based on the first sensing data and the second sensing data;
[0029] When the screen angle is in a preset fourth interval, the step of determining the respective screen states of the first screen and the second screen based on the first sensing data and the second sensing data is continued.
[0030] According to a second aspect of an embodiment of the present disclosure, a camera module switching device is provided, including:
[0031] an acquisition module configured to acquire first sensor data and second sensor data, wherein the first sensor data is obtained by monitoring the screen state of the first screen based on the first sensor, and the second sensor data is obtained by monitoring the screen state of the second screen based on the second sensor;
[0032] a processing module, configured to determine the respective screen states of the first screen and the second screen based on the first sensing data and the second sensing data;
[0033] The processing module is further configured to switch the first camera module corresponding to the first screen and the second camera module corresponding to the second screen based on the respective screen states of the first screen and the second screen.
[0034] In some embodiments, the first sensor data and the second sensor data respectively include acceleration data, and the processing module is configured to:
[0035] Decomposing and calculating the acceleration data in the target sensing data to obtain a target angle between gravity components in the first axis direction and the second axis direction corresponding to the acceleration data;
[0036] Performing conversion processing on the target angle to obtain a screen state of a target screen corresponding to the target sensing data;
[0037] Among them, the first axis direction and the second axis direction are two axis directions of the plane coordinate system where the target screen is located, the target sensing data includes the first sensing data or the second sensing data, the target screen includes the first screen or the second screen, and the screen state is used to indicate the angle between the target screen and the ground.
[0038] In some embodiments, the screen state includes any one of the following: a first state, a second state, a third state and a fourth state, wherein different screen states are used to indicate that the processed target angle is located in different preset angle intervals, and the processed target angle is the angle between the target screen and the ground.
[0039] In some embodiments, the screen state further includes a fifth state, and the processing module is further configured to:
[0040] Determining whether the target sensing data meets a preset posture condition;
[0041] If yes, continue to execute the step of decomposing and calculating the acceleration data in the target sensing data; otherwise, determine that the screen state of the target screen is the fifth state;
[0042] Among them, the preset posture condition includes that the modulus value of the acceleration data in the target sensor data is not within a preset range interval, and / or, the angle between the gravity component of the acceleration data in the target sensor data in the third axis direction and the center of gravity of the target screen in the preset gravity direction is in a preset first interval, and the third axis direction is the axis direction perpendicular to the plane coordinate system where the target screen is located.
[0043] In some embodiments, the processing module is configured to:
[0044] When the screen states of the first screen and the second screen respectively meet a preset state condition, switching processing is performed on a first camera module corresponding to the first screen and a second camera module corresponding to the second screen;
[0045] The preset state condition includes a screen state indication of the target screen, wherein the angle between the target screen and the ground is in a preset second interval, and the screen angle between the first screen and the second screen is in a preset third interval.
[0046] In some embodiments, the preset state condition is that the screen states of the first screen and the second screen respectively include the second state and the fifth state; or, the preset state condition is that the screen states of the first screen and the second screen respectively include the fourth state and the fifth state.
[0047] In some embodiments, if the first camera module is an external screen camera module and the second camera module is an internal screen camera module, the processing module is configured as follows:
[0048] When the preset state condition is that the screen states of the first screen and the second screen respectively include the second state and the fifth state, the first camera module is switched to the second camera module to use the second camera module for shooting; or
[0049] When the preset state condition is that the screen states of the first screen and the second screen respectively include the fourth state and the fifth state, the second camera module is switched to the first camera module to adopt the first camera module for shooting.
[0050] In some embodiments, the processing module is further configured to:
[0051] Output the target state; or,
[0052] When the screen states of the first screen and the second screen do not satisfy a preset state condition, outputting a target state;
[0053] The target state is determined according to respective screen states of the first screen and the second screen.
[0054] For the contents not introduced or described in the embodiments of the present disclosure, please refer to the relevant introduction in the aforementioned method embodiments, and the embodiments of the present disclosure are not limited thereto.
[0055] According to a third aspect of an embodiment of the present disclosure, a terminal device is provided, comprising a first screen, a second screen, a first sensor, a second sensor, a first camera module and a second camera module, wherein the first camera module is arranged on the first screen, and the second camera module is arranged on the second screen, and the terminal device further comprises a processor; a memory for storing processor executable instructions; wherein the processor is configured to execute the executable instructions to implement the steps of the above-mentioned camera module switching method.
[0056] According to a fourth aspect of an embodiment of the present disclosure, a computer-readable storage medium is provided, on which computer program instructions are stored. When the program instructions are executed by a processor, the steps of the camera module switching method provided in the first aspect of the present disclosure are implemented.
[0057] According to a fifth aspect of an embodiment of the present disclosure, a chip is provided, comprising: a processor and an interface; the processor is used to read instructions to execute the steps of the above-mentioned camera module switching method.
[0058] The technical solution provided by the embodiments of the present disclosure may include the following beneficial effects: the terminal device obtains the first sensor data and the second sensor data, the first sensor data is obtained by monitoring the screen state of the first screen based on the first sensor, and the second sensor data is obtained by monitoring the screen state of the second screen based on the second sensor; based on the first sensor data and the second sensor data, the respective screen states of the first screen and the second screen are determined; based on the respective screen states of the first screen and the second screen, the first camera module corresponding to the first screen and the second camera module corresponding to the second screen are switched. It can be seen that the terminal device can automatically and intelligently switch the camera modules corresponding to the first screen and the second screen according to the respective screen states of the first screen and the second screen, which can not only solve the problems of the existing solution that requires manual operation by the user, reduces the fluency of terminal use and is inconvenient to operate, but also improves the convenience and practicality of camera module switching.
[0059] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0060] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.
[0061] Figure 1 It is a schematic diagram showing the unfolding of a foldable screen mobile phone according to an exemplary embodiment.
[0062] FIG. 2( a ) and FIG. 2( b ) are schematic diagrams showing two possible folding methods of a foldable screen mobile phone according to an exemplary embodiment.
[0063] Figure 3 The diagram is a schematic structural diagram of a terminal device according to an exemplary embodiment.
[0064] Figure 4 It is a flowchart of a camera module switching method according to an exemplary embodiment.
[0065] Figure 5 It is a schematic diagram of a three-dimensional coordinate system where different screens in a terminal device are located according to an exemplary embodiment.
[0066] Figure 6(a) to Figure 6(d) is a schematic diagram showing four screen states according to an exemplary embodiment.
[0067] Figure 7 It is a structural schematic diagram of a camera module switching device according to an exemplary embodiment.
[0068] Figure 8 The diagram is a schematic structural diagram of a terminal device according to an exemplary embodiment.
[0069] Fig. 9 The figure is a schematic diagram showing the structure of a chip according to an exemplary embodiment. DETAILED DESCRIPTION
[0070] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.
[0071] It should be noted that all actions of acquiring signals, information or data in the present disclosure are carried out in compliance with the relevant data protection laws and policies of the country where the device is located and with the authorization given by the owner of the corresponding device.
[0072] With the rapid development of terminal devices with foldable screens (such as foldable screen mobile phones), a hovering hinge can be added to the foldable screen so that the screen can be fixed at various angles. However, the corresponding software logic needs to be adapted for this new feature to improve the smoothness of screen operation. At present, for most terminal devices with foldable screens, the camera operation requires manual switching by the user. Such camera switching operation requires manual operation by the user, which greatly reduces the smoothness of terminal use.
[0073] To solve the above problems, the embodiments of the present disclosure provide a camera module switching method, device, equipment, storage medium and chip. The terminal device involved in the present disclosure includes a foldable screen, which can be unfolded or folded along a folding axis. For example, the foldable screen can include a first screen and a second screen, which can also be correspondingly referred to as a first display screen and a second display screen. The first screen and the second screen can be unfolded or folded along the folding axis, etc. In order to improve the image capture quality, the present disclosure can install / set corresponding camera modules on different screens of the foldable screen, for example, a first camera module is correspondingly provided on the first screen, and a second camera module is correspondingly provided on the second screen, etc., and enable / switch the corresponding camera modules for image capture in different states, so as to obtain clearer images with better picture quality. The present disclosure does not limit the number and type of the first camera module and the second camera module, for example, see the following Figure 1 The first camera module can be an external screen camera module, the second camera module can be an internal screen camera module, etc. The different states of the screen in the foldable screen can be monitored by corresponding sensors, including but not limited to, for example, an inertial measurement unit (IMU) or other sensors for monitoring the screen state.
[0074] In practical applications, at least one sensor may be installed in each screen that constitutes the foldable screen to monitor the screen state of the screen. For each screen, the installation position of the sensor is not limited, for example, it can be installed at the preset center position of the screen; when there are multiple sensors, the present disclosure can select a main sensor from the multiple sensors, and use the sensor data of the main sensor to monitor and obtain the screen state of the screen. Usually, the main sensor is selected by the user, or is a sensor at the default position in the terminal device. In an example implementation, the present disclosure can directly obtain the sensor data of the main sensor, and use the sensor data of the main sensor to determine the screen state of the screen; in another example implementation, the present disclosure can use the sensor data of other sensors except the main sensor to correct the sensor data of the main sensor to obtain the corrected sensor data of the main sensor; and then determine the screen state of the screen based on the corrected sensor data of the main sensor. The specific implementation of the above correction is not limited, for example, the sensor data of other sensors can be used to correct the abnormal average value of the sensor data of the main sensor. How to determine the screen status of the screen based on the sensor data will be explained in detail below in this disclosure and will not be repeated here.
[0075] The terminal device involved in the present disclosure refers to a terminal device with a foldable screen, which may include but is not limited to, for example, mobile phones, tablet computers, personal computers (PC), personal digital assistants (PDA), smart watches, netbooks, wearable electronic devices, augmented reality (AR) devices, virtual reality (VR) devices, vehicle-mounted devices, smart cars, smart speakers and other electronic devices with foldable screens, and the present disclosure does not impose any restrictions on this. The following takes the terminal device as a foldable screen mobile phone as an example to illustrate several possible application scenario embodiments involved in the present disclosure, but it does not constitute a limitation.
[0076] See also Figure 1 FIG. 1 is a schematic diagram showing a folding screen mobile phone when unfolded according to an exemplary embodiment. Figure 1As shown, the terminal device includes a first screen 100 and a second screen 200. An inner screen camera module 300 may be installed / set on the second screen 200, and an outer screen camera module 400 may be installed / set on the first screen 100. The present disclosure does not limit the number of inner screen camera modules 300 and outer screen camera modules 400, which can be set according to actual use requirements. The figure only shows an inner screen camera module 300 and an outer screen camera module 400 as an example, but it does not constitute a limitation. In actual applications, the outer screen camera module 400 may include an outer screen front camera module and an outer screen rear camera module. Usually, the outer screen rear camera module serves as the outer screen main camera module for corresponding image capture. The present disclosure does not make too many limitations and details on this.
[0077] like Figure 1 As shown, a first sensor 101 is installed / set in the first screen 100, and a second sensor 201 is installed / set in the second screen 200. The first sensor 101 and the second sensor 201 can be used to monitor the screen status of the corresponding screen to determine the use status of the folding screen mobile phone (such as unfolded or folded, etc.), and then select the corresponding camera module to capture the image. Figure 1 In the scene shown, the foldable screen mobile phone is in the unfolded state. At this time, the foldable screen mobile phone can call / use the external screen camera module 400 (usually using the external screen main camera module) to perform corresponding image capture to obtain clearer captured images.
[0078] Please refer to Figures 2(a) and 2(b), which are schematic diagrams of two possible folding screen mobile phones when folded according to an exemplary embodiment. Since the foldable screen has the characteristic of being foldable, it derives many usage modes, such as a desk calendar mode, etc. The following uses Figures 2(a) and 2(b) as examples to illustrate two schematic diagrams of application scenarios that may be involved in the present disclosure, but they do not constitute a limitation. As shown in Figures 2(a) and 2(b), the first screen 100 and the second screen 200 are folded along the folding axis into a mutually perpendicular state, that is, the first screen 100 and the second screen 200 are in a folded state, and the screen angle between them is 90° (i.e., mutually perpendicular). In the scenario shown in Figure 2(a), the foldable screen mobile phone can call / use the internal screen camera module 300 to perform corresponding image capture. In the scenario shown in Figure 2(b), the foldable screen mobile phone can call / use the external screen camera module 400 (usually using the external screen main camera module) to perform corresponding image capture.
[0079] Please also see Figure 3 FIG. 1 is a schematic diagram showing the structure of a terminal device according to an exemplary embodiment. Figure 3The terminal device shown may include: a radio frequency (RF) circuit 310, a memory 320, an input unit 330, a display unit 340, a sensor 350, an audio circuit 360, a wireless fidelity (WiFi) module 370, a processor 380, and a power supply 390. Those skilled in the art will appreciate that Figure 3 The device structure shown in the figure does not constitute a limitation on the terminal device, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.
[0080] Combine the following Figure 3 The following is a detailed introduction to the various components of the terminal equipment:
[0081] The RF circuit 310 can be used for receiving and sending signals during the process of sending and receiving information or making calls. In particular, after receiving the downlink information of the base station, it is sent to the processor 380 for processing; in addition, the designed uplink data is sent to the base station. Generally, the RF circuit 310 includes but is not limited to an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier (Low Noise Amplifier, LNA), a duplexer, etc. In addition, the RF circuit 310 can also communicate with the network and other devices through wireless communication. The above-mentioned wireless communication can use any communication standard or protocol, including but not limited to the Global System of Mobile communication (Global System of Mobile communication, GSM), General Packet Radio Service (General Packet Radio Service, GPRS), Code Division Multiple Access (Code Division Multiple Access, CDMA), Wideband Code Division Multiple Access (Wideband Code Division Multiple Access, WCDMA), Long Term Evolution (Long Term Evolution, LTE), email, Short Messaging Service (SMS), etc.
[0082] The memory 320 can be used to store software programs and modules. The processor 380 executes various functional applications and data processing of the terminal device by running the software programs and modules stored in the memory 320. The memory 320 can mainly include a program storage area and a data storage area, wherein the program storage area can 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 can store data created according to the use of the terminal device (such as audio data, a phone book, etc.), etc. In addition, the memory 320 can include a high-speed random access memory, and can also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.
[0083] The input unit 330 can be used to receive input digital or character information, and to generate key signal input related to the user settings and function control of the terminal device. Specifically, the input unit 330 may include a touch panel 331 and other input devices 332. The touch panel 331, also known as a touch screen, can collect the user's touch operation on or near it (such as the user's operation on the touch panel 331 or near the touch panel 331 using any suitable object or accessory such as a finger, stylus, etc.), and drive the corresponding connection device according to a pre-set program. Optionally, the touch panel 331 may include two parts: a touch detection device and a touch controller. Among them, the touch detection device detects the user's touch orientation, detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into the touch point coordinates, and then sends it to the processor 380, and can receive and execute the command sent by the processor 380. In addition, the touch panel 331 can be implemented in various types such as resistive, capacitive, infrared, and surface acoustic waves. In addition to the touch panel 331, the input unit 330 may also include other input devices 332. Specifically, other input devices 332 may include but are not limited to one or more of a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, etc.
[0084] The display unit 340 can be used to display information input by the user or information provided to the user and various menus of the terminal device. The display unit 340 may include a display panel 341. Optionally, the display panel 341 may be configured in the form of a liquid crystal display (LCD), an organic light-emitting diode (OLED), etc. Further, the touch panel 331 may cover the display panel 341. When the touch panel 331 detects a touch operation on or near it, it is transmitted to the processor 380 to determine the type of touch event. Subsequently, the processor 380 provides a corresponding visual output on the display panel 341 according to the type of touch event. Although in Figure 3 In the embodiment, the touch panel 331 and the display panel 341 are used as two independent components to implement the input and output functions of the terminal device, but in some embodiments, the touch panel 331 and the display panel 341 can be integrated to implement the input and output functions of the terminal device.
[0085] The terminal device may also include at least one sensor 350, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor and a proximity sensor, wherein the ambient light sensor may adjust the brightness of the display panel 341 according to the brightness of the ambient light, and the proximity sensor may turn off the display panel 341 and / or the backlight when the terminal device is moved to the ear. As a type of motion sensor, the inertial measurement unit (IMU) can detect and measure data such as acceleration and angular velocity of the terminal device during movement, such as detecting the magnitude of acceleration and angular velocity in each direction (generally three axes) when the terminal device moves, etc., which can be used to identify the application of the posture or screen status of the terminal device, which is specifically described in detail below in this disclosure and will not be repeated here. For example, the accelerometer sensor can detect the magnitude of acceleration in all directions (generally three axes), and can detect the magnitude and direction of gravity when stationary. It can be used for applications that identify the posture of the terminal device (such as switching between horizontal and vertical screens, related games, and magnetometer posture calibration), vibration recognition related functions (such as pedometers and tapping), etc.; as for other sensors that can be configured in the terminal device, such as gyroscopes, barometers, hygrometers, thermometers, infrared sensors, etc., they will not be elaborated here.
[0086] The audio circuit 360, the speaker 361, and the microphone 362 can provide an audio interface between the user and the terminal device. The audio circuit 360 can transmit the received audio data to the speaker 361 after converting the received audio data into an electrical signal, which is converted into a sound signal for output by the speaker 361; on the other hand, the microphone 362 converts the collected sound signal into an electrical signal, which is received by the audio circuit 360 and converted into audio data, and then the audio data is processed by the output processor 380, and then sent to another terminal device through the RF circuit 310, or the audio data is output to the memory 320 for further processing.
[0087] WiFi is a short-range wireless transmission technology. The terminal device can help users send and receive emails, browse web pages and access streaming media through the WiFi module 370. It provides users with wireless broadband Internet access. Figure 3 A WiFi module 370 is shown, but it is understandable that it is not a necessary component of the terminal device and can be omitted as needed without changing the essence of the invention.
[0088] The processor 380 is the control center of the terminal device. It uses various interfaces and lines to connect various parts of the entire terminal device. By running or executing software programs and / or modules stored in the memory 320, and calling data stored in the memory 320, it executes various functions of the terminal device and processes data, thereby monitoring the terminal device as a whole. Optionally, the processor 380 may include one or more processing units; preferably, the processor 380 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application programs, and the modem processor mainly processes wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into the processor 380.
[0089] The terminal device also includes a power supply 390 (such as a battery) for supplying power to each component. Preferably, the power supply can be logically connected to the processor 380 through a power management system, so that the power management system can manage charging, discharging, and power consumption management. Although not shown, the terminal device can also include devices such as a camera and a Bluetooth module, which will not be described in detail here.
[0090] Based on the above examples, see Figure 4 FIG. 1 is a flow chart of a camera module switching method according to an exemplary embodiment. Figure 4 The method shown is applied to a terminal device, and the method may include the following implementation steps:
[0091] S401. Acquire first sensor data and second sensor data, where the first sensor data is obtained by monitoring a screen state of a first screen based on a first sensor, and the second sensor data is obtained by monitoring a screen state of a second screen based on a second sensor.
[0092] As an example, the first sensor data disclosed herein refers to the sensor data obtained by monitoring the screen state of the first screen 100 using the first sensor 101, and the second sensor data refers to the sensor data obtained by monitoring the screen state of the second screen 200 using the second sensor 201. The introduction of the first sensor 101 and the second sensor 201 can be referred to the relevant introduction in the aforementioned embodiment, and will not be repeated here; when the first sensor 101 and the second sensor 201 are inertial measurement units IMU, the sensor data may include but is not limited to, for example, acceleration data, angular velocity data or other measurement data obtained by IMU measurement.
[0093] It is understandable that since the IMU can measure the magnitude of acceleration and angular velocity in different directions (usually the three-axis directions of the IMU), it can be seen that the above acceleration data and the above angular velocity data involved in the present disclosure have directions and magnitudes. For example, see Figure 5 1 is a schematic diagram of the three-axis directions of different screens of an IMU in a terminal device according to an exemplary embodiment, that is, a schematic diagram of the three-dimensional coordinate system O-XYZ where the first screen 100 and the second screen 200 are located. Figure 5 The three-axis directions shown can constitute the three-dimensional coordinate system O-XYZ where the corresponding screen is located. The three-axis directions include the first axis direction (OX axis direction in the diagram), the second axis direction (OY axis direction in the diagram) and the third axis direction (OZ axis direction in the diagram), and any two of the three axis directions are perpendicular to each other.
[0094] The present disclosure does not limit the respective acquisition methods of the first sensor data and the second sensor data. For example, in an example, when the first screen 100 and the second screen 200 are respectively installed with a first sensor 101 and a second sensor 201 (such as Figure 1), the present disclosure can directly collect and obtain the sensor data monitored by the above-mentioned first sensor 101 as the above-mentioned first sensor data, and directly collect and obtain the sensor data monitored by the above-mentioned second sensor 201 as the above-mentioned second sensor data. In another example, when the above-mentioned first screen 100 and the above-mentioned second screen 200 are correspondingly installed with multiple first sensors 101 and multiple second sensors 201, the present disclosure can collect and obtain the sensor data monitored by the first main sensor, and the first main sensor is one of the multiple first sensors 101; then, the sensor data of the first main sensor is corrected using the data monitored by other first sensors except the first main sensor, so as to obtain the corrected data of the first main sensor, and finally the corrected data of the first main sensor is used as the above-mentioned first sensor data. The specific implementation method of the above-mentioned correction is not limited, for example, correction is performed using the mean correction method, etc. Similarly, referring to the processing method of the first sensor data, the sensor data monitored by multiple second sensors 201 are processed to obtain the above-mentioned second sensor data, which will not be repeated here.
[0095] S402: Determine respective screen states of the first screen and the second screen based on the first sensing data and the second sensing data.
[0096] The present disclosure can determine the screen state of the first screen according to the first sensor data, and determine the screen state of the second screen according to the second sensor data. The present disclosure does not limit the above-mentioned screen state determination implementation method, and takes the example of determining the screen state of the corresponding target screen according to the target sensor data to introduce its possible implementation method, the target sensor data includes the above-mentioned first sensor data or the above-mentioned second sensor data, and the target screen is the first screen 100 or the second screen 200 corresponding to the target sensor data. The target sensor data may include acceleration data, angular velocity data or other data measured by the IMU.
[0097] In one embodiment, the present disclosure can decompose and calculate the acceleration data in the target sensing data to obtain the target angle between the gravity components in the first axis direction (X axis direction) and the second axis direction (Y axis direction) corresponding to the acceleration data. The first axis direction and the second axis direction are the two axis directions of the plane coordinate system XOY where the target screen is located. In the implementation process, the present disclosure can decompose the acceleration data in the target sensing data to obtain the gravity component in the first axis direction (referred to as the X axis component) and the gravity component in the second axis direction (referred to as the Y axis component); and then calculate the target angle between them based on the two gravity components (X axis component and Y axis component), for example, use the formula arcsinY / X to obtain the target angle between them. In practical applications, the target angle is usually in the range of -360° to 360°.
[0098] Furthermore, the present disclosure performs conversion processing on the above-mentioned target angle to obtain a processed target angle; and then obtains the screen state of the above-mentioned target screen according to the processed target angle. The present disclosure does not limit the specific implementation method of the above-mentioned conversion processing. For example, the present disclosure can use a preset normalization algorithm to normalize the above-mentioned target angle. The normalization algorithm is a processing algorithm pre-customized and set by the user or the terminal device. For example, for a target angle greater than 180°, it can subtract 360° to obtain the processed target angle; for a target angle less than -180°, it can add 360° to obtain the processed target angle, etc. The above-mentioned processed target angle is usually in the range of -180° to 180°.
[0099] The screen state of the target screen refers to the display state of the target screen (e.g., the first screen 100 or the second screen 200), which is generally used to indicate / reflect the angle between the target screen and the ground, such as indicating the angle between the target screen direction (third axis direction, Z axis direction) and the ground. That is, the processed target angle is the angle between the target screen and the ground. The present disclosure can divide the screen state of the target screen into multiple types according to the processed target angle being located in different preset angle intervals. For example, the screen state may include a first state, a second state, a third state, and a fourth state. These four states correspond to the processed target angle being located in different preset angle intervals. For example, the first state is used to indicate that the processed target angle is located in the first preset interval, the second state is used to indicate that the processed target angle is located in the second preset interval, the third state is used to indicate that the processed target angle is located in the third preset interval, and the fourth state is used to indicate that the processed target angle is located in the fourth preset interval. The first preset interval, the second preset interval, the third preset interval and the fourth preset interval here are all different angle intervals customized by the user or the terminal device, and they may be different from each other; for example, the above-mentioned first preset interval of the present disclosure may be (-45°, 45°], the second preset interval may be (45°, 135°], the third preset interval may be (135°, 180°] and [-180°, -135°], the fourth preset interval may be [-135°, -45°], etc.
[0100] See also Figure 6(a) to Figure 6(d)It is a schematic diagram of four screen states according to an exemplary embodiment. As shown in FIG6(a), the screen state is a first state, which is used to indicate that the angle between the target screen and the ground is in a first preset interval, such as (-45°, 45°]. As shown in FIG6(b), the screen state is a second state, which is used to indicate that the angle between the target screen and the ground is in a second preset interval, such as (45°, 135°]. As shown in FIG6(c), the screen state is a third state, which is used to indicate that the angle between the target screen and the ground is in a third preset interval, such as (135°, 180°] and [-180°, -135°), etc. As shown in FIG6(d), the screen state is a fourth state, which is used to indicate that the angle between the target screen and the ground is in a fourth preset interval, such as [-135°, -45°].
[0101] In another embodiment, after acquiring the above-mentioned first sensor data and the second sensor data, and before decomposing and calculating the acceleration data in the above-mentioned target sensor data, the present disclosure may also determine whether the above-mentioned target sensor data meets the preset posture condition. If so, the above-mentioned step of decomposing and calculating the acceleration data in the target sensor data may continue to be executed; otherwise, it may be determined that the screen state of the above-mentioned target screen is the fifth state, and the fifth state may refer to other screen states except the above-mentioned first state to fourth state.
[0102] The above-mentioned preset posture conditions disclosed in the present invention are posture conditions customized by the user or the terminal device, for example, they may include any one or more of the following combinations: (1) The modulus value of the acceleration data in the target sensing data is not within the preset range interval, and the preset range interval is a numerical range customized in advance by the user or the terminal device, which is not limited by the present invention. In other words, if the modulus value of the acceleration data is too large or too small (not within the preset range interval), the terminal device is in motion at this time, which may cause an error in determining the screen state, thereby affecting the reliability of the camera module switching.
[0103] (2) The angle between the gravity component of the acceleration data in the target sensing data in the third axis direction (Z axis direction) and the gravity of the center of gravity of the target screen in the preset gravity direction is in the preset first interval, and the third axis direction is the axis direction perpendicular to the plane coordinate system XOY where the target screen is located, that is, the Z axis direction. The preset gravity direction refers to the gravity direction perpendicular to the ground, that is, the vertically downward direction. In practical applications, considering the use status of the terminal device, the gravity of the center of gravity of the target screen in the preset gravity direction is usually the modulus of the acceleration data in the target sensing data. That is to say, in the present disclosure, the angle between the gravity component of the acceleration data in the Z axis direction (referred to as the Z axis component) and the modulus of the acceleration data is in the preset first interval, and the angle can be obtained by a preset trigonometric function calculation, for example, by arcsinZ / G, where G is the modulus of the acceleration data and Z is the gravity component of the acceleration data in the Z axis direction. In practical applications, the angle is usually in the range of -90° to 90°. The preset first interval is an angle interval pre-defined by the user or the terminal device, for example, in the present disclosure, the preset first interval may be (-40°, 80°), etc. When the angle is within the preset first interval, it can be determined that the terminal device is in a reverse use state, for example, the terminal device is held over the user's head for use, etc. On the contrary, when the angle is not within the above-mentioned preset first interval, it can be determined that the user is using the above-mentioned terminal device normally, that is, the above-mentioned terminal device is in a normal use state, etc.
[0104] In some optional embodiments, after obtaining the first sensor data and the second sensor data, before determining the respective screen states of the first screen 100 and the second screen 200, the present disclosure may also determine the screen angle between the first screen 100 and the second screen 200 based on the first sensor data and the second sensor data. The implementation method for determining the screen angle is not limited. For example, the present disclosure may perform angle calculation based on the angular velocity data in the first sensor data and the angular velocity data in the second sensor data, thereby obtaining the screen angle between the first screen 100 and the second screen 200. Further, the present disclosure may determine whether the screen angle is in a preset fourth interval. If so, it may be determined that the first screen 100 and the second screen 200 (i.e., the terminal device) are in a folded state, and the above step S402 of determining the respective screen states of the first screen 100 and the second screen 200 based on the first sensor data and the second sensor data may be continued. Otherwise, it may be determined that the first screen 100 and the second screen 200 (i.e., the terminal device) are not in a folded state, for example, in an unfolded state, and the process may be terminated. The preset fourth interval is an angle interval customized by a user or a terminal device, which can be determined according to actual conditions. For example, the preset fourth interval can be an interval of 30° to 140°, etc., which is not limited in the present disclosure.
[0105] S403: Based on respective screen states of the first screen and the second screen, switching processing is performed on a first camera module corresponding to the first screen and a second camera module corresponding to the second screen.
[0106] The present disclosure does not limit the specific forms of expression of the above-mentioned screen states. For example, the screen state can be represented by at least one of numbers, letters and character strings. Taking the use of numbers to represent the screen state as an example, when the screen state is -1, it can be used to indicate that the screen state is the fifth state; when the screen state is 0, it can be used to indicate that the screen state is the first state; when the screen state is 1, it can be used to indicate that the screen state is the second state; when the screen state is 2, it can be used to indicate that the screen state is the third state; when the screen state is 3, it can be used to indicate that the screen state is the fourth state.
[0107] The present disclosure can determine the target state (also referred to as output state) that the terminal device ultimately supports outputting according to the respective screen states of the first screen 100 and the second screen 200. The target state can reflect the screen rotation result of the terminal device to a certain extent. For example, when the target state is the first state, it can indicate that the screen rotation result of the terminal device is in a portrait state; when the target state is the second state, it can indicate that the screen rotation result of the terminal device is in a landscape state, etc. For example, please refer to the following Table 1 for a table showing a possible target state.
[0108] Table 1
[0109]
[0110] As shown in Table 1 above, the first row of the table represents the screen state of the first screen, the first column of the table represents the screen state of the second screen, and the values of other columns in the table represent the final output target state determined based on the respective screen states of the first screen and the second screen.
[0111] After obtaining the respective screen states of the first screen 100 and the second screen 200 , the present disclosure can switch the corresponding first camera module and the second camera module based on the respective screen states of the first screen 100 and the second screen 200 .
[0112] The present disclosure does not limit the specific implementation methods of the above-mentioned switching process. For example, the present disclosure can determine whether the respective screen states of the above-mentioned first screen 100 and the second screen 200 meet the preset state conditions. If so, the first camera module corresponding to the above-mentioned first screen 100 and the second camera module corresponding to the above-mentioned second screen 200 can be switched; otherwise, it can be determined that there is no need to switch the camera modules at present, and the process can be terminated; or, the above-mentioned target state can be output, etc.
[0113] The above-mentioned preset state condition of the present disclosure is a condition for switching the camera module that is pre-customized and set by the user or the terminal device. For example, the condition may include the screen state of the target screen to indicate that the angle between the target screen and the ground is in a preset second interval, and the screen angle between the first screen 100 and the second screen 200 is in a preset third interval. The preset second interval and the preset third interval are angle intervals customized by the system. For example, the preset second interval may be [-5°, 5°], and the preset third interval may be [30°, 140°], etc. The above-mentioned preset third interval and the above-mentioned preset fourth interval may be the same or different. Usually, the above-mentioned preset third interval and the above-mentioned preset fourth interval are the same, which is not limited by the present disclosure. In other words, the preset state condition may include that the target screen and the ground are approximately horizontal or horizontal, and there is an angle between the first screen and the second screen (i.e., in a folded state). The target screen is the above-mentioned first screen 100 or the above-mentioned second screen 200.
[0114] With reference to the state table shown in Table 1, the preset state conditions can be the following two situations: (1) The screen states of the first screen 100 and the second screen 200 include the second state and the fifth state. For example, in the scene shown in FIG2(b), the first screen 100 is approximately horizontal with the ground and the second screen 200 is in a folded state. The screen state of the first screen 100 is the second state and the screen state of the second screen 200 is the fifth state. (2) The screen states of the first screen 100 and the second screen 200 include the fourth state and the fifth state. For example, in the scene shown in FIG2(a), the second screen 200 is approximately horizontal with the ground and the first screen 100 is in a folded state. The screen state of the first screen 100 is the fifth state and the screen state of the second screen 200 is the fourth state.
[0115] For example, referring to the examples shown in FIG. 2(a) and FIG. 2(b), the specific implementation of the above switching process is introduced by taking the first camera module corresponding to the first screen 100 as an external screen camera module and the second camera module corresponding to the second screen 200 as an internal screen camera module. When the above-mentioned preset state condition is that the screen states of the above-mentioned first screen 100 and the second screen 200 respectively include the above-mentioned second state and the fifth state, the present disclosure can switch the above-mentioned external screen camera module (second camera module) to the internal screen camera module (first camera module), so as to facilitate the subsequent use of the internal screen camera module for corresponding image shooting.
[0116] When the above-mentioned preset state condition is that the screen states of the above-mentioned first screen 100 and the second screen 200 respectively include the above-mentioned fourth state and fifth state, the present invention can switch the above-mentioned internal screen camera module (first camera module) to an external screen camera module (second camera module), so as to facilitate the subsequent use of the external screen camera module to perform corresponding image capture, and the external screen camera module can be an external screen main camera module.
[0117] In some optional embodiments, the present disclosure may further output the above target state, for example, after the above first camera module and the second camera module are switched, the above target state may be further output to display the rotation result of the corresponding screen. Alternatively, when it is determined that the screen states of the above first screen 100 and the above second screen 200 do not meet the above preset state conditions, the present disclosure may also output the above target state to display the rotation result of the corresponding screen, etc.
[0118] By implementing the disclosed embodiment, the terminal device obtains the first sensor data and the second sensor data, wherein the first sensor data is obtained by monitoring the screen state of the first screen based on the first sensor, and the second sensor data is obtained by monitoring the screen state of the second screen based on the second sensor; based on the first sensor data and the second sensor data, the respective screen states of the first screen and the second screen are determined; based on the respective screen states of the first screen and the second screen, the first camera module corresponding to the first screen and the second camera module corresponding to the second screen are switched. It can be seen that the terminal device can automatically and intelligently switch the camera modules corresponding to the first screen and the second screen according to the respective screen states of the first screen and the second screen, which can not only solve the problems of the existing solution that the user needs to operate manually, reduce the fluency of terminal use and the inconvenience of operation, but also improve the convenience and practicality of camera module switching.
[0119] Based on the above examples, see Figure 7 FIG. 1 is a schematic diagram showing the structure of a camera module switching device according to an exemplary embodiment. Figure 7The device shown can be applied to a terminal device, and the device may include an acquisition module 701 and a processing module 702. Among them:
[0120] The acquisition module 701 is configured to acquire first sensor data and second sensor data, wherein the first sensor data is obtained by monitoring the screen state of the first screen based on the first sensor, and the second sensor data is obtained by monitoring the screen state of the second screen based on the second sensor;
[0121] The processing module 702 is configured to determine the screen states of the first screen and the second screen respectively based on the first sensing data and the second sensing data;
[0122] The processing module 702 is further configured to perform switching processing on the first camera module corresponding to the first screen and the second camera module corresponding to the second screen based on respective screen states of the first screen and the second screen.
[0123] In some embodiments, the first sensor data and the second sensor data include acceleration data, and the processing module 702 is configured to:
[0124] Decomposing and calculating the acceleration data in the target sensing data to obtain a target angle between gravity components in the first axis direction and the second axis direction corresponding to the acceleration data;
[0125] Performing conversion processing on the target angle to obtain a screen state of a target screen corresponding to the target sensing data;
[0126] Among them, the first axis direction and the second axis direction are two axis directions of the plane coordinate system where the target screen is located, the target sensing data includes the first sensing data or the second sensing data, the target screen includes the first screen or the second screen, and the screen state is used to indicate the angle between the target screen and the ground.
[0127] In some embodiments, the screen state includes any one of the following: a first state, a second state, a third state and a fourth state, wherein different screen states are used to indicate that the processed target angle is located in different preset angle intervals, and the processed target angle is the angle between the target screen and the ground.
[0128] In some embodiments, the first state is used to indicate that the target angle after processing is located in a first preset interval; the second state is used to indicate that the target angle after processing is located in a second preset interval; the third state is used to indicate that the target angle after processing is located in a third preset interval; the fourth state is used to indicate that the target angle after processing is located in a fourth preset interval; wherein the first preset interval, the second preset interval, the third preset interval and the fourth preset interval are all different.
[0129] In some embodiments, the screen state further includes a fifth state, and the processing module 702 is further configured to:
[0130] Determining whether the target sensing data meets a preset posture condition;
[0131] If yes, continue to execute the step of decomposing and calculating the acceleration data in the target sensing data; otherwise, determine that the screen state of the target screen is the fifth state;
[0132] Among them, the preset posture condition includes that the modulus value of the acceleration data in the target sensor data is not within a preset range interval, and / or, the angle between the gravity component of the acceleration data in the target sensor data in the third axis direction and the center of gravity of the target screen in the preset gravity direction is in a preset first interval, and the third axis direction is the axis direction perpendicular to the plane coordinate system where the target screen is located.
[0133] In some embodiments, the gravity is a modulus of the acceleration data.
[0134] In some embodiments, the processing module 702 is configured to:
[0135] When the screen states of the first screen and the second screen respectively meet a preset state condition, switching processing is performed on a first camera module corresponding to the first screen and a second camera module corresponding to the second screen;
[0136] The preset state condition includes a screen state indication of the target screen, wherein the angle between the target screen and the ground is in a preset second interval, and the screen angle between the first screen and the second screen is in a preset third interval.
[0137] In some embodiments, the preset state condition is that the screen states of the first screen and the second screen respectively include the second state and the fifth state; or, the preset state condition is that the screen states of the first screen and the second screen respectively include the fourth state and the fifth state.
[0138] In some embodiments, if the first camera module is an external screen camera module and the second camera module is an internal screen camera module, the processing module 702 is configured as follows:
[0139] When the preset state condition is that the screen states of the first screen and the second screen respectively include the second state and the fifth state, the first camera module is switched to the second camera module to use the second camera module for shooting; or
[0140] When the preset state condition is that the screen states of the first screen and the second screen respectively include the fourth state and the fifth state, the second camera module is switched to the first camera module to adopt the first camera module for shooting.
[0141] In some embodiments, the processing module 702 is further configured to:
[0142] Output the target state; or,
[0143] When the screen states of the first screen and the second screen do not satisfy a preset state condition, outputting a target state;
[0144] The target state is determined according to respective screen states of the first screen and the second screen.
[0145] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.
[0146] The present disclosure also provides a computer-readable storage medium having computer program instructions stored thereon, which, when executed by a processor, implement the steps of the camera module switching method provided by the present disclosure.
[0147] Figure 8 800 is a schematic diagram of a terminal device according to an exemplary embodiment. For example, the terminal device 800 may be a mobile phone, a computer, a digital broadcast terminal, a message transceiver, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, or other terminal devices.
[0148] Reference Figure 8 , the terminal device 800 may include one or more of the following components: a processing component 8002 , a memory 8004 , and a communication component 8006 .
[0149] The processing component 8002 can be used to control the overall operation of the terminal device 800, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 8002 may include one or more processors 8020 to execute instructions to complete all or part of the steps of the above-mentioned camera module switching method. In addition, the processing component 8002 may include one or more modules to facilitate the interaction between the processing component 8002 and other components. For example, the processing component 8002 may include a multimedia module to facilitate the interaction between the multimedia component and the processing component 8002.
[0150] The memory 8004 is configured to store various types of data to support operations on the terminal device 800. Examples of such data include instructions for any application or method operating on the terminal device 800, contact data, phone book data, messages, pictures, videos, etc. The memory 8004 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.
[0151] The communication component 8006 is configured to facilitate wired or wireless communication between the terminal device 800 and other devices. The terminal device 800 can access a wireless network based on a communication standard, such as Wi-Fi, 2G, 3G, 4G, 5G, 6G, NB-IOT, eMTC, etc., or a combination thereof. In an exemplary embodiment, the communication component 8006 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 8006 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.
[0152] In an exemplary embodiment, the terminal device 800 can be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors or other electronic components to execute the above-mentioned camera module switching method.
[0153] The terminal device 800 may be an independent electronic device or a part of an independent electronic device. For example, in one embodiment, the electronic device may be an integrated circuit (IC) or a chip, wherein the integrated circuit may be an IC or a collection of multiple ICs; the chip may include but is not limited to the following types: GPU (Graphics Processing Unit), CPU (Central Processing Unit), FPGA (Field Programmable Gate Array), DSP (Digital Signal Processor), ASIC (Application Specific Integrated Circuit), SOC (System on Chip, SoC), etc. The above-mentioned integrated circuit or chip can be used to execute executable instructions (or codes) to implement the above-mentioned camera module switching method. The executable instructions may be stored in the integrated circuit or chip, or may be obtained from other devices or equipment, such as the integrated circuit or chip including a processor, a memory, and an interface for communicating with other devices. The executable instruction can be stored in the processor, and when the executable instruction is executed by the processor, the above-mentioned camera module switching method is implemented; alternatively, the integrated circuit or chip can receive the executable instruction through the interface and transmit it to the processor for execution, so as to implement the above-mentioned camera module switching method.
[0154] In an exemplary embodiment, the present disclosure further provides a computer-readable storage medium having computer program instructions stored thereon, which, when executed by a processor, implement the steps of the camera module switching method provided by the present disclosure. By way of example, the computer-readable storage medium may be a non-temporary computer-readable storage medium including instructions, for example, the above-mentioned memory 8004 including instructions, and the above-mentioned instructions may be executed by the processor 8020 of the terminal device 800 to complete the above-mentioned camera module switching method. For example, the non-temporary computer-readable storage medium may be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
[0155] In another exemplary embodiment, a computer program product is also provided, which includes a computer program that can be executed by a programmable device, and the computer program has a code portion for executing the above-mentioned camera module switching method when executed by the programmable device.
[0156] See also Fig. 9FIG. 1 is a schematic diagram showing the structure of a chip according to an exemplary embodiment. Fig. 9 The chip 900 shown includes a processor 901 and an interface 902. Optionally, it may also include a memory 903. The number of the processor 901 may be one or more, and the number of the interface 902 may be multiple.
[0157] In one embodiment, for a case where a chip is used to implement the method embodiment of the present disclosure:
[0158] The interface 902 is used to receive or output signals;
[0159] The processor 901 is used to execute part or all of the contents of the camera module switching method embodiment.
[0160] Understandably, the processor in the embodiment of the present disclosure may be an integrated circuit chip having signal processing capabilities. In the implementation process, each step of the above method embodiment may be completed by an integrated logic circuit of hardware in the processor or an instruction in the form of software. The above processor may be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components.
[0161] It is understandable that the memory in the embodiments of the present disclosure may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), and direct RAM (DR RAM). It should be noted that the memory of the systems and methods described herein is intended to include, but is not limited to, these and any other suitable types of memory.
[0162] It should be noted here that the description of the above storage medium, device and chip embodiments is similar to the description of the above method embodiments, and has similar beneficial effects as the method embodiments. For technical details not disclosed in the storage medium, storage medium and device embodiments of the present disclosure, please refer to the description of the method embodiments of the present disclosure for understanding.
[0163] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the present disclosure. The present disclosure is intended to cover any variations, uses or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The description and examples are to be considered as exemplary only, and the true scope and spirit of the present disclosure are indicated by the following claims.
[0164] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims
1. A camera module switching method, characterized in that: include: Acquire first sensor data and second sensor data, wherein the first sensor data is obtained by monitoring the screen state of the first screen based on the first sensor, and the second sensor data is obtained by monitoring the screen state of the second screen based on the second sensor; Determining respective screen states of the first screen and the second screen based on the first sensing data and the second sensing data; Based on the respective screen states of the first screen and the second screen, a first camera module corresponding to the first screen and a second camera module corresponding to the second screen are switched.
2. The method according to claim 1, characterized in that The first sensing data and the second sensing data respectively include acceleration data, and determining the screen states of the first screen and the second screen based on the first sensing data and the second sensing data includes: Decomposing and calculating the acceleration data in the target sensing data to obtain a target angle between gravity components in the first axis direction and the second axis direction corresponding to the acceleration data; Performing conversion processing on the target angle to obtain a screen state of a target screen corresponding to the target sensing data; Among them, the first axis direction and the second axis direction are two axis directions of the plane coordinate system where the target screen is located, the target sensing data includes the first sensing data or the second sensing data, the target screen includes the first screen or the second screen, and the screen state is used to indicate the angle between the target screen and the ground.
3. The method according to claim 2, characterized in that The screen state includes any one of the following: a first state, a second state, a third state and a fourth state, wherein different screen states are used to indicate that the processed target angle is located in different preset angle intervals, and the processed target angle is the angle between the target screen and the ground.
4. The method according to claim 3, characterized in that The screen state further includes a fifth state, and the method further includes: Determining whether the target sensing data meets a preset posture condition; If yes, continue to execute the step of decomposing and calculating the acceleration data in the target sensing data; otherwise, determine that the screen state of the target screen is the fifth state; Among them, the preset posture condition includes that the modulus value of the acceleration data in the target sensor data is not within a preset range interval, and / or, the angle between the gravity component of the acceleration data in the target sensor data in the third axis direction and the center of gravity of the target screen in the preset gravity direction is in a preset first interval, and the third axis direction is the axis direction perpendicular to the plane coordinate system where the target screen is located.
5. The method according to claim 4, characterized in that The switching process of the first camera module corresponding to the first screen and the second camera module corresponding to the second screen based on the respective screen states of the first screen and the second screen includes: When the screen states of the first screen and the second screen respectively meet a preset state condition, switching processing is performed on a first camera module corresponding to the first screen and a second camera module corresponding to the second screen; The preset state condition includes a screen state indication of the target screen, wherein the angle between the target screen and the ground is in a preset second interval, and the screen angle between the first screen and the second screen is in a preset third interval.
6. The method according to claim 5, characterized in that The preset state condition is that the screen states of the first screen and the second screen respectively include the second state and the fifth state; or, the preset state condition is that the screen states of the first screen and the second screen respectively include the fourth state and the fifth state.
7. The method according to claim 6, characterized in that If the first camera module is an external screen camera module and the second camera module is an internal screen camera module, the switching process of the first camera module corresponding to the first screen and the second camera module corresponding to the second screen includes: When the preset state condition is that the screen states of the first screen and the second screen respectively include the second state and the fifth state, the first camera module is switched to the second camera module to use the second camera module for shooting; or When the preset state condition is that the screen states of the first screen and the second screen respectively include the fourth state and the fifth state, the second camera module is switched to the first camera module to adopt the first camera module for shooting.
8. The method according to claim 7, characterized in that The method further comprises: Output the target state; or, When the screen states of the first screen and the second screen do not satisfy a preset state condition, outputting a target state; The target state is determined according to respective screen states of the first screen and the second screen.
9. The method according to any one of claims 1 to 8, characterized in that Before determining the respective screen states of the first screen and the second screen based on the first sensing data and the second sensing data, the method further includes: determining a screen angle between the first screen and the second screen based on the first sensing data and the second sensing data; When the screen angle is in a preset fourth interval, the step of determining the respective screen states of the first screen and the second screen based on the first sensing data and the second sensing data is continued.
10. A camera module switching device, characterized in that: include: an acquisition module configured to acquire first sensor data and second sensor data, wherein the first sensor data is obtained by monitoring the screen state of the first screen based on the first sensor, and the second sensor data is obtained by monitoring the screen state of the second screen based on the second sensor; a processing module, configured to determine the respective screen states of the first screen and the second screen based on the first sensing data and the second sensing data; The processing module is further configured to switch the first camera module corresponding to the first screen and the second camera module corresponding to the second screen based on the respective screen states of the first screen and the second screen.
11. A terminal device, characterized in that: The terminal device comprises a first screen, a second screen, a first sensor, a second sensor, a first camera module and a second camera module, wherein the first camera module is arranged on the first screen, the second camera module is arranged on the second screen, and the terminal device further comprises: processor; a memory for storing processor-executable instructions; The processor is configured to execute the executable instructions to implement the steps of the method according to any one of claims 1 to 9.
12. A computer-readable storage medium having computer program instructions stored thereon, characterized in that: When the computer program instructions are executed by a processor, the steps of the method according to any one of claims 1 to 9 are implemented.
13. A chip, characterized in that: The method comprises a processor and an interface; the processor is used to read instructions to execute the method according to any one of claims 1 to 9.
Citation Information
Patent Citations
Method for applying multiple sensors to electronic equipment with flexible screen and electronic equipment
CN110536004A
Display method of folding screen and related device
CN111263005A
Display screen state determination method and device, electronic equipment and storage medium
CN112099574A
Folding screen display method and device, electronic equipment and storage medium
CN113031894A
Image display method and electronic equipment
CN114257671A