A method, device and storage medium for display screen acquisition image mapping compression
By using the display screen acquisition image mapping compression method in display screen detection, screen image mapping map is generated and captured images are mapped one by one, the problem of low pixel extraction accuracy in the display screen image in the prior art is solved, and higher detection accuracy and speed are achieved.
Patent Information
- Application Number
- CN202411699556.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-26
- Publication Date
- 2025-04-04
- Estimated Expiration
- 2044-11-26
AI Technical Summary
In the process of defect detection and mura compensation of display screens, the image pixel extraction accuracy is low, especially due to the inconsistent arrangement of pixel points of different panels, the accuracy will be greatly reduced when performing extraction.
A method of image mapping compression for screen acquisition screen is adopted. By inputting a specific image to the display screen to be tested, affine transformation matrix is generated, pixel point positions are positioned, maximum value searches are performed, mapping coordinates are calculated, screen image mapping maps are generated, and the map is used to map the acquired images one by one to obtain a compressed image with one-to-one resolution.
It improves the accuracy of pixel extraction of display screen images, improves detection speed and accuracy, and solves the problem of accuracy reduction caused by inconsistent pixel layout in traditional methods.
Smart Images

Figure CN119211503B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of display screen detection, and in particular to a method, device and storage medium for display screen acquisition image mapping compression. Background Art
[0002] With the rapid development of industrial and Internet technologies, the industry's requirements for industrial product quality are becoming more and more refined and standardized. As far as the display panel industry is concerned, the quality of products directly affects its product competitiveness. Among them, the accuracy of product shape and size specifications is the most basic process indicator of product quality. As one of the display components of the device, the display screen is used in various high-end devices, such as mobile phones, TVs, tablets, etc. As people's requirements for screen display continue to increase, the display screen has gradually become a technologically sophisticated product.
[0003] With the update and iteration of electronic products, display screens are used more and more frequently, and consumers have higher requirements for product quality. The demand for defect detection and mura compensation of display screens is gradually increasing. In order to improve the detection accuracy, when selecting the camera lens, the mapping is generally adjusted to a larger value, which will take a long time in the subsequent processing. When demura and detection are performed on the display screen, the conventional method is to perform positioning correction on the captured image and then perform detection directly on the correction map. When detecting the captured image of the display screen, the captured image is generally corrected and then directly detected on the correction map. All detections are performed on the captured image of the display screen. When performing demura compensation, the conventional method is to compress the captured image of the display screen in proportion to the resolution of the display screen. Since the pixel arrangement of different panels has tolerances and is not completely consistent, the extraction accuracy will be greatly reduced during extraction. Summary of the invention
[0004] The present application discloses a method, a device and a storage medium for display screen acquisition image mapping compression, which are used to improve the accuracy of display screen image pixel extraction.
[0005] The first aspect of the present application discloses a method for display screen acquisition image mapping compression, comprising:
[0006] Input a first image to the display screen to be tested, and obtain a first captured image, wherein the size of the first image is the same as the resolution of the display screen to be tested, and the image grayscale of the first image is 255;
[0007] generating an affine transformation matrix according to the first acquired image;
[0008] Input a second image to the display screen to be tested, and obtain a second captured image, where the second image is an image used to light up pixels in alternate lines;
[0009] Performing affine transformation on pixel points on the second acquired image by using an affine transformation matrix to generate an initial array coordinate point set on the second acquired image;
[0010] Taking a point in the initial array coordinate point set as the center and performing a maximum value search on pixel points on the second acquired image according to a preset neighborhood range, a maximum value coordinate set is generated;
[0011] Calculate the coordinate offset set according to the maximum value coordinate set, and then calculate the mapping coordinate set of all pixel points according to the coordinate offset set;
[0012] Splice according to the mapping coordinate set to generate a complete screen image mapping map;
[0013] The first acquired image is mapped one-to-one using a screen image mapping map to obtain a final compressed image with a one-to-one resolution, and the compressed image is used for compensation and detection.
[0014] Optionally, generating an affine transformation matrix according to the first acquired image includes:
[0015] Acquire actual corner point coordinates on the first acquired image to generate a corner point coordinate set;
[0016] Obtain a corner point reference coordinate set, where each known reference corner point coordinate in the corner point reference coordinate set has a corresponding actual intersection point coordinate in the corner point coordinate set;
[0017] Calculate the affine transformation matrix based on the actual corner point coordinates and the reference corner point coordinates.
[0018] Optionally, a coordinate offset set is calculated according to the maximum value coordinate set, and then a mapping coordinate set of all pixel points is calculated according to the coordinate offset set, including:
[0019] Calculate a coordinate offset set according to a maximum value coordinate set and an initial array coordinate point set;
[0020] Calculate a first mapping coordinate set according to the coordinate offset set and the initial array coordinate point set;
[0021] Determine a second mapping coordinate set of unlit pixels according to the first mapping coordinate set and a screen pixel coefficient, where the screen pixel coefficient is the number of image pixels occupied by a single screen pixel in the image;
[0022] The first mapping coordinate set and the second mapping coordinate set are determined as a final mapping coordinate set.
[0023] Optionally, determining a second mapping coordinate set of unlit pixels according to the first mapping coordinate set and screen pixel coefficients includes:
[0024] Determine each coordinate point in the first mapping coordinate set as a center, and determine the screen pixel coefficient as a sampling distance;
[0025] Determine the coordinate point one sampling distance above each coordinate point as the first complement point set;
[0026] Determine the coordinate points at a sampling distance to the right of each coordinate point as the second complement point set;
[0027] Determine the coordinate points one sampling distance above and one sampling distance to the right of each coordinate point as the third complementary point set;
[0028] The first complement point set, the second complement point set and the third complement point set are determined as a second mapping coordinate set.
[0029] Optionally, determining a second mapping coordinate set of unlit pixels according to the first mapping coordinate set and screen pixel coefficients includes:
[0030] Determine each coordinate point in the first mapping coordinate set as a center, and determine the screen pixel coefficient as a sampling distance;
[0031] Take a complementary point in each of the four directions above, below, left and right of each coordinate point. The distance between the complementary point in the four directions and the corresponding coordinate point is a sampling distance.
[0032] Determine the completion point of each coordinate point one sampling distance to the left and one sampling distance to the top;
[0033] Determine the completion point of each coordinate point one sampling distance to the right and one sampling distance upward;
[0034] Determine the completion point of each coordinate point one sampling distance to the left and one sampling distance to the bottom;
[0035] Determine the completion point of each coordinate point one sampling distance to the right and one sampling distance below;
[0036] All the completion points corresponding to each unlit pixel are fitted, a target completion point is generated for each unlit pixel, and each target completion point is determined as a second mapping coordinate set.
[0037] Optionally, taking a point in the initial array coordinate point set as the center and performing a maximum value search on pixel points on the second acquired image according to a preset neighborhood range to generate a maximum value coordinate set includes:
[0038] Obtaining a neighborhood search distance, taking the initial array coordinate point in the initial array coordinate point set as the center and the neighborhood search distance as the limit, performing a maximum value search for the pixel point, and generating an initial maximum value coordinate point;
[0039] Determine the distance between each initial maximum value coordinate point found out and the edge of the search range;
[0040] Determine the initial array coordinate points that need to be expanded searched according to the interval distance, and expand the exploration of the initial array coordinate points that need to be expanded searched to generate the target maximum value coordinate points;
[0041] Determine the initial maximum value coordinate point corresponding to the unaffected initial array coordinate point as the target maximum value coordinate point;
[0042] Integrate all target maximum coordinate points into a maximum coordinate set.
[0043] Optionally, determining the initial array coordinate points that need to be expanded searched according to the interval distance, and performing expansion exploration on the initial array coordinate points that need to be expanded searched to generate the target maximum value coordinate point, including:
[0044] Determine the initial maximum value coordinate point whose distance is less than the preset search distance as the distortion point;
[0045] Determine the distortion type of the distortion point according to the distance between them, the direction of the maximum value coordinate point and the pixel value of the initial maximum value coordinate point;
[0046] The affected initial array coordinate points will be determined according to the distortion type of the distortion point, and the expanded search range will be determined;
[0047] The expanded search direction is determined according to the affected initial array coordinate points and the corresponding initial maximum coordinate points, and the expanded search range is used for expanded exploration to generate the target maximum coordinate point.
[0048] The second aspect of the present application discloses a device for display screen acquisition image mapping compression, comprising:
[0049] A first acquisition unit, used for inputting a first image to the display screen to be tested and acquiring a first captured image, wherein the size of the first image is the same as the resolution of the display screen to be tested, and the image grayscale of the first image is 255;
[0050] A first generating unit, configured to generate an affine transformation matrix according to the first collected image;
[0051] A second acquisition unit, used for inputting a second image to the display screen to be tested, and acquiring a second collected image, wherein the second image is an image for lighting up pixels in alternate lines;
[0052] A second generating unit is used to perform affine transformation on pixel points on the second acquired image through an affine transformation matrix to generate an initial array coordinate point set on the second acquired image;
[0053] A third generating unit is used to perform a maximum value search on pixel points on the second collected image based on a preset neighborhood range with a point in the initial array coordinate point set as the center to generate a maximum value coordinate set;
[0054] A calculation unit, used to calculate a coordinate offset set according to a maximum value coordinate set, and then calculate a mapping coordinate set of all pixel points according to the coordinate offset set;
[0055] A fourth generating unit, used for performing splicing according to the mapping coordinate set to generate a complete screen image mapping map;
[0056] The mapping unit is used to use the screen image mapping map to perform one-to-one mapping on the first collected image to obtain a final compressed image with a one-to-one resolution, and use the compressed image to perform compensation and detection.
[0057] Optionally, the first generating unit includes:
[0058] Acquire actual corner point coordinates on the first acquired image to generate a corner point coordinate set;
[0059] Obtain a corner point reference coordinate set, where each known reference corner point coordinate in the corner point reference coordinate set has a corresponding actual intersection point coordinate in the corner point coordinate set;
[0060] Calculate the affine transformation matrix based on the actual corner point coordinates and the reference corner point coordinates.
[0061] Optionally, the computing unit comprises:
[0062] A first calculation module, used for calculating a coordinate offset set according to a maximum value coordinate set and an initial array coordinate point set;
[0063] A second calculation module, used for calculating a first mapping coordinate set according to a coordinate offset set and an initial array coordinate point set;
[0064] A first determination module is used to determine a second mapping coordinate set of unlit pixels according to the first mapping coordinate set and a screen pixel coefficient, where the screen pixel coefficient is the number of image pixels occupied by a single screen pixel in the image;
[0065] The second determining module is used to determine the first mapping coordinate set and the second mapping coordinate set as a final mapping coordinate set.
[0066] Optionally, the first determining module includes:
[0067] Determine each coordinate point in the first mapping coordinate set as a center, and determine the screen pixel coefficient as a sampling distance;
[0068] Determine the coordinate point one sampling distance above each coordinate point as the first complement point set;
[0069] Determine the coordinate points at a sampling distance to the right of each coordinate point as the second complement point set;
[0070] Determine the coordinate points one sampling distance above and one sampling distance to the right of each coordinate point as the third complementary point set;
[0071] The first complement point set, the second complement point set and the third complement point set are determined as a second mapping coordinate set.
[0072] Optionally, the first determining module includes:
[0073] Determine each coordinate point in the first mapping coordinate set as a center, and determine the screen pixel coefficient as a sampling distance;
[0074] Take a complementary point in each of the four directions above, below, left and right of each coordinate point. The distance between the complementary point in the four directions and the corresponding coordinate point is a sampling distance.
[0075] Determine the completion point of each coordinate point one sampling distance to the left and one sampling distance to the top;
[0076] Determine the completion point of each coordinate point one sampling distance to the right and one sampling distance upward;
[0077] Determine the completion point of each coordinate point one sampling distance to the left and one sampling distance to the bottom;
[0078] Determine the completion point of each coordinate point one sampling distance to the right and one sampling distance below;
[0079] All the completion points corresponding to each unlit pixel are fitted, a target completion point is generated for each unlit pixel, and each target completion point is determined as a second mapping coordinate set.
[0080] Optionally, the third generating unit includes:
[0081] An acquisition module is used to acquire a neighborhood search distance, and to perform a maximum value search of a pixel point with an initial array coordinate point in the initial array coordinate point set as the center and with the neighborhood search distance as the limit, to generate an initial maximum value coordinate point;
[0082] A third determination module is used to determine the distance between each searched initial maximum value coordinate point and the edge of the search range;
[0083] A generation module is used to determine the initial array coordinate points that need to be expanded and searched according to the distance between them, and to expand and explore the initial array coordinate points that need to be expanded and searched to generate the target maximum value coordinate points;
[0084] A fourth determination module is used to determine an initial maximum value coordinate point corresponding to an unaffected initial array coordinate point as a target maximum value coordinate point;
[0085] The integration module is used to integrate all target maximum value coordinate points into a maximum value coordinate set.
[0086] Optionally, generate a module including:
[0087] Determine the initial maximum value coordinate point whose distance is less than the preset search distance as the distortion point;
[0088] Determine the distortion type of the distortion point according to the distance between them, the direction of the maximum value coordinate point and the pixel value of the initial maximum value coordinate point;
[0089] The affected initial array coordinate points will be determined according to the distortion type of the distortion point, and the expanded search range will be determined;
[0090] The expanded search direction is determined according to the affected initial array coordinate points and the corresponding initial maximum coordinate points, and the expanded search range is used for expanded exploration to generate the target maximum coordinate point.
[0091] A third aspect of the present application provides a device for display screen acquisition image mapping compression, comprising:
[0092] Processor, memory, input-output unit, and bus;
[0093] The processor is connected to the memory, the input and output unit, and the bus;
[0094] The memory stores a program, and the processor calls the program to execute the first aspect and any optional method of the first aspect.
[0095] A fourth aspect of the present application provides a computer-readable storage medium, on which a program is stored. When the program is executed on a computer, the program executes the first aspect and any optional method of the first aspect.
[0096] It can be seen from the above technical solutions that the embodiments of the present application have the following advantages:
[0097] In the present application, firstly, a first image is input to the display screen to be tested, and a first captured image is obtained. The size of the first image is the same as the resolution of the display screen to be tested, and the image grayscale of the first image is 255. An affine transformation matrix is generated according to the first captured image. A second image is input to the display screen to be tested, and a second captured image is obtained. The size of the second image is the same as the resolution of the display screen to be tested, and the second image is an image for lighting pixels in alternate lines. The pixels on the second captured image are affinely transformed by the affine transformation matrix, and an initial array coordinate point set is generated on the second captured image. The pixel points on the second captured image are searched for the maximum value based on the point in the initial array coordinate point set and the preset neighborhood range, and a maximum value coordinate set is generated. The coordinate offset set is calculated based on the maximum value coordinate set, and then the mapping coordinate set of all pixels is calculated based on the coordinate offset set. The mapping coordinate set is spliced to generate a complete screen image mapping map. The first captured image is mapped one-to-one using the screen image mapping map to obtain a final compressed image with a resolution of one to one, and the compressed image is used for compensation and detection.
[0098] The screen to be tested is displayed with the second image in which pixels are lit in alternate rows and columns and the first image in which all pixels are lit. The screen is calibrated using the first acquired image (the screen is straightened by affine transformation), and then the pixel positions are located on the second acquired image. The pixels are first precisely located by separating the pixels, and then a neighborhood search is performed to find the center of the pixel cluster (the pixel with the maximum value). The mapping points are then verified to obtain the mapping map of the pixels, and finally the image is mapped to obtain the compressed image. Compared with traditional display screen pixel extraction, this method can not only improve the detection speed, but also improve the accuracy of display screen image pixel extraction. BRIEF DESCRIPTION OF THE DRAWINGS
[0099] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0100] Figure 1 A schematic diagram of an embodiment of the method for display screen acquisition image mapping compression of the present application;
[0101] Figure 2 A schematic diagram of an embodiment of a method for generating an affine transformation matrix by using a display screen to capture an image in the present application;
[0102] Figure 3 A schematic diagram of an embodiment of a method for calculating a mapping coordinate set according to a maximum value coordinate set in the present application;
[0103] Figure 4 A schematic diagram of an embodiment of a method for determining a second mapping coordinate set of unlit pixels in the present application;
[0104] Figure 5 A schematic diagram of another embodiment of a method for determining a second mapping coordinate set of unlit pixels in the present application;
[0105] Figure 6 A schematic diagram of an embodiment of a method for generating a maximum value coordinate set for the present application;
[0106] Figure 7 A schematic diagram of an embodiment of a method for generating target maximum coordinate points for the present application;
[0107] Figure 8 A schematic diagram of an embodiment of a device for collecting image mapping and compressing a display screen of the present application;
[0108] Fig. 9 A schematic diagram of an embodiment of a device for collecting image mapping and compressing a display screen of the present application;
[0109] Fig.10 A schematic diagram of a first captured image with all pixels lit up;
[0110] Fig.11 A schematic diagram of lighting an image in alternate rows and columns;
[0111] Fig.12 is a schematic diagram of a second acquired image after affine transformation;
[0112] Fig.13 is a schematic diagram of a second acquired image after the coordinate offset is adjusted;
[0113] Fig.14 A schematic diagram of compressing an image in proportion to its resolution. DETAILED DESCRIPTION
[0114] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present application.
[0115] It should be understood that when used in the present specification and the appended claims, the term "comprising" indicates the presence of described features, wholes, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or combinations thereof.
[0116] It should also be understood that the term “and / or” used in the specification and appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes these combinations.
[0117] As used in the specification and appended claims of this application, the term "if" can be interpreted as "when" or "uponce" or "in response to determining" or "in response to detecting", depending on the context. Similarly, the phrase "if it is determined" or "if [described condition or event] is detected" can be interpreted as meaning "uponce it is determined" or "in response to determining" or "uponce [described condition or event] is detected" or "in response to detecting [described condition or event]", depending on the context.
[0118] In addition, in the description of the present application specification and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance.
[0119] References to "one embodiment" or "some embodiments" etc. described in the specification of this application mean that one or more embodiments of the present application include specific features, structures or characteristics described in conjunction with the embodiment. Therefore, the statements "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. that appear in different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways.
[0120] In the prior art, with the update and iteration of electronic products, display screens are used more and more frequently, and consumers have higher requirements for product quality. The demand for defect detection and mura compensation of display screens is gradually increasing. In order to improve the detection accuracy, when selecting the camera lens, the mapping is generally adjusted to be larger, so that the processing time will be longer in the subsequent processing. When demura and detection are performed on the display screen, the conventional method is to perform positioning correction on the captured image and then perform detection directly on the correction map. When detecting the image captured by the display screen, the captured image is generally corrected and then directly detected on the correction map. All detections are performed on the captured image of the display screen. When performing demura compensation, the conventional method is to compress the captured image of the display screen in proportion to the resolution of the display screen. Since the pixel arrangement of different panels has tolerances and is not completely consistent, the extraction accuracy will be greatly reduced during extraction.
[0121] Based on this, the present application discloses a method, device and storage medium for display screen acquisition image mapping compression, which are used to improve the accuracy of display screen image pixel extraction.
[0122] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0123] The method of the present application can be applied to a server, a device, a terminal or other devices with logic processing capabilities, and the present application does not limit this. For the convenience of description, the following description is made by taking the execution subject as an example of a terminal.
[0124] See also Figure 1 The present application provides an embodiment of a method for display screen acquisition image mapping compression, comprising:
[0125] 101. Input a first image to the display screen to be tested, and obtain a first captured image, wherein the size of the first image is the same as the resolution of the display screen to be tested, and the image grayscale of the first image is 255;
[0126] In this embodiment, it is necessary to first create a first image with all pixels lit up, display and capture the image on the display screen to be tested, and extract the position information of the display screen to be tested in the middle area of the image. Specifically, the terminal creates the first image according to the resolution of the display screen to be tested, the size of the first image is equal to the resolution of the display screen to be tested, and the grayscale of the first image is full 255. The created first image is imported into the display screen lighting device to display the display screen to be tested, and then the image is captured and the coordinates of the pixel points of the display screen are obtained to obtain the converted affine transformation matrix.
[0127] Please refer to Fig.10 , Fig.10 This is a schematic diagram of the first captured image with all pixels lit up. At this time, the pixels on the display screen have not been adjusted.
[0128] 102. Generate an affine transformation matrix according to the first collected image;
[0129] In this embodiment, when producing the first image, the resolution is equal to the display resolution, the grayscale is 255, and after importing the display screen to light up the device display and take a photo, the display screen area is extracted to obtain a specific set of coordinate points, and the required affine transformation matrix is calculated through the target coordinates corresponding to the specific set of coordinate points.
[0130] 103. Input a second image to the display screen to be tested, and obtain a second collected image, where the second image is an image for lighting up pixels in alternate lines;
[0131] The terminal inputs the second image to the display screen to be tested, captures the image of alternate rows and columns (second acquisition image) and extracts the precise position of the pixel points to obtain the screen image mapping map. Specifically, based on the initial array coordinate point set, the maximum value is taken in the neighborhood, the pixel point position is accurately located, and the converted screen image mapping map is obtained. The following is a specific analysis. Please refer to Fig.11 , Fig.11 A schematic diagram of lighting an image in alternate rows and columns. The wide gap between two adjacent pixels is formed by the unlit pixels.
[0132] 104. Perform affine transformation on pixel points on the second acquired image by using an affine transformation matrix to generate an initial array coordinate point set on the second acquired image;
[0133] Through the affine transformation matrix, the captured alternate row and column lit image (the second acquisition image) is affine transformed, and then the initial array coordinate point set (X1, Y1) is generated. The number of point sets (X1, Y1) is PixelRow*PixelCol / 4, PixelRow is the resolution in the row direction to be tested, and PixelCol is the resolution in the column direction of the display screen to be tested. The specific coordinate positions are as follows:
[0134]
[0135] See Fig.12 , Fig.12 is a schematic diagram of the second acquired image after affine transformation, wherein the blue dots show the positions of the initial array coordinate points obtained. It can be seen that the initial array coordinate points are generally distorted in one direction at this time.
[0136] 105. Taking a point in the initial array coordinate point set as the center and performing a maximum value search on pixel points on the second collected image according to a preset neighborhood range, to generate a maximum value coordinate set;
[0137] The terminal searches within a set neighborhood (preset neighborhood range) with the initial array coordinate point (initial pixel array coordinate) in the initial array coordinate point set as the center to calculate the precise pixel point position coordinates (maximum value coordinate set).
[0138] Assume (X i ,Y i ) is any coordinate point in the initial array coordinate point set (X1, Y1). i ,Y i ) as the center, find the maximum grayscale value within the preset range, and record the coordinates with the largest value (XM i ,YM i ), and then calculate the offset value of the coordinate point.
[0139] 106. Calculate a coordinate offset set according to the maximum value coordinate set, and then calculate a mapping coordinate set of all pixel points according to the coordinate offset set;
[0140] The terminal calculates the coordinate offset set based on the maximum value coordinate set, which can be calculated based on the positional relationship between the maximum value coordinate set and the initial array coordinate point set, or based on other reference points, such as corner point coordinates, etc., which is not limited here.
[0141] Then, the mapping coordinate set corresponding to the initial array coordinate point set is calculated based on the coordinate offset set. Since alternate rows are lit, the pixels of the display screen to be tested are actually divided into 4 groups (rows and columns are reduced by half), so the other 3 sets of mapping maps (mapping coordinate sets) need to be calculated. Suppose the first set of final array point coordinate set (mapping coordinate set) just calculated is (X, Y), and MR is used to calculate the mapping coordinates of the other three groups. MR represents the number of image pixels occupied by a single screen pixel in the image. You can also directly take the middle position of two adjacent and determined mapping coordinates as the mapping coordinates of the unlit pixels, which is not limited here. In this way, the mapping coordinate set of all pixels is calculated.
[0142] 107. Splicing is performed according to the mapping coordinate set to generate a complete screen image mapping map;
[0143] After the terminal calculates the mapping coordinate set of all pixel points according to the coordinate offset set, it can splice the mapping coordinate set to generate a complete screen image mapping map.
[0144] Specifically, the four groups of mapping maps in step 106 are spliced into a complete screen image mapping map.
[0145] 108. Use the screen image mapping map to perform one-to-one mapping on the first acquired image to obtain a final compressed image with a one-to-one resolution, and use the compressed image to perform compensation and detection.
[0146] Finally, the terminal uses the screen image map to map the first captured image one by one, obtaining the final one-to-one resolution compressed image, and uses the compressed image for compensation and detection. Fig.14 , Fig.14 This is a schematic diagram of compressing an image in proportion to resolution, and the figure uses a screen image map to perform one-to-one mapping on the first acquired image.
[0147] In this embodiment, firstly, a first image is input to the display screen to be tested, and a first acquisition image is obtained. The size of the first image is the same as the resolution of the display screen to be tested, and the image grayscale of the first image is 255. An affine transformation matrix is generated according to the first acquisition image. A second image is input to the display screen to be tested, and a second acquisition image is obtained. The size of the second image is the same as the resolution of the display screen to be tested, and the second image is an image for lighting pixels in alternate lines. The pixels on the second acquisition image are affine transformed by the affine transformation matrix, and an initial array coordinate point set is generated on the second acquisition image. The pixel points on the second acquisition image are searched for the maximum value based on the point in the initial array coordinate point set and the preset neighborhood range, and a maximum value coordinate set is generated. The coordinate offset set is calculated based on the maximum value coordinate set, and then the mapping coordinate set of all pixels is calculated based on the coordinate offset set. The mapping coordinate set is spliced to generate a complete screen image mapping map. The first acquisition image is mapped one-to-one using the screen image mapping map to obtain a final compressed image with a resolution of one to one, and the compressed image is used for compensation and detection.
[0148] The screen to be tested is displayed with the second image in which pixels are lit in alternate rows and columns and the first image in which all pixels are lit. The screen is calibrated using the first acquired image (the screen is straightened by affine transformation), and then the pixel positions are located on the second acquired image. The pixels are first precisely located by separating the pixels, and then a neighborhood search is performed to find the center of the pixel cluster (the pixel with the maximum value). The mapping points are then verified to obtain the mapping map of the pixels, and finally the image is mapped to obtain the compressed image. Compared with traditional display screen pixel extraction, this method can not only improve the detection speed, but also improve the accuracy of display screen image pixel extraction.
[0149] See also Figure 2 The present application provides an embodiment of a method for generating an affine transformation matrix by using a display screen to capture an image, comprising:
[0150] 201. Acquire actual corner point coordinates on a first acquired image to generate a corner point coordinate set;
[0151] 202. Obtain a corner point reference coordinate set, wherein each known reference corner point coordinate in the corner point reference coordinate set has a corresponding actual intersection point coordinate in the corner point coordinate set;
[0152] 203. Calculate the affine transformation matrix according to the actual corner point coordinates and the reference corner point coordinates.
[0153] In this embodiment, after making the first image, the resolution is equal to the display resolution, the grayscale is 255, the display is imported, the device is lit up and the photo is taken, the display area is extracted, the corner point coordinate set is obtained, and the required affine transformation matrix C is calculated by the target coordinate B (reference corner point coordinate) corresponding to the corner point coordinate set A. The matrix calculation method is as follows:
[0154]
[0155] The matrix is expanded into the following formula:
[0156]
[0157] Where QX and QY are the target coordinates (reference corner coordinates): (0,0), (0,col), (row,0), (row,col), PX and PY are the four screen corner coordinates actually extracted from the first captured image (actual intersection coordinates). Currently, corner points are commonly used as points for AA area detection of display screens, which can make the generated radiation transformation matrix C more accurate.
[0158]
[0159]
[0160] Wherein, MR represents the number of image pixels occupied by a single screen pixel in the image, PixelRow is the resolution in the row direction to be tested, and PixelCol is the resolution in the column direction of the display screen to be tested.
[0161] See also Figure 3 The present application provides an embodiment of a method for calculating a mapping coordinate set according to a maximum value coordinate set, comprising:
[0162] 301. Calculate a coordinate offset set according to a maximum value coordinate set and an initial array coordinate point set;
[0163] The terminal calculates the coordinate offset set based on the maximum value coordinate set and the initial array coordinate point set, as follows:
[0164] In this embodiment, it is assumed that (X i ,Y i ) is the coordinate point of any pixel in the initial array coordinate point set (X1, Y1). i ,Y i ) as the center, i is the meaning of the number of points, find the maximum grayscale value within the preset range, and record the coordinates with the largest value (XM i ,YM i ), and then calculate the offset value of the coordinate point, that is, the coordinate offset set.
[0165]
[0166]
[0167] 302. Calculate a first mapping coordinate set according to the coordinate offset set and the initial array coordinate point set;
[0168] The terminal calculates a first mapping coordinate set according to the coordinate offset set and the initial array coordinate point set.
[0169] Iterate this operation to traverse all the pixels (X1, Y1) in the initial array coordinate point set (X1, Y1). i ,Y i ), get the coordinate offset of all initial array coordinate points (OffRow i , OffCol i ), that is, a set of coordinate offsets, and then use all coordinate offsets (OffRow, OffCol) to calculate each final mapping coordinate (DestiRow, DestiCol). The overall formula is as follows:
[0170]
[0171]
[0172] Results Fig.13 , Fig.13 is a schematic diagram of the second acquired image after the coordinate offset is adjusted. It can be seen that after the search, the position of the initial array coordinate point has fallen to the center of the pixel point, indicating that the pixel point position has been accurately extracted.
[0173] 303. Determine a second mapping coordinate set of unlit pixels according to the first mapping coordinate set and a screen pixel coefficient, where the screen pixel coefficient is the number of image pixels occupied by a single screen pixel in the image;
[0174] The terminal determines the second mapping coordinate set of the unlit pixels based on the first mapping coordinate set and the screen pixel coefficient MR. The screen pixel coefficient MR is the number of image pixels occupied by a single screen pixel in the image. Since alternate rows are lit, the pixels of the display screen to be tested are actually divided into 4 groups (the rows and columns are reduced by half), so the other 3 sets of mapping maps (mapping coordinate sets) need to be calculated. Suppose the first set of final array point coordinate set (mapping coordinate set) just calculated is (X, Y), and the screen pixel coefficient MR is used to calculate the mapping coordinates of the other three groups. MR represents the number of image pixels occupied by a single screen pixel in the image. You can also directly take the middle position of two adjacent and determined mapping coordinates as the mapping coordinates of the unlit pixels, which is not limited here. In this way, the mapping coordinate set of all pixels is calculated.
[0175] 304. Determine the first mapping coordinate set and the second mapping coordinate set as a final mapping coordinate set.
[0176] Finally, the terminal only needs to determine the first mapping coordinate set and the second mapping coordinate set as the final mapping coordinate set.
[0177] In this embodiment, through the above-mentioned calculation method of the offset, the mapping point can be more accurately calculated through the maximum value coordinate point, thereby improving the accuracy of subsequent mapping.
[0178] See also Figure 4 The present application provides an embodiment of a method for determining a second mapping coordinate set of unlit pixels, comprising:
[0179] 401. Determine each coordinate point in the first mapping coordinate set as a center, and determine a screen pixel coefficient as a sampling distance;
[0180] 402. Determine the coordinate point one sampling distance above each coordinate point as the first complement point set;
[0181] 403. Determine the coordinate points at a sampling distance to the right of each coordinate point as the second complement point set;
[0182] 404. Determine the coordinate points one sampling distance above and one sampling distance to the right of each coordinate point as a third complementary point set;
[0183] 405. Determine the first complementary point set, the second complementary point set, and the third complementary point set as a second mapping coordinate set.
[0184] In this embodiment, since the alternate line lighting actually divides the screen into 4 groups (rows and columns are reduced by half), it is necessary to find the other 3 sets of mapping maps. Assume that the first set of final array point coordinates just found (first mapping coordinate set) is (X, Y), then the second, third, and fourth sets of coordinates are the first complementary point set (X+MR, Y), the second complementary point set (X, Y+MR), and the third complementary point set (X+MR, Y+MR). The terminal determines the first complementary point set, the second complementary point set, and the third complementary point set as the second mapping coordinate set. This method can quickly calculate the mapping points and shorten the time.
[0185] The four sets of mapping maps (the first mapping coordinate set and the second mapping coordinate set) are spliced into a complete screen image mapping map, and the obtained screen image mapping map is mapped on the first acquired image to obtain a compressed image.
[0186] (1) The pixels of the first and second groups are interspersed at column intervals. The image width becomes the sum of the two groups, and the height remains unchanged, resulting in a composite image 1.
[0187] (2) The pixels of the third and fourth groups are interspersed according to the column intervals. The image width becomes the sum of the two groups, and the height remains unchanged, resulting in the composite image 2.
[0188] (3) The pixels of synthetic image 1 and synthetic image 2 are interspersed according to the row interval. The image height becomes the sum of two groups, and the width remains unchanged to obtain the final mapping image.
[0189] See also Figure 5 The present application provides another embodiment of a method for determining a second mapping coordinate set of unlit pixels, comprising:
[0190] 501. Determine each coordinate point in the first mapping coordinate set as a center, and determine a screen pixel coefficient as a sampling distance;
[0191] 502. Take a completion point in each of the four directions above, below, left, and right of each coordinate point. The distances between the completion points in the four directions and the corresponding coordinate point are all a sampling distance.
[0192] 503. Determine a completion point for each coordinate point that is one sampling distance to the left and one sampling distance upward;
[0193] 504. Determine a completion point for each coordinate point that is one sampling distance to the right and one sampling distance upward;
[0194] 505. Determine a completion point for each coordinate point that is one sampling distance to the left and one sampling distance to the bottom;
[0195] 506. Determine a completion point for each coordinate point that is one sampling distance to the right and one sampling distance downward;
[0196] 507. Perform point fitting on all the completion points corresponding to each unlit pixel, generate a target completion point for each unlit pixel, and determine each target completion point as a second mapping coordinate set.
[0197] In this embodiment, the terminal determines each coordinate point in the first mapping coordinate set as the center, and determines the screen pixel coefficient as the sampling distance. This step is similar to the aforementioned 401. The terminal determines a supplementary point of a sampling distance in the four directions of up, down, left, and right for each coordinate point, and then determines a supplementary point of a sampling distance in the left direction and a sampling distance in the upper direction for each coordinate point, determines a supplementary point of a sampling distance in the right direction and a sampling distance in the upper direction for each coordinate point, determines a supplementary point of a sampling distance in the left direction and a sampling distance in the lower direction for each coordinate point, and determines a supplementary point of a sampling distance in the right direction and a sampling distance in the lower direction for each coordinate point. Finally, one coordinate point can generate points in 8 directions. At this time, it is necessary to perform each unlit point, and there are at least two supplementary points, and some have 4 points. In order to ensure the accuracy of the point, it is necessary to integrate multiple supplementary points of each unlit point into a unique point.
[0198] In this embodiment, the terminal performs point fitting on all the completion points corresponding to each unlit pixel, generates a target completion point for each unlit pixel, and determines each target completion point as a second mapping coordinate set, specifically in the following manner:
[0199] First, each coordinate point in the first mapping coordinate set has a redundant maximum value coordinate. Each maximum value coordinate is used as the center to divide the area. In contrast to dividing the pixel area on the second acquisition image, the attention value of each pixel area is calculated. The attention value of each pixel area on the second acquisition image can also be calculated to generate an attention matrix. At this time, since there is distortion regardless of pixel points, the attention value of the distorted pixel point is different from the normal pixel point attention value. The attention value is usually between 0.5 and 1. The minimum attention value can be set to prevent the missing point from having an attention value of 0.
[0200] Secondly, the maximum values of pixels at different locations are also different, and weight coefficients are generated for different maximum values. The weight coefficients are calculated as follows: first, the average value of all maximum values is calculated, and the weight values of the coordinate points corresponding to the maximum values below the average value are set to the lowest 1. The maximum value greater than the average value is divided by the average value to generate redundant weight coefficients. The weight coefficient is usually between 1 and 1.5. The highest weight coefficient can be set to prevent the existence of incorrectly detected maximum values.
[0201] At this time, each coordinate point in the first mapping coordinate set corresponds to an attention value and a weight coefficient, and the 8 completion points of this coordinate point also correspond to this attention value.
[0202] There are two unlit pixels with complementary points. The target complementary points are generated and calculated as follows:
[0203]
[0204]
[0205] in, The horizontal and vertical coordinates of the target completion point, and are the attention values corresponding to the two completion points, and are the weight coefficients corresponding to the two completion points, is the coordinate of the first completion point, is the coordinate of the second completion point. The calculation method of the 4 completion points is similar:
[0206]
[0207]
[0208] in, The horizontal and vertical coordinates of the target completion point, , , , are the attention values corresponding to the two completion points, , , , are the weight coefficients corresponding to the two completion points, is the coordinate of the first completion point, is the coordinate of the second completion point, are the coordinates of the third completion point, are the coordinates of the fourth completion point.
[0209] This method can determine the importance of different completion points by obtaining the point attention value and the weight coefficient of the maximum value. In the process of fitting the completion points, the coordinates of important points are retained as much as possible, thereby improving accuracy. Secondly, by setting the minimum attention value and the maximum weight coefficient value, point detection anomalies can be prevented, ensuring that the target completion point will not produce excessive errors.
[0210] See also Figure 6 The present application provides another embodiment of a method for generating a maximum value coordinate set, comprising:
[0211] 601. Obtain a neighborhood search distance, take an initial array coordinate point in the initial array coordinate point set as the center, and perform a maximum value search of pixel points within the neighborhood search distance to generate an initial maximum value coordinate point;
[0212] The terminal searches within a set neighborhood (preset neighborhood range) with the initial array coordinate point (initial pixel array coordinate) in the initial array coordinate point set as the center to calculate the precise pixel point position coordinates (maximum value coordinate set).
[0213] Specifically, a rectangular search method can be used. Assume that the search size of the neighborhood is (SerchRow, SerchCol), then the search range (preset neighborhood range) of the initial point set (initial pixel array coordinates) is:
[0214]
[0215]
[0216] Among them, SerchRow is the search range in the row direction, and SerchCol is the search range in the column direction. (X i ,Y i ) is any coordinate point in the initial array coordinate point set (X1, Y1).
[0217] In (X i ,Y i ) as the center, find the maximum grayscale value in the rectangular range of 2*SerchRow+1, 2*SerchCol+1, and record the coordinate with the largest value (XM i ,YM i ), and then calculate the offset value of the coordinate point.
[0218] 602. Determine the distance between each searched initial maximum value coordinate point and the edge of the search range;
[0219] In this embodiment, the terminal determines the distance between each searched initial maximum value coordinate point and the edge of the search range, that is, the distance parameter between the initial maximum value coordinate and the search edge.
[0220] 603. Determine the initial array coordinate points that need to be expanded and searched according to the distance between them, and perform expansion exploration on the initial array coordinate points that need to be expanded and searched to generate the target maximum value coordinate points;
[0221] The terminal determines the initial array coordinate points that need to be expanded searched according to the interval distance, and expands the exploration of the initial array coordinate points that need to be expanded searched to generate the target maximum value coordinate points, that is, determines the range where the maximum value point may not be collected by the interval distance, and re-searches.
[0222] 604. Determine the initial maximum value coordinate point corresponding to the unaffected initial array coordinate point as the target maximum value coordinate point;
[0223] 605. Integrate all target maximum value coordinate points into a maximum value coordinate set.
[0224] The terminal determines the initial maximum value coordinate point corresponding to the unaffected initial array coordinate point as the target maximum value coordinate point, and integrates all target maximum value coordinate points into a maximum value coordinate set. In this embodiment, the terminal can actively detect the credibility of the maximum value. If the maximum value point is too close to the detection edge, it means that there may be other maximum value points that need to be detected.
[0225] See also Figure 7 The present application provides another embodiment of a method for generating a target maximum coordinate point, comprising:
[0226] 701. Determine an initial maximum value coordinate point whose distance is less than a preset search distance as a distortion point;
[0227] In this embodiment, the terminal can actively detect the credibility of the maximum value. If the maximum value point is too close to the detection edge, it means that there may be other maximum value points that need to be detected. Since such a situation may be caused by distortion, it is necessary to expand the search for points within the influence range of the distortion.
[0228] 702. Determine the distortion type of the distortion point according to the distance between them, the direction of the maximum value coordinate point, and the pixel value of the initial maximum value coordinate point;
[0229] The terminal needs to determine the type of distortion, such as edge collapse and overlap, based on the distance between the pixels, the direction of the maximum value coordinate point, and the pixel value of the initial maximum value coordinate point (the grayscale value of the current maximum value point).
[0230] 703. Determine the affected initial array coordinate point according to the distortion type of the distortion point, and determine the expanded search range;
[0231] After the terminal determines the distortion type of the distortion point, the affected initial array coordinate point can be determined according to the distortion type of the distortion point, and the expanded search range can be determined. The direction of the distortion can be determined according to the type of distortion, because the display screen distortion is regular. The affected pixel points can be determined according to the direction and influence range of the distortion, thereby determining the expanded search range.
[0232] 704. Determine an expanded search direction according to the affected initial array coordinate points and the corresponding initial maximum value coordinate points, perform expanded exploration with an expanded search range, and generate a target maximum value coordinate point.
[0233] After the terminal determines the extended search direction according to the affected initial array coordinate points and the corresponding initial maximum value coordinate points, it performs extended exploration with the extended search range to generate the target maximum value coordinate point.
[0234] This embodiment solves the problem of inaccurate detection of maximum value coordinate points, and further expands the search according to the distortion type to improve the accuracy.
[0235] See also Figure 8 The present application provides an embodiment of a device for display screen acquisition image mapping compression, comprising:
[0236] A first acquisition unit 801 is used to input a first image to the display screen to be tested and acquire a first captured image, wherein the size of the first image is the same as the resolution of the display screen to be tested and the image grayscale of the first image is 255;
[0237] A first generating unit 802, configured to generate an affine transformation matrix according to the first collected image;
[0238] Optionally, the first generating unit 802 includes:
[0239] Acquire actual corner point coordinates on the first acquired image to generate a corner point coordinate set;
[0240] Obtain a corner point reference coordinate set, where each known reference corner point coordinate in the corner point reference coordinate set has a corresponding actual intersection point coordinate in the corner point coordinate set;
[0241] Calculate the affine transformation matrix based on the actual corner point coordinates and the reference corner point coordinates.
[0242] A second acquisition unit 803 is used to input a second image to the display screen to be tested and acquire a second collected image, where the second image is an image for lighting up pixels in alternate lines;
[0243] The second generating unit 804 is used to perform affine transformation on the pixel points on the second acquired image through an affine transformation matrix to generate an initial array coordinate point set on the second acquired image;
[0244] The third generating unit 805 is used to perform a maximum value search on the pixel points on the second collected image based on a preset neighborhood range with the point in the initial array coordinate point set as the center, and generate a maximum value coordinate set;
[0245] Optionally, the third generating unit 805 includes:
[0246] The acquisition module 8051 is used to acquire the neighborhood search distance, take the initial array coordinate point in the initial array coordinate point set as the center, and perform the maximum value search of the pixel point within the neighborhood search distance to generate the initial maximum value coordinate point;
[0247] The third determination module 8052 is used to determine the distance between each searched initial maximum value coordinate point and the edge of the search range;
[0248] A generating module 8053 is used to determine the initial array coordinate points that need to be expanded and searched according to the distance between each other, and to perform expansion exploration on the initial array coordinate points that need to be expanded and searched to generate the target maximum value coordinate points;
[0249] Optionally, the generating module 8053 includes:
[0250] Determine the initial maximum value coordinate point whose distance is less than the preset search distance as the distortion point;
[0251] Determine the distortion type of the distortion point according to the distance between them, the direction of the maximum value coordinate point and the pixel value of the initial maximum value coordinate point;
[0252] The affected initial array coordinate points will be determined according to the distortion type of the distortion point, and the expanded search range will be determined;
[0253] The expanded search direction is determined according to the affected initial array coordinate points and the corresponding initial maximum coordinate points, and the expanded search range is used for expanded exploration to generate the target maximum coordinate point.
[0254] A fourth determination module 8054 is used to determine the initial maximum value coordinate point corresponding to the unaffected initial array coordinate point as the target maximum value coordinate point;
[0255] The integration module 8055 is used to integrate all target maximum value coordinate points into a maximum value coordinate set.
[0256] A calculation unit 806, configured to calculate a coordinate offset set according to the maximum value coordinate set, and then calculate a mapping coordinate set of all pixel points according to the coordinate offset set;
[0257] Optionally, the calculation unit 806 includes:
[0258] A first calculation module 8061 is used to calculate a coordinate offset set according to a maximum value coordinate set and an initial array coordinate point set;
[0259] Optionally, the first determining module 8061 includes:
[0260] Determine each coordinate point in the first mapping coordinate set as a center, and determine the screen pixel coefficient as a sampling distance;
[0261] Determine the coordinate point one sampling distance above each coordinate point as the first complement point set;
[0262] Determine the coordinate points at a sampling distance to the right of each coordinate point as the second complement point set;
[0263] Determine the coordinate points one sampling distance above and one sampling distance to the right of each coordinate point as the third complementary point set;
[0264] The first complement point set, the second complement point set and the third complement point set are determined as a second mapping coordinate set.
[0265] Optionally, the first determining module 8061 includes:
[0266] Determine each coordinate point in the first mapping coordinate set as a center, and determine the screen pixel coefficient as a sampling distance;
[0267] Determine the completion point of a sampling distance in the four directions of up, down, left and right for each coordinate point;
[0268] Determine the completion point of each coordinate point one sampling distance to the left and one sampling distance to the top;
[0269] Determine the completion point of each coordinate point one sampling distance to the right and one sampling distance upward;
[0270] Determine the completion point of each coordinate point one sampling distance to the left and one sampling distance to the bottom;
[0271] Determine the completion point of each coordinate point one sampling distance to the right and one sampling distance below;
[0272] All the completion points corresponding to each unlit pixel are fitted, a target completion point is generated for each unlit pixel, and each target completion point is determined as a second mapping coordinate set.
[0273] A second calculation module 8062, configured to calculate a first mapping coordinate set according to a coordinate offset set and an initial array coordinate point set;
[0274] A first determining module 8063 is used to determine a second mapping coordinate set of unlit pixels according to the first mapping coordinate set and a screen pixel coefficient, where the screen pixel coefficient is the number of image pixels occupied by a single screen pixel in the image;
[0275] The second determining module 8064 is used to determine the first mapping coordinate set and the second mapping coordinate set as a final mapping coordinate set.
[0276] The fourth generating unit 807 is used to perform splicing according to the mapping coordinate set to generate a complete screen image mapping map;
[0277] The mapping unit 808 is used to use the screen image mapping map to perform one-to-one mapping on the first collected image to obtain a final compressed image with a one-to-one resolution, and use the compressed image to perform compensation and detection.
[0278] See also Fig. 9 The present application provides a device for display screen acquisition image mapping compression, comprising:
[0279] Processor 901 , memory 902 , input-output unit 903 , and bus 904 .
[0280] The processor 901 is connected to the memory 902 , the input and output unit 903 , and the bus 904 .
[0281] The memory 902 stores a program, and the processor 901 calls the program to execute the following steps: Figure 1 , Figure 2 and Figure 3 , Figure 4 , Figure 5 , Figure 6 and Figure 7 The method in .
[0282] The present application provides a computer-readable storage medium, on which a program is stored, and when the program is executed on a computer, the program performs the following steps: Figure 1 , Figure 2 and Figure 3 , Figure 4 , Figure 5 , Figure 6 and Figure 7 The method in .
[0283] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0284] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.
[0285] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0286] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0287] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, read-only memory), random access memory (RAM, random access memory), disk or optical disk and other media that can store program code.
Claims
1. A method for display screen acquisition image mapping compression, characterized in that: include: Input a first image to the display screen to be tested, and obtain a first captured image, wherein the size of the first image is the same as the resolution of the display screen to be tested, and the image grayscale of the first image is 255; generating an affine transformation matrix according to the first acquired image; Input a second image to the display screen to be tested, and obtain a second captured image, wherein the second image is an image for lighting pixels in alternate lines; Performing affine transformation on pixel points on the second acquired image by using the affine transformation matrix to generate an initial array coordinate point set on the second acquired image; Taking a point in the initial array coordinate point set as the center and performing a maximum value search on pixel points on the second acquired image according to a preset neighborhood range, to generate a maximum value coordinate set; Calculate a coordinate offset set according to the maximum value coordinate set, and then calculate a mapping coordinate set of all pixel points according to the coordinate offset set; Perform stitching according to the mapping coordinate set to generate a complete screen image mapping map; The first captured image is mapped one-to-one using the screen image mapping map to obtain a final compressed image with a one-to-one resolution, and the compressed image is used for compensation and detection.
2. The method according to claim 1, characterized in that Generating an affine transformation matrix according to the first acquired image includes: Acquire actual corner point coordinates on the first acquired image to generate a corner point coordinate set; Acquire a corner point reference coordinate set, wherein each known reference corner point coordinate in the corner point reference coordinate set has a corresponding actual intersection point coordinate in the corner point coordinate set; An affine transformation matrix is calculated according to the actual corner point coordinates and the reference corner point coordinates.
3. The method according to claim 1, characterized in that Calculating a coordinate offset set according to the maximum value coordinate set, and then calculating a mapping coordinate set of all pixel points according to the coordinate offset set, including: Calculate a coordinate offset set according to the maximum value coordinate set and the initial array coordinate point set; Calculate a first mapping coordinate set according to the coordinate offset set and the initial array coordinate point set; Determine a second mapping coordinate set of unlit pixels according to the first mapping coordinate set and a screen pixel coefficient, where the screen pixel coefficient is the number of image pixels occupied by a single screen pixel in the image; The first mapping coordinate set and the second mapping coordinate set are determined as a final mapping coordinate set.
4. The method according to claim 3, characterized in that Determining a second mapping coordinate set of unlit pixels according to the first mapping coordinate set and screen pixel coefficients includes: Determine each coordinate point in the first mapping coordinate set as a center and determine a screen pixel coefficient as a sampling distance; Determine the coordinate point one sampling distance above each coordinate point as the first complement point set; Determine the coordinate points at a sampling distance to the right of each coordinate point as the second complement point set; Determine the coordinate points one sampling distance above and one sampling distance to the right of each coordinate point as the third complementary point set; The first complement point set, the second complement point set and the third complement point set are determined as a second mapping coordinate set.
5. The method according to claim 3, characterized in that: Determining a second mapping coordinate set of unlit pixels according to the first mapping coordinate set and screen pixel coefficients includes: Determine each coordinate point in the first mapping coordinate set as a center and determine a screen pixel coefficient as a sampling distance; Take a complementary point in each of the four directions above, below, left and right of each coordinate point. The distance between the complementary point in the four directions and the corresponding coordinate point is a sampling distance. Determine the completion point of each coordinate point one sampling distance to the left and one sampling distance to the top; Determine the completion point of each coordinate point one sampling distance to the right and one sampling distance upward; Determine the completion point of each coordinate point one sampling distance to the left and one sampling distance to the bottom; Determine the completion point of each coordinate point one sampling distance to the right and one sampling distance below; All the completion points corresponding to each unlit pixel are point-fitted, a target completion point is generated for each unlit pixel, and each of the target completion points is determined as a second mapping coordinate set.
6. The method according to any one of claims 1 to 5, characterized in that Taking a point in the initial array coordinate point set as the center and performing a maximum value search on pixel points on the second acquired image according to a preset neighborhood range to generate a maximum value coordinate set, including: Obtaining a neighborhood search distance, taking the initial array coordinate point in the initial array coordinate point set as the center and the neighborhood search distance as the limit, performing a maximum value search for pixel points to generate an initial maximum value coordinate point; Determine the distance between each initial maximum value coordinate point found out and the edge of the search range; Determine the initial array coordinate points that need to be expanded and searched according to the distances, and perform expansion exploration on the initial array coordinate points that need to be expanded and searched to generate target maximum value coordinate points; Determine the initial maximum value coordinate point corresponding to the unaffected initial array coordinate point as the target maximum value coordinate point; Integrate all target maximum coordinate points into a maximum coordinate set.
7. The method according to claim 6, characterized in that Determining the initial array coordinate points that need to be expanded and searched according to the distances between them, and performing expansion exploration on the initial array coordinate points that need to be expanded and searched to generate target maximum value coordinate points, including: Determine the initial maximum value coordinate point whose distance is less than the preset search distance as the distortion point; Determine the distortion type of the distortion point according to the distance between them, the direction of the maximum value coordinate point and the pixel value of the initial maximum value coordinate point; Determining the affected initial array coordinate point according to the distortion type of the distortion point, and determining an expanded search range; An extended search direction is determined according to the affected initial array coordinate points and the corresponding initial maximum value coordinate points, and an extended exploration is performed with the extended search range to generate a target maximum value coordinate point.
8. A device for display screen image acquisition mapping compression, characterized in that: include: A first acquisition unit is used to input a first image to the display screen to be tested and acquire a first captured image, wherein the size of the first image is the same as the resolution of the display screen to be tested, and the image grayscale of the first image is 255; A first generating unit, configured to generate an affine transformation matrix according to the first collected image; A second acquisition unit, used for inputting a second image to the display screen to be tested, and acquiring a second acquired image, wherein the second image is an image for lighting pixels in alternate lines; A second generating unit, configured to perform affine transformation on pixel points on the second acquired image by using the affine transformation matrix, and generate an initial array coordinate point set on the second acquired image; A third generating unit is used to perform a maximum value search on pixel points on the second acquired image based on a preset neighborhood range with a point in the initial array coordinate point set as the center to generate a maximum value coordinate set; A calculation unit, used to calculate a coordinate offset set according to the maximum value coordinate set, and then calculate a mapping coordinate set of all pixel points according to the coordinate offset set; A fourth generating unit, configured to perform splicing according to the mapping coordinate set to generate a complete screen image mapping map; A mapping unit is used to use the screen image mapping map to perform one-to-one mapping on the first collected image to obtain a final compressed image with a one-to-one resolution, and use the compressed image to perform compensation and detection.
9. A device for display screen acquisition image mapping compression, characterized in that: include: Processor, memory, input-output unit, and bus; The processor is connected to the memory, the input and output unit, and the bus; The memory stores a program, and the processor calls the program to execute the method according to any one of claims 1 to 7.
10. A computer-readable storage medium having a program stored thereon, wherein the program, when executed on a computer, performs the method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Compression display method of high dynamic range infrared image
CN113096031A
Display screen sub-pixel bright group positioning method and device and storage medium
CN118967798A