Folding angle detection method and device, equipment and storage medium
By using the camera to acquire images and calculate the folding angle in the folding screen device, the hardware cost and space occupation problems caused by adding sensors in the prior art are solved, and accurate angle detection and personalized functions are realized without the need for additional sensors.
Patent Information
- Application Number
- CN202410079719.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-01-19
- Publication Date
- 2025-07-22
AI Technical Summary
In the prior art, when detecting the folding angle of the folding screen device, additional sensors are usually required, resulting in increased hardware costs or hinge space occupancy, making it difficult to accurately detect the folding angle without adding hardware.
The target image of the target object is obtained by using the camera of the electronic device, and by identifying the pixel size of the target object and the focal length of the camera, combining the triangle principle to calculate the folding angle to achieve angle detection without additional sensors.
It reduces hardware costs, avoids hinge space occupation, and realizes accurate detection of folding angles through software upgrades, supporting the implementation of personalized functions.
Smart Images

Figure CN120358298A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the technical field of mobile terminals, including but not limited to a method and device, equipment, and storage medium for detecting the folding angle. Background Art
[0002] With the rapid development of mobile terminal devices, devices with folding screens, such as folding screen mobile phones, folding screen computers, etc., are increasingly favored by consumers because they can be better carried in the folded state and provide a larger display area in the unfolded state. To improve the user experience, some folding screen devices can also set more personalized functions according to different folding angles of the screen. For example, operations such as controlling the display of a single-side screen, changing the page layout of an application, and controlling application split-screen are realized according to the current folding angle of the device.
[0003] To obtain the folding angle of the device screen, in related technologies, additional sensors such as rotary encoders or magnetic sensors are added to the rotating hinge used to implement the screen folding function. Such solutions will occupy a certain amount of hinge space and are not conducive to the design and miniaturization of the rotating hinge. Another solution is to detect the folding angle by adding sensors capable of detecting acceleration and gyroscope values at both ends of the folding screen. Such solutions will increase the hardware cost.
[0004] Therefore, how to detect the screen folding angle of an electronic device including a folding screen without adding additional sensors is an urgent problem to be solved. Summary of the Invention
[0005] In view of this, the folding angle detection method, device, equipment, and storage medium provided by the embodiments of the present application can obtain the target distance between the camera of the electronic device and the target object displayed on the opposite screen, and then determine the folding angle. There is no need to add additional sensor components related to angle detection in the electronic device, which reduces the hardware cost and does not occupy the space of the rotating hinge of the folding screen. The folding angle detection method, device, equipment, and storage medium provided by the embodiments of the present application are implemented as follows:
[0006] The folding angle detection method provided by the embodiments of the present application is applied to an electronic device including a folding screen. The folding screen includes a first screen and a second screen that can be folded relative to each other. The first screen is provided with a camera. The method includes:
[0007] When the distance between the first side of the first screen and the second side of the second screen is greater than a distance threshold, control the camera to obtain a target image including a target object, where the target object is displayed through the second screen, and the first side and the second side are opposite sides;
[0008] Determine a target distance between the camera and the target object according to the recognition result of the target object in the target image;
[0009] Determine a folding angle between the first screen and the second screen according to the size of the folding screen and the target distance.
[0010] In some embodiments, the recognition result includes a pixel size. The step of determining a target distance between the camera and the target object according to the recognition result of the target object in the target image includes:
[0011] Determine a target distance between the camera and the target object according to the actual size of the target object, the pixel size of the target object, and the focal length of the camera.
[0012] In some embodiments, before determining a target distance between the camera and the target object according to the recognition result of the target object in the target image, the method further includes:
[0013] Preprocess the target image, where the preprocessing includes binary processing and / or noise reduction processing;
[0014] Perform feature detection on the preprocessed target image to obtain the pixel size of the target object.
[0015] In some embodiments, the first screen and the second screen are screens of the same size. The size of the folding screen includes the length of the folding screen. The target object is displayed at a position on the second screen at a preset distance from the second side, and the preset distance is the distance of the camera from the first side on the first screen. The step of determining a folding angle between the first screen and the second screen according to the size of the folding screen and the target distance includes:
[0016] Determine a folding angle between the first screen and the second screen according to half of the length of the folding screen, the preset distance, the target distance, and the triangle principle.
[0017] In some embodiments, the electronic device includes a rotating shaft, the first screen and the second screen rotate relative to the rotating shaft so that the first screen and the second screen are folded, the camera is disposed at a position of the first screen at a first distance from the first side, the target object is displayed at a position of the second screen at a second distance from the second side, the size of the folding screen includes a first length between the first side and the rotating shaft and a second length between the second side and the rotating shaft, and determining the folding angle between the first screen and the second screen according to the size of the folding screen and the target distance includes:
[0018] Determine the folding angle between the first screen and the second screen according to the first length, the second length, the first distance, the second distance, the target distance, and the triangle principle.
[0019] In some embodiments, the electronic device further includes a sensing element, the sensing element is respectively disposed on the first screen and the second screen, the sensing element is used to indicate whether the first screen or the second screen is within the sensing range of the sensing element, and when the first screen or the second screen is within the sensing range of the sensing element, the distance between the first side and the second side is less than or equal to the distance threshold, before controlling the camera to acquire a target image including a target object, the method further includes:
[0020] Obtain a trigger signal of the sensing element, where the trigger signal is used to indicate that the first screen or the second screen is outside the sensing range of the sensing element.
[0021] In some embodiments, the method further includes:
[0022] Determine the display states of the first screen and the second screen according to the folding angle;
[0023] Wherein, the display states include at least one of the following: single-screen display of the first screen, single-screen display of the second screen, and dual-screen display of the first screen and the second screen.
[0024] In some embodiments, the method further includes:
[0025] Determine the display content of the first screen and / or the second screen according to the folding angle and the correspondence between the folding angle and the target application pre-configured.
[0026] The folding angle detection device provided by the embodiments of the present application, the device includes a folding screen, the folding screen includes a first screen and a second screen that can be folded relative to each other, the first screen is provided with a camera, and the device includes:
[0027] An image acquisition module, which is applied when the distance between the first side of the first screen and the second side of the second screen is greater than a distance threshold, controls the camera to acquire a target image including a target object, where the target object is displayed through the second screen, and the first side and the second side are opposite sides;
[0028] A distance measurement module, which is used to determine the target distance between the camera and the target object according to the recognition result of the target object in the target image;
[0029] An angle detection module, which determines the folding angle between the first screen and the second screen according to the size of the folding screen and the target distance.
[0030] The computer device provided by the embodiment of the present application includes a memory and a processor. The memory stores a computer program that can run on the processor, and when the processor executes the program, it implements the method described in the embodiment of the present application.
[0031] The computer-readable storage medium provided by the embodiment of the present application stores a computer program thereon, and when the computer program is executed by a processor, it implements the method provided by the embodiment of the present application.
[0032] The method, device, computer device, and computer-readable storage medium for detecting the folding angle provided by the embodiment of the present application. The method is applied to an electronic device including a folding screen, and the folding screen includes a first screen and a second screen that can be folded relative to each other, and the first screen is provided with a camera. When the distance between the first side of the first screen and the second side of the second screen is greater than a distance threshold, a target image including a target object can be acquired through the camera provided on the first screen, where the target object is displayed through the second screen, and the first side and the second side are opposite sides. Since the screen with a camera is a common configuration, acquiring the target image through this method to detect the folding angle will not increase additional hardware costs. By recognizing the target image, according to the recognition result of the target object in the target image, the target distance between the camera and the target object can be determined, and then according to the size of the folding screen and the obtained target distance, the folding angle between the first screen and the second screen can be determined.
[0033] In this way, without adding additional sensors, the screen folding angle of an electronic device including a folding screen can be detected, and this method detects the screen opening and closing angle through the software layer. Even if the electronic device does not have the function of detecting the folding angle during the preliminary design, this function can be added through software upgrade. Description of the Drawings
[0034] The accompanying drawings here are incorporated into the specification and constitute a part of this specification. These drawings show embodiments consistent with this application and, together with the specification, are used to illustrate the technical solutions of this application.
[0035] Figure 1 A schematic structural diagram of an electronic device to which the folding angle detection method provided in the embodiments of this application is applied;
[0036] Figure 2 A schematic flowchart of an implementation of the folding angle detection method provided in the embodiments of this application;
[0037] Figure 3 A schematic diagram for determining a target distance according to the recognition result of a target object in the method provided in the embodiments of this application;
[0038] Figure 4 Another schematic diagram for determining a target distance according to the recognition result of a target object in the method provided in the embodiments of this application;
[0039] Figure 5 A schematic structural diagram of the folding angle detection device provided in the embodiments of this application;
[0040] Figure 6 A schematic structural diagram of the computer device provided in the embodiments of this application. Detailed implementation manners
[0041] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the following will further describe the specific technical solutions of this application in detail with reference to the accompanying drawings in the embodiments of this application. The following embodiments are used to illustrate this application but not to limit the scope of this application.
[0042] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those of ordinary skill in the technical field to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.
[0043] In the following descriptions, reference is made to "some embodiments", which describe a subset of all possible embodiments. However, it can be understood that "some embodiments" can be the same subset or different subsets of all possible embodiments and can be combined with each other without conflict.
[0044] It should be noted that the terms "first / second / third" involved in the embodiments of this application are used to distinguish similar or different objects and do not represent a specific order for the objects. It can be understood that "first / second / third" can be interchanged with a specific order or sequence when allowed, so that the embodiments of this application described here can be implemented in an order other than that illustrated or described here.
[0045] With the rapid development of screen generation technology, foldable screen devices have gradually been received and recognized by consumers. Such foldable devices, such as foldable mobile phones and foldable computers, provide users with a more convenient and innovative user experience with their unique folding characteristics. In the folded state, they can be easily put into a pocket or a backpack, greatly enhancing portability. Once unfolded, foldable screen devices can provide a display area far exceeding that of conventional products, providing users with a wider field of view and a more immersive user experience.
[0046] To further enhance the user experience, many manufacturers of foldable screen devices have also developed innovative designs that customize personalized functions according to the folding angle of the screen. This means that according to the current folding angle of the device's screen, the device can perform a series of unique operations according to corresponding control instructions. For example, controlling the display of a single-side screen, adjusting the page layout of an application, or controlling application split-screen, etc. This interaction method not only increases the rationality and flexibility of operations in some scenarios but also significantly improves the user experience.
[0047] Therefore, it is crucial to obtain the folding angle of the foldable screen. In related technologies, the following technical solutions are usually used to detect the folding angle:
[0048] Using a rotary potentiometer for detection, placing the potentiometer in the hinge. When the folded screen is opened, it drives the rotary potentiometer to move, and the opening angle of the screen is calculated by detecting the change value of the resistance; the disadvantage of this solution is that the hinge requires a relatively large space to place the potentiometer, and the waterproof design at the hinge position is not good. Water ingress will lead to poor reliability;
[0049] Using two 3-axis or 6-axis sensors, respectively placed at both ends of the folded screen. When the screen is opened and closed, the acceleration values and gyroscope angle values of the sensors on both sides are different, and the opening and closing angle of the screen is calculated through software algorithms; since this solution uses two sensors, the cost increases, and it is not suitable for scenarios with high cost requirements;
[0050] Using a magnetic sensor, which can detect the direction and intensity of the magnetic field. Place a magnet and a magnetic sensor at the hinge position to ensure that when the screen is opened and closed, there is a relative change in the positions of the magnet and the sensor, and the opening and closing angle of the screen can be calculated through the detected change value; this solution also has requirements for the space of the hinge.
[0051] In view of this, the embodiments of the present application provide a method for detecting the folding angle, which is applied to an electronic device including a foldable screen. Figure 1 It is a schematic structural diagram of an electronic device to which the method for detecting the folding angle provided by the embodiments of the present application is applied.
[0052] Such as Figure 1As shown, the folding screen of the electronic device 100 is composed of a first screen 110 and a second screen 120. The first screen 110 and the second screen 120 can rotate relative to a rotation axis provided inside the electronic device 100. It should be noted that the dashed lines in the figure are only used to demonstrate the division of the folding screen in this application and do not represent the actual structure. Among them, the rotation axis can be in the form of a rotating shaft or a rotating hinge, which is not limited here. A camera 112 is provided on the first screen 110. One side of the first screen 110 away from the rotation axis is the first side 111 of the first screen 110, and one side of the second screen 120 away from the rotation axis is the second side 121 of the second screen 120.
[0053] It should be noted that the camera 112 can be selected and configured according to different usage scenarios and requirements, including but not limited to an under-screen camera, a perforated camera, a mechanical lifting camera, etc. In addition, it can also be a camera in a camera lens group, as long as it can capture a target image including the target object displayed on the second screen 120, which is not limited here. As Figure 1 The electronic device 100 described above is demonstrated in the form of a folding mobile phone. The method provided in this application can also be applied to other devices with a folding screen including a first screen and a second screen, and the first screen includes a camera, including but not limited to mobile phones, wearable devices, tablet computers, etc. The functions implemented by this method can be achieved by a processor in the electronic device calling program code. Of course, the program code can be stored in a computer storage medium. It can be seen that the electronic device at least includes a processor and a storage medium.
[0054] Next, the method for detecting the folding angle provided in the embodiments of this application will be described in conjunction with the accompanying drawings of the specification.
[0055] Please refer to Figure 2 , Figure 2 which is a schematic flowchart of an implementation of the method for detecting the folding angle provided in the embodiments of this application. As Figure 2 shown, the method may include the following steps 201 to step 203.
[0056] Step 201, when the distance between the first side of the first screen and the second side of the second screen is greater than a distance threshold, control the camera to obtain a target image including a target object.
[0057] The method provided in the embodiments of this application is applied to an electronic device including a folding screen. The folding screen includes a first screen and a second screen that can be folded relative to each other, and a camera is provided on the first screen.
[0058] In an embodiment of the present application, when the distance between the first side of the first screen and the second side of the second screen is greater than a distance threshold, the camera is controlled to acquire a target image including a target object, where the target object is displayed through the second screen, and the first side and the second side are opposite sides.
[0059] It should be noted that the target object is displayed through the second screen. The target object can be in the shape of a cross or other recognizable shapes, such as a rhombus, a star, etc. At the same time, the target object can be made easier to identify by displaying a white background and a black target object on the second screen, which helps to improve the accuracy of subsequent folding angle detection.
[0060] In some embodiments, a background image or an application interface is displayed on the second screen. After determining the position of the target object displayed on the second screen, the color information corresponding to this position is acquired in real time. The color information can include RGB color values, HSV color values, or CMYK color values, etc. The average value of the color information in this position area is obtained and processed to obtain the corresponding complementary color, and the complementary color of the target object is displayed in this position area. Among them, the complementary color refers to the color that is 180 degrees different from a certain color on the color wheel. Taking RGB color as an example, the complementary color is usually obtained by subtracting the RGB value of a certain color from white (RGB: 255, 255, 255). This can prominently display the target object on the second screen, making it easier to identify the target object in the target image acquired by the camera.
[0061] To improve the battery life of the electronic device, in some embodiments, the folding screen of the electronic device and the camera are in a sleep state when the folding screen is in a closed state. Only when it is detected that the distance between the first side of the first screen and the second side of the second screen is greater than a preset threshold, the electronic device will wake up the folding screen and the camera, and apply the folding angle detection method provided by the embodiments of the present application to detect the folding angle.
[0062] In some embodiments, the electronic device further includes a sensing element, and the sensing element is respectively disposed on the first screen and the second screen. The sensing element is used to indicate whether the first screen or the second screen is within the sensing range of the sensing element. When the first screen or the second screen is within the sensing range of the sensing element, the distance between the first side and the second side is less than or equal to the distance threshold. Before controlling the camera to acquire a target image including a target object, the method further includes:
[0063] Acquiring a trigger signal of the sensing element, where the trigger signal is used to indicate that the first screen or the second screen is outside the sensing range of the sensing element.
[0064] It should be noted that the sensing elements respectively arranged on the first screen and the second screen can be Hall sensors or touch switches, which are used to monitor whether the distance between the first side of the first screen and the second side of the second screen exceeds a preset threshold. The preset threshold depends on the type and specific model of the sensing element. Generally, when the distance between the first side and the second side is more than 3 millimeters, the sensing element will send out a corresponding trigger signal.
[0065] By means of the sensing elements arranged on the first screen and the second screen, it is possible to determine whether the folding screen of the electronic device is in the open state, realize the wake-up of the folding screen and the camera, and implement operations such as controlling the camera to obtain a target image including the target object in the method provided by the embodiment of the present application. It avoids the situation that the related functions of the folding screen and the camera are still activated when the folding screen is in the closed state. This wake-up mechanism not only helps to save energy and extend the battery life of the electronic device, but also improves the response speed and user experience of the electronic device. When the user needs to use the electronic device, the folding screen can quickly start the required functions in the unfolded state, meeting the user's needs for an efficient, convenient and intelligent device.
[0066] In some examples, to improve the accuracy of the sensing element in monitoring the distance between the first side and the second side, the sensing elements are respectively arranged at positions on the first screen close to the first side and on the second screen close to the second side. The actual setting positions of the sensing elements need to be determined according to the internal structure and functional requirements of the electronic device, which are not limited herein. By optimizing the positions of the sensing elements, the distance change between the screens can be monitored more precisely, so as to more sensitively obtain the trigger signal of the sensing element and correspondingly complete the detection of the folding angle.
[0067] Step 202: Determine the target distance between the camera and the target object according to the recognition result of the target object in the target image.
[0068] In the embodiment of the present application, the target distance between the camera and the target object is determined according to the recognition result of the target object in the target image.
[0069] It should be noted that this recognition process mainly involves image processing algorithms, such as edge detection, feature extraction or pattern matching, etc., to ensure that the target object can be accurately recognized and located. After the target object is successfully recognized in the image, the method provided by the embodiment of the present application will further use image processing techniques or preset algorithms to determine the distance of the line segment between the camera and the target object according to the size, position and other relevant parameters of the target object in the image, and define this distance as the target distance for subsequent realization of the detection of the folding angle.
[0070] In some embodiments, the recognition result includes the pixel size. Determining the target distance between the camera and the target object according to the recognition result of the target object in the target image includes:
[0071] Determining the target distance between the camera and the target object according to the actual size of the target object, the pixel size of the target object, and the focal length of the camera.
[0072] It should be noted that when discussing the performance of a camera, resolution is a key parameter affecting the camera evaluation. It determines the clarity and detail performance of the images captured by the camera. The resolution of a camera refers to the pixel size or quantity of the images it captures. In the embodiments of the present application, the pixel size of the target object refers to the pixel size or quantity it occupies in the target image.
[0073] It can be understood that as the first screen rotates relative to the second screen, with the position of the camera determined and the position of the target object displayed on the second screen unchanged, the larger the folding angle of the folding screen of the electronic device, the farther the target object is from the camera. With the focal length of the camera unchanged, the pixel size of the target object in the target image is smaller. Among them, since the cameras set on the screens of electronic devices are usually fixed-focus cameras, no additional adjustment is required for this. For some variable focal length cameras, a preset fixed focal length needs to be selected to obtain the target image to ensure the accuracy of folding angle detection. In this way, through the actual size and pixel size of the target object, the required target distance can be calculated, which is applicable to folding screen devices including screen cameras without adding additional sensing elements for angle detection.
[0074] Therefore, accurately obtaining the pixel size of the target object is the basis for ensuring the accuracy of folding angle detection. By selecting a target object with a regular shape, such as a rectangle or a circle, it is convenient to recognize the target object in the target image and confirm the edge pixel positions and quantities of the target object, which helps to detect the folding angle more accurately.
[0075] In some embodiments, the folding angle of the electronic device is measured by other measuring devices, and with the actual size and display position of the target object unchanged, the pixel size of the target object in the image captured by the camera at different folding angles is recorded, an angle detection rule including the corresponding relationship between the actual size, pixel size, and folding angle of the target object is constructed, and the angle detection rule is stored in the storage medium of the electronic device for subsequent folding angle detection.
[0076] In addition, through relevant prediction algorithms, such as linear regression algorithms, random forest algorithms, neural network models, etc., the pixel size of the target object in the images captured by the camera at different folding angles can be trained to obtain an angle detection prediction model, which can predict the pixel size of the target object at some folding angles that have not been measured in advance, further improving the accuracy of folding angle detection.
[0077] In some embodiments, the camera provided on the first screen is a single camera, and a monocular depth algorithm can be used to identify the target distance between the target object and the camera. The monocular depth algorithm derives the distance between the target object and the camera by analyzing parameters such as the pixel size of the target object in the target image and the focal length of the camera. In some embodiments, a camera module including at least two cameras with different focal lengths is provided on the first screen, and a binocular depth algorithm can be used. By analyzing the images captured by the two cameras with different focal lengths and combining the position and size differences of the target object in the two images, the target distance between the target object and the camera can be obtained.
[0078] In some embodiments, before determining the target distance between the camera and the target object according to the recognition result of the target object in the target image, the method further includes:
[0079] Preprocessing the target image, where the preprocessing includes binary processing and / or noise reduction processing;
[0080] Performing feature detection on the preprocessed target image to obtain the pixel size of the target object.
[0081] It should be noted that, in order to more accurately identify the target distance between the target object and the camera, the method provided in the embodiments of the present application further includes a series of preprocessing steps to improve the image quality of the obtained target image.
[0082] First, the target image needs to be preprocessed, including binary processing and / or noise reduction processing. Binary processing converts the target image into black and white, highlighting the contrast between the target object and the background, making subsequent processing more convenient. The purpose of performing noise reduction processing is that when the folding angle is small, the camera may not be correctly focused on the nearby target object, resulting in a blurred image. It is necessary to reduce the noise and interference in the image and improve the clarity of the image.
[0083] Then, feature detection is performed on the preprocessed target image. This step detects feature points in the image through a specific algorithm, such as edges, lines, corner points, etc. Through these feature points, the position of the target object in the target image can be further calculated, and then the pixel size of the target object can be determined.
[0084] Combining the above preprocessing steps can improve the accuracy of the pixel size of the acquired target object to ensure the accuracy of calculating the distance between the target object and the camera in the subsequent process.
[0085] Step 203: Determine the folding angle between the first screen and the second screen according to the size of the folding screen and the target distance.
[0086] In some embodiments, the first screen and the second screen are screens of the same size. The size of the folding screen includes the length of the folding screen. The target object is displayed at a position preset distance from the second side on the second screen. The preset distance is the distance of the camera from the first side on the first screen. The determining the folding angle between the first screen and the second screen according to the size of the folding screen and the target distance includes:
[0087] Determine the folding angle between the first screen and the second screen according to half of the length of the folding screen, the preset distance, the target distance, and the triangle principle.
[0088] It should be noted that the mainstream materials selected for the folding screen of the electronic device include ultra-thin flexible glass (UTG) and transparent polyimide film (CPI), etc. To ensure the durability of the screen and reduce the folding marks, there is a certain arc at the connection between the first screen and the second screen when the folding screen is in the open state. However, this arc is usually small relative to the overall size of the folding screen, and the resulting error is less than the acceptable error threshold. Therefore, the folding angle can be detected according to half of the length of the folding screen, the preset distance, the target distance, and the triangle principle.
[0089] It can be understood that when the first screen and the second screen are of the same size, the midline of the folding screen can be regarded as the folding area, and half of the length of the folding screen is the distance value from the first side and the second side to the folding area. By subtracting the preset distance from half of the length of the folding screen, the distance value of the camera and the target object from the folding area is obtained. Combining the triangle principle and the target distance obtained in the above steps, the folding angle can be obtained. Among them, according to the cosine theorem in the triangle principle, after determining the lengths of the three sides of the triangle, the angle information of any included angle in the triangle can be obtained.
[0090] In some embodiments, the electronic device includes a rotating shaft, the first screen and the second screen rotate relative to the rotating shaft so that the first screen and the second screen are folded. The camera is disposed at a position that is a first distance from the first side of the first screen, and the target object is displayed at a position that is a second distance from the second side of the second screen. The size of the folding screen includes a first length between the first side and the rotating shaft and a second length between the second side and the rotating shaft. Determining the folding angle between the first screen and the second screen according to the size of the folding screen and the target distance includes:
[0091] Determine the folding angle between the first screen and the second screen according to the first length, the second length, the first distance, the second distance, the target distance, and the triangle principle.
[0092] It should be noted that in some embodiments, the distances of the first screen and the second screen from the folding area, i.e., the rotating shaft, may not be the same. The distance value of the camera from the folding area can be obtained by subtracting the first distance from the first length, and the distance value of the target object from the folding area can be obtained by subtracting the second distance from the second length. Combining the triangle principle and the target distance obtained in the above steps, the folding angle can also be obtained.
[0093] In some embodiments, when the first distance between the camera disposed on the first screen and the first side and the second distance between the target object displayed on the second screen and the second side are both less than a preset acceptable error distance, the folding angle between the first screen and the second screen is determined according to the first length between the first side and the rotating shaft and the second length between the second side and the rotating shaft included in the folding screen size, the target distance, and the triangle principle.
[0094] It can be understood that when the first distance between the camera and the first side and the second distance between the target object and the second side are both less than the preset acceptable error distance, the ratios of the first distance and the second distance to the overall size of the folding screen are small. Therefore, in some scenarios with lower precision requirements, the folding angle can be determined without considering the above first distance and second distance. This can simplify the calculation process of the folding angle, and the display position of the target object can be flexibly changed to a certain extent to avoid the display content of other applications.
[0095] In some embodiments, when calculating the folding angle based on the distance value of the camera from the folding area, the distance value of the target object from the folding area, and the target distance. To ensure the accuracy of the result. It should be ensured that the display position of the target object and the camera are on the same straight line perpendicular to the boundary line between the first screen and the second screen, which reduces the error caused by the non-perpendicular connection line between the camera and the target object and the boundary line, and improves the accuracy of detecting the folding angle.
[0096] It should be noted that when performing operations related to the distance measurement between the camera and the target object, the center point or specific boundary point of the camera and the target object can be selected as the position reference. Such a selection can standardize the detection process to provide more accurate measurement results, thereby ensuring the accuracy of the folding angle.
[0097] By implementing the above technical solutions, the folding angle detection method provided by this application can, when the distance between the first side of the first screen and the second side of the second screen is greater than the distance threshold, obtain a target image including the target object through the camera set on the first screen. Since the screen with the camera is a common configuration, obtaining the target image through this method does not increase the hardware cost for detecting the folding angle. By identifying the target image and based on the recognition result of the target object in the target image, the target distance between the camera and the target object can be determined. Furthermore, according to the size of the folding screen and the obtained target distance, the folding angle between the first screen and the second screen can be determined. Without adding additional sensors, the screen folding angle of an electronic device including a folding screen can be detected, and this method detects the screen opening and closing angle at the software level. Even if the electronic device does not have the function of detecting the folding angle in the early design, this function can be added through software upgrade.
[0098] After obtaining the folding angle of the folding screen, various functions or applications can be further realized according to different folding angles. For example, adjusting the interface layout, optimizing the display effect, or performing specific interaction operations according to the folding angle to provide a richer and more personalized user experience.
[0099] In some embodiments, the method further includes:
[0100] Determining the display states of the first screen and the second screen according to the folding angle;
[0101] Wherein, the display states include at least one of the following: single-screen display of the first screen, single-screen display of the second screen, and dual-screen display of the first screen and the second screen.
[0102] By presetting multiple intervals of folding angles, after detecting the actual folding angle according to the method provided in the embodiments of the present application, the display state of the screen is determined to be single-screen display of the first screen, single-screen display of the second screen, or dual-screen display of the first screen and the second screen according to the folding angle interval in which the actual folding angle is located. This dynamic adjustment mechanism can not only adaptively adjust the display state of the screen according to the user's needs, but also, by changing the folding angle interval, gradually adjust the folding angle interval by learning the user's usage habits in the case where the user has no clear needs, so as to achieve a more intelligent user experience.
[0103] In some embodiments, the method further includes:
[0104] Determine the display content of the first screen and / or the second screen according to the folding angle and the pre-configured correspondence between the folding angle and the target application.
[0105] Among them, the above-mentioned pre-configured correspondence between the folding angle and the target application can be the display content of the same target application at different folding angles. Taking the camera application as an example, when the folding angle is less than a certain angle, the camera application can automatically enter the selfie mode interface. At this time, the first screen can be used as a viewfinder to display the selfie image, and the second screen can be used as an operation interface to display controls such as the capture button and beauty settings. When the folding angle is greater than a certain angle, the camera application can automatically enter the rear camera shooting mode interface. At this time, the first screen can be used as a viewfinder to display the shooting image of the rear camera, and the second screen can be used as an operation interface to display controls such as the capture button and flash settings. The pre-configured correspondence between the folding angle and the target application can also be the display content of different target applications at different folding angles. For example, when the folding angle is less than a certain angle and stays for more than the preset response time, the first screen can display the e-book reader application, and the second screen can display the table of contents or bookmarks of the e-book; when the folding angle is greater than a certain angle and stays for more than the preset response time, the first screen can display the music player application, and the second screen can display the playlist or music control buttons. The specific application configuration is not limited here.
[0106] In addition, the target application can be determined according to the preset application list or by obtaining the applications running in the background in real time, which is not limited here. This mechanism can adaptively adjust the correspondence between the application and the display content according to the user's actual needs and scenarios, thereby providing a more intelligent and personalized user experience.
[0107] It should be understood that although the steps in the above flowcharts are shown sequentially according to the arrows, these steps are not necessarily executed sequentially in the order indicated by the arrows. Unless otherwise clearly stated in this document, the execution of these steps has no strict order limit, and these steps can be executed in other orders. Moreover, at least a part of the steps in the above flowcharts may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed alternately or in turn with at least a part of other steps or sub-steps or stages of other steps.
[0108] Next, in combination with the accompanying drawings of the specification, a method for determining the target distance between a camera and a target object according to the recognition result of the target object in the target image in some embodiments will be further described.
[0109] Please refer to Figure 3 , Figure 3 which is a schematic diagram for determining the target distance according to the recognition result of the target object in the method provided by the embodiments of the present application, including Figure 3 (a) and Figure 3 (b).
[0110] As Figure 3 (a) shows, it is a simplified schematic diagram of the folding screen of the electronic device provided by the embodiments of the present application. It includes a first screen provided with a camera and a second screen for displaying the target object. The dotted line at the connection between the first screen and the second screen represents the boundary line between the two screens, and the area in the second screen that is distinguished by a dotted line and displays the target object is the feature display area.
[0111] In the embodiment shown in Figure 3 (a), the target object is a cross-shaped target object composed of a line segment parallel to the boundary line and a line segment perpendicular to the boundary line. And the landing point of the perpendicular line drawn from the center point of the cross-shaped target object to the boundary line is the same as the landing point of the perpendicular line drawn from the center point of the camera to the boundary line. The camera is controlled to obtain a target image including the target object.
[0112] It can be understood that the target object is displayed on the second screen that is inclined to the first screen where the camera is located. In the captured target image, due to the influence of the shooting angle and perspective effect, the image length of the line segment of the target object perpendicular to the boundary line will deviate from the line segment of the same actual length parallel to the boundary line at the same shooting distance. Therefore, in order to more accurately determine the distance between the camera and the target object, the recognition result of the line segment of the target object parallel to the boundary line can be selected to determine the target distance between the camera and the target object.
[0113] In some embodiments, the target object is a cross-shaped target object composed of a line segment parallel to the demarcation line and a line segment perpendicular to the demarcation line, and the lengths of the line segment parallel to the demarcation line and the line segment perpendicular to the demarcation line are the same. Taking advantage of the fact that due to the influence of the shooting angle and perspective effect, the image length of the line segment of the target object perpendicular to the demarcation line will deviate from the line segment of the same actual length parallel to the demarcation line at the same shooting distance, the recognition result of the target object in the target image includes the ratio of the lengths of the two line segments. Based on this ratio, the target distance between the camera and the target object is determined.
[0114] As Figure 3 (b) shows a schematic diagram of the principle for determining the target distance between the camera and the target object according to the actual size of the target object, the pixel size of the target object, and the focal length of the camera in some embodiments. In Figure 3 (b), the arrow marked as image height on the left is used to show the mapping of the target object on the photosensitive chip of the camera, that is, the pixel size. The arrow marked as object height on the right is used to show the display of the target object on the second screen, that is, the actual size. The middle line segment is used to represent the lens structure of the camera. The distance from it to the left arrow is the focal length, and the distance from it to the right arrow is the distance from the target object to the camera, that is, the target distance.
[0115] According to the properties of similar triangles, corresponding angles are equal and corresponding sides are in proportion. It can be known that the ratio of the image height to the focal length is equal to the ratio of the object height to the distance from the target object to the camera.
[0116] Obtain the relevant parameters of the camera to get the pixel size of each pixel and the focal length data of the camera. Through the feature recognition algorithm, obtain the number of pixels in the specified direction of the target object in the target image captured by the camera. For example, Figure 3 (a) the number of pixels of the line segment parallel to the demarcation line direction. After combining the pixel size of each pixel, the value of the image height can be calculated. The object height corresponding to the target object can be directly measured by a tool or determined according to the pixel size of the second screen and the number of pixels occupied by the display of the target object on the second screen, which is not limited here. After obtaining the above-mentioned image height, focal length, and object height, using the properties of similar triangles, the distance from the target object to the camera can be calculated, and this distance is the target distance required for subsequent detection of the folding angle.
[0117] In some embodiments, when the detection accuracy requirement for the folding angle is not high, it is not necessary to consider the deformation of the target object in the target image captured by the camera due to the perspective effect. Similarly, it is not necessary to limit that the landing point of the perpendicular line drawn from the center point of the target object to the dividing line is the same as the landing point of the perpendicular line drawn from the center point of the camera to the dividing line. Obtain the total number of pixels of the target object recognized in the target image. By using the formula that the photosensitive area is equal to the pixel size multiplied by the number of pixels, obtain the pixel size of the target object in the target image. At the same time, obtain the actual area of the target object displayed on the second plane, that is, the actual size.
[0118] The property of similar bodies can be utilized. The ratio of the surface areas of similar bodies is equal to the square of the similarity ratio. Calculate to obtain the target distance between the camera and the target object. Similar bodies refer to two or more geometric bodies whose corresponding angles are equal and the corresponding side lengths are in proportion. It can be understood that the geometric body formed by the mapped image of the target object on the photosensitive chip of the camera and the camera focus, and the geometric body formed by the target object displayed on the second screen and the camera focus are similar bodies to each other. Combining parameters such as the known pixel size of the target object, the actual size of the target object, and the camera focal length, the target distance between the target object and the camera can be obtained.
[0119] By implementing the above technical solutions, it is possible to determine the target distance between the camera and the target object based on the actual size of the target object, the pixel size of the target object, and the focal length of the camera.
[0120] In some embodiments, the recognition result includes the position information of the target object in the target image. Determining the target distance between the camera and the target object according to the recognition result of the target object in the target image includes:
[0121] Determine the target distance between the camera and the target object according to the position information of the target object in the target image.
[0122] Next, with reference to the accompanying drawings of the specification, a method for determining the target distance between the camera and the target object according to the position information of the target object in the target image will be further described.
[0123] Please refer to Figure 4 , Figure 4 which is another schematic diagram for determining the target distance according to the recognition result of the target object in the method provided by the embodiment of the present application. It includes Figure 4 (a), Figure 4 (b), Figure 4 (c) and Figure 4 (d), four target images containing the target object captured by the same electronic device at different folding angles.
[0124] AsFigure 4 As shown, the target object is a cross shape displayed on the second screen. Figure 4 (a), Figure 4 (b), Figure 4 (c) and Figure 4 (d) show the target images including the target object obtained by the camera on the first screen as the folding angle of the folding screen gradually increases. These images show the process of the position of the target object in the target image changing with the folding angle.
[0125] In Figure 4 (a), due to the small folding angle, the target object is relatively close to the camera, and it is impossible to effectively focus the target object on the photosensitive element, resulting in a blurred image. And in the subsequent Figure 4 (b), Figure 4 (c) and Figure 4 (d), as the folding angle increases, while the target object becomes clear in the target image, the position of the target object in the target image is also continuously moving downward, approaching the bottom of the target image. This is because the camera is fixed on the first screen. When the first screen rotates relative to the second screen, the position of the target object displayed on the second screen mapped on the photosensitive chip of the camera also moves until it exceeds the boundary of the photosensitive chip, and at this time the target object disappears in the target image. Therefore, the target distance between the camera and the target object can be determined by obtaining the relative position of the target object in the target image, or the folding angle can be directly determined.
[0126] In order to realize determining the target distance between the camera and the target object by obtaining the relative position of the target object in the target image, or directly determining the folding angle. The distance between the camera and the target object at different folding angles can be measured by a device or a preset algorithm, or the angle value can be directly recorded, and the relative position of the target object in the corresponding target image can be obtained. The actually measured distance or angle value and the relative position of the target object are used to construct a mathematical model or establish a corresponding table through an interpolation or fitting algorithm, and stored in the storage medium of the electronic device. In this way, determining the target distance or folding angle between the camera and the target object by obtaining the relative position of the target object in the target image is completed.
[0127] Based on the foregoing embodiments, an embodiment of the present application provides a folding angle detection device. The device includes each module included, and each unit included in each module, which can be implemented by a processor; of course, it can also be implemented by specific logic circuits; in the implementation process, the processor can be a central processing unit (CPU), a microprocessor (MPU), a digital signal processor (DSP), or a field programmable gate array (FPGA), etc.
[0128] Figure 5The structural schematic diagram of the folding angle detection device provided by the embodiment of the present application is as follows. Figure 5 As shown in the figure, the folding angle detection device 500 includes an image acquisition module 501, a distance measurement module 502, and an angle detection module 503.
[0129] The image acquisition module 501 is configured to control the camera to acquire a target image including a target object when the distance between the first side of the first screen and the second side of the second screen is greater than a distance threshold. The target object is displayed through the second screen, and the first side and the second side are opposite sides.
[0130] The distance measurement module 502 is configured to determine the target distance between the camera and the target object according to the recognition result of the target object in the target image.
[0131] The angle detection module 503 is configured to determine the folding angle between the first screen and the second screen according to the size of the folding screen and the target distance.
[0132] In some embodiments, the recognition result includes a pixel size. The distance measurement module 502 is further configured to determine the target distance between the camera and the target object according to the actual size of the target object, the pixel size of the target object, and the focal length of the camera.
[0133] In some embodiments, the image acquisition module 501 is further configured to perform preprocessing on the target image. The preprocessing includes binary processing and / or noise reduction processing; perform feature detection on the preprocessed target image to obtain the pixel size of the target object.
[0134] In some embodiments, the first screen and the second screen are screens of the same size. The size of the folding screen includes the length of the folding screen. The target object is displayed at a position preset distance from the second side of the second screen. The preset distance is the distance between the camera and the first side of the first screen. The angle detection module 503 is further configured to determine the folding angle between the first screen and the second screen according to half of the length of the folding screen, the preset distance, the target distance, and the triangle principle.
[0135] In some embodiments, the electronic device includes a rotating shaft, the first screen and the second screen rotate relative to the rotating shaft so that the first screen and the second screen are folded, the camera is disposed at a position of the first screen at a first distance from the first side, the target object is displayed at a position of the second screen at a second distance from the second side, the size of the folding screen includes a first length between the first side and the rotating shaft and a second length between the second side and the rotating shaft, and the angle detection module 503 is further configured to determine a folding angle between the first screen and the second screen according to the first length, the second length, the first distance, the second distance, the target distance, and the triangle principle.
[0136] In some embodiments, the electronic device further includes sensing elements respectively disposed on the first screen and the second screen. The sensing elements are configured to indicate whether the first screen or the second screen is within the sensing range of the sensing elements. When the first screen or the second screen is within the sensing range of the sensing elements, the distance between the first side and the second side is less than or equal to the distance threshold. The image acquisition module 501 is further configured to acquire a trigger signal of the sensing elements, and the trigger signal is configured to indicate that the first screen or the second screen is outside the sensing range of the sensing elements.
[0137] In some embodiments, the angle detection module 503 is further configured to determine a display state of the first screen and the second screen according to the folding angle; wherein the display state includes at least one of the following: single-screen display of the first screen, single-screen display of the second screen, and dual-screen display of the first screen and the second screen.
[0138] In some embodiments, the angle detection module 503 is further configured to determine display content of the first screen and / or the second screen according to the folding angle and a corresponding relationship between the folding angle and a target application configured in advance.
[0139] The description of the above device embodiments is similar to the description of the above method embodiments and has similar beneficial effects to those of the method embodiments. For technical details not disclosed in the device embodiments of the present application, please refer to the description of the method embodiments of the present application for understanding.
[0140] It should be noted that in the embodiments of the present application Figure 5The division of the detection device for the folding angle shown is schematic, merely a logical function division, and there may be other division methods in actual implementation. In addition, in each embodiment of the present application, each functional unit may be integrated in a processing unit, may exist alone physically, or two or more units may be integrated in one unit. The above integrated unit may be implemented in the form of hardware, or may be implemented in the form of a software functional unit, or may be implemented in a form combining software and hardware.
[0141] It should be noted that in the embodiments of the present application, if the above method is implemented in the form of a software functional module and sold or used as an independent product, it may also be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the embodiments of the present application essentially or the part that contributes to the related technology can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to enable an electronic device to execute all or part of the methods described in the embodiments of the present application. The foregoing storage medium includes: various media such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a magnetic disk, or an optical disc that can store program codes. In this way, the embodiments of the present application are not limited to any specific combination of hardware and software.
[0142] The embodiments of the present application provide a computer device, which may be a server, and its internal structure diagram may be as Figure 6 shown. The computer device includes a processor, a memory, and a network interface connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store data. The network interface of the computer device is used to communicate with an external terminal through a network connection. The computer program, when executed by the processor, implements the above method.
[0143] The embodiments of the present application provide a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, it implements the steps in the method provided in the above embodiments.
[0144] The embodiments of the present application provide a computer program product containing instructions. When it runs on a computer, it enables the computer to execute the steps in the method provided in the above method embodiments.
[0145] Those skilled in the art can understand that Figure 6The structure shown is only a block diagram of some structures related to the solution of this application, and does not constitute a limitation on the computer device to which the solution of this application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine some components, or have different component arrangements.
[0146] In one embodiment, the folding angle detection device provided by this application can be implemented in the form of a computer program, and the computer program can run on a computer device as shown in Figure 6 the figure. Each program module constituting the above device can be stored in the memory of the computer device. The computer program constituted by each program module enables the processor to execute the steps in the methods of various embodiments of this application described in this specification.
[0147] It should be pointed out here that: the descriptions of the above storage medium and device embodiments are similar to the descriptions of the above method embodiments, and have beneficial effects similar to those of the method embodiments. For the technical details not disclosed in the storage medium, storage medium and device embodiments of this application, please refer to the descriptions of the method embodiments of this application for understanding.
[0148] It should be understood that the "one embodiment" or "an embodiment" or "some embodiments" mentioned throughout the specification means that the specific features, structures or characteristics related to the embodiment are included in at least one embodiment of this application. Therefore, the "in one embodiment" or "in an embodiment" or "in some embodiments" that appear throughout the specification do not necessarily refer to the same embodiment. In addition, these specific features, structures or characteristics can be combined in one or more embodiments in any suitable manner. It should be understood that in various embodiments of this application, the order numbers of the above processes do not mean the order of execution, and the execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application. The serial numbers of the embodiments of this application above are only for description and do not represent the advantages or disadvantages of the embodiments. The descriptions of the above embodiments tend to emphasize the differences between the embodiments, and their similarities or similarities can be referred to each other. For the sake of brevity, they will not be repeated here.
[0149] The term "and / or" in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, object A and / or object B can represent: object A exists alone, object A and object B exist simultaneously, and object B exists alone. These three situations.
[0150] It should be noted that in this article, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, such that a process, method, article or device comprising a series of elements not only includes those elements but also includes other elements not expressly listed, or further includes elements inherent to such process, method, article or device. Without further limitation, an element defined by the statement "comprising a..." does not exclude the existence of additional identical elements in the process, method, article or device comprising such element.
[0151] In several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. The embodiments described above are merely illustrative. For example, the division of the modules is only a logical function division, and there may be other division methods in actual implementation. For example, multiple modules or components can be combined, or can be integrated into another system, or some features can be ignored or not executed. In addition, the coupling, direct coupling, or communication connection between the components shown or discussed with each other can be through some interfaces, and the indirect coupling or communication connection of devices or modules can be electrical, mechanical or other forms.
[0152] The modules described above as separate components may or may not be physically separated, and the components shown as modules may or may not be physical modules; they can be located in one place or distributed to multiple network units; some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0153] In addition, each functional module in the embodiments of this application can be fully integrated into a processing unit, or each module can be separately used as a unit, or two or more modules can be integrated into a unit; the above-mentioned integrated modules can be implemented in the form of hardware, or in the form of hardware plus software functional units.
[0154] Those of ordinary skill in the art can understand that all or part of the steps to implement the above method embodiments can be completed by hardware related to program instructions. The foregoing program can be stored in a computer-readable storage medium. When the program is executed, it executes the steps including the above method embodiments; and the foregoing storage medium includes: various media such as removable storage devices, read-only memory (ROM), magnetic disks or optical discs that can store program codes.
[0155] Alternatively, if the above integrated units of the present application are implemented in the form of software functional modules and sold or used as independent products, they can also be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the embodiments of the present application, in essence or the part that contributes to the related art, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing an electronic device to execute all or part of the methods described in the various embodiments of the present application. The foregoing storage medium includes: various media such as removable storage devices, ROMs, magnetic disks, or optical discs that can store program codes.
[0156] The methods disclosed in several method embodiments provided by the present application can be arbitrarily combined without conflict to obtain new method embodiments.
[0157] The features disclosed in several product embodiments provided by the present application can be arbitrarily combined without conflict to obtain new product embodiments.
[0158] The features disclosed in several method or device embodiments provided by the present application can be arbitrarily combined without conflict to obtain new method embodiments or device embodiments.
[0159] The above is only the implementation manner of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art within the technical scope disclosed by the present application can easily think of changes or substitutions, which should be covered by the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.
Claims
1. A method for detecting the folding angle, characterized in that The method is applied to an electronic device including a folding screen, where the folding screen includes a first screen and a second screen that can be folded relative to each other. The first screen is provided with a camera. The method includes: When the distance between a first side of the first screen and a second side of the second screen is greater than a distance threshold, controlling the camera to acquire a target image including a target object, where the target object is displayed through the second screen, and the first side and the second side are opposite sides; Determining a target distance between the camera and the target object according to the recognition result of the target object in the target image; Determining a folding angle between the first screen and the second screen according to the size of the folding screen and the target distance.
2. The method according to claim 1, characterized in that The recognition result includes a pixel size. Determining the target distance between the camera and the target object according to the recognition result of the target object in the target image includes: Determining the target distance between the camera and the target object according to the actual size of the target object, the pixel size of the target object, and the focal length of the camera.
3. The method according to claim 2, wherein Before determining the target distance between the camera and the target object according to the recognition result of the target object in the target image, the method further includes: Performing preprocessing on the target image, where the preprocessing includes binary processing and / or noise reduction processing; Performing feature detection on the preprocessed target image to obtain the pixel size of the target object.
4. The method according to claim 1, wherein The first screen and the second screen are screens of the same size. The size of the folding screen includes the length of the folding screen. The target object is displayed at a position on the second screen at a preset distance from the second side, and the preset distance is the distance of the camera from the first side on the first screen. Determining the folding angle between the first screen and the second screen according to the size of the folding screen and the target distance includes: Determining the folding angle between the first screen and the second screen according to half of the length of the folding screen, the preset distance, the target distance, and the triangle principle.
5. The method according to claim 1, wherein The electronic device includes a rotating shaft. The first screen and the second screen rotate relative to the rotating shaft to fold the first screen and the second screen. The camera is arranged at a position on the first screen at a first distance from the first side, and the target object is displayed at a position on the second screen at a second distance from the second side. The size of the folding screen includes a first length between the first side and the rotating shaft and a second length between the second side and the rotating shaft. Determining the folding angle between the first screen and the second screen according to the size of the folding screen and the target distance includes: Determining the folding angle between the first screen and the second screen according to the first length, the second length, the first distance, the second distance, the target distance, and the triangle principle.
6. The method according to claim 1, characterized in that, The electronic device further includes sensing elements respectively disposed on the first screen and the second screen. The sensing elements are used to indicate whether the first screen or the second screen is within the sensing range of the sensing elements. When the first screen or the second screen is within the sensing range of the sensing elements, the distance between the first side and the second side is less than or equal to the distance threshold. Before controlling the camera to acquire a target image including a target object, the method further includes: Obtaining a trigger signal of the sensing element, where the trigger signal is used to indicate that the first screen or the second screen is outside the sensing range of the sensing element.
7. The method according to any one of claims 1 to 6, characterized in that, The method further includes: Determining the display states of the first screen and the second screen according to the folding angle; Wherein, the display states include at least one of the following: single-screen display of the first screen, single-screen display of the second screen, and dual-screen display of the first screen and the second screen.
8. The method according to any one of claims 1 to 6, characterized in that, The method further includes: Determining the display content of the first screen and / or the second screen according to the folding angle and the pre-configured correspondence between the folding angle and the target application.
9. A detection device for folding angle, characterized in that The device includes a folding screen, the folding screen includes a first screen and a second screen that can be folded relative to each other, the first screen is provided with a camera, and the device includes: An image acquisition module, configured to control the camera to acquire a target image including a target object when the distance between the first side of the first screen and the second side of the second screen is greater than a distance threshold, the target object is displayed through the second screen, and the first side and the second side are opposite sides; A distance measurement module, configured to determine a target distance between the camera and the target object according to the recognition result of the target object in the target image; An angle detection module, configured to determine the folding angle between the first screen and the second screen according to the size of the folding screen and the target distance.
10. A computer device, comprising a memory and a processor, the memory storing a computer program that can run on the processor, characterized in that, When the processor executes the program, it implements the steps of the method according to any one of claims 1 to 8.
11. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the method according to any one of claims 1 to 8.
Citation Information
Cited By
Reliability test method and system for folding screen mobile phone
CN120980162A