Image display method, image display system and electronic equipment
By using a gyroscope in the camera device to acquire angle information and rotate the image, the problem of angle offset when the camera device acquires images is solved, improving user experience and reducing calculation costs.
Patent Information
- Application Number
- CN202510381797.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-27
- Publication Date
- 2025-06-24
AI Technical Summary
When the camera device collects image data, due to the offset of the setting angle, the collected picture direction is offset, which affects the user's viewing experience. The existing adjustment methods rely on neural network algorithms with high computing cost.
By using a gyroscope in the imaging device to obtain the first angle information when the image is to be displayed, and rotate the image to be displayed based on the information, obtain the rotated target image, so that the object direction is consistent with the actual object direction, and then the target image is sent to the display device for display.
It improves the user's viewing experience, reduces the computing cost, simplifies the computing process, improves the regulation efficiency, and reduces the demand for computing resources.
Smart Images

Figure CN120201288A_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the technical field of electronic devices, and particularly relates to a method for displaying images, a display system, and an electronic device. Background Art
[0002] Camera devices can be widely applied in production and life. For example, devices such as cat's eyes, monitors, and dash cams can all use camera devices to collect image data and display it.
[0003] However, when collecting image data, the setting angle of the camera device may cause the direction of the captured image to be offset, resulting in a poor viewing experience for users.
[0004] Currently, there are also some methods for adjusting the display direction. However, the current methods adjust the image angle based on the face direction, and a neural network algorithm is required to identify the face during the adjustment process, which requires a relatively high computational cost. Summary of the Invention
[0005] In view of this, embodiments of the present application provide a method for displaying images, a display system, and an electronic device, which can reduce the computational cost while improving the user's viewing experience.
[0006] The first aspect of the embodiments of the present application provides a method for displaying images, which is applied to a camera device. The method includes:
[0007] When the camera device captures an image to be displayed, obtain the first angle information of the camera device when capturing the image to be displayed;
[0008] According to the first angle information, rotate the image to be displayed to obtain a rotated target image. The target image and the image to be displayed have the same object, and the direction of the object in the target image is consistent with the actual object direction;
[0009] Send the target image to a display device for display.
[0010] The second aspect of the embodiments of the present application provides a method for displaying images, which is applied to a display device. The method includes:
[0011] Receive a target image from a camera device. The target image is an image to be displayed that has been rotated based on the first angle information of the camera device. The target image and the image to be displayed have the same object, and the direction of the object in the target image is consistent with the actual object direction;
[0012] Determine the target display area of the target image;
[0013] Display the target image in the target display area.
[0014] The third aspect of the embodiments of the present application provides a display device for images, which is applied to a camera device. The device includes:
[0015] An acquisition module, configured to acquire first angle information of the camera device when the camera device acquires an image to be displayed.
[0016] A rotation module, configured to rotate the image to be displayed according to the first angle information to obtain a rotated target image. The target image and the image to be displayed have the same object, and the direction of the object in the target image is consistent with the actual object direction.
[0017] A sending module, configured to send the target image to a display device for display.
[0018] The fourth aspect of the embodiments of the present application provides a display device for images, which is applied to a display device. The device includes:
[0019] A receiving module, configured to receive a target image from a camera device. The target image is an image to be displayed obtained by rotating based on the first angle information of the camera device. The target image and the image to be displayed have the same object, and the direction of the object in the target image is consistent with the actual object direction.
[0020] A determination module, configured to determine a target display area of the target image.
[0021] A display module, configured to display the target image in the target display area.
[0022] The fifth aspect of the embodiments of the present application provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the method described in the first aspect or the second aspect above is implemented.
[0023] The sixth aspect of the embodiments of the present application provides a computer-readable storage medium storing a computer program, and when the computer program is executed by a processor, the method described in the first aspect or the second aspect above is implemented.
[0024] The seventh aspect of the embodiments of the present application provides a computer program product, which when running on an electronic device, causes the electronic device to execute the method described in the first aspect or the second aspect above.
[0025] An eighth aspect of an embodiment of the present application is a display system, including a camera device and a display device, where the camera device includes a gyroscope.
[0026] The gyroscope is configured to obtain first angle information when the camera device captures an image to be displayed.
[0027] The camera device is configured to rotate the image to be displayed according to the first angle information to obtain a rotated target image, and send the target image to the display device.
[0028] The display device is configured to display the image to be displayed.
[0029] Compared with the prior art, the embodiment of the present application has at least the following advantages:
[0030] In the camera device in the embodiment of the present application, the first angle information when the camera device captures the image to be displayed can be obtained. Due to the angle of the camera device, the captured image to be displayed will also be offset, that is, the object direction in the image to be displayed has an angular offset relative to the actual object direction. The camera device rotates the image to be displayed according to the first angle information to obtain a target image, and the object direction in the target image can be consistent with the actual object direction. After the camera device sends the target image to the display device, the display device displays the target image, so that the user can view the object with the same direction as the actual object from the target image, improving the user experience. The embodiment of the present application adjusts the display angle of the image by rotating the image. The calculation process is relatively simple, the adjustment process is more efficient, and the required computing resources are less. It can improve the adjustment efficiency while reducing the computing cost. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings required for the description of the embodiments or the prior art.
[0032] Figure 1 is a schematic diagram of a display system provided by an embodiment of the present application;
[0033] Figure 2 is a schematic flowchart of a method for displaying an image provided by an embodiment of the present application;
[0034] Figure 3 is a schematic diagram of a plane and direction provided by an embodiment of the present application;
[0035] Figure 4 is a schematic diagram of a physical object to be photographed provided by an embodiment of the present application;
[0036] Figure 5It is a schematic diagram of an image to be displayed provided by an embodiment of the present application;
[0037] Figure 6 It is a schematic diagram of a target image provided by an embodiment of the present application;
[0038] Figure 7 It is a schematic diagram of the step flow of another image display method provided by an embodiment of the present application;
[0039] Figure 8 It is a schematic diagram of the step flow of yet another image display method provided by an embodiment of the present application;
[0040] Figure 9 It is a schematic diagram of another display system provided by an embodiment of the present application;
[0041] Figure 10 It is a schematic diagram of the step flow of still another image display method provided by an embodiment of the present application;
[0042] Figure 11 It is a schematic diagram of an image display device provided by an embodiment of the present application;
[0043] Figure 12 It is a schematic diagram of an image display device provided by an embodiment of the present application;
[0044] Figure 13 It is a schematic diagram of an electronic device provided by an embodiment of the present application. Detailed implementation manners
[0045] In the following description, specific details such as specific system architectures and technologies are presented for the purpose of illustration rather than limitation, so as to thoroughly understand the embodiments of the present application. However, those skilled in the art should clearly understand that the present application can also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to avoid unnecessary details from interfering with the description of the present application.
[0046] The angle during the image shooting process will affect the display effect of the image. As an example, a cat's eye transmits the external scene through a device to the human eye, and a smart cat's eye device transmits it to the indoor screen for real-time playback.
[0047] However, an ordinary cat's eye has a single function, and the screen can only be viewed horizontally or vertically fixedly, and the screen playback effect is not ideal. Therefore, in order to make the cat's eye device more flexible during playback, it is found that it needs to be better solved in the actual application process. Therefore, how to make the cat's eye device be placed arbitrarily and still play a better video effect is an urgent problem for those skilled in the art to solve.
[0048] Based on this, an embodiment of the present application provides a method for displaying images.
[0049] The technical solution of the present application will be described below through specific embodiments.
[0050] The method for displaying images in the embodiment of the present application can be applied to a display system. Figure 1 It is a schematic diagram of a display system provided by an embodiment of the present application. As Figure 1 shown, the display system may include a camera device and a display device. The camera device may include a gyroscope.
[0051] A gyroscope is a device that can measure the angle, angular velocity, and angular acceleration of a moving object. It is also known as an angular velocity sensor and is used to sense and maintain direction.
[0052] The camera device may be a cat's eye device, a dash cam, a monitoring device, etc. The embodiment of the present application does not limit the camera device. The camera device may include a processor, an image sensor, and a gyroscope.
[0053] The gyroscope can be used to obtain the first angle information when the camera device captures the image to be displayed. The angles measured by the gyroscope usually include three directions, corresponding to the three coordinate axes in space, and are generally represented by roll angle, pitch angle, and yaw angle.
[0054] An image sensor is a component that converts an optical signal into an electrical signal and then generates a digital image signal. The image sensor may be a charge-coupled device (CCD) and a complementary metal-oxide semiconductor (CMOS). Based on the image sensor, the camera device can capture the image to be displayed.
[0055] Data collected by the image sensor and the gyroscope can be sent to the processor for processing. Among them, the processor may include one or more processing units. For example, the processor may include a central processing unit (CPU), an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Among them, different processing units may be independent devices or integrated in one or more processors. The processor can generate operation control signals according to the instruction operation code and the timing signal to complete the control of reading and executing instructions.
[0056] The imaging device can be used to rotate the image to be displayed according to the first angle information to obtain the rotated target image; and send the target image to the display device.
[0057] The display device can be an electronic device with a display screen, such as a computer, a mobile phone, a screen component, a television, etc. The embodiments of the present application do not limit the type of the display device. The display device can receive the image and display the image to be displayed.
[0058] The display device may include a display screen, which is also called a screen and is used to display images, videos, etc. The display screen can be one or more. The display screen includes a display panel, and the display panel can adopt a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), a MiniLED, a MicroLED, a Micro-OLED, a quantum dot light-emitting diode (QLED), etc.
[0059] The display device and the imaging device in the display system can be the same device or different devices. The display device and the imaging device can be arranged in different spaces, so that the user can view the picture within the field of view of the imaging device through the display device.
[0060] It can be understood that the above example structure does not specifically limit the electronic device. In some other examples, the electronic device may include more or fewer components, or combine certain components, or split certain components, or have different component arrangements.
[0061] Referring to Figure 2 , a schematic flow chart of steps of a method for displaying an image provided by an embodiment of the present application is shown, which may specifically include the following steps:
[0062] S201, when the imaging device captures the image to be displayed, obtain the first angle information of the imaging device when capturing the image to be displayed.
[0063] The execution subject of this embodiment is the imaging device. The above image to be displayed is a picture or video captured by an image sensor of the imaging device. Among them, the video may include multiple video frames, and each video frame may be an image.
[0064] As an example, when the imaging device is moving, the gyroscope can collect data, thereby obtaining the first angle information of the imaging device and storing the first angle information in the memory.
[0065] Whenever the imaging device has a new movement, the first angle information can be updated based on the data collected by the gyroscope. The first angle information may include a first angle value, a second angle value, and a third angle value. The first angle value is used to represent the angle of the imaging device relative to the first direction, the second angle value is used to represent the angle of the imaging device relative to the second direction, and the third angle value is used to represent the angle of the imaging device relative to the third direction. The first direction, the second direction, and the third direction are perpendicular to each other respectively. For example, the first angle value may be the roll angle, the second angle value may be the pitch angle, and the third angle value may be the yaw angle.
[0066] Figure 3 is a schematic diagram of a plane and a direction provided by the present application. Figure 3 The coordinate system in [[ ]] is a three-dimensional space coordinate system, which is composed of three mutually perpendicular coordinate axes, respectively called the x-axis, the y-axis, and the z-axis. The intersection of the three coordinate axes is called the origin O. Among them, the x-axis and the y-axis determine a horizontal plane, and the z-axis is perpendicular to this plane, with the upward direction being the positive direction. This coordinate system conforms to the right-hand rule, that is, when the right hand holds the z-axis, when the four fingers of the right hand turn from the positive direction of the x-axis to the positive direction of the y-axis at an angle of 90 degrees, the direction of the thumb is the positive direction of the z-axis. As an example, among them, the first direction may be the plane determined by the x-axis and the y-axis, the second direction may be the plane determined by the x-axis and the z-axis, and the third direction may be the plane determined by the y-axis and the z-axis. The first angle value represents the rotation angle of the gyroscope on the x-axis, the second angle value represents the rotation angle of the gyroscope on the y-axis, and the third angle value represents the rotation angle of the gyroscope on the z-axis.
[0067] As an example, the first angle value, the second angle value, and the third angle value can have signs and numerical values. The numerical value is used to characterize the magnitude of the rotation angle, and the sign can be used to characterize the rotation direction. For example, the sign can include two sign values. The first sign value characterizes clockwise rotation, and the second sign value characterizes counterclockwise rotation. For example, the first sign value can be "+", and the second sign value can be "-".
[0068] According to different imaging devices, the first angle value, the second angle value, and the third angle value can have corresponding angle ranges. For example, if the imaging device is a cat's eye device, the first angle value represents the rotation angle of the gyroscope on the x-axis, with a range of -90 to 90°. The second angle value represents the rotation angle of the gyroscope on the y-axis, with a range of -180 to 180°. The third angle value represents the rotation angle of the gyroscope on the z-axis, with a range of 0 to 360°. Assuming that when the cat's eye device is installed, the first angle value of the first gyroscope data obtained is 0, the second angle value is 45, and the third angle value is 0, it means that the cat's eye device is tilted 45° in the clockwise direction relative to the ground. And so on, no matter how the cat's eye device is placed, the placement direction and tilt angle of the cat's eye device can be determined according to the magnitude of the first gyro data.
[0069] When the imaging device captures the image to be displayed, it can obtain the latest first angle information from the memory, so as to obtain the angles of the imaging device relative to the first direction, the second direction, and the third direction. The first angle information can characterize the offset information of the object in the image to be displayed.
[0070] S202, rotate the image to be displayed according to the first angle information to obtain a rotated target image. The target image and the image to be displayed have the same object, and the object direction in the target image is consistent with the actual object direction.
[0071] The imaging device can rotate the image to be displayed according to the first angle information to obtain a target image.
[0072] Specifically, the imaging device can determine whether the first angle value, the second angle value, and the third angle value in the first angle information are zero. Zero indicates that there is no rotation in the corresponding direction, and non-zero indicates that there is rotation in the corresponding direction.
[0073] If the first angle value is not zero, rotate the image to be displayed by an angle corresponding to the first angle value in the first direction. Specifically, if the first angle value is not zero, the imaging device can determine the sign value and numerical value of the first angle value, so as to determine the rotation direction of the imaging device in the first direction; based on the rotation direction of the imaging device in the first direction, the rotation direction of the image to be displayed in the first direction can be determined. Among them, the rotation direction of the imaging device in the first direction is opposite to the rotation direction of the image to be displayed in the first direction. For example, if the rotation direction of the imaging device in the first direction is to rotate upward, then the rotation direction of the image to be displayed in the first direction is to rotate downward. The imaging device can rotate the image to be displayed by an angle of the above numerical size according to the rotation direction of the image to be displayed in the first direction.
[0074] If the second angle value is not zero, rotate the image to be displayed by an angle corresponding to the second angle value in the second direction. Specifically, if the second angle value is not zero, the imaging device can determine the sign value and numerical value of the second angle value, so as to determine the rotation direction of the imaging device in the second direction; based on the rotation direction of the imaging device in the second direction, the rotation direction of the image to be displayed in the second direction can be determined. Among them, the rotation direction of the imaging device in the second direction is opposite to the rotation direction of the image to be displayed in the second direction. For example, if the rotation direction of the imaging device in the second direction is to rotate clockwise, then the rotation direction of the image to be displayed in the second direction is to rotate counterclockwise. The imaging device can rotate the image to be displayed by an angle of the above numerical size according to the rotation direction of the image to be displayed in the second direction.
[0075] If the third angle value is not zero, rotate the image to be displayed by an angle corresponding to the third angle value in the third direction. Specifically, if the third angle value is not zero, the imaging device can determine the sign value and numerical value of the third angle value, so as to determine the rotation direction of the imaging device in the third direction; based on the rotation direction of the imaging device in the third direction, the rotation direction of the image to be displayed in the third direction can be determined. Among them, the rotation direction of the imaging device in the third direction is opposite to the rotation direction of the image to be displayed in the third direction. For example, if the rotation direction of the imaging device in the third direction is to rotate left, then the rotation direction of the image to be displayed in the third direction is to rotate right. The imaging device can rotate the image to be displayed by an angle of the above numerical size according to the rotation direction of the image to be displayed in the third direction.
[0076] Among them, the rotation method of the image can refer to the picture rotation method in the prior art, which will not be elaborated here.
[0077] After rotating the image to be displayed based on the first angle value, the second angle value, and / or the third angle value, a target image can be obtained.
[0078] As an example, when the first angle value is 0, the second angle value is +45 degrees, and the third angle value is 0, it indicates that the imaging device is tilted 45 degrees clockwise relative to the ground. The image to be displayed can be rotated counterclockwise by 45 degrees to obtain the target image.
[0079] The image to be displayed may include the physical object being photographed. Figure 4 is a schematic diagram of a physical object to be photographed provided by an embodiment of the present application. When photographing the Figure 4 physical object therein, if the imaging device rotates 90 degrees clockwise in the y-axis direction, the image to be displayed captured can be as shown in Figure 5 . At this time, the direction of the physical object in the image to be displayed is inconsistent with that of the Figure 4 physical object in reality. Therefore, the imaging device can rotate the Figure 5 image to be displayed counterclockwise by 90 degrees to obtain the Figure 6 target image. Figure 6 is a schematic diagram of a target image provided by an embodiment of the present application. In the Figure 6 target image, the direction of the physical object is the same as that of the Figure 4 physical object.
[0080] S203. Send the target image to a display device for display.
[0081] The imaging device can send the target image to the display device, so that the display device directly displays the target image.
[0082] In another possible implementation, the imaging device can send the image to be displayed and the first angle information to the display device, so that the display device can rotate the image to be displayed according to the first angle information to obtain the target image. Then display the target image.
[0083] Referring to Figure 7 , a schematic flowchart of steps of another image display method provided by an embodiment of the present application is shown, which may specifically include the following steps:
[0084] S701. Receive a target image from an imaging device. The target image is an image to be displayed obtained by rotating based on the first angle information of the imaging device. The same object exists in the target image and the image to be displayed, and the direction of the object in the target image is consistent with the actual object direction.
[0085] The execution subject of this embodiment is the above-mentioned display device.
[0086] S702. Determine a target display area of the target image.
[0087] In a possible implementation, a display device may include multiple display areas, and each display area may have a different size. For example, the display device may include a first display area and a second display area, where the length of the first display area is greater than the width, and the length of the second display area is less than the width.
[0088] The display device may determine the display mode of the target image according to the length and width of the target image. The display mode includes horizontal display or vertical display. When the length of the target image is less than the width, the display mode is vertical display. When the length of the target image is greater than the width, the display mode is horizontal display. Wherein, the width of the target image is the side length of the side parallel to the gravity direction of the object in the target image, and the length is the other side length.
[0089] If the display mode is horizontal display, the target display area is the first display area; if the display mode is vertical display, the target display area is the second display area.
[0090] S703, display the target image in the target display area.
[0091] It can be understood that by rotating the image to be displayed according to the angle of the imaging device, a target image that conforms to the user's viewing habit can be obtained, thereby improving the user's viewing experience when displaying the image. When adjusting the image display method in this embodiment, the angle information of the gyroscope can be used to obtain the angle of the imaging device, so as to determine the offset angle of the image. Since the acquisition of gyroscope data is simple and the required amount of calculation is not large, the method in this embodiment requires a low calculation cost and a fast calculation speed, and can improve the image display efficiency.
[0092] Refer to Figure 8 , which shows a schematic flowchart of the steps of another image display method provided by the embodiment of the present application, and may specifically include the following steps:
[0093] S801, when the imaging device captures the image to be displayed, the imaging device obtains the first angle information when the imaging device captures the image to be displayed.
[0094] S802, the imaging device sends the first angle information and the image to be displayed to the display device, and the display device is used to display the image to be displayed according to the first angle information.
[0095] S803, the display device rotates the image to be displayed according to the first angle information to obtain a target image.
[0096] The display device may refer to S202 above and rotate the image to be displayed according to the first angle information to obtain a target image.
[0097] S804, the display device displays the target image.
[0098] In this embodiment, the imaging device may not perform image rotation, but instead the display device performs image rotation. By unifying image processing on the display device, the computational pressure on the imaging device can be reduced, thereby improving the battery life of the imaging device. For example, the imaging device may be a surveillance camera, and the display device may be a surveillance display screen. The surveillance camera may send the first angle information and the image to be displayed to the surveillance display screen, and the surveillance display screen performs image rotation. The surveillance camera does not need to perform computational processing for image rotation. Since surveillance cameras are generally installed at high places, when the surveillance camera is powered by a battery, reducing the computational pressure on the surveillance camera can improve the battery life of the surveillance camera, thereby reducing the frequency of users replacing the battery or charging the battery, and avoiding the need for users to frequently install or remove the surveillance camera at high places.
[0099] Figure 9 is a schematic diagram of another display system provided by an embodiment of the present application; as Figure 9 shown, the display device may include a rotating mechanism. The rotating mechanism may be connected to the display area, and by rotating the rotating mechanism, the display area can be driven to rotate, thereby changing the angle of the display area.
[0100] Referring to Figure 10 , a schematic flow chart of steps of another method for displaying an image provided by an embodiment of the present application is shown, which may specifically include the following steps:
[0101] S1001, when the imaging device captures an image to be displayed, the imaging device obtains first angle information of the imaging device when capturing the image to be displayed.
[0102] S1002, the imaging device sends the first angle information and the image to be displayed to the display device, and the display device is configured to display the image to be displayed according to the first angle information.
[0103] S1003, the display device obtains second angle information of the display area.
[0104] The display area may be a display screen, and the display screen may have a gyroscope, so that based on the data of the gyroscope, the second angle information can be obtained.
[0105] S1004, the display device controls the rotation of the rotating mechanism according to the first angle information and the second angle information to change the angle of the display area.
[0106] The display device can determine the angular difference between the display device and the imaging device based on the first angle information and the second angle information, and thus control the rotation mechanism to rotate according to the angular difference, so that the display device and the imaging device have the same angle.
[0107] S1005. The display device displays the image to be displayed on the display area.
[0108] In this embodiment, in order to retain more image data, the display device can be controlled to rotate, so that the displayed image data conforms to people's viewing habits and improves the viewing experience.
[0109] It should be noted that the magnitudes of the sequence numbers of the steps in the above embodiments do not mean the order of execution. The execution order of each process should be determined according to its function and internal logic, and should not constitute any limitation to the implementation process of the embodiments of the present application.
[0110] Refer to Figure 11 , which shows a schematic diagram of an image display device provided by an embodiment of the present application. The device is applied to an imaging device and specifically may include an acquisition module 1101, a rotation module 1102, and a sending module 1103, where:
[0111] The acquisition module 1101 is configured to obtain first angle information when the imaging device acquires the image to be displayed.
[0112] The rotation module 1102 is configured to rotate the image to be displayed according to the first angle information to obtain a rotated target image. The target image and the image to be displayed have the same object, and the direction of the object in the target image is consistent with the actual object direction.
[0113] The sending module 1103 is configured to send the target image to the display device for display.
[0114] In a possible implementation manner, the imaging device includes a gyroscope, and the gyroscope is used to obtain the first angle information.
[0115] In a possible implementation manner, the rotating the image to be displayed according to the first angle information to obtain a rotated target image includes:
[0116] Determine a first angle value, a second angle value, and a third angle value in the first angle information. The first angle value is used to represent the angle of the imaging device relative to a first direction, the second angle value is used to represent the angle of the imaging device relative to a second direction, and the third angle value is used to represent the angle of the imaging device relative to a third direction. The first direction, the second direction, and the third direction are perpendicular to each other respectively.
[0117] Determine whether the first angle value, the second angle value, and the third angle value are zero;
[0118] If the first angle value is not zero, rotate the image to be displayed by an angle corresponding to the first angle value in the first direction;
[0119] If the second angle value is not zero, rotate the image to be displayed by an angle corresponding to the second angle value in the second direction;
[0120] If the third angle value is not zero, rotate the image to be displayed by an angle corresponding to the third angle value in the third direction;
[0121] After rotating the image to be displayed based on the first angle value, the second angle value, and / or the third angle value, the target image is obtained.
[0122] In a possible implementation, the device is further configured to:
[0123] Send the first angle information and the image to be displayed to the display device, and the display device is configured to display the image to be displayed according to the first angle information.
[0124] Refer to Figure 12 , which shows a schematic diagram of an image display device provided by an embodiment of the present application. The device is applied to a display device and specifically may include a receiving module 1201, a determining module 1202, and a display module 1203, where:
[0125] The receiving module 1201 is configured to receive a target image from a camera device. The target image is an image to be displayed obtained by rotating based on the first angle information of the camera device. The target image and the image to be displayed have the same object, and the object direction in the target image is consistent with the actual object direction;
[0126] The determining module 1202 is configured to determine a target display area of the target image;
[0127] The display module 1203 is configured to display the target image in the target display area.
[0128] In a possible implementation, determining the target display area of the target image includes:
[0129] Determine a display mode of the target image, where the display mode includes horizontal display or vertical display;
[0130] If the display mode is horizontal display, the target display area is a first display area, and the length of the first display area is greater than the width;
[0131] If the display mode is vertical display, the target display area is the second display area, and the length of the second display area is less than the width.
[0132] In a possible implementation, the device is further configured to:
[0133] Receive a to-be-displayed image from a camera device and first angle information of the camera device;
[0134] Rotate the to-be-displayed image according to the first angle information to obtain a target image;
[0135] Display the target image.
[0136] In a possible implementation, the display device includes a rotation mechanism for changing the angle of the display area, and the device is further configured to:
[0137] Receive a to-be-displayed image from a camera device and first angle information of the camera device;
[0138] Obtain second angle information of the display area;
[0139] Control the rotation mechanism to rotate according to the first angle information and the second angle information to change the angle of the display area;
[0140] Display the to-be-displayed image on the display area.
[0141] For the device embodiments, since they are basically similar to the method embodiments, the description is relatively simple. For related parts, please refer to the description in the method embodiment section.
[0142] Figure 13 It is a schematic structural diagram of an electronic device provided by an embodiment of the present application. As Figure 13 shown, the electronic device 130 in this embodiment includes: at least one processor 1300 ( Figure 13 only one is shown in the figure), a processor, a memory 1301, and a computer program 1302 stored in the memory 1301 and executable on the at least one processor 1300. When the processor 1300 executes the computer program 1302, the steps in any of the above method embodiments are implemented.
[0143] The electronic device 130 may be a computing device such as a desktop computer, a notebook, a palm computer, and a cloud electronic device. The electronic device may include, but is not limited to, a processor 1300 and a memory 1301. Those skilled in the art can understand, Figure 13The electronic device 130 is merely an example and does not limit the electronic device 130. It may include more or fewer components than those shown in the figure, or combine certain components, or different components. For example, it may also include input / output devices, network access devices, etc.
[0144] The so-called processor 1300 may be a central processing unit (CPU), and the processor 1300 may also be other general-purpose processors, digital signal processors (DSPs), application specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
[0145] In some embodiments, the memory 1301 may be an internal storage unit of the electronic device 130, such as the hard disk or memory of the electronic device 130. In some other embodiments, the memory 1301 may also be an external storage device of the electronic device 130, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc., equipped on the electronic device 130. Further, the memory 1301 may also include both the internal storage unit and the external storage device of the electronic device 130. The memory 1301 is used to store an operating system, application programs, a boot loader, data, and other programs, such as the program code of the computer program, etc. The memory 1301 may also be used to temporarily store data that has been output or will be output.
[0146] An embodiment of the present application also provides a computer-readable storage medium storing a computer program, and when the computer program is executed by a processor, the steps in the above method embodiments can be implemented.
[0147] An embodiment of the present application provides a computer program product, and when the computer program product runs on an electronic device, the electronic device can implement the steps in the above method embodiments when executed.
[0148] The foregoing embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: they can still modify the technical solutions recorded in the foregoing embodiments, or perform equivalent replacements on some of the technical features; and these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.
Claims
1. A method for displaying an image, characterized in that: Applied to a camera device, the method comprises: When the camera device captures the image to be displayed, obtaining first angle information when the camera device captures the image to be displayed; According to the first angle information, the image to be displayed is rotated to obtain a rotated target image, wherein the target image and the image to be displayed have the same object, and the direction of the object in the target image is consistent with the direction of the actual object; The target image is sent to a display device for display.
2. The method according to claim 1, characterized in that The camera device includes a gyroscope, and the gyroscope is used to obtain the first angle information.
3. The method according to claim 1 or 2, characterized in that The step of rotating the image to be displayed according to the first angle information to obtain a rotated target image includes: Determine a first angle value, a second angle value, and a third angle value in the first angle information, wherein the first angle value is used to represent the angle of the camera device relative to a first direction, the second angle value is used to represent the angle of the camera device relative to a second direction, and the third angle value is used to represent the angle of the camera device relative to a third direction, wherein the first direction, the second direction, and the third direction are respectively perpendicular to each other; determining whether the first angle value, the second angle value, and the third angle value are zero; If the first angle value is not zero, rotating the image to be displayed in the first direction by an angle corresponding to the first angle value; If the second angle value is not zero, rotating the image to be displayed in the second direction by an angle corresponding to the second angle value; If the third angle value is not zero, rotating the image to be displayed in the third direction by an angle corresponding to the third angle value; After the image to be displayed is rotated based on the first angle value, the second angle value and / or the third angle value, the target image is obtained.
4. The method according to claim 3, characterized in that The method further comprises: The first angle information and the image to be displayed are sent to the display device, and the display device is used to display the image to be displayed according to the first angle information.
5. A method for displaying an image, characterized in that: Applied to a display device, the method comprises: Receiving a target image from a camera device, wherein the target image is an image to be displayed obtained by rotating based on first angle information of the camera device, the target image and the image to be displayed have the same object, and the direction of the object in the target image is consistent with the direction of the actual object; Determining a target display area of the target image; The target image is displayed in the target display area.
6. The method according to claim 5, characterized in that The determining of the target display area of the target image includes: Determining a display mode of the target image, wherein the display mode includes horizontal display or vertical display; If the display mode is horizontal display, the target display area is the first display area, and the length of the first display area is greater than the width; If the display mode is vertical display, the target display area is the second display area, and the length of the second display area is smaller than the width.
7. The method according to claim 5, characterized in that The method further comprises: Receiving an image to be displayed and first angle information of the camera device from the camera device; Rotate the image to be displayed according to the first angle information to obtain a target image; The target image is displayed.
8. The method according to claim 5, characterized in that The display device includes a rotating mechanism, and the rotating mechanism is used to change the angle of the display area. The method further includes: Receiving an image to be displayed and first angle information of the camera device from the camera device; Acquiring second angle information of the display area; According to the first angle information and the second angle information, controlling the rotating mechanism to rotate so as to change the angle of the display area; The image to be displayed is displayed in the display area.
9. A display system, characterized in that: The invention comprises a camera device and a display device, wherein the camera device comprises a gyroscope. The gyroscope is used to obtain first angle information when the camera device captures the image to be displayed; The camera device is used to rotate the image to be displayed according to the first angle information to obtain a rotated target image; and send the target image to a display device; The display device is used to display the image to be displayed.
10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the method according to any one of claims 1 to 8 is implemented.