Display screen area testing methods, apparatus, storage media and electronic equipment

By constructing a virtual test area and generating test graphics and images, the problem of a unified standard for testing the safe display area of ​​a display screen is solved, ensuring the integrity of information display.

CN116246557BActive Publication Date: 2026-05-26NETEASE (HANGZHOU) NETWORK CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
NETEASE (HANGZHOU) NETWORK CO LTD
Filing Date
2023-01-04
Publication Date
2026-05-26

AI Technical Summary

Technical Problem

The differences in screen size, resolution, and shape among different terminals have led to a lack of unified standards for testing the safe display area of ​​the screen, and the information displayed on the screen in the existing technology is incomplete.

Method used

A virtual test area is constructed based on the display resolution, and test graphics and images are generated. Safe display pixels are obtained by traversing and matching, and unsafe areas are excluded to ensure the integrity of information display.

Benefits of technology

It has enabled the testing of secure display areas across various terminal devices to ensure displayability, thereby improving the completeness of information display.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116246557B_ABST
    Figure CN116246557B_ABST
Patent Text Reader

Abstract

This disclosure relates to the field of terminal displays, specifically to a method, apparatus, storage medium, and electronic device for testing display screen areas. The method includes: obtaining a virtual test area based on the resolution of the display screen; generating a first test image based on a maximum width and a test value, and generating a second test image based on a maximum height and a test value; traversing the first test image along the vertical axis to obtain a first display image, and traversing the second test image along the horizontal axis to obtain a second display image; matching the first test image with each of the first display images to obtain a first secure display pixel, and matching the second test image with each of the second display images to obtain a second secure display pixel; and taking the union of the first secure display pixel and the second secure display pixel to obtain a secure display area of ​​the display screen. The display screen area testing method provided by this disclosure can test the secure display area of ​​the display screen, thereby improving the integrity of information display.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of terminal display, specifically to a method, apparatus, storage medium, and electronic device for testing display screen areas. Background Technology

[0002] Currently, different terminals have a wide variety of displays, differing in size, resolution, aspect ratio, and other aspects. Furthermore, the rounded corners and camera area of ​​these displays mean the visible area is not rectangular. Developers, however, require a regularly shaped display area (a safe display area) that can be guaranteed to be displayed. Therefore, it is necessary to test and determine the safe display area. This technical solution aims to test and determine the safe display area on a display screen.

[0003] In existing technologies, the range of the safe display area of ​​a display screen is usually provided by the hardware or equipment supplier. Different hardware and equipment suppliers do not have a unified standard for the safe display area, and the range of the safe display area provided by some displays deviates from the actual situation.

[0004] It should be noted that the information disclosed in the background section above is only used to enhance the understanding of the background of this disclosure, and therefore may include information that does not constitute prior art known to those skilled in the art. Summary of the Invention

[0005] The purpose of this disclosure is to provide a method, apparatus, storage medium, and electronic device for testing display screen areas, aiming to solve the problem of incomplete information display on display screens.

[0006] Other features and advantages of this disclosure will become apparent from the following detailed description, or may be learned in part from practice of this disclosure.

[0007] According to one aspect of the present disclosure, a display screen area testing method is provided, comprising: obtaining a virtual test area based on the resolution of the display screen, comprising a maximum width and a maximum height; wherein the virtual test area comprises a horizontal axis and a vertical axis; generating a first test image comprising a first test graphic based on the maximum width and a preset test value, and generating a second test image comprising a second test graphic based on the maximum height and the test value; traversing the first test graphic along the vertical axis to obtain a first display image corresponding to each vertical coordinate, and traversing the second test graphic along the horizontal axis to obtain a second display image corresponding to each horizontal coordinate; matching the first test image with each of the first display images to obtain a first safe display pixel, and matching the second test image with each of the second display images to obtain a second safe display pixel; and taking the union of the first safe display pixel and the second safe display pixel to obtain a safe display area of ​​the display screen.

[0008] According to some embodiments of this disclosure, based on the foregoing scheme, the first test pattern includes a first upper test pattern and a first lower test pattern. Generating a first test image including the first test pattern based on the maximum width and a preset test value includes: drawing a first test line segment along the horizontal axis based on the maximum width; drawing a second and a third test line segment starting from the endpoints of the first test line segment and perpendicular to the first test line segment along the positive direction of the vertical axis, and a fourth and a fifth test line segment perpendicular to the first test line segment along the opposite direction of the vertical axis, based on the test value; combining the first, second, and third test line segments to obtain the first upper test pattern; and combining the first, fourth, and fifth test line segments to obtain the first lower test pattern.

[0009] According to some embodiments of this disclosure, based on the foregoing scheme, the first display image includes a first upper display image and a first lower display image; the step of traversing the first test pattern along the vertical axis to obtain the first display image corresponding to each vertical coordinate includes: determining a target vertical coordinate i based on the virtual test area; recording the display effect of the first upper test pattern and the first lower test pattern where the vertical coordinate of the first test line segment is the target vertical coordinate, respectively, to obtain the first upper display image P corresponding to the target vertical coordinate i. i,1 And the first image P is displayed i,2 Repeat the steps of determining the target ordinate and recording the display effect until the ordinate of the virtual test area has been traversed to obtain the first upper display image and the first lower display image corresponding to each ordinate.

[0010] According to some embodiments of this disclosure, based on the foregoing scheme, the step of matching the first test pattern with each of the first display images to obtain a first safe display pixel includes: for a target vertical coordinate i, matching the first upper test pattern and the first lower test pattern with the first upper display image P corresponding to the target vertical coordinate i. i,1 And the first image P is displayed i,2 Four matching pairs are obtained by pairwise combinations; when there is a matching pair in the four matching pairs that matches the first test graphic and the first display image, the target ordinate is marked as the matching ordinate; the above matching steps are repeated until the ordinate of the virtual test area is traversed to obtain all the matching ordinates, and the first safe display pixel is obtained according to the matching ordinates.

[0011] According to some embodiments of this disclosure, based on the foregoing scheme, the method further includes: determining whether the first test graphic in the matching pair matches the first display image, wherein determining whether the first test graphic in the matching pair matches the first display image includes: extracting the contour of the first display image in the matching pair to obtain a first display graphic; and performing shape matching between the display graphic and the first test graphic to determine whether the first test graphic matches the first display image.

[0012] According to some embodiments of this disclosure, based on the foregoing scheme, obtaining the first safe display pixel according to the matching ordinate includes: for a target matching ordinate, marking the pixel in the first test line segment of the first test graphic corresponding to the target matching ordinate as a safe display pixel; traversing all the matching ordinates to obtain all the safe display pixels.

[0013] According to some embodiments of this disclosure, based on the foregoing scheme, the method further includes: setting the background color of the display screen to a first color, and setting the color of the first test graphic to a second color; wherein the first color is different from the second color.

[0014] According to a second aspect of the present disclosure, a display screen area testing apparatus is provided, comprising: a resolution module, configured to obtain a virtual test area composed of a maximum width and a maximum height based on the resolution of the display screen; wherein the virtual test area includes a horizontal axis and a vertical axis; a test image module, configured to generate a first test image including a first test graphic based on the maximum width and a preset test value, and to generate a second test image including a second test graphic based on the maximum height and the test value; a display image module, configured to traverse the first test graphic along the vertical axis to obtain a first display image corresponding to each vertical coordinate, and to traverse the second test graphic along the horizontal axis to obtain a second display image corresponding to each horizontal coordinate; a matching module, configured to match the first test image with each of the first display images to obtain a first safe display pixel, and to match the second test image with each of the second display images to obtain a second safe display pixel; and a union module, configured to take the union of the first safe display pixel and the second safe display pixel to obtain a safe display area of ​​the display screen.

[0015] According to a third aspect of the present disclosure, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the display area testing method as described in the above embodiments.

[0016] According to a fourth aspect of the present disclosure, an electronic device is provided, characterized in that it includes: one or more processors; and a storage device for storing one or more programs, which, when executed by the one or more processors, cause the one or more processors to implement the display area testing method as described in the above embodiments.

[0017] The exemplary embodiments disclosed herein may have some or all of the following beneficial effects:

[0018] In some embodiments of this disclosure, the maximum width and maximum height are first determined based on the display screen's resolution, and a virtual test area with the maximum width and maximum height is constructed. Then, test graphics and test images are generated based on preset test values ​​along the horizontal or vertical axis of the virtual test area. The test image is then moved through the virtual test area to obtain a display image. Finally, the test image and the display image are matched to obtain a secure display area composed of a certain number of displayable pixels. Based on this method, non-secure display areas such as rounded corners and cameras can be excluded, and a secure display area at the pixel level ensuring a certain number of displayable pixels can be obtained from the tests of various devices' displays. This secure display area can then be used for information display, improving the completeness of the information display.

[0019] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description

[0020] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure. It is obvious that the drawings described below are merely some embodiments of this disclosure, and those skilled in the art can obtain other drawings based on these drawings without any inventive effort. In the drawings:

[0021] Figure 1 This schematically illustrates a flowchart of a display area testing method according to an exemplary embodiment of the present disclosure;

[0022] Figure 2 This schematically illustrates a first test pattern in an exemplary embodiment of the present disclosure;

[0023] Figure 3 This schematically illustrates a first test pattern in an exemplary embodiment of the present disclosure;

[0024] Figure 4 This schematic diagram illustrates a first lower-display image in an exemplary embodiment of the present disclosure;

[0025] Figure 5 This diagram schematically illustrates a contour extraction result in an exemplary embodiment of the present disclosure.

[0026] Figure 6 This schematic diagram illustrates the composition of a display area testing apparatus according to an exemplary embodiment of the present disclosure;

[0027] Figure 7 This schematic diagram illustrates a computer-readable storage medium according to an exemplary embodiment of the present disclosure;

[0028] Figure 8 The schematic diagram illustrates the structure of a computer system of an electronic device according to an exemplary embodiment of the present disclosure. Detailed Implementation

[0029] Exemplary embodiments will now be described more fully with reference to the accompanying drawings. However, these exemplary embodiments can be implemented in many forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be more thorough and complete, and will fully convey the concept of the exemplary embodiments to those skilled in the art.

[0030] Furthermore, the described features, structures, or characteristics can be combined in any suitable manner in one or more embodiments. Numerous specific details are provided in the following description to give a thorough understanding of embodiments of this disclosure. However, those skilled in the art will recognize that the technical solutions of this disclosure can be practiced without one or more of the specific details, or other methods, components, apparatuses, steps, etc., can be employed. In other instances, well-known methods, apparatuses, implementations, or operations are not shown or described in detail to avoid obscuring various aspects of this disclosure.

[0031] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities can be implemented in software, in one or more hardware modules or integrated circuits, or in different network and / or processor devices and / or microcontroller devices.

[0032] The flowcharts shown in the accompanying drawings are merely illustrative and do not necessarily include all content and operations / steps, nor do they necessarily have to be performed in the described order. For example, some operations / steps can be broken down, while others can be combined or partially combined; therefore, the actual execution order may change depending on the specific circumstances.

[0033] The implementation details of the technical solutions of the embodiments of this disclosure are described in detail below.

[0034] Figure 1 This schematically illustrates a flowchart of a display area testing method according to an exemplary embodiment of the present disclosure. Figure 1 As shown, the display area testing method includes steps S101 to S105:

[0035] Step S101: Based on the resolution of the display screen, a virtual test area is obtained, which is composed of the maximum width and the maximum height; wherein, the virtual test area includes a horizontal axis and a vertical axis;

[0036] Step S102: Generate a first test image including a first test graphic based on the maximum width and a preset test value; and generate a second test image including a second test graphic based on the maximum height and the test value.

[0037] Step S103: Traverse the first test graphic along the vertical axis to obtain the first display image corresponding to each vertical coordinate, and traverse the second test graphic along the horizontal axis to obtain the second display image corresponding to each horizontal coordinate.

[0038] Step S104: Match the first test image with each of the first display images to obtain a first safe display pixel, and match the second test image with each of the second display images to obtain a second safe display pixel;

[0039] Step S105: Take the union of the first security display pixel and the second security display pixel as the security display area of ​​the display screen.

[0040] In some embodiments of this disclosure, the maximum width and maximum height are first determined based on the display screen's resolution, and a virtual test area with the maximum width and maximum height is constructed. Then, test graphics and test images are generated based on preset test values ​​along the horizontal or vertical axis of the virtual test area. The test image is then moved through the virtual test area to obtain a display image. Finally, the test image and the display image are matched to obtain a secure display area composed of a certain number of displayable pixels. Based on this method, non-secure display areas such as rounded corners and cameras can be excluded, and a secure display area at the pixel level ensuring a certain number of displayable pixels can be obtained from the tests of various devices' displays. This secure display area can then be used for information display, improving the completeness of the information display.

[0041] The following will describe in more detail each step of the display area testing method in this exemplary embodiment, with reference to the accompanying drawings and embodiments.

[0042] In step S101, a virtual test area is obtained based on the resolution of the display screen, consisting of the maximum width and the maximum height; wherein the virtual test area includes a horizontal axis and a vertical axis.

[0043] Specifically, since different displays may have different resolutions, in order to obtain a pixel-level safe display area, the maximum width W and maximum height H of the display can be obtained based on the resolution.

[0044] In one embodiment of this disclosure, the width of the display screen can be used as the horizontal axis and the height as the vertical axis. The coordinates of the pixels on the display screen then lie within a rectangular area of ​​a virtual test region with a width of W and a height of H. Considering the actual display effect, the actual coordinates of the pixels on the display screen are located between (0,0) and (H-1, W-1) or between (1,1) and (H, W).

[0045] It should be noted that the virtual test area is only constructed based on the maximum width and height. The pixels corresponding to the pixels in the virtual test area may not necessarily be displayed on the screen. For example, the camera area and the rounded corners around the device may be located within the virtual test area, but their display is not guaranteed. Therefore, the ultimate goal of this method is to test and identify a guaranteed displayable safe area from the virtual test area.

[0046] The horizontal and vertical axes are merely illustrative examples, and those skilled in the art should understand that they can be interchanged in practical applications.

[0047] In step S102, a first test image including a first test graphic is generated based on the maximum width and a preset test value, and a second test image including a second test graphic is generated based on the maximum height and the test value.

[0048] It should be noted that the steps for generating the first test image and the second test image are similar, the only difference being that they are performed along the two coordinate axes of the virtual test area. Therefore, the process of generating the first test image and the first test graphic will be described in detail below. It is conceivable that by interchanged coordinate axes, the same steps can be used to obtain the second test image and the second test graphic.

[0049] Specifically, step S102, which generates the first test image, includes the following steps:

[0050] 1) Draw the first test line segment along the horizontal axis based on the maximum width;

[0051] 2) Draw a second test line segment and a third test line segment that start from the endpoints of the first test line segment and are perpendicular to the first test line segment along the positive direction of the vertical axis, and a fourth test line segment and a fifth test line segment that are perpendicular to the first test line segment along the opposite direction of the vertical axis, based on the test values.

[0052] 3) The first test line segment, the second test line segment and the third test line segment are combined to obtain the first upper test pattern, and the first test line segment, the fourth test line segment and the fifth test line segment are combined to obtain the first lower test pattern.

[0053] Specifically, firstly, a line segment with a length equal to the maximum width W is drawn along the width direction of the display screen as the first test line segment L1. The two segments of the line segment are A(0,i) and B(W-1,i), where i is any vertical coordinate value.

[0054] With the test value set to k, along the positive vertical axis, draw a second test line segment L2 starting from A(0,i) and extending from (0,i) to (0,i+k) with a length of k, and draw a third test line segment L3 starting from B(W-1,i) and extending from (W-1,i) to (W-1,i+k) with a length of k. Along the negative vertical axis, draw a fourth test line segment L4 starting from A(0,i) and extending from (0,i) to (0,ik) with a length of k, and draw a fifth test line segment L5 starting from B(W-1,i) and extending from (W-1,i) to (W-1,ik) with a length of k.

[0055] Figure 2 This schematic diagram illustrates a first upper test pattern in an exemplary embodiment of the present disclosure. L1, L2, and L3 are combined to obtain the first upper test pattern U1, as shown below. Figure 2 As shown, the opening of the first upper test pattern faces upwards; Figure 3 This schematic diagram illustrates a first test pattern in an exemplary embodiment of the present disclosure. L1, L4, and L5 are combined to obtain the first test pattern, as shown below. Figure 3 As shown, the opening of the first test pattern U2 faces downwards.

[0056] After obtaining the test graphic, a test image is generated, including a first upper test image and a first lower test image, for subsequent image matching with the display image.

[0057] The process of generating a second test image including a second test pattern based on the maximum height and the test value is similar to that of generating a first test image including a first test pattern, or the horizontal axis and the vertical axis are swapped to obtain a second test pattern including a second right test pattern U3 with the opening facing right and a second left test pattern U4 with the opening facing left.

[0058] Specifically, draw the sixth test line segment L6 along the vertical axis based on the maximum height; draw the seventh test line segment L7 and the eighth test line segment L8, which are perpendicular to the sixth test line segment in the positive direction of the horizontal axis, starting from the endpoints of the sixth test line segment, and the ninth test line segment L9 and the tenth test line segment L10, which are perpendicular to the sixth test line segment in the opposite direction of the horizontal axis, based on the test values.

[0059] In step S103, the first test graphic is traversed along the vertical axis to obtain the first display image corresponding to each vertical coordinate, and the second test graphic is traversed along the horizontal axis to obtain the second display image corresponding to each horizontal coordinate.

[0060] Specifically, step S103, which generates the first display image, includes the following steps:

[0061] 1) Determine a target ordinate i based on the virtual test area;

[0062] 2) Record the display effects of the first upper test image and the first lower test image, where the vertical coordinate of the first test line segment is the target vertical coordinate, displayed on the display screen respectively, so as to obtain the first upper display image P corresponding to the target vertical coordinate i. i,1 And the first image P is displayed i,2 ;

[0063] 3) Repeat the above steps of determining the target ordinate and recording the display effect until the ordinate of the virtual test area has been traversed to obtain the first upper display image and the first lower display image corresponding to each ordinate.

[0064] Specifically, the process involves traversing the vertical coordinates of the first test line segment in the first test pattern to obtain the first display image corresponding to each vertical coordinate. Since the first test pattern includes an upper test pattern U1 with its opening facing upwards and a lower test pattern U2 with its opening facing downwards, a first upper display image P displaying U1 will be generated at each vertical coordinate. i,1 And display the first image P of U2. i,2 .

[0065] When recording the display effect, the screen first needs to display the test graphic at the target position according to the coordinate system. Line segments in the test graphic that are not within the range of the screen can be ignored. Then, take a picture to record the current image of the screen as the display image, and obtain the first upper display image of display U1 and the first lower display image of display U2.

[0066] During the traversal, the ordinate can be changed from 0 to H-1 or from H-1 back to 0, with a step size of 1 for each update. Since the W and H values ​​are obtained based on the display resolution, increasing the ordinate by 1 here actually corresponds to adding one pixel. After the traversal, the display image corresponding to each ordinate value in [0, H-1] is obtained.

[0067] Figure 4 This schematic diagram illustrates a first lower display image in an exemplary embodiment of the present disclosure, with reference to... Figure 4 As shown, the first test pattern is displayed on the screen to be tested. Figure 4 .

[0068] In one embodiment of this disclosure, the process of traversing the second test graphic along the horizontal axis to obtain the second display image corresponding to each horizontal coordinate is similar to generating the first display image, or the horizontal axis and vertical axis are swapped to obtain the second right display image and the second left display image of display U3 corresponding to each horizontal coordinate value.

[0069] That is, a target horizontal coordinate j is determined based on the virtual test area; the display effect of the first right test image and the first left test image, where the horizontal coordinate of the sixth test line segment is the target horizontal coordinate, is recorded on the display screen to obtain the first right display image P corresponding to the target horizontal coordinate j. j,1 And the first left-hand display image P j,2 Repeat the steps of determining the target x-coordinate and recording the display effect until the x-coordinate of the virtual test area has been traversed to obtain the first right display image and the first left display image corresponding to each x-coordinate.

[0070] In step S104, the first test image is matched with each of the first display images to obtain a first safe display pixel, and the second test image is matched with each of the second display images to obtain a second safe display pixel.

[0071] Specifically, the process of obtaining the first security display pixel in step S104 is as follows:

[0072] 1) For a target ordinate i, the first upper test image and the first lower test image are respectively matched with the first upper display image P corresponding to the target ordinate i. i,1 And the first image P is displayed i,2 By combining each pair, four matching pairs are obtained;

[0073] 2) When there is a matching pair among the four matching pairs where the first test graphic matches the first displayed image, the target ordinate is marked as the matching ordinate.

[0074] 3) Repeat the above matching steps until the vertical coordinates of the virtual test area have been traversed to obtain all the matching vertical coordinates, and obtain the first safe display pixel based on the matching vertical coordinates.

[0075] This process involves iterating through all ordinates, determining whether a given ordinate is a matching ordinate based on the image matching results, and finally obtaining the first safe display pixel based on the matching ordinate. Image matching is then used to match P. i,1 P i,2 Matching with U1 and U2 forms P i,1 -U1、P i,1 -U2、P i,2 -U1、P i,2 -U2 has four matching pairs. If there is one matching pair, then the ordinate i is recorded as the matching ordinate x. i Finally, the result is obtained by matching the ordinate y. i The Y-axis is formed by this. Similarly, those skilled in the art will readily conceive of obtaining the matching x-coordinate. i X constitutes the whole.

[0076] Therefore, in one embodiment of this disclosure, the method further includes: determining whether the first test graphic in the matching pair matches the first display image. Specifically, the steps are as follows: extracting the contour of the first display image in the matching pair to obtain a first display graphic; performing shape matching between the display graphic and the first test graphic to determine whether the first test graphic matches the first display image.

[0077] Specifically, the first step is to extract the contour of the first display image to obtain a display graphic composed of three line segments. Figure 5 This diagram schematically illustrates a contour extraction result in an exemplary embodiment of the present disclosure. Figure 4 Taking the first displayed image as an example, the result after contour extraction is referenced. Figure 5 As shown.

[0078] After contour extraction, the extracted display graphic is matched with the matching graphic. Graphic matching can be performed by changing the size of the display graphic, rotating it, or translating it. The advantage of using these methods is that when matching graphics or capturing images from the screen, there's no need to consider scale, translation, or rotation issues. For example, even if the captured image is too large or too small, or not perfectly aligned, it can still be matched more accurately.

[0079] In one embodiment of this disclosure, the method further includes: setting the background color of the display screen to a first color, and setting the color of the first test graphic to a second color; wherein the first color is different from the second color.

[0080] Specifically, since contour extraction is required for the first displayed image, the greater the color difference when the display screen shows the test pattern, the better the contour extraction effect. Therefore, the background color of the display screen and the color of the first test pattern can be set to a second color that is significantly different from the display image to improve the accuracy of contour extraction and further improve the accuracy of pattern matching.

[0081] Repeat the matching steps above, judge each ordinate, and finally obtain all the matching ordinates. Then, obtain the first safe display pixel based on the matching ordinates.

[0082] In one embodiment of this disclosure, obtaining the first safe display pixel based on the matching ordinate specifically includes the following steps: for a target matching ordinate, marking the pixel in the first test line segment of the first test graphic corresponding to the target matching ordinate as a safe display pixel; traversing all the matching ordinates to obtain all the safe display pixels.

[0083] Specifically, iterate through each item y in Y. i The first test line segment (0, y) i) to (W-1, y i All pixels in X are marked as the first safe display pixel. Similarly, traversing each item x in X... i The sixth test segment (x) i ,0) to (x i All pixels (H-1) are marked as second security display pixels.

[0084] In step S105, the union of the first security display pixel and the second security display pixel is taken to obtain the security display area of ​​the display screen.

[0085] Specifically, the union of the first and second security display pixels is taken to obtain all security display pixels, and the range formed by all security display pixels is the security display area of ​​the display screen.

[0086] The safe display area is the regular display area on the screen excluding areas such as cameras and rounded corners, ensuring that the image is always visible.

[0087] Figure 6 This schematic diagram illustrates the composition of a display area testing apparatus according to an exemplary embodiment of the present disclosure, such as... Figure 6 As shown, the display area testing device 600 may include a resolution module 601, a test image module 602, a display image module 603, a matching module 604, and a union module 605. Wherein:

[0088] The resolution module 601 is used to obtain a virtual test area consisting of the maximum width and the maximum height based on the resolution of the display screen; wherein the virtual test area includes a horizontal axis and a vertical axis;

[0089] The test image module 602 is used to generate a first test image including a first test graphic based on the maximum width and a preset test value, and to generate a second test image including a second test graphic based on the maximum height and the test value;

[0090] The display image module 603 is used to traverse the first test graphic along the vertical axis to obtain a first display image corresponding to each vertical coordinate, and to traverse the second test graphic along the horizontal axis to obtain a second display image corresponding to each horizontal coordinate.

[0091] The matching module 604 is used to match the first test image with each of the first display images to obtain a first safe display pixel, and to match the second test image with each of the second display images to obtain a second safe display pixel;

[0092] The union module 605 is used to obtain the safe display area of ​​the display screen by taking the union of the first safe display pixel and the second safe display pixel.

[0093] According to an exemplary embodiment of this disclosure, the first test pattern includes a first upper test pattern and a first lower test pattern. The test image module 602 is used to draw a first test line segment along the horizontal axis based on the maximum width; draw a second test line segment and a third test line segment starting from the endpoints of the first test line segment and perpendicular to the first test line segment along the positive direction of the vertical axis, and a fourth test line segment and a fifth test line segment perpendicular to the first test line segment along the opposite direction of the vertical axis, based on the test value; combine the first test line segment, the second test line segment, and the third test line segment to obtain the first upper test pattern, and combine the first test line segment, the fourth test line segment, and the fifth test line segment to obtain the first lower test pattern.

[0094] According to an exemplary embodiment of this disclosure, the first display image includes a first upper display image and a first lower display image. The display image module 603 is used to determine a target vertical coordinate i based on the virtual test area; and to record the display effect of the first upper test image and the first lower test image, where the vertical coordinate of the first test line segment is the target vertical coordinate, respectively displayed on the display screen, so as to obtain the first upper display image P corresponding to the target vertical coordinate i. i,1 And the first image P is displayed i2 Repeat the steps of determining the target ordinate and recording the display effect until the ordinate of the virtual test area has been traversed to obtain the first upper display image and the first lower display image corresponding to each ordinate.

[0095] According to an exemplary embodiment of this disclosure, the matching module 604 is configured to, for a target ordinate i, match the first upper test image and the first lower test image with the first upper display image P corresponding to the target ordinate i. i,1 And the first image P is displayed i,2 Four matching pairs are obtained by pairwise combinations; when there is a matching pair in the four matching pairs that matches the first test graphic and the first display image, the target ordinate is marked as the matching ordinate; the above matching steps are repeated until the ordinate of the virtual test area is traversed to obtain all the matching ordinates, and the first safe display pixel is obtained according to the matching ordinates.

[0096] According to an exemplary embodiment of the present disclosure, the matching module 604 is further configured to determine whether the first test graphic in the matching pair matches the first display image, including: extracting the contour of the first display image in the matching pair to obtain a first display graphic; and performing shape matching between the display graphic and the first test graphic to determine whether the first test graphic matches the first display image.

[0097] According to an exemplary embodiment of this disclosure, the matching module 604 is further configured to, for a target matching ordinate, mark the pixel in the first test line segment of the first test graphic corresponding to the target matching ordinate as a safe display pixel; and traverse all the matching ordinates to obtain all the safe display pixels.

[0098] According to an exemplary embodiment of the present disclosure, the display image module 603 further includes a display unit for setting the background color of the display screen to a first color and setting the color of the first test graphic to a second color; wherein the first color is different from the second color.

[0099] The specific details of each module in the aforementioned display area testing device 600 have been described in detail in the corresponding display area testing method, so they will not be repeated here.

[0100] It should be noted that although several modules or units for the device used to perform actions have been mentioned in the detailed description above, this division is not mandatory. In fact, according to embodiments of this disclosure, the features and functions of two or more modules or units described above can be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided and embodied by multiple modules or units.

[0101] In an exemplary embodiment of this disclosure, a storage medium capable of implementing the above-described method is also provided. Figure 7 This schematic diagram illustrates a computer-readable storage medium according to an exemplary embodiment of the present disclosure, such as... Figure 7 As shown, a program product 700 for implementing the above-described method according to an embodiment of the present disclosure is described. This product may employ a portable compact disc read-only memory (CD-ROM) and include program code, and may run on a terminal device, such as a mobile phone. However, the program product of the present disclosure is not limited thereto. In this document, the readable storage medium may be any tangible medium containing or storing a program that may be used by or in conjunction with an instruction execution system, apparatus, or device.

[0102] In an exemplary embodiment of this disclosure, an electronic device capable of implementing the above-described method is also provided. Figure 8The schematic diagram illustrates the structure of a computer system of an electronic device according to an exemplary embodiment of the present disclosure.

[0103] It should be noted that, Figure 8 The computer system 800 of the electronic device shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments disclosed herein.

[0104] like Figure 8 As shown, the computer system 800 includes a Central Processing Unit (CPU) 801, which can perform various appropriate actions and processes based on programs stored in Read-Only Memory (ROM) 802 or programs loaded from storage section 808 into Random Access Memory (RAM) 803. The RAM 803 also stores various programs and data required for system operation. The CPU 801, ROM 802, and RAM 803 are interconnected via a bus 804. An Input / Output (I / O) interface 805 is also connected to the bus 804.

[0105] The following components are connected to I / O interface 805: an input section 806 including a keyboard, mouse, etc.; an output section 807 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and speakers, etc.; a storage section 808 including a hard disk, etc.; and a communication section 809 including a network interface card such as a LAN (Local Area Network) card, modem, etc. The communication section 809 performs communication processing via a network such as the Internet. A drive 810 is also connected to I / O interface 805 as needed. A removable medium 811, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed on drive 810 as needed so that computer programs read from it can be installed into storage section 808 as needed.

[0106] In particular, according to embodiments of this disclosure, the processes described below with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this disclosure include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication section 809, and / or installed from removable medium 811. When the computer program is executed by central processing unit (CPU) 801, it performs various functions defined in the system of this disclosure.

[0107] It should be noted that the computer-readable medium shown in the embodiments of this disclosure can be a computer-readable signal medium or a computer-readable storage medium, or any combination of the two. A computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), flash memory, optical fiber, portable compact disc read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this disclosure, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In this disclosure, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such transmitted data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. The computer-readable signal medium can also be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to wireless, wired, etc., or any suitable combination thereof.

[0108] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0109] The units described in the embodiments of this disclosure can be implemented in software or hardware, and the described units can also be located in a processor. The names of these units do not necessarily limit the unit itself.

[0110] In another aspect, this disclosure also provides a computer-readable medium, which may be included in the electronic device described in the above embodiments; or it may exist independently and not assembled into the electronic device. The computer-readable medium carries one or more programs that, when executed by the electronic device, cause the electronic device to perform the methods described in the above embodiments.

[0111] It should be noted that although several modules or units for the device used to perform actions have been mentioned in the detailed description above, this division is not mandatory. In fact, according to embodiments of this disclosure, the features and functions of two or more modules or units described above can be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided and embodied by multiple modules or units.

[0112] From the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein can be implemented by software or by combining software with necessary hardware. Therefore, the technical solutions according to the embodiments of this disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (such as a CD-ROM, USB flash drive, external hard drive, etc.) or on a network, including several instructions to cause a computing device (such as a personal computer, server, touch terminal, or network device, etc.) to execute the method according to the embodiments of this disclosure.

[0113] Other embodiments of this disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This disclosure is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not disclosed herein.

[0114] It should be understood that this disclosure is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this disclosure is limited only by the appended claims.

Claims

1. A method for testing a display screen area, characterized in that, include: A virtual test area is obtained based on the resolution of the display screen, consisting of the maximum width and the maximum height; wherein, the virtual test area includes a horizontal axis and a vertical axis; A first test image including a first test graphic is generated based on the maximum width and a preset test value, and a second test image including a second test graphic is generated based on the maximum height and the test value; The first test image is traversed along the vertical axis to obtain the first display image corresponding to each vertical coordinate, and the second test image is traversed along the horizontal axis to obtain the second display image corresponding to each horizontal coordinate. The first test image is matched with each of the first display images to obtain a first safe display pixel, and the second test image is matched with each of the second display images to obtain a second safe display pixel; The safe display area of ​​the display screen is obtained by taking the union of the first safe display pixel and the second safe display pixel.

2. The display screen area testing method according to claim 1, characterized in that, The first test pattern includes a first upper test pattern and a first lower test pattern. Generating a first test image including the first test pattern based on the maximum width and a preset test value includes: Draw the first test line segment along the horizontal axis based on the maximum width; Based on the test values, draw a second test line segment and a third test line segment that start from the endpoints of the first test line segment and are perpendicular to the first test line segment along the positive direction of the vertical axis; and a fourth test line segment and a fifth test line segment that are perpendicular to the first test line segment along the opposite direction of the vertical axis. The first test line segment, the second test line segment, and the third test line segment are combined to obtain the first upper test pattern, and the first test line segment, the fourth test line segment, and the fifth test line segment are combined to obtain the first lower test pattern.

3. The display screen area testing method according to claim 2, characterized in that, The first displayed image includes a first upper displayed image and a first lower displayed image; The step of traversing the first test image along the vertical axis to obtain the first display image corresponding to each vertical coordinate includes: A target ordinate i is determined based on the virtual test area; The display screen is recorded to show the display effects of the first upper test image and the first lower test image, where the vertical coordinate of the first test line segment is the target vertical coordinate, respectively, so as to obtain the first upper display image P corresponding to the target vertical coordinate i. i,1 And the first image P is displayed i,2 ; Repeat the steps of determining the target ordinate and recording the display effect until the ordinate of the virtual test area has been traversed to obtain the first upper display image and the first lower display image corresponding to each ordinate.

4. The display screen area testing method according to claim 3, characterized in that, The step of matching the first test graphic with each of the first display images to obtain the first safe display pixel includes: For a target ordinate i, the first upper test image and the first lower test image are respectively matched with the first upper display image P corresponding to the target ordinate i. i,1 And the first image P is displayed i,2 By combining each pair, four matching pairs are obtained; When there is a matching pair among the four matching pairs where the first test graphic matches the first displayed image, the target ordinate is marked as the matching ordinate. Repeat the above matching steps until the vertical coordinates of the virtual test area have been traversed to obtain all the matching vertical coordinates, and obtain the first safe display pixel based on the matching vertical coordinates.

5. The display screen area testing method according to claim 4, characterized in that, The method further includes: determining whether the first test image in the matching pair matches the first displayed image, wherein determining whether the first test image in the matching pair matches the first displayed image includes: Contour extraction is performed on the first display image in the matching pair to obtain a first display graphic; The display graphic is shape matched with the first test graphic to determine whether the first test graphic matches the first display image.

6. The display screen area testing method according to claim 4, characterized in that, The step of obtaining the first safe display pixel based on the matched ordinate includes: For a target matching ordinate, the pixel in the first test line segment of the first test graphic corresponding to the target matching ordinate is marked as a safe display pixel. Iterate through all the matching ordinates to obtain all the safe display pixels.

7. The display screen area testing method according to claim 3, characterized in that, The method further includes: The background color of the display screen is set to a first color, and the color of the first test graphic is set to a second color; wherein the first color is different from the second color.

8. A display screen area testing device, characterized in that, include: A resolution module is used to obtain a virtual test area consisting of the maximum width and the maximum height based on the resolution of the display screen; wherein the virtual test area includes a horizontal axis and a vertical axis; The test image module is used to generate a first test image including a first test graphic based on the maximum width and a preset test value, and to generate a second test image including a second test graphic based on the maximum height and the test value; The display image module is used to traverse the first test graphic along the vertical axis to obtain a first display image corresponding to each vertical coordinate, and to traverse the second test graphic along the horizontal axis to obtain a second display image corresponding to each horizontal coordinate. The matching module is used to match the first test image with each of the first display images to obtain a first safe display pixel, and to match the second test image with each of the second display images to obtain a second safe display pixel; The union module is used to obtain the safe display area of ​​the display screen by taking the union of the first safe display pixel and the second safe display pixel.

9. A computer-readable storage medium having a computer program stored thereon, the program being executed by a processor to implement the display area testing method as described in any one of claims 1 to 7.

10. An electronic device, characterized in that, include: One or more processors; A storage device for storing one or more programs, which, when executed by one or more processors, cause the one or more processors to implement the display area testing method as described in any one of claims 1 to 7.