Screen projection picture display method, electronic device, and storage medium
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- GUANGZHOU SHIYUAN ELECTRONICS CO LTD
- Filing Date
- 2025-02-06
- Publication Date
- 2026-08-07
AI Technical Summary
[0003]目前,在移动端投屏到大屏幕的显示设备时,由于不同设备的屏幕的长、宽比例不同,在移动端处于竖屏状态下,将屏幕画面投屏到大屏幕的显示设备时,容易导致移动端的屏幕画面在显示设备的屏幕中的区域较小,导致显示效果不佳
[0048]本申请实施方式的有益效果是:区别于现有技术的情况,本申请实施方式提供一种投屏画面的显示方法,该方法应用于电子设备,电子设备通信连接显示设备,电子设备包括运动传感装置和调节装置,通过响应于第一触发操作,将电子设备的显示画面发送到显示设备,以使显示设备显示显示画面,获取运动传感装置的方向信息,根据方向信息,确定显示画面的边界线的初始位置,响应于对调节装置的调整操作,生成调整信息,其中,调整信息包括调整方向以及调整值,根据调整方向以及调整值,确定边界线的移动方向以及像素值,根据移动方向以及像素值,确定边界线的第一位置,以根据边界线的第一位置,对显示画面进行区域选取,得到区域投屏画面;将区域投屏画面发送到显示设备,以使显示设备显示区域投屏画面。
Smart Images

Figure CN122534249A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of smart terminal technology, and in particular to a method for displaying projected images, an electronic device, and a storage medium. Background Technology
[0002] When users need to watch videos, play games, or share content on a larger screen, they often need a screen mirroring function to project content from a smaller screen onto a larger screen device for viewing. For example, casting the screen content of an electronic device (e.g., a mobile phone) to a large-screen display device (e.g., a television).
[0003] Currently, when projecting a mobile device's screen onto a large display device, due to the different aspect ratios of the screens of different devices, when the mobile device is in portrait mode and the screen is projected onto the large display device, the area of the mobile device's screen on the large display device is often small, resulting in poor display quality. Summary of the Invention
[0004] To address the aforementioned technical problems, embodiments of this application provide a method for displaying projected images, an electronic device, and a storage medium, which can improve the display effect of projected images from the electronic device on the display device.
[0005] To address the aforementioned technical problems, the embodiments of this application provide the following technical solutions:
[0006] In a first aspect, embodiments of this application provide a method for displaying a projected image, applied to an electronic device. The electronic device is communicatively connected to a display device, and the electronic device includes a motion sensing device and an adjustment device. The method includes:
[0007] In response to the first trigger operation, the display screen of the electronic device is sent to the display device so that the display device displays the display screen;
[0008] Acquire orientation information from motion sensing devices;
[0009] Based on the direction information, determine the initial position of the boundary line of the display screen;
[0010] In response to an adjustment operation on the adjustment device, adjustment information is generated, wherein the adjustment information includes the adjustment direction and the adjustment value;
[0011] Based on the adjustment direction and adjustment value, determine the movement direction and pixel value of the boundary line;
[0012] Based on the direction of movement and pixel value, the first position of the boundary line is determined, and the display area is selected according to the first position of the boundary line to obtain the area projection screen.
[0013] The area projection screen is sent to the display device so that the display device can display the area projection screen.
[0014] In some embodiments, before acquiring the orientation information from the motion sensing device, the method further includes:
[0015] Receive a second trigger operation, which is used to trigger the acquisition of the direction information of the motion sensing device. The direction information of the motion sensing device includes up, down, left or right, and the initial position of the boundary line includes the top edge, bottom edge, left edge or right edge of the display screen.
[0016] Based on the orientation information, determine the initial position of the boundary line of the displayed image, including:
[0017] If the direction information is upward, then the initial position of the boundary line of the display screen is determined to be the bottom edge of the display screen;
[0018] If the direction information is downward, then the initial position of the boundary line of the display screen is determined to be the top edge of the display screen;
[0019] If the direction information is left, then the initial position of the boundary line of the display screen is determined to be the left edge of the display screen;
[0020] If the direction information is to the right, then the initial position of the boundary line of the display screen is determined to be the right edge of the display screen.
[0021] In some embodiments, in response to an adjustment operation on the adjustment device, adjustment information is generated, including:
[0022] Determine the direction of adjustment based on the type of adjustment operation;
[0023] The adjustment value is determined based on the number of times the adjustment operation is triggered, where the adjustment value is positively correlated with the number of triggers;
[0024] Adjustment information is generated based on the adjustment direction and adjustment value.
[0025] In some embodiments, the type of adjustment operation includes a volume decrease operation and a volume increase operation, and the adjustment direction includes a first adjustment direction and a second adjustment direction;
[0026] Based on the type of adjustment operation, determine the direction of adjustment, including:
[0027] If the adjustment operation type is volume decrease, then the adjustment direction is determined to be the first adjustment direction;
[0028] If the adjustment operation type is volume increase, then the adjustment direction is determined to be the second adjustment direction.
[0029] In some embodiments, the direction of movement includes a first direction of movement and a second direction of movement;
[0030] Based on the adjustment direction and value, determine the movement direction and pixel value of the boundary line, including:
[0031] If the adjustment direction is the first adjustment direction, then the movement direction of the boundary line is determined as the first movement direction, wherein the first movement direction is the direction in which the boundary line points to the center of the display screen;
[0032] If the adjustment direction is the second adjustment direction, then the movement direction of the boundary line is determined to be the second movement direction, where the second movement direction is the direction in which the boundary line moves away from the center of the display screen;
[0033] Get the number of pixels corresponding to one trigger of the adjustment operation;
[0034] The pixel value is determined based on the number of pixels corresponding to a single trigger, combined with the adjustment value. The pixel value is the product of the number of pixels corresponding to a single trigger and the adjustment value.
[0035] In some embodiments, determining the first position of the boundary line based on the direction of movement and pixel values includes:
[0036] Based on the initial position of the boundary line and the pixel value, the boundary line is moved by a pixel value along the moving direction to determine the first position of the boundary line.
[0037] In some embodiments, a region of the display screen is selected based on the first position of the boundary line to obtain a region projection screen, including:
[0038] The projection area of the display screen is determined based on the first position of several boundary lines, where each boundary line corresponds to a first position.
[0039] The screen corresponding to the projection area will be used as the projection screen for that area.
[0040] In some embodiments, after the display device displays the projected image, the method further includes:
[0041] Get the current positions of several boundary lines corresponding to the projected screen;
[0042] Determine the movement direction and pixel value of at least one boundary line in real time;
[0043] Based on the current position of each boundary line, combined with the movement direction of at least one boundary line and the pixel value, determine the second position of the boundary line;
[0044] Based on the second position of the boundary line, a region of the display screen is selected to update the region's projection screen.
[0045] Secondly, embodiments of this application provide an electronic device, including:
[0046] The processor and memory are used to execute executable program code in the memory. When the executable program code is executed, the processor executes instructions for displaying the screen projection method as described in the first aspect.
[0047] Thirdly, embodiments of this application provide a computer-readable storage medium storing a computer program that, when executed, implements the screen projection display method as described in the first aspect.
[0048] The beneficial effects of the embodiments of this application are as follows: Unlike the prior art, the embodiments of this application provide a method for displaying a projected image. This method is applied to an electronic device, which is communicatively connected to a display device. The electronic device includes a motion sensing device and an adjustment device. In response to a first trigger operation, the display image of the electronic device is sent to the display device, causing the display device to display the image. Direction information from the motion sensing device is acquired. Based on the direction information, the initial position of the boundary line of the display image is determined. In response to an adjustment operation on the adjustment device, adjustment information is generated, including an adjustment direction and an adjustment value. Based on the adjustment direction and adjustment value, the movement direction and pixel value of the boundary line are determined. Based on the movement direction and pixel value, a first position of the boundary line is determined. Based on the first position of the boundary line, a region of the display image is selected to obtain a regional projected image. The regional projected image is then sent to the display device, causing the display device to display the regional projected image.
[0049] The initial position of the boundary line of the display screen is determined by the directional information of the motion sensing device, and the movement direction and pixel value of the boundary line are determined by responding to the adjustment operation of the adjustment device, thereby obtaining the adjusted projection screen, and the obtained projection screen is projected onto the display device for display. This application can improve the display effect of the projection screen of the electronic device on the display device. Attached Figure Description
[0050] One or more embodiments are illustrated by way of example with reference to the accompanying drawings. These illustrations do not constitute a limitation on the embodiments. Elements having the same reference numerals in the drawings are denoted as similar elements. Unless otherwise stated, the figures in the drawings are not to be limited by scale.
[0051] Figure 1 This is an example diagram illustrating the projection of an electronic device's display onto a display device;
[0052] Figure 2 This is a schematic diagram of an application environment provided in an embodiment of this application;
[0053] Figure 3This is a flowchart illustrating a method for displaying a projected screen according to an embodiment of this application;
[0054] Figure 4 yes Figure 3 A detailed flowchart of step S303 in the process;
[0055] Figure 5a This is an example schematic diagram of the initial position of the boundary line when the directional information of the motion sensing device is upward;
[0056] Figure 5b This is an example schematic diagram of the initial position of the boundary line when the directional information of the motion sensing device is downward;
[0057] Figure 5c This is an example schematic diagram of the initial position of the boundary line when the direction information of the motion sensing device is to the left;
[0058] Figure 5d This is an example schematic diagram of the initial position of the boundary line when the direction information of the motion sensing device is to the right;
[0059] Figure 6 yes Figure 3 A detailed flowchart of step S304 in the process;
[0060] Figure 7 yes Figure 6 A detailed flowchart of step S3041 in the process;
[0061] Figure 8 yes Figure 3 A detailed flowchart of step S305 in the process;
[0062] Figure 9 yes Figure 3 A detailed flowchart of step S306 in the process;
[0063] Figure 10 yes Figure 3 A detailed flowchart of step S306 in the process;
[0064] Figure 11 This is an example schematic diagram illustrating how to determine the projection area of a display screen according to an embodiment of this application;
[0065] Figure 12 This application provides a flowchart illustrating a real-time adjustment of the display screen according to an embodiment.
[0066] Figure 13 This is an example schematic diagram of a screen projection screen provided in an embodiment of this application;
[0067] Figure 14 This is a flowchart illustrating a method for adjusting a projected screen according to an embodiment of this application;
[0068] Figure 15 This is a schematic diagram of the overall process of a screen projection display method provided in an embodiment of this application;
[0069] Figure 16 This is a schematic diagram of the structure of a screen projection display device provided in an embodiment of this application;
[0070] Figure 17 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application.
[0071] Explanation of icon numbers:
[0072]
[0073] Detailed Implementation
[0074] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this invention, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0075] It should be noted that, unless there is a conflict, the various features in the embodiments of this application can be combined with each other, all of which are within the protection scope of this application. In addition, the terms "first" and "second" used in this application do not limit the data, but only distinguish the same or similar items with basically the same function and effect.
[0076] Before introducing the embodiments of this application, a brief introduction will be given to the display methods of screen projection known to the inventors of this application, so as to facilitate the understanding of the embodiments of this application later.
[0077] Currently, when users want to enjoy videos, games, or share various exciting content in a wider visual space, screen mirroring has become a bridge connecting small-screen and large-screen devices, allowing content from portable electronic devices such as mobile phones to be seamlessly extended to large-screen display devices such as TVs. This technology not only satisfies people's pursuit of immersive viewing experiences but also greatly enriches the application scenarios for home entertainment and business presentations. However, in practical applications, due to the difference in screen aspect ratio between mobile devices and large-screen devices, especially when mobile devices are in portrait mode, direct screen mirroring often results in the content being displayed in too small an area on the large screen, with the image being excessively stretched or leaving large blank areas, affecting the clarity and comfort of viewing.
[0078] For example, please see Figure 1 , Figure 1 This is an example diagram illustrating how to project the display screen of an electronic device onto a display device.
[0079] like Figure 1 As shown, assuming the electronic device is in portrait mode and its screen is currently playing a video, area A is the display screen of the electronic device, and area B is the video playback area. After projecting area A (portrait mode) onto the display device, the resulting effect is as follows: Figure 1 Area A, along with areas A, C, and D, constitutes the screen area of the display device. Due to the difference in aspect ratio between electronic devices and large-screen devices, the display image from the electronic device cannot fill the entire screen of the display device after being projected, leaving a large blank area on the screen. For example... Figure 1 Areas C and D are both blank areas, which means that area B occupies only a small portion of the entire display screen area, thus reducing the user's viewing experience.
[0080] To address the aforementioned issues, this application provides a method for displaying a projected image. In response to a first trigger operation, the display image of an electronic device is sent to the display device to display the image. Directional information from a motion sensing device is obtained to determine the initial position of the boundary line of the display image. Furthermore, in response to an adjustment operation on an adjustment device, the movement direction and pixel value of the boundary line are determined to obtain a cropped projected image. This cropped projected image is then projected onto the display device for display. This application improves the display effect of the projected image from the electronic device on the display device.
[0081] The technical solution of this application is described in detail below with reference to the accompanying drawings:
[0082] Please see Figure 2 , Figure 2 This is a schematic diagram of an application environment provided in an embodiment of this application.
[0083] like Figure 2 As shown, the application environment 200 includes: electronic device 10 and display device 20, wherein the electronic device 10 and display device 20 are connected to each other via a wireless network or a wired network, wherein the wireless network includes 2G, 3G, 4G, 5G, wireless LAN, Bluetooth and other wireless networks, and the wired network includes serial cable, network cable and other wired networks.
[0084] Electronic device 10 is used to adjust the resolution of its screen image and send the adjusted screen image to display device 20. Electronic device 10 can be a tablet, mobile phone, or other similar device.
[0085] Display device 20 is used to receive screen images sent by electronic device 10 and display the screen images on the screen of display device 20. Display device 20 includes devices such as projectors, televisions, and laptops.
[0086] Please see Figure 3 , Figure 3 This is a flowchart illustrating a method for displaying a projected image according to an embodiment of this application.
[0087] The screen projection display method is applied to electronic devices. Specifically, the execution subject of the screen projection display method is one or at least two processors of the electronic device.
[0088] like Figure 3 As shown, the method for displaying the projected screen includes:
[0089] Step S301: In response to the first trigger operation, the display screen of the electronic device is sent to the display device so that the display device displays the display screen;
[0090] The first trigger operation is used to start screen mirroring.
[0091] Specifically, in response to the first trigger operation, the display screen of the electronic device is sent to the display device so that the display device displays the display screen.
[0092] In this embodiment of the application, after the display screen of the electronic device is sent to the display device, the display screen of the electronic device is adjusted, that is, the process is executed. Figure 3 Steps S302-S307 are used to prevent accidental touches during the movement of electronic devices.
[0093] Step S302: Obtain the orientation information from the motion sensing device;
[0094] In the embodiments of this application, electronic devices typically incorporate multiple motion sensors for detecting and recording the physical motion and positional changes of the electronic device. These motion sensors include accelerometers, gyroscopes, etc., and preferably, in this application, the motion sensor is an accelerometer.
[0095] Accelerometers are used to detect the acceleration changes of electronic devices (such as mobile phones) on the three axes of a three-dimensional coordinate system (including the x, y, and z axes). The three-dimensional coordinate system is established with the center of the screen of the electronic device as the origin. The gravitational force of the Earth on the electronic device will be distributed on the three axes of the three-dimensional coordinate system. By obtaining the values of the electronic device on the three axes of the three-dimensional coordinate system, the direction of motion of the electronic device can be determined.
[0096] The acceleration coordinates of the electronic device in the three-dimensional coordinate system can be obtained through the CoreMotion framework, which is a set of application programming interfaces (APIs) for accessing motion sensing data on electronic devices.
[0097] The direction information of the motion sensing device includes up, down, left, or right.
[0098] Specifically, the acceleration coordinates (x, y, z) of the electronic device in a three-dimensional coordinate system are obtained to acquire the orientation information of the motion sensor. The values of x, y, and z range from [-1, 1]. When x is greater than or equal to a preset value, the motion sensor points to the right; when x is less than the preset value, the motion sensor points to the left; when y is greater than or equal to a preset value, the motion sensor points downwards; and when y is less than the preset value, the motion sensor points upwards. The preset values range from [-1, 1]. For example, when x is greater than or equal to 0.75, the motion sensor points to the right; when x is less than -0.75, the motion sensor points to the left; when y is greater than or equal to 0.75, the motion sensor points downwards; and when y is less than -0.75, the motion sensor points upwards.
[0099] It should be noted that when both x and y in the acceleration coordinates are not equal to 0, the motion sensing device is in a tilted state. This application will not provide a detailed description of the motion sensing device being in a tilted state. This application only considers the case where the direction of the motion sensing device is horizontally to the left or right, or vertically upward or downward. That is, when one of the x, y, and z variables in the acceleration coordinates (x, y, z) of the electronic device in the three-dimensional coordinate system is not equal to 0, the other two variables are 0.
[0100] In this embodiment of the application, in response to the first trigger operation and before acquiring the direction information of the motion sensing device, a second trigger operation is received, wherein the second trigger operation is used to trigger the acquisition of the direction information of the motion sensing device to avoid accidental touch caused by moving the electronic device.
[0101] Step S303: Determine the initial position of the boundary line of the display screen based on the orientation information;
[0102] The displayed image is the screen image of the electronic device, and the boundary lines are used to select areas of the displayed image in order to adjust the size of the displayed image.
[0103] Specifically, based on the direction information, the initial position of the boundary line of the display screen is determined, that is, the specific direction of the motion sensing device of the electronic device is determined in order to determine the initial position of the boundary line of the display screen.
[0104] Please refer to the following: Figure 4 , Figure 4 yes Figure 3 A detailed flowchart of step S303 in the process.
[0105] like Figure 4 As shown, step S303 includes:
[0106] Step S3031: When the direction information is upward, the initial position of the boundary line of the display screen is determined to be the lower edge of the display screen;
[0107] Specifically, when the direction information from the motion sensor of the electronic device is upward, the initial position of the boundary line of the display screen is determined to be the lower edge of the display screen.
[0108] It is understandable that the bottom edge of the displayed image is the bottom edge of the electronic device's display screen.
[0109] Please refer to the following: Figure 5a , Figure 5a This is an example schematic diagram of the initial position of the boundary line when the direction information of the motion sensing device is upward.
[0110] like Figure 5a As shown, assuming the electronic device is playing a video, area A is the display screen of the electronic device, and area B is the video area. At this time, the direction of the motion sensor of the electronic device is upward, so the initial position of the boundary line of the display screen is the lower edge of the display screen.
[0111] Step S3032: When the direction information is downward, the initial position of the boundary line of the display screen is determined to be the upper edge of the display screen;
[0112] It is understandable that the bottom edge of the displayed image is the top edge of the electronic device's display screen.
[0113] Specifically, when the direction information from the motion sensor of the electronic device is downward, the initial position of the boundary line of the display screen is determined to be the upper edge of the display screen.
[0114] Please refer to the following: Figure 5b , Figure 5b This is an example schematic diagram of the initial position of the boundary line when the direction information of the motion sensing device is downward.
[0115] like Figure 5bAs shown, assuming the electronic device is playing a video, area A is the display screen of the electronic device, area B is the video area, and the motion sensor of the electronic device is pointing downwards. The initial position of the boundary line of the display screen is the upper edge of the display screen.
[0116] Step S3033: When the direction information is left, the initial position of the boundary line of the display screen is determined to be the left edge of the display screen;
[0117] It is understandable that the bottom edge of the displayed image is the left edge of the electronic device's display screen.
[0118] Specifically, when the direction information from the motion sensor of the electronic device is left, the initial position of the boundary line of the display screen is determined to be the left edge of the display screen.
[0119] Please refer to the following: Figure 5c , Figure 5c This is an example schematic diagram of the initial position of the boundary line when the direction information of the motion sensing device is to the left.
[0120] like Figure 5c As shown, assuming the electronic device is playing a video, area A is the display screen of the electronic device, area B is the video area, and the motion sensor of the electronic device is pointing to the left. The initial position of the boundary line of the display screen is the left edge of the display screen.
[0121] Step S3034: When the direction information is to the right, the initial position of the boundary line of the display screen is determined to be the right edge of the display screen;
[0122] Specifically, when the direction information from the motion sensor of the electronic device is to the right, the initial position of the boundary line of the display screen is determined to be the right edge of the display screen.
[0123] It is understandable that the bottom edge of the displayed image is the right edge of the electronic device's display screen.
[0124] Please refer to the following: Figure 5d , Figure 5d This is an example schematic diagram showing the initial position of the boundary line when the direction information of the motion sensing device is to the right.
[0125] like Figure 5d As shown, assuming the electronic device is playing a video, area A is the display screen of the electronic device, area B is the video area, and the motion sensor of the electronic device is pointing to the right. The initial position of the boundary line of the display screen is the right edge of the display screen.
[0126] In this embodiment of the application, the orientation information of the motion sensing device is obtained to determine the orientation of the electronic device, so as to adjust the display area of the display screen of the electronic device according to the orientation of the electronic device.
[0127] Step S304: In response to the adjustment operation of the adjustment device, adjustment information is generated, wherein the adjustment information includes the adjustment direction and the adjustment value;
[0128] In this embodiment, the electronic device includes an adjustment device. When the electronic device is in projection mode, the adjustment device is used to adjust the position of the boundary lines of the displayed image. The adjustment device can be a volume controller.
[0129] The adjustment device includes two types of adjustment operations: volume decrease and volume increase.
[0130] In this embodiment of the application, the electronic device includes volume keys. Each type of adjustment operation corresponds to one volume key, that is, the volume decrease operation corresponds to one volume key and the volume increase operation corresponds to one volume key. When the user presses the volume key corresponding to the volume decrease operation, the adjustment device will automatically recognize the current adjustment operation as the volume decrease operation. When the user presses the volume key corresponding to the volume increase operation, the adjustment device will automatically recognize the current adjustment operation as the volume increase operation.
[0131] Specifically, in response to an adjustment operation on the adjustment device, adjustment information is generated. This information includes the adjustment direction and the adjustment value, which represents the number of times the adjustment operation on the adjustment device has been triggered—that is, the number of times the volume button is pressed for each type of adjustment operation. For detailed steps on generating adjustment information, please refer to [link to documentation]. Figure 6 .
[0132] Please refer to the following: Figure 6 , Figure 6 yes Figure 3 A detailed flowchart of step S304 in the process.
[0133] like Figure 6 As shown, step S304 includes:
[0134] Step S3041: Determine the adjustment direction based on the type of adjustment operation;
[0135] Specifically, the adjustment operation types include volume down and volume up. Determining the type of adjustment operation determines the adjustment direction, which includes a first adjustment direction and a second adjustment direction. For detailed steps on determining the adjustment direction, please refer to [link to documentation]. Figure 7 .
[0136] Please refer to the following: Figure 7 , Figure 7 yes Figure 6 A detailed flowchart of step S3041 is shown.
[0137] like Figure 7 As shown, step S3041 includes:
[0138] Step S3411: Determine whether the adjustment operation type is a volume decrease operation;
[0139] Specifically, in response to the current adjustment operation of the adjustment device, the type of adjustment operation is determined. If the type of adjustment operation is a volume decrease operation, the process jumps to step S3412; if the type of adjustment operation is a volume increase operation, the process jumps to step S3413.
[0140] Step S3412: Determine the adjustment direction as the first adjustment direction;
[0141] Specifically, when the adjustment operation type is volume down, the adjustment direction is the first adjustment direction, which is the volume down direction.
[0142] Step S3413: Determine the adjustment direction as the second adjustment direction;
[0143] Specifically, when the adjustment operation type is volume increase, the adjustment direction is the second adjustment direction, which is the volume increase direction.
[0144] Step S3042: Determine the adjustment value based on the number of times the adjustment operation is triggered, wherein the adjustment value is equal to the number of triggers;
[0145] Specifically, the adjustment value corresponding to the volume decrease operation is determined based on the number of times the adjustment operation is triggered, or the adjustment value corresponding to the volume increase operation is determined based on the number of times the volume increase operation is triggered. The adjustment value is positively correlated with the number of triggers.
[0146] In this embodiment of the application, each time the volume button corresponding to the volume decrease operation is pressed within a short period of time, the adjustment value corresponding to the volume decrease operation increases by 1, and each time the volume button corresponding to the volume increase operation is pressed, the adjustment value corresponding to the volume increase operation increases by 1. For example, if the volume button is pressed once within 0-0.5 seconds, the adjustment value is equal to the number of times the adjustment operation is triggered.
[0147] In this embodiment of the application, when the volume button is pressed and held, the number of times the adjustment operation is triggered is determined by the duration of the press and hold. For example, if the volume button is pressed and held for 1 second, the number of triggers is 5, and the adjustment is 5.
[0148] In this embodiment of the application, the adjustment value is used to represent the number of times the boundary line moves.
[0149] Step S3043: Generate adjustment information based on the adjustment direction and adjustment value;
[0150] The adjustment direction includes the first adjustment direction and the second adjustment direction, and the adjustment value includes the number of triggers.
[0151] Specifically, when the adjustment operation of the adjustment device is a volume reduction operation, the adjustment direction is determined as the first adjustment direction, and the number of times the volume reduction operation is triggered is recorded to determine the adjustment value. The current adjustment operation of the adjustment device and the adjustment value corresponding to the volume reduction operation are used as adjustment information, which includes the first adjustment direction and the adjustment value corresponding to the volume reduction operation.
[0152] Specifically, when the adjustment operation of the adjustment device is a volume increase operation, the adjustment direction is determined to be the second adjustment direction, and the number of times the volume decrease operation is triggered is recorded to determine the adjustment value. The current adjustment operation of the adjustment device and the adjustment value corresponding to the volume increase operation are used as adjustment information, which includes the second adjustment direction and the adjustment value corresponding to the volume increase operation.
[0153] In the embodiments of this application, different electronic devices trigger adjustment operations in different ways. For example, some electronic devices include volume buttons, and each click of the volume button triggers an adjustment operation. Some electronic devices trigger adjustment operations by touching the panel corresponding to the volume adjustment, such as long-pressing the panel corresponding to the volume adjustment to trigger the adjustment operation. In this case, the number of times the adjustment operation is triggered is determined by the duration of the long press. For example, if the panel is long-pressed for 1 second, the number of triggers is 5.
[0154] Step S305: Determine the moving direction and pixel value of the boundary line based on the adjustment direction and adjustment value;
[0155] The movement direction includes a first movement direction and a second movement direction. The first movement direction is the direction in which the boundary line points to the center of the display screen, and the second movement direction is the direction in which the boundary line moves away from the center of the display screen.
[0156] Specifically, when the adjustment direction is the first adjustment direction, that is, the adjustment direction is the volume decrease direction, the boundary line movement direction is determined to be the first movement direction; when the adjustment direction is the second adjustment direction, that is, the adjustment direction is the volume increase direction, the boundary line movement direction is determined to be the second movement direction.
[0157] Specifically, once the direction of boundary line movement and adjustment value are determined, the corresponding pixel value of the boundary line is determined based on that adjustment value. For detailed steps on determining the pixel value, please refer to [link to documentation / reference]. Figure 8 .
[0158] Please refer to the following: Figure 8 , Figure 8 yes Figure 3A detailed flowchart of step S305 in the process.
[0159] like Figure 8 As shown, step S305 includes:
[0160] Step S3051: Determine whether the adjustment direction is the first adjustment direction;
[0161] Specifically, determine whether the adjustment direction is the first adjustment direction. If the adjustment direction is the first adjustment direction, jump to step S3052. If the adjustment direction is the second adjustment direction, jump to step S3053.
[0162] Step S3052: Determine the direction of movement of the boundary line as the first direction of movement;
[0163] Specifically, when the adjustment direction is the first adjustment direction, the movement direction of the boundary line is determined to be the first movement direction, and the process jumps to step S3054.
[0164] Step S3053: Determine the direction of movement of the boundary line as the second direction of movement;
[0165] Specifically, when the adjustment direction is the second adjustment direction, the movement direction of the boundary line is determined to be the second movement direction.
[0166] In this embodiment of the application, each time a volume decrease operation is triggered, the boundary line is moved once towards the center of the display screen, and each time a volume increase operation is triggered, the boundary line is moved once away from the center of the display screen.
[0167] It should be noted that the direction of movement of the boundary line of the motion sensing device is determined based on the adjustment direction when the device is in different orientations.
[0168] Step S3054: Obtain the number of pixels corresponding to one trigger of the adjustment operation, where one adjustment value corresponds to one trigger;
[0169] In this embodiment of the application, the method of determining the pixel value of the boundary line is explained by taking one adjustment value corresponding to one trigger of the adjustment operation as an example.
[0170] In this embodiment of the application, each time an adjustment operation is triggered, the adjustment value increases by 1, and each time an adjustment operation is triggered, a certain number of pixels are increased or decreased, for example, each time an adjustment operation is triggered, 4 pixels are increased or decreased.
[0171] Step S3055: Determine the pixel value based on the number of pixels corresponding to one trigger, combined with the adjustment value;
[0172] Specifically, the pixel value is determined based on the number of pixels corresponding to a single trigger, combined with the adjustment value. That is, pixel value = number of pixels corresponding to a single trigger * adjustment value.
[0173] In this embodiment, each time the boundary line moves, the resolution of the electronic device's display decreases or increases by a preset value. This preset value is equal to the number of pixels corresponding to one trigger. For example, when the preset value is 4, there is only one boundary line in the current display, and the resolution of the display is 1080*1920. At this time, the direction of the motion sensing device of the electronic device is upward (refer to...). Figure 5a If a volume decrease operation is triggered, the boundary line will move one step towards the center of the display screen, and the resolution of the display screen will be 1080*(1920-4)=1080*1916. Conversely, if a volume increase operation is triggered, the boundary line will move one step away from the center of the display screen, and the resolution of the display screen will be 1080*(1916+4)=1080*1920.
[0174] Step S306: Determine the first position of the boundary line based on the movement direction and pixel value, and select an area of the display screen based on the first position of the boundary line to obtain the area projection screen.
[0175] Specifically, the first position of the boundary line is determined based on the direction of movement and the pixel value. That is, the first position of the boundary line is determined based on the direction of movement of the boundary line, the number of times the boundary line moves, and the number of pixels corresponding to one trigger. The first position of the boundary line is the final position of the boundary line on the display screen. There is a boundary line in different directions of the motion sensing device, and each boundary line corresponds to a first position.
[0176] In this embodiment of the application, by determining the first position of the boundary line, the final position of each boundary line is determined, and the display screen is selected at the first position of the boundary line, thereby increasing or decreasing the resolution of the display screen of the electronic device.
[0177] Please refer to the following: Figure 9 , Figure 9 yes Figure 3 A detailed flowchart of step S306 in the process.
[0178] like Figure 9 As shown, step S306 includes:
[0179] Step S3601: Based on the initial position of the boundary line and the pixel value, move the boundary line along the moving direction by a pixel value to determine the first position of the boundary line;
[0180] Specifically, the initial position of the boundary line can be set arbitrarily. After obtaining the pixel value, the boundary line is moved along the moving direction by the pixel value to determine the first position of the boundary line. For example, the boundary values for upward, downward, leftward, and rightward directions in the motion sensing device are 40, 80, 20, and 16, respectively. The resolution of the electronic device's display screen is 1080*1920. Based on the pixel value, the display screen of the electronic device is adjusted. The adjusted resolution of the electronic device's display screen is (1080-20-26)*(1920-40-80)=1044*1800.
[0181] Please refer to the following: Figure 10 , Figure 10 yes Figure 3 A detailed flowchart of step S306 in the process.
[0182] like Figure 10 As shown, step S306 includes:
[0183] Step S3602: Determine the projection area of the display screen based on the first positions of several boundary lines, wherein each boundary line corresponds to a first position.
[0184] Specifically, after determining the first position of the boundary lines in different directions, the projection area of the display screen is determined based on the first positions of these boundary lines, where each boundary line corresponds to a first position.
[0185] In this embodiment, by continuously adjusting the position of the boundary line in the display screen, a projection screen with the same resolution as the display device is determined, so that the display screen of the electronic device occupies the largest proportion in the display screen of the display device, and there is no excessive stretching that would cause image distortion, resulting in a better viewing effect.
[0186] Please see Figure 11 , Figure 11 This is an example schematic diagram of determining the projection area of the display screen according to an embodiment of this application.
[0187] like Figure 11 As shown, the display screen includes four boundary lines, and the closed area B enclosed by the intersection of these four boundary lines is the projection area of the display screen.
[0188] Step S3603: Use the screen corresponding to the projection area as the projection area screen;
[0189] Specifically, the screen corresponding to the projection area will be used as the projection area screen, for example, [the screen will be projected as shown in the image]. Figure 11 The screen in area B is used as the screen to be projected.
[0190] Step S307: Send the area projection screen to the display device so that the display device displays the area projection screen;
[0191] Specifically, the electronic device is connected to the display device. After the display screen is adjusted on the electronic device to obtain the projected screen, the projected screen of the electronic device is sent to the display device for display.
[0192] In this embodiment of the application, by triggering an adjustment operation, the display screen of the electronic device can be quickly adjusted. When switching between different videos, the different video screens can be automatically adjusted, and the adjusted video screens can be continuously projected onto the display device without the need for re-projection.
[0193] Please refer to it again. Figure 11 ,like Figure 11 As shown, area E is the final projected image displayed on the display device.
[0194] In this embodiment of the application, by determining the type of adjustment operation of the adjustment device, the direction of movement of the boundary line is determined. By determining the number of times each boundary line moves, the final position of the boundary line is determined. The display screen of the electronic device is then cropped at the final position of the boundary line to adjust the size of the display screen of the electronic device to be consistent with the screen size of the display device, so that the display screen achieves the best visual effect.
[0195] Please refer to the following: Figure 12 , Figure 12 This is a flowchart illustrating a real-time adjustment of the display screen according to an embodiment of this application.
[0196] like Figure 12 As shown, the process of real-time adjustment of the display screen includes:
[0197] Step S1201: Obtain the current positions of several boundary lines corresponding to the projected screen;
[0198] Specifically, it acquires the projected image from the display device, responds to the adjustment operation of the adjustment device, and acquires the current position of several boundary lines corresponding to the projected image.
[0199] The projected image from the display device is either an adjusted image or the original display image from the electronic device.
[0200] In this embodiment of the application, when the display screen of the electronic device is projected onto the display device and the display effect of the display device is poor, the projected screen of the display device is obtained and the projected screen of the display device is readjusted.
[0201] Step S1202: Determine the movement direction and pixel value of at least one boundary line in real time;
[0202] Specifically, in response to the adjustment operation of the adjustment device of the electronic device, the adjustment direction is determined, and the movement direction of the boundary line is determined based on the adjustment direction. When the adjustment direction is a first adjustment direction, the movement direction of the boundary line is determined to be the first movement direction. When the adjustment direction is a second adjustment direction, the movement direction of the boundary line is determined to be the second movement direction.
[0203] Specifically, the number of times the volume adjustment operation of the motion sensing device is triggered in different directions is obtained to obtain the adjustment value. Furthermore, the number of pixels corresponding to one trigger is obtained, and then the pixel value is determined based on the adjustment value and the number of pixels corresponding to one trigger.
[0204] Step S1203: Determine the second position of the boundary line based on the current position of each boundary line, combined with the movement direction of at least one boundary line and the pixel value;
[0205] Specifically, based on the current position of the boundary line, the direction of movement of the boundary line, and the pixel value, the boundary line is moved by a pixel value along the direction of movement to determine the second position of the boundary line, where the second position of the boundary line is the final position of the boundary line in the projection screen.
[0206] Please refer to the following: Figure 13 , Figure 13 This is an example schematic diagram of a screen projection provided in an embodiment of this application.
[0207] like Figure 13 As shown, area A is the display screen of the electronic device, area B is the video playback area, and area F is the screen image of the display device.
[0208] Step S1204: Select a region of the display screen based on the second position of the boundary line to update the region projection screen;
[0209] Specifically, the display area is selected based on the second position of the boundary line, that is, based on the final position of the boundary line, in order to update the area projection screen of the display device.
[0210] Please refer to the following: Figure 13 ,like Figure 13 Area F in the diagram represents the screen before the update. When the aspect ratio of the electronic device's display screen is smaller than the aspect ratio of the display device (width divided by height), the top and bottom edges of the electronic device's display screen will fill the display device, while the left and right edges will not. In this case, a color different from the electronic device's screen will be used to fill the left and right edges of the display device. When the aspect ratio of the electronic device's display screen is larger than the aspect ratio of the display device (width divided by height), the left and right edges of the electronic device's display screen will fill the display device, while the top and bottom edges will not. In this case, a color different from the electronic device's screen will be used to fill the top and bottom edges of the display device (not shown in the diagram).
[0211] Area A is the display screen of the electronic device, and Area B is the video playback area. When the electronic device projects its display screen onto the display device in portrait mode, from the perspective of Area F as a whole, Area B only occupies a small part of Area F. In order to make Area B fill the entire Area F, the boundary line of the projected screen is adjusted to select the area of the projected screen through the boundary line, and the adjusted projected screen is Area G.
[0212] In this embodiment of the application, when the display screen of the electronic device is too small on the display device, the screen projection screen of the display device is acquired and adjusted in real time to meet the user's needs.
[0213] Furthermore, it can repeatedly adjust the boundary lines according to actual needs to adjust the projected image, so that the adjusted projected image will not be overstretched and distorted, thus improving the display effect of the projected image of the electronic device on the display device.
[0214] Please see Figure 14 , Figure 14 This is a flowchart illustrating a method for adjusting the projection screen provided in an embodiment of this application.
[0215] The method for adjusting the projected image is applied to a display device. Specifically, the execution subject of the method for adjusting the projected image is one or at least two processors of the display device.
[0216] like Figure 14 As shown, the method for adjusting the projected screen includes:
[0217] Step S1401: Acquire the area projection screen sent by the electronic device, wherein the area projection screen corresponds to a resolution;
[0218] Specifically, the display device communicates with the electronic device to obtain the area projection screen sent by the electronic device, where the area projection screen corresponds to a resolution.
[0219] Step S1402: Render the display area of the display device according to the resolution corresponding to the area projection screen to obtain the rendered display area;
[0220] The display area is used to display the projected image.
[0221] Specifically, the display device renders the display area according to the resolution of the projected image, that is, it adjusts the resolution of the display area to obtain the rendered display area.
[0222] In this embodiment, the display area is re-rendered to ensure that the projected image maintains its original proportions during display, avoiding image distortion caused by stretching or compression.
[0223] For example, when displaying a low-resolution image on a high-resolution screen, proper layout adjustments can reduce blurriness and jagged edges.
[0224] Step S1403: Display the projected image in the rendered display area;
[0225] In this embodiment, by displaying the regional projection screen in the rendered display area, the display area of the regional projection screen can be dynamically adjusted according to the resolution of the regional projection screen and the screen size of the display device, ensuring that the regional projection screen can be displayed correctly according to the expected size and proportion, and providing a better viewing experience.
[0226] Please see Figure 15 , Figure 15 This is a schematic diagram of the overall process of a screen projection display method provided in an embodiment of this application.
[0227] like Figure 15 As shown, the overall flow of this screen projection display method includes:
[0228] start;
[0229] Step S1501: Obtain the display screen of the electronic device and confirm the selected area;
[0230] In this embodiment of the application, the display screen of the electronic device is obtained, and the area to be selected is determined. The selected area is the display area of the screen to be projected onto the display device.
[0231] Step S1502: Obtain the orientation information from the motion sensing device;
[0232] Specifically, a three-dimensional coordinate system is constructed based on the center of the screen of the electronic device. The acceleration coordinates of the electronic device in the three-dimensional coordinate system are read based on this coordinate system. The orientation information of the motion sensing device is determined according to each value in the acceleration coordinates. The orientation information of the motion sensing device includes up, down, right, and left.
[0233] Step S1503: In response to the adjustment operation of the adjustment device, adjust the selected area of the display screen;
[0234] Specifically, the adjustment operations include volume increase and volume decrease. When the adjustment operation is a volume decrease operation, the direction of movement of the boundary line is determined as the first movement direction, that is, the direction in which the boundary line points to the center of the display screen. When the adjustment operation is a volume increase operation, the direction of movement of the boundary line is determined as the second movement direction, that is, the direction in which the boundary line moves away from the center of the display screen.
[0235] Specifically, the adjustment value corresponding to the adjustment operation is obtained. The adjustment value includes the number of times the adjustment operation is triggered, and the number of pixels corresponding to one trigger is obtained to determine the pixel value. The pixel value = the number of pixels corresponding to one trigger * the adjustment value.
[0236] In this embodiment of the application, the display screen includes several boundary lines. By determining the movement direction and pixel value of each boundary line, the boundary line is moved by a pixel value along the movement direction to adjust the position of each boundary line in the display screen. Based on the position of each boundary line in the display screen, the selected area of the display screen is adjusted.
[0237] In this embodiment of the application, if the selected area of the display screen still needs to be adjusted, the process jumps to step S1502 to continue to obtain the direction information of the motion sensing device in order to continue to adjust the position of the boundary line on the display screen in order to adjust the selected area.
[0238] Step S1504: Based on the adjusted selection area, select a region of the display screen of the electronic device to modify the resolution of the display screen;
[0239] In this embodiment of the application, the video content is transmitted to the display device in the form of a continuous data stream. Before the video content is transmitted to the display device, the video stream is decoded into raw image data, that is, the size of the video display screen is adjusted based on the image data.
[0240] In this embodiment of the application, the adjusted selection area is a selection area obtained based on the original image data.
[0241] Specifically, after obtaining the adjusted selection area, the original image (i.e., the display screen of the electronic device) is selected based on the adjusted selection area to modify the resolution of the original image. The original image with the modified resolution is then re-encoded to obtain the adjusted display screen.
[0242] In this embodiment of the application, the video stream can be re-encoded based on the libyuv library. The libyuv library is an open-source cross-platform C / C++ library mainly used for image and video processing. It provides a rich set of function interfaces that can perform operations such as color space conversion, rotation, and scaling.
[0243] In this embodiment of the application, the range of the encoding region (minX, minY, maxX, maxY) can be set through the libyuv library, where minX is the X coordinate of the upper left corner of the encoding region, minY is the Y coordinate of the upper left corner of the encoding region, maxX is the X coordinate of the lower right corner of the encoding region, and maxY is the Y coordinate of the lower right corner of the encoding region. For example, the range of the encoding region can be set to (20, 40, 1064, 1840).
[0244] In this embodiment of the application, the encoding area is the area that needs to be retained in the display screen.
[0245] Step S1505: Send the adjusted display screen to the display device;
[0246] Specifically, the adjusted display image is sent to the display device, so that the display device displays the adjusted display image.
[0247] In this embodiment of the application, the adjustment operation of the adjustment device can quickly readjust the size of the display screen and dynamically adjust the display screen to the area required by the user.
[0248] Finish.
[0249] Please see Figure 16 , Figure 16 This is a schematic diagram of the structure of a screen projection display device provided in an embodiment of this application.
[0250] like Figure 16 As shown, the display device 1600 for projecting the screen includes:
[0251] The response unit 1601 is used to respond to the first trigger operation by sending the display screen of the electronic device to the display device so that the display device displays the display screen;
[0252] Acquisition unit 1602 is used to acquire orientation information from the motion sensing device;
[0253] The initial position determination unit 1603 is used to determine the initial position of the boundary line of the display screen based on the direction information.
[0254] The generation unit 1604 is configured to generate adjustment information in response to an adjustment operation on the adjustment device, wherein the adjustment information includes the adjustment direction and the adjustment value;
[0255] The pixel value determination unit 1605 is used to determine the movement direction and pixel value of the boundary line based on the adjustment direction and the adjustment value.
[0256] The screen projection determination unit 1606 is used to determine the first position of the boundary line based on the movement direction and pixel value, so as to select a region of the display screen based on the first position of the boundary line and obtain a region screen projection screen.
[0257] The sending unit 1607 is used to send the area projection screen to the display device so that the display device can display the area projection screen.
[0258] In the embodiments of this application, the display device for the projected screen can be a software module. The software module includes several instructions, which are stored in a memory. The processor can access the memory, call the instructions to execute them, and complete the display method of the projected screen in the above embodiments.
[0259] In the embodiments of this application, the display device for the projected screen can also be constructed from hardware components. For example, the display device for the projected screen can be constructed from one or more chips, and the chips can work together to complete the display method for the projected screen described in the above embodiments. Furthermore, the display device for the projected screen can also be constructed from various logic devices, such as general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), microcontrollers, ARM (Acorn RISC Machine) or other programmable logic devices, discrete gate or transistor logic, discrete hardware components, or any combination of these components.
[0260] The display device for the projected screen in this embodiment can be a device, or a component, integrated circuit, or chip in a terminal. The device can be a mobile electronic device or a non-mobile electronic device. For example, mobile electronic devices can be mobile phones, tablets, laptops, PDAs, in-vehicle electronic devices, wearable devices, ultra-mobile personal computers (UMPCs), netbooks, or personal digital assistants (PDAs), etc., while non-mobile electronic devices can be servers, network attached storage (NAS), personal computers (PCs), televisions (TVs), ATMs, or self-service machines, etc. This embodiment does not impose specific limitations.
[0261] The display device for the projected screen in this embodiment can be a device with an operating system. This operating system can be Android, iOS, or other possible operating systems; this embodiment does not specifically limit the specific operating system used.
[0262] The screen projection display device provided in this application embodiment can achieve... Figure 3 The various processes implemented in the method implementation examples will not be described again here to avoid repetition.
[0263] It should be noted that the above-described device can execute the screen projection display method provided in the embodiments of this application, and has the corresponding functional modules and beneficial effects of executing the method. Technical details not described in detail in the device embodiments can be found in the screen projection display method provided in the embodiments of this application.
[0264] In the embodiments of this application, the display effect of the screen projection of the electronic device on the display device can be improved by the cooperation of the various modules of the screen projection display device.
[0265] Please see Figure 17 , Figure 17 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application.
[0266] like Figure 17 As shown, the electronic device 10 includes one or more processors 11 and a memory 12. Wherein, Figure 17 Take a processor 11 as an example.
[0267] Processor 11 and memory 12 can be connected via a bus or other means. Figure 17 Taking the example of a connection between China and Israel via a bus.
[0268] A processor is configured to execute the screen projection display method in any embodiment of this application. The method is applied to an electronic device, which is communicatively connected to a display device. The electronic device includes a motion sensing device and an adjustment device, comprising:
[0269] In response to the first trigger operation, the display screen of the electronic device is sent to the display device so that the display device displays the display screen;
[0270] Acquire orientation information from motion sensing devices;
[0271] Based on the direction information, determine the initial position of the boundary line of the display screen;
[0272] In response to an adjustment operation on the adjustment device, adjustment information is generated, wherein the adjustment information includes the adjustment direction and the adjustment value;
[0273] Based on the adjustment direction and adjustment value, determine the movement direction and pixel value of the boundary line;
[0274] Based on the direction of movement and pixel value, the first position of the boundary line is determined, and the display area is selected according to the first position of the boundary line to obtain the area projection screen.
[0275] The area projection screen is sent to the display device so that the display device can display the area projection screen.
[0276] The memory 12, as a non-volatile computer-readable storage medium, can be used to store non-volatile software programs, non-volatile computer-executable programs, and modules, such as the program instructions / modules corresponding to the screen projection display method in the embodiments of the present invention. The processor 11 executes various functional applications and data processing of the electronic device by running the non-volatile software programs, instructions, and modules stored in the memory 12, thereby implementing the screen projection display method of the above-described method embodiments.
[0277] Memory 12 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other non-volatile solid-state storage device. In some embodiments, memory 12 may optionally include memory remotely located relative to processor 11. Examples of the above-described networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
[0278] One or more modules are stored in memory 12. When executed by one or more processors 11, they perform the screen projection display method in any of the above method embodiments, for example, the method described above. Figure 3 The steps shown.
[0279] This application also provides a computer program product, which includes one or more lines of program code stored in a non-volatile computer-readable storage medium. The processor of the electronic device reads the program code from the non-volatile computer-readable storage medium and executes the program code to complete the steps of the screen projection display method provided in the above embodiments.
[0280] Based on the above description of the embodiments, those skilled in the art will understand that all or part of the steps of the above embodiments can be implemented by hardware, or by a program or program code related to hardware. The program can be stored in a non-volatile computer-readable storage medium, such as a read-only memory, a disk, or an optical disk.
[0281] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented using software plus a general-purpose hardware platform, or of course, using hardware. Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. The non-volatile computer-readable storage medium can be a magnetic disk, optical disk, read-only memory (ROM), or random access memory (RAM), etc.
[0282] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and not to limit them; under the concept of this application, the technical features of the above embodiments or different embodiments can also be combined, the steps can be implemented in any order, and there are many other variations as described above in different aspects of this application, which are not provided in detail for the sake of brevity; although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the foregoing embodiments, or make equivalent substitutions for some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.
Claims
1. A method for displaying a projected image, characterized in that, Applied to an electronic device, the electronic device being communicatively connected to a display device, the electronic device including a motion sensing device and an adjustment device, the method includes: In response to a first trigger operation, the display screen of the electronic device is sent to the display device so that the display device displays the display screen; Obtain the orientation information of the motion sensing device; Based on the direction information, determine the initial position of the boundary line of the displayed image; In response to an adjustment operation on the adjustment device, adjustment information is generated, wherein the adjustment information includes the adjustment direction and the adjustment value; Based on the adjustment direction and adjustment value, the movement direction and pixel value of the boundary line are determined; Based on the movement direction and pixel value, the first position of the boundary line is determined, and the display screen is selected according to the first position of the boundary line to obtain the area projection screen. The projected image of the area is sent to the display device so that the display device displays the projected image of the area.
2. The method according to claim 1, characterized in that, Before acquiring the orientation information of the motion sensing device, the method further includes: Receive a second trigger operation, the second trigger operation is used to trigger the acquisition of the direction information of the motion sensing device, wherein the direction information of the motion sensing device includes up, down, left or right, and the initial position of the boundary line includes the upper edge, lower edge, left edge or right edge of the display screen; Determining the initial position of the boundary line of the displayed image based on the direction information includes: If the direction information is upward, then the initial position of the boundary line of the display screen is determined to be the lower edge of the display screen; If the direction information is downward, then the initial position of the boundary line of the display screen is determined to be the upper edge of the display screen; If the direction information is to the left, then the initial position of the boundary line of the display screen is determined to be the left edge of the display screen; If the direction information is to the right, then the initial position of the boundary line of the display screen is determined to be the right edge of the display screen.
3. The method according to claim 1, characterized in that, In response to an adjustment operation on the adjustment device, adjustment information is generated, including: The direction of adjustment is determined based on the type of adjustment operation. An adjustment value is determined based on the number of times the adjustment operation is triggered, wherein the adjustment value is positively correlated with the number of triggers; Adjustment information is generated based on the adjustment direction and the adjustment value.
4. The method according to claim 3, characterized in that, The adjustment operation types include volume decrease operation and volume increase operation, and the adjustment direction includes a first adjustment direction and a second adjustment direction; Determining the adjustment direction based on the type of adjustment operation includes: If the type of adjustment operation is a volume decrease operation, then the adjustment direction is determined to be the first adjustment direction; If the type of adjustment operation is a volume increase operation, then the adjustment direction is determined to be the second adjustment direction.
5. The method according to claim 3, characterized in that, The direction of movement includes a first direction of movement and a second direction of movement; Based on the adjustment direction and adjustment value, the movement direction and pixel value of the boundary line are determined, including: If the adjustment direction is the first adjustment direction, then the movement direction of the boundary line is determined to be the first movement direction, wherein the first movement direction is the direction in which the boundary line points to the center of the display screen; If the adjustment direction is the second adjustment direction, then the movement direction of the boundary line is determined to be the second movement direction, wherein the second movement direction is the direction in which the boundary line moves away from the center of the display screen; Obtain the number of pixels corresponding to one trigger of the adjustment operation; The pixel value is determined based on the number of pixels corresponding to a single trigger, combined with the adjustment value, wherein the pixel value is the product of the number of pixels corresponding to a single trigger and the adjustment value.
6. The method according to claim 1, characterized in that, Determining the first position of the boundary line based on the movement direction and pixel value includes: Based on the initial position of the boundary line and the pixel value, the boundary line is moved by the pixel value along the moving direction to determine the first position of the boundary line.
7. The method according to claim 1, characterized in that, The step of selecting a region of the display screen based on the first position of the boundary line to obtain a region projection screen includes: The projection area of the display screen is determined based on the first positions of several boundary lines, wherein each boundary line corresponds to a first position. The image corresponding to the projection area is used as the projection image for that area.
8. The method according to claim 1, characterized in that, After the display device displays the projected image, the method further includes: Obtain the current position of several boundary lines corresponding to the projected screen; Determine the movement direction and pixel value of at least one of the boundary lines in real time; Based on the current position of each of the boundary lines, and in combination with the movement direction of at least one of the boundary lines and the pixel value, the second position of the boundary line is determined. Based on the second position of the boundary line, a region of the display screen is selected to update the projected image of that region.
9. An electronic device, characterized in that, include: A processor and a memory, the processor being configured to execute executable program code in the memory, wherein when the executable program code is executed, the processor executes instructions for the screen projection display method as described in any one of claims 1 to 8.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed, implements the screen projection display method as described in any one of claims 1 to 8.