Display screen rotation adaptive method, device, computer equipment and storage medium
By dividing the pixels of the LED rectangular display screen and judging the sub-pixel coordinates after rotation, the problem of deformation of the display content after rotation is solved, and the clear and consistent display content is achieved.
Patent Information
- Application Number
- CN202310189327.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-01
- Publication Date
- 2024-08-27
- Estimated Expiration
- 2043-03-01
AI Technical Summary
After rotating the LED rectangular display screen, the display content will be visually deformed, and it is difficult to effectively solve this problem with existing technology.
By obtaining the number of pixel divisions according to the size of the LED rectangular display screen, dividing each pixel into sub-pixels, determining the coordinates of the sub-pixels that are lit before rotation, and rotating according to the preset angle to determine whether the number of lit pixels is met after rotation. Condition to decide whether to light the corresponding pixel.
This effectively avoids visual distortion of the rotated display content and ensures that the displayed content remains clear and consistent after rotation.
Smart Images

Figure CN116343714B
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of LED display screens, and in particular to a display screen rotation adaptive method, device, computer equipment and storage medium. Background Art
[0002] When rotating the LED display screen, it is necessary to keep the display content on the LED display screen facing upwards. However, when the LED display screen is a rectangular LED display screen, the existing method of rotating the rectangular LED display screen so that the display content thereon faces upwards will cause the display content to be visually deformed after rotation. Summary of the invention
[0003] Based on this, it is necessary to provide a display screen rotation adaptive method, device, computer equipment and storage medium that can avoid obvious visual deformation of the displayed content after rotation in order to solve the above technical problems.
[0004] In a first aspect, the present application provides a display screen rotation adaptive method, wherein the display screen is an LED rectangular display screen. The method comprises:
[0005] According to the size of the LED rectangular display screen, the number of pixel divisions is obtained, and each pixel on the LED rectangular display screen is divided into sub-pixels of the number of pixel divisions;
[0006] Determine the coordinates of the illuminated sub-pixels in the illuminated pixels on the LED rectangular display screen before rotation, rotate the LED rectangular display screen according to a preset angle, and obtain the coordinates of the illuminated sub-pixels after rotation;
[0007] Based on the rotated lit sub-pixel coordinates, it is determined whether the number of lit sub-pixels in the pixels on the LED rectangular display screen after rotation is not less than the preset number of lit pixels. If so, the corresponding pixels are lit.
[0008] In one embodiment, obtaining the number of pixel divisions according to the size of the LED rectangular display screen includes:
[0009] Obtain the number of pixels on the long side and the number of pixels on the short side of the LED rectangular display screen, and obtain the least common multiple of the number of pixels on the long side and the number of pixels on the short side;
[0010] The number of pixel divisions is obtained according to the least common multiple, the number of pixels on the long side and the number of pixels on the short side.
[0011] In one embodiment, obtaining the number of pixel divisions according to the least common multiple, the number of pixels on the long side, and the number of pixels on the short side includes:
[0012] Determining the number of pixel divisions in the long side direction according to the least common multiple and the number of pixels on the long side;
[0013] Determining the number of pixel divisions in the short side direction according to the least common multiple and the number of pixels on the short side;
[0014] The number of pixel divisions is determined based on the number of pixel divisions in the long side direction and the number of pixel divisions in the short side direction.
[0015] In one embodiment, the preset angle includes a natural multiple of 90 degrees.
[0016] In one embodiment, rotating the LED rectangular display screen according to a preset angle to obtain the rotated illuminated sub-pixel coordinates includes:
[0017] When the LED rectangular display screen is rotated by an odd multiple of 90 degrees, the horizontal and vertical coordinates of the illuminated sub-pixel coordinates in the illuminated pixels on the LED rectangular display screen before the rotation are swapped to obtain the rotated illuminated sub-pixel coordinates, and the horizontal and vertical axes of the rotated coordinate axes corresponding to the rotated illuminated sub-pixel coordinates are obtained by swapping the horizontal and vertical axes of the coordinate axes before the rotation corresponding to the illuminated sub-pixel coordinates in the illuminated pixels on the LED rectangular display screen before the rotation;
[0018] When the LED rectangular display screen is rotated by an even multiple of 90 degrees, the horizontal and vertical coordinates of the illuminated sub-pixel coordinates in the illuminated pixels on the LED rectangular display screen before rotation remain unchanged and serve as the illuminated sub-pixel coordinates after rotation, and the horizontal and vertical axes of the coordinate axes after rotation corresponding to the rotated illuminated sub-pixel coordinates are consistent with the horizontal and vertical axes of the coordinate axes before rotation corresponding to the illuminated sub-pixel coordinates in the illuminated pixels on the LED rectangular display screen before rotation.
[0019] In one of the embodiments, the preset number of illuminated pixels is half of the number of pixel divisions.
[0020] In a second aspect, the present application also provides a display screen rotation adaptive device, wherein the display screen is an LED rectangular display screen. The device comprises:
[0021] A pixel division module, used for obtaining the number of pixel divisions according to the size of the LED rectangular display screen, and dividing each pixel on the LED rectangular display screen into sub-pixels of the number of pixel divisions;
[0022] A rotation module, used to determine the coordinates of the illuminated sub-pixels in the illuminated pixels on the LED rectangular display screen before rotation, and rotate the LED rectangular display screen according to a preset angle to obtain the coordinates of the illuminated sub-pixels after rotation;
[0023] The lighting module is used to determine whether the number of illuminated sub-pixels in the pixels on the LED rectangular display screen after rotation is not less than the preset number of illuminated pixels based on the rotated illuminated sub-pixel coordinates, and if not, illuminate the corresponding pixels.
[0024] In a third aspect, the present application further provides a computer device, wherein the computer device comprises a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the steps of the method in any of the above embodiments are implemented.
[0025] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps of the method in any of the above embodiments are implemented.
[0026] In a fifth aspect, the present application further provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, the steps of the method in any of the above embodiments are implemented.
[0027] The above display screen rotation adaptive method, device, computer equipment and storage medium obtain the number of pixel divisions through the size of the LED rectangular display screen, and divide each pixel on the LED rectangular display screen into the number of sub-pixels of pixel divisions, determine the coordinates of the illuminated sub-pixels in the illuminated pixels on the LED rectangular display screen before rotation, rotate the LED rectangular display screen according to a preset angle, obtain the coordinates of the illuminated sub-pixels after rotation, and judge whether the pixels on the LED rectangular display screen can be illuminated after rotation based on the illuminated sub-pixel coordinates after rotation. Compared with the problem of obvious visual deformation of the display content on the LED rectangular display screen after rotating the LED rectangular display screen in the conventional technology, the present application obtains the number of pixel divisions based on the size of the LED rectangular display screen, divides each pixel on the LED rectangular display screen, determines the coordinates of the illuminated sub-pixels in the illuminated pixels after division, and then rotates it, and judges whether to illuminate the corresponding pixels based on the illuminated sub-pixel coordinates after rotation, which can avoid obvious visual deformation of the display content after rotation. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] Figure 1 A schematic diagram of the flow of a display screen rotation adaptive method provided in an embodiment of the present application;
[0029] Figure 2 A schematic diagram of dividing a pixel on an LED rectangular display screen into sub-pixels in the number of pixel divisions provided in an embodiment;
[0030] Figure 3A schematic diagram of a process for obtaining the number of pixel divisions according to the size of an LED rectangular display screen in one embodiment;
[0031] Figure 4 A schematic diagram of a rectangular LED display screen provided in one embodiment;
[0032] Figure 5 A schematic diagram of a process for obtaining the number of pixel divisions in one embodiment;
[0033] Figure 6 A schematic diagram of lighting up pixels of a rotating front LED rectangular display screen provided in one embodiment;
[0034] Figure 7 A schematic diagram of unlit pixels of a rotated LED rectangular display screen provided in one embodiment;
[0035] Figure 8 A schematic diagram of lighting up pixels on a rotated rectangular LED display screen provided in one embodiment;
[0036] Fig. 9 This is a structural block diagram of a display screen rotation adaptive device provided in an embodiment of the present application;
[0037] Fig.10 This is a diagram of the internal structure of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0038] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0039] In this embodiment, a display screen rotation adaptive method is provided. This embodiment uses the method applied to a computer device as an example for illustration. It can be understood that the method can also be applied to a server, and can also be applied to a system including a computer device and a server, and is implemented through the interaction between the computer device and the server.
[0040] Figure 1 Schematic diagram of the flow of the display screen rotation adaptive method provided in the embodiment of the present application, the method is applied to a computer device or a server, the display screen is an LED rectangular display screen, in one embodiment, Figure 1 As shown, the following steps are included:
[0041] S101, according to the size of the LED rectangular display screen, obtain the number of pixel divisions, and divide each pixel on the LED rectangular display screen into sub-pixels equal to the number of pixel divisions.
[0042] The LED rectangular display screen is an LED display screen including a long side and a short side. It should be understood that an LED rectangular display screen with two adjacent sides of equal length can also be applied to the present application. The number of pixel divisions is the number of sub-pixels that determine how many sub-pixels each pixel on the LED rectangular display screen is divided into. Sub-pixels are virtual pixels that cannot be lit individually. The smallest lighting unit on the LED rectangular display screen is a pixel.
[0043] In some embodiments, a schematic diagram of dividing a pixel on an LED rectangular display screen into pixel division number sub-pixels is provided, such as Figure 2 shown. Figure 2 B represents a pixel on the LED rectangular display screen, and A represents a sub-pixel. Figure 2 The number of pixel divisions in is 6, that is, one pixel B on the LED rectangular display screen is divided into 6 sub-pixels A.
[0044] S102, determining the coordinates of the illuminated sub-pixels in the illuminated pixels on the LED rectangular display screen before rotation, rotating the LED rectangular display screen according to a preset angle, and obtaining the coordinates of the illuminated sub-pixels after rotation.
[0045] The illuminated pixels on the LED rectangular display screen before rotation are the illuminated pixels corresponding to the content to be displayed on the LED rectangular display screen before rotation. The content to be displayed can be text or an image, which is not specifically limited. The illuminated sub-pixel coordinates are the coordinates of each sub-pixel included in the illuminated pixels on the LED rectangular display screen before rotation. The illuminated sub-pixel coordinates after rotation are the coordinates obtained by rotating each sub-pixel included in the illuminated pixels on the LED rectangular display screen before rotation.
[0046] S103, based on the rotated lit sub-pixel coordinates, determining whether the number of lit sub-pixels in the pixels on the rotated LED rectangular display screen is not less than a preset number of lit pixels, and if so, lighting the corresponding pixels.
[0047] The illuminated sub-pixel is the sub-pixel corresponding to each sub-pixel included in the illuminated pixel on the LED rectangular display screen before rotation. The preset number of illuminated pixels can be set manually or by computer equipment, and is not specifically limited.
[0048] In some embodiments, determining whether the number of illuminated sub-pixels in the pixels on the rotated LED rectangular display screen is not less than a preset number of illuminated pixels may be determining whether the number of illuminated sub-pixels in each pixel on the rotated LED rectangular display screen is not less than a preset number of illuminated pixels, or it may be determining whether the number of illuminated sub-pixels in the pixels on the rotated LED rectangular display screen to which each rotated illuminated sub-pixel belongs is not less than a preset number of illuminated pixels, without specific limitation.
[0049] The display screen rotation adaptive method provided in this embodiment obtains the number of pixel divisions through the size of the LED rectangular display screen, and divides each pixel on the LED rectangular display screen into the number of pixel divisions, sub-pixels, determines the coordinates of the illuminated sub-pixels in the illuminated pixels on the LED rectangular display screen before rotation, rotates the LED rectangular display screen according to a preset angle, obtains the coordinates of the illuminated sub-pixels after rotation, and judges whether the pixels on the LED rectangular display screen can be illuminated after rotation based on the illuminated sub-pixel coordinates after rotation. Compared with the problem of obvious visual deformation of the display content on the LED rectangular display screen after rotation in the conventional technology, this embodiment obtains the number of pixel divisions based on the size of the LED rectangular display screen, divides each pixel on the LED rectangular display screen, determines the coordinates of the illuminated sub-pixels in the illuminated pixels after division, and then rotates it, and judges whether to illuminate the corresponding pixels based on the illuminated sub-pixel coordinates after rotation, which can avoid obvious visual deformation of the display content after rotation.
[0050] In one embodiment, a flow chart of obtaining the number of pixel divisions according to the size of the LED rectangular display screen is as follows: Figure 3 As shown, including the following:
[0051] S301, obtaining the number of pixels on the long side and the number of pixels on the short side of the LED rectangular display screen, and obtaining the least common multiple of the number of pixels on the long side and the number of pixels on the short side.
[0052] The number of long-side pixels is the number of pixels contained in a long side of the LED rectangular display screen. The number of short-side pixels is the number of pixels contained in a short side of the LED rectangular display screen. Figure 4 As shown, Figure 4 The LED rectangular display screen has 4 pixels on the long side and 2 pixels on the short side.
[0053] S302, obtaining the number of pixel divisions according to the least common multiple, the number of pixels on the long side and the number of pixels on the short side.
[0054] In this embodiment, the least common multiple of the number of pixels on the long side and the number of pixels on the short side is obtained, and the number of pixel divisions is obtained based on the least common multiple. The number of pixel divisions is determined based on the least common multiple, which can ensure the feasibility of the obtained number of pixel divisions when performing pixel division.
[0055] In one embodiment, step S302 is a flow chart of obtaining the number of pixel divisions according to the least common multiple, the number of pixels on the long side and the number of pixels on the short side, as shown in FIG. Figure 5 As shown, the following steps are included:
[0056] S3021, determining the number of pixel divisions in the long side direction according to the least common multiple and the number of long side pixels.
[0057] In some embodiments, there are multiple ways to determine the number of pixel divisions in the long side direction based on the least common multiple and the number of pixels on the long side. One way to do this is to use the quotient obtained by dividing the least common multiple by the number of pixels on the long side as the number of pixel divisions in the long side direction. Alternatively, the quotient obtained by dividing the product of the least common multiple and a natural number by the number of pixels on the long side may be used as the number of pixel divisions in the long side direction, without any specific limitation.
[0058] S3022, determining the number of pixel divisions in the short side direction according to the least common multiple and the number of short side pixels.
[0059] In some embodiments, there are multiple ways to determine the number of pixel divisions in the short side direction based on the least common multiple and the number of pixels on the short side. One way to do this is to use the quotient obtained by dividing the least common multiple by the number of pixels on the short side as the number of pixel divisions in the short side direction. Alternatively, the quotient obtained by dividing the product of the least common multiple and a natural number by the number of pixels on the short side may be used as the number of pixel divisions in the short side direction, without any specific limitation.
[0060] S3023, determining the number of pixel divisions according to the number of pixel divisions in the long side direction and the number of pixel divisions in the short side direction.
[0061] In some embodiments, the number of pixel divisions in the long side direction is multiplied by the number of pixel divisions in the short side direction, and the product result is used as the number of pixel divisions.
[0062] In this embodiment, it can be ensured that the number of pixel divisions obtained is an integer, which is convenient for dividing each pixel on the LED rectangular display screen.
[0063] In one embodiment, the LED rectangular display screen is rotated according to a preset angle, and the preset angle includes a natural multiple of 90 degrees. For example, the preset angle may be 90 degrees, 180 degrees, or 270 degrees.
[0064] In one embodiment, the LED rectangular display screen is rotated according to a preset angle to obtain the rotated illuminated sub-pixel coordinates, including:
[0065] When the LED rectangular display screen is rotated by an odd multiple of 90 degrees, the horizontal and vertical coordinates of the illuminated sub-pixel coordinates in the illuminated pixels on the LED rectangular display screen before the rotation are swapped to obtain the illuminated sub-pixel coordinates after the rotation, and the horizontal and vertical axes of the coordinate axes after the rotation corresponding to the illuminated sub-pixel coordinates after the rotation are obtained by swapping the horizontal and vertical axes of the coordinate axes before the rotation corresponding to the illuminated sub-pixel coordinates in the illuminated pixels on the LED rectangular display screen before the rotation;
[0066] When the LED rectangular display screen is rotated by an even multiple of 90 degrees, the horizontal and vertical coordinates of the illuminated sub-pixel coordinates in the illuminated pixels on the LED rectangular display screen before rotation remain unchanged and serve as the illuminated sub-pixel coordinates after rotation, and the horizontal and vertical axes of the coordinate axes after rotation corresponding to the rotated illuminated sub-pixel coordinates are consistent with the horizontal and vertical axes of the coordinate axes before rotation corresponding to the illuminated sub-pixel coordinates in the illuminated pixels on the LED rectangular display screen before rotation.
[0067] In this embodiment, if the LED rectangular display screen is rotated by an even multiple of 90 degrees, the coordinates and coordinate axes before and after the rotation remain unchanged, which can ensure that the display content on the LED rectangular display screen remains displayed upward; if the LED rectangular display screen is rotated by an odd multiple of 90 degrees, the coordinates and coordinate axes before and after the rotation are swapped, which can ensure that the display content on the LED rectangular display screen remains displayed upward.
[0068] In one embodiment, the preset number of illuminated pixels is half of the number of pixel divisions.
[0069] In this embodiment, half of the number of pixel divisions is used as the preset number of illuminated pixels, which can further ensure that the displayed content will not be visually deformed significantly after rotation.
[0070] Here, the display content "1" on the LED rectangular display screen is taken as an example, and the complete implementation process of the display screen rotation adaptive method is described in detail.
[0071] The number of pixels on the long side of the LED rectangular display screen is 3, and the number of pixels on the short side is 2; the least common multiple of the number of pixels on the long side 3 and the number of pixels on the short side 2 is 6; the quotient obtained by dividing the least common multiple by the number of pixels on the long side is multiplied by the quotient obtained by dividing the least common multiple by the number of pixels on the short side to obtain the number of pixel divisions 6; each pixel on the LED rectangular display screen is divided into 6 sub-pixels.
[0072] Schematic diagram of the LED rectangular display lighting up pixels before rotation, as shown Figure 6As shown, the upper left corner of the LED rectangular display before rotation is taken as the origin O, the long side direction is the X axis, and the short side direction is the Y axis to establish the coordinate axis before rotation. M1, M2, M3, M4, M5 and M6 form a pixel. Figure 6 The illuminated sub-pixel coordinates of the illuminated pixels on the LED rectangular display screen before rotation; the LED rectangular display screen is rotated 90 degrees clockwise, and the horizontal and vertical coordinates of the illuminated sub-pixel coordinates of the illuminated pixels on the LED rectangular display screen before rotation are swapped, and the horizontal and vertical axes of the coordinate axes after rotation corresponding to the rotated illuminated sub-pixel coordinates of the illuminated pixels on the LED rectangular display screen before rotation are swapped to obtain the rotated illuminated sub-pixel coordinates.
[0073] by Figure 6 Taking the coordinates of the lit sub-pixels in the upper left corner of the LED rectangular display screen as an example, the coordinates of the lit sub-pixels are M1(0,0), M2(0,1), M3(0,2), M4(1,0), M5(1,1), M6(1,2), and the corresponding coordinates of the rotated lit sub-pixels are M1'(0,0), M2'(1,0), M3'(2,0), M4'(0,1), M5'(1,1), M6'(2,1). The schematic diagram of the unlit pixels of the LED rectangular display screen after rotation is as follows: Figure 7 As shown, the upper left corner of the rotated LED rectangular display screen is taken as the origin O, the long side direction is the X-axis, and the short side direction is the Y-axis to establish the rotated coordinate axis, and N1, N2, N3, N4, N5 and N6 constitute a pixel.
[0074] Based on the coordinates of the rotated lit sub-pixels, it is determined whether the number of lit sub-pixels in the pixels on the rotated LED rectangular display screen is not less than half of the number of pixel divisions, i.e., 3. If not, the corresponding pixels are lit. The schematic diagram of the rotated LED rectangular display screen lighting up the pixels is as follows: Figure 8 shown.
[0075] The display screen rotation adaptive method provided in this embodiment obtains the number of pixel divisions based on the size of the LED rectangular display screen, divides each pixel on the LED rectangular display screen, determines the illuminated sub-pixel coordinates in the illuminated pixel after division, and then rotates it. Based on the rotated illuminated sub-pixel coordinates, it determines whether to illuminate the corresponding pixel, thereby avoiding obvious visual deformation of the displayed content after rotation.
[0076] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0077] Based on the same inventive concept, the embodiment of the present application also provides a display screen rotation adaptive device for implementing the display screen rotation adaptive method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more display screen rotation adaptive device embodiments provided below can refer to the limitations of the display screen rotation adaptive method above, and will not be repeated here.
[0078] See also Fig. 9 , Fig. 9 This is a structural block diagram of a display screen rotation adaptive device provided in an embodiment of the present application. The display screen is an LED rectangular display screen. The device 900 includes: a pixel division module 901, a rotation module 902 and a lighting module 903, wherein:
[0079] The pixel division module 901 is used to obtain the number of pixel divisions according to the size of the LED rectangular display screen, and divide each pixel on the LED rectangular display screen into sub-pixels of the number of pixel divisions;
[0080] The rotation module 902 is used to determine the coordinates of the illuminated sub-pixels in the illuminated pixels on the LED rectangular display screen before rotation, and rotate the LED rectangular display screen according to a preset angle to obtain the coordinates of the illuminated sub-pixels after rotation;
[0081] The lighting module 903 is used to determine whether the number of lit sub-pixels in the pixels on the rotated LED rectangular display screen is not less than the preset number of lit pixels based on the rotated lit sub-pixel coordinates, and if so, light up the corresponding pixels.
[0082] The display screen rotation adaptive device provided in this embodiment obtains the number of pixel divisions through the size of the LED rectangular display screen, and divides each pixel on the LED rectangular display screen into the number of sub-pixels of pixel divisions, determines the coordinates of the illuminated sub-pixels in the illuminated pixels on the LED rectangular display screen before rotation, rotates the LED rectangular display screen according to a preset angle, obtains the coordinates of the illuminated sub-pixels after rotation, and judges whether the pixels on the LED rectangular display screen can be illuminated after rotation based on the illuminated sub-pixel coordinates after rotation. Compared with the problem of obvious visual deformation of the display content on the LED rectangular display screen after rotation in the traditional technology, this embodiment obtains the number of pixel divisions based on the size of the LED rectangular display screen, divides each pixel on the LED rectangular display screen, determines the coordinates of the illuminated sub-pixels in the illuminated pixels after division, and then rotates it, and judges whether to illuminate the corresponding pixels based on the illuminated sub-pixel coordinates after rotation, which can avoid obvious visual deformation of the display content after rotation.
[0083] Optionally, the pixel division module 901 includes:
[0084] A size acquisition unit, used to acquire the number of pixels on the long side and the number of pixels on the short side of the LED rectangular display screen, and to acquire the least common multiple of the number of pixels on the long side and the number of pixels on the short side;
[0085] The quantity acquisition unit is used to acquire the number of pixel divisions according to the lowest common multiple, the number of pixels on the long side and the number of pixels on the short side.
[0086] Optionally, the quantity acquisition unit includes:
[0087] The long side number determination subunit is used to determine the number of pixel divisions in the long side direction according to the lowest common multiple and the number of long side pixels;
[0088] A short side number determination subunit is used to determine the number of pixel divisions in the short side direction according to the lowest common multiple and the number of short side pixels;
[0089] The number determination subunit is used to determine the number of pixel divisions according to the number of pixel divisions in the long side direction and the number of pixel divisions in the short side direction.
[0090] Optionally, the preset angle includes a natural multiple of 90 degrees.
[0091] Optionally, the rotation module 902 includes:
[0092] An odd number rotation unit is used for, when the LED rectangular display screen is rotated by an odd number of 90 degrees, exchanging the horizontal and vertical coordinates of the illuminated sub-pixel coordinates in the illuminated pixels on the LED rectangular display screen before the rotation, to obtain the illuminated sub-pixel coordinates after the rotation, wherein the horizontal and vertical axes of the coordinate axes after the rotation corresponding to the illuminated sub-pixel coordinates after the rotation are obtained by exchanging the horizontal and vertical axes of the coordinate axes before the rotation corresponding to the illuminated sub-pixel coordinates in the illuminated pixels on the LED rectangular display screen before the rotation;
[0093] The even rotation unit is used to keep the horizontal and vertical coordinates of the illuminated sub-pixel coordinates in the illuminated pixels on the LED rectangular display screen before rotation unchanged when the LED rectangular display screen is rotated by an even multiple of 90 degrees, and use them as the illuminated sub-pixel coordinates after rotation, and the horizontal and vertical axes of the coordinate axes after rotation corresponding to the rotated illuminated sub-pixel coordinates are consistent with the horizontal and vertical axes of the coordinate axes before rotation corresponding to the illuminated sub-pixel coordinates in the illuminated pixels on the LED rectangular display screen before rotation.
[0094] Optionally, the preset number of illuminated pixels is half of the number of divided pixels.
[0095] Each module in the above display screen rotation adaptive device can be implemented in whole or in part by software, hardware or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each module.
[0096] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Fig.10 As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store data such as the number of pixel divisions. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a display screen rotation adaptive method is implemented.
[0097] Those skilled in the art will understand that Fig.10The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0098] In one embodiment, a computer device is provided, including a memory and a processor. A computer program is stored in the memory. When the processor executes the computer program, the steps of the display screen rotation adaptive method provided in the above embodiment are implemented:
[0099] The display screen is an LED rectangular display screen. According to the size of the LED rectangular display screen, the number of pixel divisions is obtained, and each pixel on the LED rectangular display screen is divided into sub-pixels of the number of pixel divisions.
[0100] Determine the coordinates of the illuminated sub-pixels in the illuminated pixels on the LED rectangular display screen before rotation, rotate the LED rectangular display screen according to a preset angle, and obtain the coordinates of the illuminated sub-pixels after rotation;
[0101] Based on the rotated lit sub-pixel coordinates, it is determined whether the number of lit sub-pixels in the pixels on the rotated LED rectangular display screen is not less than the preset number of lit pixels. If so, the corresponding pixels are lit.
[0102] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0103] Get the number of pixels on the long side and the number of pixels on the short side of the LED rectangular display screen, and get the least common multiple of the number of pixels on the long side and the number of pixels on the short side;
[0104] The number of pixel divisions is obtained based on the least common multiple, the number of pixels on the long side, and the number of pixels on the short side.
[0105] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0106] According to the least common multiple and the number of pixels on the long side, the number of pixel divisions in the long side direction is determined;
[0107] According to the least common multiple and the number of pixels on the short side, the number of pixel divisions in the short side direction is determined;
[0108] The number of pixel divisions is determined based on the number of pixel divisions in the long side direction and the number of pixel divisions in the short side direction.
[0109] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0110] The preset angles include values that are natural multiples of 90 degrees.
[0111] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0112] When the LED rectangular display screen is rotated by an odd multiple of 90 degrees, the horizontal and vertical coordinates of the illuminated sub-pixel coordinates in the illuminated pixels on the LED rectangular display screen before the rotation are swapped to obtain the illuminated sub-pixel coordinates after the rotation, and the horizontal and vertical axes of the coordinate axes after the rotation corresponding to the illuminated sub-pixel coordinates after the rotation are obtained by swapping the horizontal and vertical axes of the coordinate axes before the rotation corresponding to the illuminated sub-pixel coordinates in the illuminated pixels on the LED rectangular display screen before the rotation;
[0113] When the LED rectangular display screen is rotated by an even multiple of 90 degrees, the horizontal and vertical coordinates of the illuminated sub-pixel coordinates in the illuminated pixels on the LED rectangular display screen before rotation remain unchanged and serve as the illuminated sub-pixel coordinates after rotation, and the horizontal and vertical axes of the coordinate axes after rotation corresponding to the rotated illuminated sub-pixel coordinates are consistent with the horizontal and vertical axes of the coordinate axes before rotation corresponding to the illuminated sub-pixel coordinates in the illuminated pixels on the LED rectangular display screen before rotation.
[0114] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0115] The preset number of lit pixels is half the number of pixel divisions.
[0116] The implementation principle and technical effects of the above embodiment are similar to those of the above method embodiment and will not be repeated here.
[0117] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps of the display screen rotation adaptive method provided in the above embodiment are implemented:
[0118] The display screen is an LED rectangular display screen. According to the size of the LED rectangular display screen, the number of pixel divisions is obtained, and each pixel on the LED rectangular display screen is divided into sub-pixels of the number of pixel divisions.
[0119] Determine the coordinates of the illuminated sub-pixels in the illuminated pixels on the LED rectangular display screen before rotation, rotate the LED rectangular display screen according to a preset angle, and obtain the coordinates of the illuminated sub-pixels after rotation;
[0120] Based on the rotated lit sub-pixel coordinates, it is determined whether the number of lit sub-pixels in the pixels on the rotated LED rectangular display screen is not less than the preset number of lit pixels. If so, the corresponding pixels are lit.
[0121] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0122] Get the number of pixels on the long side and the number of pixels on the short side of the LED rectangular display screen, and get the least common multiple of the number of pixels on the long side and the number of pixels on the short side;
[0123] The number of pixel divisions is obtained based on the least common multiple, the number of pixels on the long side, and the number of pixels on the short side.
[0124] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0125] According to the least common multiple and the number of pixels on the long side, the number of pixel divisions in the long side direction is determined;
[0126] According to the least common multiple and the number of pixels on the short side, the number of pixel divisions in the short side direction is determined;
[0127] The number of pixel divisions is determined based on the number of pixel divisions in the long side direction and the number of pixel divisions in the short side direction.
[0128] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0129] The preset angles include values that are natural multiples of 90 degrees.
[0130] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0131] When the LED rectangular display screen is rotated by an odd multiple of 90 degrees, the horizontal and vertical coordinates of the illuminated sub-pixel coordinates in the illuminated pixels on the LED rectangular display screen before the rotation are swapped to obtain the illuminated sub-pixel coordinates after the rotation, and the horizontal and vertical axes of the coordinate axes after the rotation corresponding to the illuminated sub-pixel coordinates after the rotation are obtained by swapping the horizontal and vertical axes of the coordinate axes before the rotation corresponding to the illuminated sub-pixel coordinates in the illuminated pixels on the LED rectangular display screen before the rotation;
[0132] When the LED rectangular display screen is rotated by an even multiple of 90 degrees, the horizontal and vertical coordinates of the illuminated sub-pixel coordinates in the illuminated pixels on the LED rectangular display screen before rotation remain unchanged and serve as the illuminated sub-pixel coordinates after rotation, and the horizontal and vertical axes of the coordinate axes after rotation corresponding to the rotated illuminated sub-pixel coordinates are consistent with the horizontal and vertical axes of the coordinate axes before rotation corresponding to the illuminated sub-pixel coordinates in the illuminated pixels on the LED rectangular display screen before rotation.
[0133] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0134] The preset number of lit pixels is half the number of pixel divisions.
[0135] The implementation principle and technical effects of the above embodiment are similar to those of the above method embodiment and will not be repeated here.
[0136] In one embodiment, a computer program product is provided, including a computer program, which, when executed by a processor, implements the steps of the display screen rotation adaptive method provided in the above embodiment:
[0137] The display screen is an LED rectangular display screen. According to the size of the LED rectangular display screen, the number of pixel divisions is obtained, and each pixel on the LED rectangular display screen is divided into sub-pixels of the number of pixel divisions.
[0138] Determine the coordinates of the illuminated sub-pixels in the illuminated pixels on the LED rectangular display screen before rotation, rotate the LED rectangular display screen according to a preset angle, and obtain the coordinates of the illuminated sub-pixels after rotation;
[0139] Based on the rotated lit sub-pixel coordinates, it is determined whether the number of lit sub-pixels in the pixels on the rotated LED rectangular display screen is not less than the preset number of lit pixels. If so, the corresponding pixels are lit.
[0140] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0141] Get the number of pixels on the long side and the number of pixels on the short side of the LED rectangular display screen, and get the least common multiple of the number of pixels on the long side and the number of pixels on the short side;
[0142] The number of pixel divisions is obtained based on the least common multiple, the number of pixels on the long side, and the number of pixels on the short side.
[0143] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0144] According to the least common multiple and the number of pixels on the long side, the number of pixel divisions in the long side direction is determined;
[0145] According to the least common multiple and the number of pixels on the short side, the number of pixel divisions in the short side direction is determined;
[0146] The number of pixel divisions is determined based on the number of pixel divisions in the long side direction and the number of pixel divisions in the short side direction.
[0147] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0148] The preset angles include values that are natural multiples of 90 degrees.
[0149] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0150] When the LED rectangular display screen is rotated by an odd multiple of 90 degrees, the horizontal and vertical coordinates of the illuminated sub-pixel coordinates in the illuminated pixels on the LED rectangular display screen before the rotation are swapped to obtain the illuminated sub-pixel coordinates after the rotation, and the horizontal and vertical axes of the coordinate axes after the rotation corresponding to the illuminated sub-pixel coordinates after the rotation are obtained by swapping the horizontal and vertical axes of the coordinate axes before the rotation corresponding to the illuminated sub-pixel coordinates in the illuminated pixels on the LED rectangular display screen before the rotation;
[0151] When the LED rectangular display screen is rotated by an even multiple of 90 degrees, the horizontal and vertical coordinates of the illuminated sub-pixel coordinates in the illuminated pixels on the LED rectangular display screen before rotation remain unchanged and serve as the illuminated sub-pixel coordinates after rotation, and the horizontal and vertical axes of the coordinate axes after rotation corresponding to the rotated illuminated sub-pixel coordinates are consistent with the horizontal and vertical axes of the coordinate axes before rotation corresponding to the illuminated sub-pixel coordinates in the illuminated pixels on the LED rectangular display screen before rotation.
[0152] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0153] The preset number of lit pixels is half the number of pixel divisions.
[0154] The implementation principle and technical effects of the above embodiment are similar to those of the above method embodiment and will not be repeated here.
[0155] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.
[0156] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0157] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A display screen rotation adaptive method, characterized in that: The display screen is a LED rectangular display screen, and the method comprises: Obtain the number of pixels on the long side and the number of pixels on the short side of the LED rectangular display screen, and obtain the least common multiple of the number of pixels on the long side and the number of pixels on the short side; The quotient obtained by dividing the least common multiple by the number of pixels on the long side is used as the number of pixel divisions in the long side direction, the quotient obtained by dividing the least common multiple by the number of pixels on the short side is used as the number of pixel divisions in the short side direction, the number of pixel divisions in the long side direction is multiplied by the number of pixel divisions in the short side direction, and the product result is used as the number of pixel divisions; Divide each pixel on the LED rectangular display screen into sub-pixels of the number of pixel divisions; Determine the coordinates of the illuminated sub-pixels in the illuminated pixels on the LED rectangular display screen before rotation, rotate the LED rectangular display screen according to a preset angle, and obtain the coordinates of the illuminated sub-pixels after rotation; Based on the rotated lit sub-pixel coordinates, it is determined whether the number of lit sub-pixels in the pixels on the LED rectangular display screen after rotation is not less than the preset number of lit pixels. If so, the corresponding pixels are lit.
2. The method according to claim 1, characterized in that The preset angle includes a natural multiple of 90 degrees.
3. The method according to claim 2, characterized in that The step of rotating the LED rectangular display screen according to a preset angle to obtain the rotated illuminated sub-pixel coordinates includes: When the LED rectangular display screen is rotated by an odd multiple of 90 degrees, the horizontal and vertical coordinates of the illuminated sub-pixel coordinates in the illuminated pixels on the LED rectangular display screen before the rotation are swapped to obtain the rotated illuminated sub-pixel coordinates, and the horizontal and vertical axes of the rotated coordinate axes corresponding to the rotated illuminated sub-pixel coordinates are obtained by swapping the horizontal and vertical axes of the coordinate axes before the rotation corresponding to the illuminated sub-pixel coordinates in the illuminated pixels on the LED rectangular display screen before the rotation; When the LED rectangular display screen is rotated by an even multiple of 90 degrees, the horizontal and vertical coordinates of the illuminated sub-pixel coordinates in the illuminated pixels on the LED rectangular display screen before rotation remain unchanged and serve as the illuminated sub-pixel coordinates after rotation, and the horizontal and vertical axes of the coordinate axes after rotation corresponding to the rotated illuminated sub-pixel coordinates are consistent with the horizontal and vertical axes of the coordinate axes before rotation corresponding to the illuminated sub-pixel coordinates in the illuminated pixels on the LED rectangular display screen before rotation.
4. The method according to claim 1, characterized in that: The preset number of lit pixels is half of the number of pixel divisions.
5. A display screen rotation adaptive device, characterized in that: The display screen is a LED rectangular display screen, and the device comprises: A pixel division module, used for obtaining the number of pixel divisions according to the size of the LED rectangular display screen, and dividing each pixel on the LED rectangular display screen into sub-pixels of the number of pixel divisions; A rotation module, used to determine the coordinates of the illuminated sub-pixels in the illuminated pixels on the LED rectangular display screen before rotation, and rotate the LED rectangular display screen according to a preset angle to obtain the coordinates of the illuminated sub-pixels after rotation; A lighting module, used for judging whether the number of the illuminated sub-pixels in the pixels on the LED rectangular display screen after rotation is not less than the preset number of illuminated pixels based on the coordinates of the illuminated sub-pixels after rotation, and lighting the corresponding pixels if it is not less than the preset number of illuminated pixels; A pixel division module, including a size acquisition unit and a quantity acquisition unit; The size acquisition unit is used to acquire the number of pixels on the long side and the number of pixels on the short side of the LED rectangular display screen, and acquire the least common multiple of the number of pixels on the long side and the number of pixels on the short side; The number acquisition unit is used to acquire the number of pixel divisions according to the least common multiple, the number of pixels on the long side and the number of pixels on the short side; The step of obtaining the number of pixel divisions according to the least common multiple, the number of pixels on the long side, and the number of pixels on the short side includes: The quotient obtained by dividing the least common multiple by the number of pixels on the long side is used as the number of pixel divisions in the long side direction, and the quotient obtained by dividing the least common multiple by the number of pixels on the short side is used as the number of pixel divisions in the short side direction. The number of pixel divisions in the long side direction is multiplied by the number of pixel divisions in the short side direction, and the product result is used as the number of pixel divisions.
6. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 4 are implemented.
7. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 4 are implemented.
8. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 4 are implemented.
