Image correction method, LED display screen image correction method and device

By labeling connected components and locating the center position of the image, and forming an edge box to determine the corner points, the problems of low efficiency and low accuracy of image correction in the existing technology are solved, and more efficient and accurate image correction is achieved.

CN115440159BActive Publication Date: 2026-03-17HANGZHOU HIKVISION DIGITAL TECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-08-22
Publication Date
2026-03-17

AI Technical Summary

Technical Problem

Existing technologies suffer from low efficiency and accuracy in image correction, especially in cases of image distortion where it is difficult to accurately determine corner points.

Method used

By labeling connected components in the image to be corrected, the center positions of multiple connected components are determined, and a point matrix is ​​formed based on these center positions. Edge points are located, and the corner points of the image are determined using edge boxes for correction processing.

Benefits of technology

It improves the efficiency and accuracy of image correction, is applicable to different images, eliminates the need for dilation value settings and saves processor computing resources, and ensures accurate corner positioning even in the case of image distortion.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115440159B_ABST
    Figure CN115440159B_ABST
Patent Text Reader

Abstract

The application discloses an image correction method, a correction method and device of an LED display screen image, and aims to solve the problems of low image correction efficiency and low accuracy in the prior art. The method comprises the following steps: performing connected domain marking on a to-be-corrected image to determine a plurality of connected domains of the to-be-corrected image; each connected domain is used for indicating a region where a light-emitting unit is located in the to-be-corrected image; the center position of each connected domain is determined; the center position is used for indicating the position where the light-emitting unit is located in the connected domain; edge point positioning is performed on a dot matrix formed by the center positions of the connected domains to determine the edge points of the dot matrix; the edge frame generated by connecting the edge points is used to determine the corresponding corner points of the to-be-corrected image; and the to-be-corrected image is corrected according to the corner points. The technical scheme improves the image correction efficiency and accuracy. In addition, the technical scheme can be used for image correction of the images of display screens with a plurality of light-emitting units, such as LED, LCD and OLED.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of image processing technology, and in particular to an image correction method, an image correction method and apparatus for LED displays. Background Technology

[0002] In image processing, if the acquired image is distorted, it will interfere with subsequent image processing. Therefore, image correction is necessary to eliminate the distortion. Image correction can be performed by locating the positions of the four corner points of the image and then stretching the image based on these points to restore its true shape.

[0003] Existing techniques typically employ morphological image processing, using closing and dilation operations to create a closed region in the image, then determining the circumscribed rectangle of this region, and using the four corners of the circumscribed rectangle as the image's corner points. However, this method requires data padding, resulting in significant processor resource consumption during dilation and closing operations, making it difficult to ensure image correction efficiency. Furthermore, the dilation value needs to be set specifically for different images, limiting the applicability of this method. Moreover, when the acquired image contains distortion, determining corner points using the circumscribed rectangle can lead to discrepancies between the determined corner points and the actual image corner points, thus affecting the accuracy of image correction. Summary of the Invention

[0004] The purpose of this application is to provide an image correction method, an LED display screen image correction method and apparatus, to solve the problems of low image correction efficiency and low accuracy in the prior art.

[0005] To solve the above-mentioned technical problems, the embodiments of this application are implemented as follows:

[0006] On one hand, embodiments of this application provide an image correction method, including:

[0007] Connected component labeling is performed on the image to be corrected to determine multiple connected components of the image to be corrected; each connected component is used to indicate the region where the light-emitting unit is located in the image to be corrected.

[0008] For each of the connected components, the center position of the connected component is determined; the center position is used to indicate the location of the light-emitting unit in the connected component;

[0009] For the lattice formed by the center positions of each of the connected domains, edge point localization is performed to determine the edge points of the lattice;

[0010] The corner points of the image to be corrected are determined based on the bounding box generated by connecting the edge points.

[0011] The image to be corrected is corrected based on the corner points.

[0012] On the other hand, embodiments of this application provide a method for correcting images on an LED display screen, including:

[0013] Acquire an image of the LED display screen to be calibrated;

[0014] The image of the LED display screen to be corrected is corrected using the image correction method described above.

[0015] On the other hand, embodiments of this application provide an image correction apparatus, including:

[0016] The labeling processing module is used to label connected components of the image to be corrected, and to determine multiple connected components of the image to be corrected; each connected component is used to indicate the region where the light-emitting unit is located in the image to be corrected.

[0017] The first determining module is used to determine the center position of each connected component; the center position is used to indicate the location of the light-emitting unit in the connected component.

[0018] An edge point localization module is used to locate edge points for a point matrix formed by the center positions of each of the connected domains, and to determine the edge points of the point matrix.

[0019] The second determining module is used to determine the corner points corresponding to the image to be corrected based on the bounding box generated by connecting the edge points;

[0020] The first correction processing module is used to perform correction processing on the image to be corrected based on the corner points.

[0021] On the other hand, embodiments of this application provide an image correction device for an LED display screen, characterized in that it includes:

[0022] The acquisition module is used to acquire images of the LED display screen to be calibrated.

[0023] The second correction processing module is used to perform correction processing on the LED display image to be corrected using the image correction device described above.

[0024] In another aspect, embodiments of this application provide an image correction device, including a processor; and a memory arranged to store computer-executable instructions configured to be executed by the processor, the executable instructions including instructions for performing the above-described image correction method, or for performing the above-described LED display image correction method.

[0025] In another aspect, embodiments of this application provide a storage medium for storing computer-executable instructions, which cause a computer to perform the above-described image correction method, or to perform the above-described LED display screen image correction method.

[0026] The technical solution of this application involves marking connected components in the image to be corrected to determine multiple connected components. For each connected component, the center position is determined. Edge points are located within the point matrix formed by the center positions of each connected component, and the edge points of the point matrix are determined. Based on the bounding box generated by connecting the edge points, the corner points of the image to be corrected are determined, and then the image to be corrected is corrected based on these corner points. Each connected component indicates the region where the light-emitting unit is located in the image to be corrected, and the center position indicates the location of the light-emitting unit within the connected component. Compared to related technologies that determine corner points by forming closed regions through dilation and closing operations, this technical solution determines corner points by identifying edge points from the center positions of each connected component, thus determining corner points on the bounding box formed by these edge points. This eliminates the need to set different dilation values ​​for different images to be corrected, making the technical solution more applicable to different images. Furthermore, it eliminates the need for data padding in the image to be corrected, significantly saving processor computing resources and improving the efficiency of corner point location in the image to be corrected, thereby enhancing image correction efficiency. Furthermore, compared to the method of determining corner points by connecting bounding rectangles in related technologies, this technical solution determines the corner points of the image to be corrected based on the bounding boxes generated by connecting edge points. Since each edge point is a real point on the image to be corrected, rather than a point on the bounding box, it can still ensure accurate corner point positioning even if the image to be corrected is distorted, making the positioning results more accurate and thus improving the accuracy of image correction. Attached Figure Description

[0027] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0028] Figure 1 This is a schematic flowchart of an image correction method according to an embodiment of this application;

[0029] Figure 2 This is a schematic diagram of a connected region according to an embodiment of this application;

[0030] Figure 3This is a schematic diagram of a dot matrix according to an embodiment of this application;

[0031] Figure 4 This is a schematic diagram of a dot matrix according to another embodiment of this application;

[0032] Figure 5 This is a schematic diagram of an edge frame according to an embodiment of this application;

[0033] Figure 6 This is a schematic diagram of an edge frame according to another embodiment of this application;

[0034] Figure 7 This is a schematic flowchart of an image correction method according to another embodiment of this application;

[0035] Figure 8 This is a schematic diagram of an image to be corrected according to an embodiment of this application;

[0036] Figure 9 This is a schematic flowchart of an LED display image correction method according to an embodiment of this application;

[0037] Figure 10 This is a schematic diagram of the structure of an image correction device according to an embodiment of this application;

[0038] Figure 11 This is a schematic diagram of the structure of an LED display screen image correction device according to an embodiment of this application;

[0039] Figure 12 This is a schematic diagram of the hardware structure of an image correction device according to an embodiment of this application. Detailed Implementation

[0040] This application provides an image correction method, an LED display screen image correction method and apparatus to solve the problems of low image correction efficiency and low accuracy in the prior art.

[0041] To enable those skilled in the art to better understand the technical solutions in this application, the technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of this application.

[0042] Figure 1 This is a schematic flowchart of an image correction method according to an embodiment of this application, such as... Figure 1 As shown, the method includes:

[0043] S102, Connected component labeling is performed on the image to be corrected to determine multiple connected components of the image to be corrected.

[0044] Each connected component indicates the region where the light-emitting units are located in the image to be corrected. Optionally, the image to be corrected can be an image of a display screen with multiple light-emitting units. For example, an image of a display screen with multiple light-emitting units can be an LED (Light Emitting Diode) display screen image, an LCD (Liquid Crystal Display) display screen image, an OLED (Organic Light-Emitting Diode) display screen image, etc.

[0045] If the image to be corrected is an LED display image, then the light-emitting unit is an LED bead, and each connected region is used to indicate the area where an LED bead is located in the LED display image.

[0046] Optionally, the image to be corrected can be a color image or a grayscale image. If the image to be corrected is a color image, it can first be converted into a corresponding grayscale image, then the grayscale image can be converted into a corresponding binary image, and finally the connected components of the binary image can be labeled to determine multiple connected components of the image to be corrected. The determined multiple connected components are then relabeled in the grayscale image for subsequent processing.

[0047] When the image to be corrected is a grayscale image, it can first be converted into a corresponding binary image. Then, the connected components of the binary image are labeled to determine multiple connected components of the image to be corrected. Finally, the determined multiple connected components are relabeled into the grayscale image for subsequent processing.

[0048] Optionally, the labeling can be completed by traversing the image to be corrected using a connected component labeling algorithm. During the connected component labeling process, four adjacent pixels can be labeled as a connected component, thus obtaining multiple connected components in the image to be corrected. Alternatively, eight adjacent pixels can be labeled as a connected component, thus obtaining multiple connected components in the image to be corrected.

[0049] In an image, the smallest unit is a pixel, and each pixel has eight neighboring pixels. For example... Figure 2 As shown, multiple local images are displayed. Each local image is a portion of the binary image obtained by converting the image to be corrected. Each square represents a pixel, with 1 representing white and 0 representing black. It should be understood that when a light-emitting unit emits light, its corresponding pixel value in the binary image is 1.

[0050] There are two common adjacency relationships: 4-adjacency and 8-adjacency. 4-adjacency includes four pixels: top, bottom, left, and right, such as... Figure 2 As shown in (a), 210 is a connected component. The 8 adjacent pixels include the top, bottom, left, right, top-left, bottom-left, top-right, and bottom-right pixels, as shown in (a). Figure 2 As shown in (b), 220 is a connected component.

[0051] For example, when four adjacent pixels are marked as a connected component, in the case of... Figure 2 In the local graph shown in (c), 230 and 240 are connected components.

[0052] S104. For each connected component, determine the center location of the connected component.

[0053] The center position is used to indicate the location of the light-emitting unit within the connected domain. For example, when the image to be corrected is an LED display image, the light-emitting unit is an LED chip, the connected domain is used to indicate the area where the LED chip is located, and the center position is used to indicate the location of the LED chip within the connected domain.

[0054] Generally, multiple light-emitting units on a display screen have basically the same size and luminous intensity. When a light-emitting unit emits light, it can stably illuminate the surrounding area, forming a light-emitting region, and the center of the light-emitting region is the light-emitting unit. Based on this, this embodiment equates the center position of the connected domain with the position of the light-emitting unit in the connected domain. Optionally, the center position of the connected domain can be the center point of the connected domain.

[0055] S106, For the lattice formed by the center positions of each connected domain, perform edge point localization to determine the edge points of the lattice.

[0056] S108, determine the corner points of the image to be corrected based on the bounding box generated by connecting the edge points.

[0057] In this embodiment, the closed area formed by the edge box includes all the center positions on the image to be corrected, and there are no other center positions outside the edge box.

[0058] S110, perform correction processing on the image to be corrected based on the corner points.

[0059] Optionally, the image to be corrected can be stretched or otherwise corrected based on the corner points to restore the true state of the image to be corrected.

[0060] In one embodiment, Figure 1The image correction method shown is suitable for various scenarios, such as image correction of images of LED displays, LCD displays, OLED displays, and other displays with multiple light-emitting units.

[0061] The technical solution of this application involves marking connected components in the image to be corrected to determine multiple connected components. For each connected component, the center position is determined. Edge points are located within the point matrix formed by the center positions of each connected component, and the edge points of the point matrix are determined. Based on the bounding box generated by connecting the edge points, the corner points of the image to be corrected are determined, and then the image to be corrected is corrected based on these corner points. Each connected component indicates the region where the light-emitting unit is located in the image to be corrected, and the center position indicates the location of the light-emitting unit within the connected component. Compared to related technologies that determine corner points by forming closed regions through dilation and closing operations, this technical solution determines corner points by identifying edge points from the center positions of each connected component, thus determining corner points on the bounding box formed by these edge points. This eliminates the need to set different dilation values ​​for different images to be corrected, making the technical solution more applicable to different images. Furthermore, it eliminates the need for data padding in the image to be corrected, significantly saving processor computing resources and improving the efficiency of corner point location in the image to be corrected, thereby enhancing image correction efficiency. Furthermore, compared to the method of determining corner points by connecting bounding rectangles in related technologies, this technical solution determines the corner points of the image to be corrected based on the bounding boxes generated by connecting edge points. Since each edge point is a real point on the image to be corrected, rather than a point on the bounding box, it can still ensure accurate corner point positioning even if the image to be corrected is distorted, making the positioning results more accurate and thus improving the accuracy of image correction.

[0062] In one embodiment, determining multiple connected components of the image to be corrected (i.e., S102) can be performed as follows: steps A1-A3:

[0063] Step A1: Determine the area of ​​each connected region.

[0064] Step A2: Determine the average area of ​​all connected components based on the region area of ​​all connected components in the image to be corrected.

[0065] Step A3: Based on the average area, remove connected components whose area meets the preset removal criteria, and use the remaining connected components as the connected components of the image to be corrected.

[0066] The preset exclusion criteria include at least one of the following: a first preset multiple by which the area is greater than the average area, wherein the first preset multiple is greater than 1; and a second preset multiple by which the area is less than the average area, wherein the second preset multiple is greater than 0 and less than 1. Optionally, the first and second preset multiples can be set based on empirical values, for example, the first preset multiple can be set to 1.2 and the second preset multiple can be set to 0.8.

[0067] In this embodiment, taking the application of the image correction method to correct the acquired LED display screen image as an example, since the LED beads on the LED display screen are basically the same size, the area of ​​each connected region should also be basically the same. By removing connected regions with abnormal areas, the influence of such connected regions on the final corner point location can be avoided. It should be noted that the removed connected regions may be at the corner points, but since the corner points are ultimately determined by the intersection of fitted curves, removing connected regions with abnormal areas has little or no impact on the accuracy of the corner points determined in this technical solution.

[0068] In one embodiment, determining the center position of a connected component (i.e., S104) can be performed as follows: based on the pixel values ​​of the pixels within the connected component, determine the pixel with the highest pixel value as the center position of the connected component.

[0069] In this embodiment, the pixel with the highest pixel value within a connected component is equated to the location of the light-emitting unit within that connected component. Optionally, when multiple connected components of the image to be corrected determined in S102 are marked onto a grayscale image, the grayscale image includes multiple connected components, each containing multiple pixels, and each pixel may have the same or different pixel values. For example, the pixel values ​​in the grayscale image range from 0 to 255, with white being 255 and black being 0.

[0070] When applying image correction methods to correct images of acquired LED displays, each connected component corresponds to one LED. Since the brightness of an LED is higher than the surrounding area when it's lit, the pixel value at the LED's location is generally higher in the grayscale image. The pixel value at the center of the LED is the highest value within the connected component corresponding to that LED. For example, in an 8-bit grayscale image, the pixel value at the center of the LED is close to 255; in a 16-bit grayscale image, the pixel value is close to 65535. Therefore, for each connected component, the pixel with the highest value within that component can be determined as the center of that component.

[0071] It should be noted that in practical applications, since an LED bead is not a single pixel but corresponds to multiple pixels, multiple pixels with the highest pixel values ​​will appear in a grayscale image. In this embodiment, any one of these pixels with the highest pixel values ​​can be determined as the center position of the corresponding connected component.

[0072] Alternatively, determining the center location of the connected domain (i.e., S104) can be performed as follows: based on the geometry of the connected domain, determine the geometric center as the center location of the connected domain.

[0073] In this embodiment, the geometric center of the connected domain is equated to the location of the light-emitting unit within the connected domain. Optionally, the center of the circumscribed rectangle of the connected domain can also be determined as the center of the connected domain based on the circumscribed rectangle.

[0074] It should be noted that the center position is only one representation of the location of the light-emitting unit in the connected domain. In other embodiments, other positions in the connected domain can also be used to represent the location of the light-emitting unit. Furthermore, the methods for determining the center position include, but are not limited to, the methods listed above. In practical applications, any of the methods listed above or a user-defined method can be used to determine the center position, and this application embodiment does not limit this.

[0075] In one embodiment, the center location of a connected component is the center point of the connected component. For the lattice formed by the center locations of each connected component, edge point localization is performed to determine the edge points of the lattice (i.e., S106), which can be executed as follows: steps B1-B2:

[0076] Step B1: According to the positional order of each center point, add the first center point (ranked first) and the second center point (ranked second) to the pre-created set of edge points.

[0077] The first center point is a pre-determined edge point. Optionally, the set of edge points can be a stack.

[0078] Step B2 involves sequentially selecting new center points from the matrix and adding them to the edge point set as follows, including steps B21-B23:

[0079] Step B21: Select the newly added nth and mth center points from the edge point set, and determine the target center point to be added from the point matrix. The target center point to be added is positioned after the nth center point.

[0080] Where n is an integer greater than or equal to 2, m is an integer greater than or equal to 1, and n is greater than m. For example, P0 represents the first center point in the first order, P1 represents the second center point in the second order, P2 represents the third center point in the third order, and so on. Therefore, after step B1, the pre-created set of edge points contains a first center point P0 and a second center point P1. Based on this, step B21 can be executed as follows: select the newly added second center point P1 and the first center point P0 from the set of edge points, and determine the target center point P2 to be added from the point matrix. The target center point P2 to be added is positioned after the second center point P1.

[0081] Step B22: Based on the nth center point, the mth center point, and the target center point, determine whether the nth center point is an edge point; if the nth center point is not an edge point, then remove the nth center point from the edge point set.

[0082] Following the example in step B21, step B22 can be performed as follows: based on the second center point P1, the first center point P0, and the target center point P2, confirm whether the second center point P1 is an edge point; if it is confirmed that the second center point P1 is not an edge point, then remove the second center point P1 from the edge point set.

[0083] Optionally, if the nth center point is confirmed to be an edge point, then the nth center point in the edge point set is retained. Continuing with the example in step B21, if the second center point P1 is confirmed to be an edge point, then the second center point P1 in the edge point set is retained.

[0084] Step B23: Add the target center point to the edge point set, and confirm the center point whose position order is after the target center point as the new target center point to be added. According to the position order of the center points, check whether the latest added nth center point in the edge point set is an edge point, until the latest confirmed target center point is the first center point.

[0085] Following the example in step B22, if it is confirmed that the second center point P1 is not an edge point, step B23 can be executed as follows: add the target center point P2 to the edge point set, and confirm the center point whose position order is after the third center point P2 as the new target center point P3 to be added. Select the newly added third center point P2 and the first center point P0 from the edge point set, add the target center point P3 to the edge point set, and confirm whether the third center point P2 is an edge point. According to the position order of the center points, and so on, sequentially determine whether the newly added nth center point in the edge point set is an edge point, until the newly confirmed target center point is the first center point P0.

[0086] Following the example in step B22, if the second center point P1 is confirmed to be an edge point, the target center point P2 can be added to the edge point set. The center point whose position order is after the third center point P2 is confirmed as the new target center point P3 to be added. The newly added third center point P2 and second center point P1 are selected from the edge point set. The target center point P3 is added to the edge point set, and it is confirmed whether the third center point P2 is an edge point. According to the position order of the center points, this process is repeated to determine whether the newly added nth center point in the edge point set is an edge point, until the newly confirmed target center point is the first center point P0.

[0087] In this embodiment, by determining whether each center point is an edge point, the determined edge points are added to the edge point set, thus achieving the effect of accurately locating the edge points of the dot matrix.

[0088] In one embodiment, before adding the first center point (ranked first) and the second center point (ranked second) to the pre-created set of edge points according to their positional order (i.e., step B1), the following steps C1-C4 can be performed to determine the positional order of the center points:

[0089] Step C1: Establish the pixel coordinate system of the image to be corrected and determine the coordinate information of each center point.

[0090] The dot matrix is ​​located in the target quadrant of the pixel coordinate system. Optionally, the target quadrant can be the first quadrant, the second quadrant, the third quadrant, or the fourth quadrant. Optionally, the coordinate information is represented in the form of [x, y].

[0091] Step C2: Based on the coordinate information of multiple center points, determine the center point closest to the origin of the pixel coordinate system as the first center point.

[0092] Among them, "closest to the origin" means that both the horizontal and vertical axes of the coordinate system are closest to the origin. Therefore, the first center point is the edge point.

[0093] Step C3: Using the first center point as the endpoint, scan the dot matrix point by point according to the preset scanning direction.

[0094] Optionally, during the point-by-point scanning of the dot matrix, the first center point can be used as the endpoint, and the scan line can be set as the horizontal or vertical coordinate of the first center point, scanning is performed according to a preset scanning direction. The preset scanning direction can be clockwise or counterclockwise.

[0095] For example, when the dot matrix is ​​located in the first quadrant of the pixel coordinate system, with the first center point as the endpoint, if the scan line is the horizontal axis coordinate of the first center point, then the preset scanning direction is counterclockwise, that is, from the horizontal axis to the vertical axis. If the scan line is the vertical axis coordinate of the first center point, then the preset scanning direction is clockwise, that is, from the vertical axis to the horizontal axis.

[0096] Step C4: Determine the position order of each center point according to the scanning order of each center point.

[0097] The positional order of the center points is positively correlated with the scanning order. That is, the center points scanned earlier have a smaller positional order (i.e., earlier in the sequence); the center points scanned later have a larger positional order (i.e., later in the sequence).

[0098] Specifically, when the preset scanning direction is from the horizontal axis to the vertical axis, the scanning order of each center point is positively correlated with the angle between it and the horizontal axis. Similarly, when the preset scanning direction is from the vertical axis to the horizontal axis, the scanning order of each center point is positively correlated with the angle between it and the vertical axis.

[0099] For each center point, the angle between the center point and the horizontal axis is the angle between the line connecting the center point and the endpoint and the horizontal axis, and the angle between the center point and the vertical axis is the angle between the line connecting the center point and the endpoint and the vertical axis.

[0100] like Figure 3 As shown in (a), a dot matrix containing nine center points is schematically listed. This dot matrix is ​​located in the first quadrant of the pixel coordinate system, where the first center point is P0. The preset scanning direction is from the horizontal axis to the vertical axis. The order of the remaining center points is undetermined and therefore not labeled. Figure 3 As shown in (b), the order of the center points is determined by scanning the point matrix point by point, with the first center point as the endpoint, in the scanning direction from the horizontal axis to the vertical axis. By connecting each center point with the first center point P0, multiple lines can be obtained (i.e., the dashed lines shown in the figure). Based on the angle between each line and the horizontal axis, the order of the center points can be determined in ascending order of the angle, resulting in the second center point P1, the third center point P2, the fourth center point P3, the fifth center point P4, the sixth center point P5, the seventh center point P6, the eighth center point P7, and the ninth center point P8.

[0101] like Figure 3As shown in (c), the order of the center points is determined by scanning the point matrix point by point, with the first center point as the endpoint, in the scanning direction from the vertical axis to the horizontal axis. By connecting each center point with the first center point P0, multiple lines can be obtained (i.e., the dashed lines shown in the figure). Based on the angle between each line and the vertical axis, the order of the center points can be determined in ascending order of the angles, resulting in the second center point p1, the third center point p2, the fourth center point p3, the fifth center point p4, the sixth center point p5, the seventh center point p6, the eighth center point p7, and the ninth center point p8.

[0102] In this embodiment, by taking the center point closest to the origin as the endpoint on the pixel coordinate system and scanning the dot matrix point by point according to the preset scanning direction, the position order of each center point can be determined according to the scanning order of each center point, thus accurately and orderly determining the position order of each center point.

[0103] In one embodiment, if the order of the center points is determined by scanning the matrix point by point from the first center point as the endpoint, following the scanning direction from the horizontal axis to the vertical axis, then confirming whether the nth center point is an edge point (i.e., step B22) can be performed as follows: steps B221-B223.

[0104] Step B221: The directed line connecting the nth center point and the mth center point newly added to the edge point set is taken as the first line segment. The direction of the first line segment is from the nth center point to the mth center point.

[0105] Following the example in step B21, step B221 can be performed as follows: the directed line connecting the second center point P1 and the first center point P0, which were recently added to the set of edge points, is taken as the first line segment, and the direction of the first line segment is from the second center point P1 to the first center point P0. Optionally, the first line segment from the second center point P1 to the first center point P0 can be denoted as P1P0.

[0106] Step B222: Determine the positional relationship between the target center point and the first line segment.

[0107] Following the example in step B221, step B222 can be executed as follows: determine the positional relationship between the target center point P2 and the first line segment P1P0.

[0108] Step B223: If the target center point is located in the clockwise direction of the first line segment or on the first line segment, then the nth center point is confirmed as an edge point; if the target center point is located in the counterclockwise direction of the first line segment, then the nth center point is confirmed as not an edge point.

[0109] Following the example in step B222, if the target center point P2 is located in the clockwise direction of the first line segment P1P0 or on the first line segment P1P0, then the second center point P1 is confirmed as an edge point; if the target center point P2 is located in the counterclockwise direction of the first line segment P1P0, then the second center point P1 is confirmed as not an edge point.

[0110] In one embodiment, determining the positional relationship between the target center point and the first line segment (i.e., step B222) can be performed as follows: steps B2221-B2223:

[0111] Step B2221: The directed line connecting the nth center point and the target center point is taken as the target line segment. The direction of the target line segment is from the nth center point to the target center point.

[0112] Following the example in step B221, step B2221 can be performed as follows: the directed line connecting the second center point P1 and the target center point P2 is taken as the target line segment, and the direction of the target line segment is from the second center point P1 to the target center point P2. Optionally, the target line segment from the second center point P1 to the target center point P2 can be denoted as P1P2.

[0113] Step B2222: Perform a cross product operation on the first line segment and the target line segment to obtain the result.

[0114] Following the example in step B2221, step B2222 can be executed as follows: perform a cross product operation on the first line segment P1P0 and the target line segment P1P2 to obtain the operation result.

[0115] Optionally, the cross product operation is calculated as x1y2 - x2y1, where the first line segment P1P0 is represented by [x1, y1], and the target line segment P1P2 is represented by [x2, y2]. The x1 of the first line segment P1P0 can be obtained by calculating the difference between the horizontal coordinates of P0 and P1, and the y1 of the first line segment P1P0 can be obtained by calculating the difference between the vertical coordinates of P0 and P1. Similarly, the x2 of the target line segment P1P2 can be obtained by calculating the difference between the horizontal coordinates of P2 and P1, and the y2 of the target line segment P1P2 can be obtained by calculating the difference between the vertical coordinates of P2 and P1.

[0116] Step B2223: Based on the calculation results, determine the positional relationship between the target center point and the first line segment.

[0117] Specifically, if the calculation result is less than zero, the target center point is determined to be located in the clockwise direction of the first line segment; if the calculation result is equal to zero, the target center point is determined to be located on the first line segment; if the calculation result is greater than zero, the target center point is determined to be located in the counterclockwise direction of the first line segment.

[0118] Below, with Figure 3 Taking the dot matrix shown in (b) as an example, this section explains in detail how to determine whether the second center point P1 to the ninth center point P8 are edge points. For ease of explanation, as follows... Figure 4 As shown, the coordinate information of the first center point P0, the second center point P1, the third center point P2, the fourth center point P3, the fifth center point P4, and the sixth center point P5 are marked for example.

[0119] The coordinates of P0 are [2.1, 1.2], the coordinates of P1 are [4.8, 1.8], the coordinates of P2 are [7.1, 2.5], the coordinates of P3 are [6.6, 4.8], the coordinates of P4 are [4.2, 4], and the coordinates of P5 are [6, 6.9].

[0120] First, it is necessary to confirm whether the second center point P1 is an edge point. In this step, the target center point is the third center point P2. The directed line connecting the newly added edge point set, the second center point P1, and the first center point P0 can be taken as the first line segment, denoted as P1P0, with a value of [-2.7, -0.6]. The directed line connecting the second center point P1 and the target center point P2 can be taken as the target line segment, denoted as P1P2, with a value of [2.3, 0.7]. The cross product operation is performed on the first line segment P1P0 and the target line segment P1P2 to obtain the result, which is the result of calculating -2.7*0.7-2.3*(-0.6). The result is -0.51. Since the result is less than zero, it can be determined that the target center point P2 is located in the clockwise direction of the first line segment P1P0, thus confirming that the second center point P1 is an edge point.

[0121] Secondly, it is necessary to confirm whether the third center point P2 is an edge point. In this step, the target center point is the fourth center point P3. The directed line connecting the newly added third center point P2 and the second center point P1 can be taken as the first line segment, denoted as P2P1, with a value of [-2.3, -0.7]. The directed line connecting the third center point P2 and the target center point P3 can be taken as the target line segment, denoted as P2P3, with a value of [-0.5, 2.3]. The cross product operation is performed on the first line segment P2P1 and the target line segment P2P3 to obtain the result, which is the result of calculating -2.3*2.3-(-0.5)*(-0.7). The result is -5.64. Since the result is less than zero, it can be determined that the target center point P3 is located in the clockwise direction of the first line segment P2P1, thus confirming that the third center point P2 is an edge point.

[0122] Next, it is necessary to confirm whether the fourth center point P3 is an edge point. In this step, the target center point is the fifth center point P4. The directed line connecting the newly added fourth center point P3 and the third center point P2 can be taken as the first line segment, denoted as P3P2, with a value of [0.5, -2.3]. The directed line connecting the fourth center point P3 and the target center point P4 can be taken as the target line segment, denoted as P3P4, with a value of [-2.4, -0.8]. Perform a cross product operation on the first line segment P3P2 and the target line segment P3P4 to obtain the result, which is the result of calculating 0.5*(-0.8)-(-2.4)*(-2.3). The result is -5.92. Since the result is less than zero, it can be determined that the target center point P4 is located in the clockwise direction of the first line segment P3P2, thus confirming that the fourth center point P3 is an edge point.

[0123] Next, it needs to be confirmed whether the fifth center point P4 is an edge point. In this step, the target center point is the sixth center point P5. The directed line connecting the newly added fifth center point P4 and the fourth center point P3 can be taken as the first line segment, denoted as P4P3, with a value of [2.4, 0.8]. The directed line connecting the fifth center point P4 and the target center point P5 can be taken as the target line segment, denoted as P4P5, with a value of [1.8, 2.9]. The cross product operation is performed on the first line segment P4P3 and the target line segment P4P5 to obtain the result, which is the result of calculating 2.4*2.9-1.8*0.8. The result is 8.4. Since the result is greater than zero, it can be determined that the target center point P5 is located in the counterclockwise direction of the first line segment P4P3, thus confirming that the fifth center point P4 is not an edge point.

[0124] In this embodiment, since the fifth center point P4 is not an edge point, it needs to be removed from the edge point set. At this point, the edge point set only includes P0, P1, P2, P3, and P5. Therefore, in confirming whether the sixth center point P5 is an edge point, the target center point is the seventh center point P6. The directed line connecting the newly added sixth center point P5 and the fourth center point P3 can be taken as the first line segment, denoted as P5P3. The directed line connecting the sixth center point P5 and the target center point P6 can be taken as the target line segment, denoted as P5P6. A cross product operation is performed on the first line segment P5P3 and the target line segment P5P6 to obtain the result. If the calculation result is less than zero, the target center point P6 is determined to be located in the clockwise direction of the first line segment P5P3, thus confirming that the sixth center point P5 is an edge point; if the calculation result is equal to zero, the target center point P6 is determined to be located on the first line segment P5P3, thus confirming that the sixth center point P5 is an edge point; if the calculation result is greater than zero, the target center point P6 is determined to be located in the counterclockwise direction of the first line segment P5P3, thus confirming that the sixth center point P5 is not an edge point.

[0125] In one embodiment, if the order of the center points is determined by scanning the point matrix point by point with the first center point as the endpoint, following the scanning direction from the vertical axis to the horizontal axis, then confirming whether the nth center point is an edge point (i.e., step B22) can be performed as follows:

[0126] First, the directed line connecting the nth and mth center points newly added to the edge point set is taken as the first line segment. The direction of the first line segment is from the nth center point to the mth center point.

[0127] Where n is an integer greater than or equal to 2, m is an integer greater than or equal to 1, and n is greater than m. In this embodiment, the method for determining the first line segment is similar to the method for determining the first line segment in step B221, and will not be described again here.

[0128] Secondly, determine the positional relationship between the target center point and the first line segment.

[0129] In this embodiment, the directed line connecting the nth center point and the target center point can be taken as the target line segment, with the direction of the target line segment pointing from the nth center point to the target center point. A cross product operation is performed on the first line segment and the target line segment to obtain the result. Based on the result, the positional relationship between the target center point and the first line segment is determined. Specifically, if the result is less than zero, the target center point is determined to be located counterclockwise on the first line segment; if the result is equal to zero, the target center point is determined to be located on the first line segment; and if the result is greater than zero, the target center point is determined to be located clockwise on the first line segment.

[0130] Finally, if the target center point is located in the counterclockwise direction of the first line segment or on the first line segment, then the nth center point is confirmed as an edge point; if the target center point is located in the clockwise direction of the first line segment, then the nth center point is confirmed as not an edge point.

[0131] In one embodiment, before determining the corner points corresponding to the image to be corrected based on the bounding boxes generated by connecting edge points (i.e., S108), the edge points of the dot matrix can be mapped onto the binary image to generate bounding boxes on the binary image.

[0132] Optionally, in the binary image, the edge points of the dot matrix can be represented by black, or white. When using black to represent the edge points, mapping the edge points of the dot matrix onto the binary image generates bounding boxes on the binary image. (See reference...) Figure 5 , where 510 is the bounding box.

[0133] In this embodiment, since there are other non-edge points besides edge points on the image to be corrected, these pixels have corresponding pixel values, which can easily interfere with the generation of the bounding box and the determination of corner points in subsequent steps. Therefore, by mapping the edge points of the dot matrix onto the binary image, the bounding box is generated on the binary image, which helps to eliminate interference and thus facilitates accurate corner point positioning of the image to be corrected.

[0134] In one embodiment, determining the corner points of the image to be corrected (i.e., S108) based on the bounding box generated by connecting the edge points can be performed as follows: steps D1-D3:

[0135] Step D1: Divide the bounding box into multiple edge regions according to the preset division method.

[0136] Each edge region includes an intersection point. Optionally, the preset division method can be: dividing along the midpoint of each side of the edge box to evenly divide the edge box into multiple edge regions; or, dividing along the midpoint of each side of the binary image to evenly divide the edge box into multiple edge regions.

[0137] Optionally, when the bounding box is rectangular, it can be divided into four edge regions according to a preset division method; when the bounding box is polygonal, it can be divided into multiple edge regions according to a preset division method, wherein the number of edge regions is the same as the number of vertices contained in the polygon.

[0138] Step D2: For each edge region, scan the edge region to obtain scan coordinate information, perform curve fitting on the scan coordinate information to obtain two fitted curves, and determine the coordinate information of the intersection point of the two fitted curves.

[0139] For example, targeting Figure 5 The bounding box shown can be divided into four equal edge regions by dividing it along the midpoints of each side of the binary image, as shown below. Figure 6 The edge box shown in (a).

[0140] Optionally, when scanning edge regions, the scanning start position and scanning direction can be determined first. To facilitate the determination of the scanning start position and scanning direction, the same or different scanning coordinate systems can be established for each edge region. It should be understood that the coordinate information of each point on the edge box in each edge region will not change due to the establishment of the scanning coordinate system; that is, the scanning coordinate information corresponding to the edge box obtained by scanning is still the coordinate information in the pixel coordinate system.

[0141] For example, targeting Figure 6 The upper left edge region of the bounding box shown in (a) can be used to create a bounding box like this. Figure 6The scanning coordinate system is shown in (b). Therefore, when scanning this edge region, we can first start from the X-axis and scan point by point from top to bottom and column by column from left to right along the Y-axis. If a black point is scanned, the coordinate information of the current point is recorded. The scanning ends when the last column of the X-axis is reached. Curve fitting is then performed on the coordinate information of each point to obtain a fitted curve L1, for example, L1(y) = ax^2 + bx + c. Next, starting from the Y-axis, we scan point by point from left to right and row by row from top to bottom along the X-axis. If a black point is scanned, the coordinate information of the current point is recorded. The scanning ends when the last row of the Y-axis is reached. Curve fitting is then performed on the coordinate information of each point to obtain a fitted curve L2. The coordinate information of the intersection point G1 of the two fitted curves is calculated, which is the corner point of this edge region.

[0142] Optionally, for Figure 6 For the edge region shown in (b), in order to save processor computing resources when scanning this edge region, it can be set as follows: if no black point is detected when scanning beyond 1 / 2 of the Y axis, start from the X axis and scan along the Y axis; if no black point is detected when scanning beyond 1 / 2 of the X axis, start from the Y axis and scan along the X axis, start from the Y axis and scan along the X axis.

[0143] Step D3: Determine the corner points of the image to be corrected based on the coordinate information of the intersection points in multiple edge regions.

[0144] For example, the following steps can be used to determine the following sequentially: Figure 6 The corner points of each edge region in the bounding box shown in (a) are as follows: Figure 6 As shown in (c), all corner points G1, G2, G3 and G4 corresponding to the image to be corrected are obtained.

[0145] In this embodiment, the bounding box is divided into multiple edge regions, and line scanning is performed on each edge region to obtain an edge curve function through curve fitting. Then, by calculating the intersection of the two curves, precise corner point positioning is achieved. In this technical solution, even if the image is distorted, since the corner points are not determined by the circumscribed rectangle, deviations between the determined corner points and the actual corner points can be avoided.

[0146] Figure 7This is a schematic flowchart illustrating an image correction method according to another embodiment of this application. In this embodiment, the image to be corrected is an image of a display screen with multiple light-emitting units (hereinafter referred to as "display screen image"). For ease of explanation, this embodiment uses the center position of the connected domain as the center point of the connected domain as an example, and takes the first center point as the endpoint, scanning the dot matrix point by point in a scanning direction from the horizontal axis to the vertical axis to determine the position order of each center point. Figure 7 As shown, the image correction method includes:

[0147] S701, Connectivity labeling is performed on the display screen image to determine multiple connected components of the display screen image.

[0148] Each connected component is used to indicate the area where the light-emitting unit is located in the image on the display screen.

[0149] Optionally, when determining multiple connected components of the display screen image, the area of ​​each connected component can be determined separately. Based on the area of ​​all connected components in the display screen image, the average area of ​​all connected components is determined. Then, based on the average area, connected components whose area meets the preset rejection criteria are removed, and the remaining connected components are used as the connected components of the display screen image.

[0150] The preset exclusion conditions include at least one of the following: the area of ​​the region is greater than the average area by a first preset multiple, where the first preset multiple is a multiple greater than 1; the area of ​​the region is less than the average area by a second preset multiple, where the second preset multiple is a multiple greater than 0 and less than 1.

[0151] S702, For each connected component, determine the center point of the connected component.

[0152] The center point is used to indicate the location of the light-emitting unit in the connected domain. In this embodiment, for each connected domain, the pixel with the highest pixel value in the connected domain can be determined as the center point of the connected domain, or the geometric center of the connected domain can be determined as the center point of the connected domain.

[0153] S703, according to the positional order of each center point, add the first center point (ranked first) and the second center point (ranked second) to the pre-created set of edge points.

[0154] The first center point is a pre-determined edge point.

[0155] Optionally, the coordinate information of each center point can be determined by establishing a pixel coordinate system for the display screen image, wherein the dot matrix is ​​located in the target quadrant of the pixel coordinate system. Based on the coordinate information of multiple center points, the center point closest to the origin of the pixel coordinate system is determined as the first center point. Using the first center point as the endpoint, the dot matrix is ​​scanned point by point in the scanning direction from the horizontal axis to the vertical axis of the coordinate system to determine the position order of each center point.

[0156] S704, select new center points from the dot matrix and add them to the edge point set.

[0157] Optionally, S704 can be executed as S7041-S7043, wherein S7041-S7043 is not in Figure 7 The text shows:

[0158] S7041: Select the newly added nth and mth center points from the edge point set, and determine the target center point to be added from the point matrix. The target center point to be added is in the order of the nth center point, where n is an integer greater than or equal to 2, m is an integer greater than or equal to 1, and n is greater than m.

[0159] S7042, based on the nth center point, the mth center point and the target center point, determine whether the nth center point is an edge point; if not, remove the nth center point from the edge point set; if so, retain the nth center point from the edge point set.

[0160] Optionally, when confirming whether the nth center point is an edge point, the directed line connecting the nth center point and the mth center point that were recently added to the edge point set can be used as the first line segment. The direction of the first line segment is from the nth center point to the mth center point, thereby determining the positional relationship between the target center point and the first line segment. If the target center point is located in the clockwise direction of the first line segment or is located on the first line segment, then the nth center point is confirmed as an edge point. If the target center point is located in the counterclockwise direction of the first line segment, then the nth center point is confirmed as not being an edge point.

[0161] Optionally, when determining the positional relationship between the target center point and the first line segment, the directed line connecting the nth center point and the target center point can be used as the target line segment, with the direction of the target line segment pointing from the nth center point to the target center point. A cross product operation is then performed on the first line segment and the target line segment to obtain the result. The positional relationship between the target center point and the first line segment is then determined based on the result. Specifically, if the result is less than zero, the target center point is determined to be located in the clockwise direction of the first line segment; if the result is equal to zero, the target center point is determined to be located on the first line segment; and if the result is greater than zero, the target center point is determined to be located in the counterclockwise direction of the first line segment.

[0162] S7043, add the target center point to the edge point set, and confirm the center point whose position order is after the target center point as the new target center point to be added. According to the position order of the center points, check whether the latest added nth center point in the edge point set is an edge point, until the latest confirmed target center point is the first center point.

[0163] S705, determine the corner points corresponding to the display screen image based on the bounding box generated by the edge points in the set of connected edge points.

[0164] Optionally, the edge points of the dot matrix can be mapped onto a binary image to generate bounding boxes on the binary image.

[0165] Optionally, S705 may perform the following: according to a preset division method, divide the edge box into multiple edge regions, each edge region including an intersection point; for each edge region, perform scanning processing on the edge region to obtain the scanning coordinate information corresponding to the edge box; perform curve fitting processing on the scanning coordinate information to obtain two fitting curves; thereby determine the intersection point coordinate information of the two fitting curves; and then determine the corner point corresponding to the display screen image based on the intersection point coordinate information in the multiple edge regions.

[0166] S706 performs image correction processing on the display screen based on corner points.

[0167] The specific processes of S701-S706 described above have been explained in detail in the above embodiments and will not be repeated here.

[0168] The technical solution of this application involves marking connected components in a display image to determine multiple connected components. For each connected component, a center point is determined. Edge points are located within the point matrix formed by the center points of each connected component, and the edge points of the point matrix are determined. Based on the bounding box generated by connecting the edge points, the corner points of the display image are determined, and the display image is then corrected according to these corner points. Each connected component indicates the area where the light-emitting unit is located in the display image, and the center point indicates the location of the light-emitting unit within the connected component. Compared to related technologies that determine corner points by forming closed regions through dilation and closing operations, this technical solution determines corner points by identifying edge points from the center points of each connected component, thus determining corner points on the bounding box formed by these edge points. This eliminates the need to set different dilation values ​​for different display images, making the technical solution more applicable to different display images. Furthermore, it eliminates the need for data padding in the display image, significantly saving processor computing resources and improving the efficiency of corner point location for the display image, thereby enhancing image correction efficiency. Furthermore, compared to the method of determining corner points by connecting bounding rectangles in related technologies, this technical solution determines the corner points of the display image based on the bounding boxes generated by connecting edge points. Since each edge point is a real point on the display image, rather than a point on the bounding box, it can still ensure accurate corner point positioning of the display image even when there is distortion in the display image, making the positioning results more accurate and thus helping to improve the accuracy of image correction.

[0169] In one embodiment, the image correction method provided in this application can be applied to scenarios involving image correction of acquired LED display screen images. In related technologies, when performing point-by-point correction on an LED display screen, the first and crucial step is to acquire the brightness information of the LED display screen using a camera. However, when using a camera to acquire images of an LED display screen, it is often impossible to guarantee that the camera's viewing angle is centered on the LED display screen and aligned with it. Furthermore, during camera adjustment, inaccurate placement or an environment where the image acquisition environment of the LED display screen does not allow the camera's viewing angle to be aligned with the LED display screen can cause the camera to rotate or tilt. Figure 8 As shown in (a), this is a typical image acquisition environment where the LED display screen is installed at a high position, and the camera's viewing angle cannot correspond to the center viewing angle of the LED display screen. Therefore, a tilt angle is required for the camera to capture a complete image of the LED display screen. Consequently, the acquired image will appear as shown in the image below. Figure 8As shown in (b), the acquired image is distorted. If the image is distorted, it will interfere with the subsequent correction process of extracting the brightness of the LED beads on the LED display screen. Therefore, image correction is required to eliminate the distortion. Figure 8 As shown in (c), during the image correction process, the image can be stretched based on the four corner points of the image by locating the positions of the four corner points in order to restore the true state of the image. Figure 9 The illustrated embodiment uses this scenario as an example for explanation.

[0170] Figure 9 This is a schematic flowchart illustrating an LED display image correction method according to an embodiment of this application, such as... Figure 9 As shown, the methods for correcting LED display screen images include:

[0171] S902, acquire the image of the LED display screen to be calibrated.

[0172] S904. Using the image correction method described above, the image of the LED display screen to be corrected is processed.

[0173] Optionally, S904 can be performed as follows: Connected component marking is performed on the LED display image to be calibrated, determining multiple connected components of the LED display image to be calibrated, each connected component indicating the area where the light-emitting units are located in the LED display image to be calibrated. For each connected component, the center position of the connected component is determined, the center position indicating the position of the light-emitting units in the connected component. For the dot matrix formed by the center positions of each connected component, edge point localization is performed, determining the edge points of the dot matrix. Therefore, based on the edge boxes generated by connecting the edge points, the corner points corresponding to the LED display image to be calibrated are determined, and then, the LED display image to be calibrated is calibrated based on the corner points. In this embodiment, detailed descriptions of each step can be found in the relevant content of S102 to S110, and will not be repeated here.

[0174] The technical solution of this application involves marking connected components in an LED display image to determine multiple connected components. For each connected component, a center point is determined. Edge points are located within the point matrix formed by the center points of each connected component, and the edge points of the point matrix are determined. Based on the edge frame generated by connecting the edge points, the corner points of the LED display image are determined, and the LED display image is then corrected based on these corner points. Each connected component indicates the area where the light-emitting unit is located in the LED display image, and the center point indicates the location of the light-emitting unit within the connected component. Compared to related technologies that determine corner points by using dilation and closing operations to form closed regions, this technical solution determines corner points by identifying edge points from the center points of each connected component, thus determining corner points on the edge frame formed by these edge points. This eliminates the need to set different dilation values ​​for different LED display images, making the solution more applicable to various LED display images. Furthermore, it eliminates the need for data padding in the LED display image, significantly saving processor computing resources and improving the efficiency of corner point location for LED display images, thereby enhancing image correction efficiency. Furthermore, compared to the method of determining corner points by using the bounding rectangle of the connected domain in related technologies, this technical solution determines the corner points of the LED display image based on the bounding box generated by connecting edge points. Since each edge point is a real point on the LED display image, rather than a point on the bounding box, it can still ensure accurate corner point positioning of the LED display image even when there is distortion in the LED display image, making the positioning result more accurate and thus helping to improve the accuracy of image correction.

[0175] In summary, specific embodiments of this subject matter have been described. Other embodiments are within the scope of the appended claims. In some cases, the actions recited in the claims can be performed in a different order and still achieve the desired result. Furthermore, the processes depicted in the drawings do not necessarily require a specific or sequential order to achieve the desired result. In some embodiments, multitasking and parallel processing can be advantageous.

[0176] The above are the image correction method and LED display screen image correction method provided in the embodiments of this application. Based on the same idea, the embodiments of this application also provide an image correction device and an LED display screen image correction device.

[0177] Figure 10 This is a schematic diagram of an image correction device according to an embodiment of this application. Please refer to... Figure 10 The image correction device may include:

[0178] The labeling processing module 1010 is used to label connected components of the image to be corrected and to determine multiple connected components of the image to be corrected; each connected component is used to indicate the region where the light-emitting unit is located in the image to be corrected.

[0179] The first determining module 1020 is used to determine the center position of each connected component; the center position is used to indicate the location of the light-emitting unit in the connected component.

[0180] The edge point localization module 1030 is used to locate the edge points of the point array formed by the center positions of each connected domain, and to determine the edge points of the point array.

[0181] The second determining module 1040 is used to determine the corner points of the image to be corrected based on the bounding box generated by the connecting edge points.

[0182] The first correction processing module 1050 is used to perform correction processing on the image to be corrected based on the corner points.

[0183] In one embodiment, the center location of the connected domain is the center point of the connected domain; the edge point localization module 1030 includes:

[0184] The first processing unit is used to add the first center point (ranked first) and the second center point (ranked second) to a pre-created set of edge points according to the positional order of the center points; the first center point is a pre-determined edge point.

[0185] The second processing unit is used to sequentially select new center points from the dot matrix and add them to the edge point set in the following manner:

[0186] Select the newly added nth and mth center points from the edge point set, and determine the target center point to be added from the point matrix; wherein, the position order of the target center point to be added is after the nth center point, n is an integer greater than or equal to 2, m is an integer greater than or equal to 1, and n is greater than m;

[0187] Based on the nth center point, the mth center point, and the target center point, determine whether the nth center point is an edge point; if not, remove the nth center point from the edge point set.

[0188] Add the target center point to the edge point set, and confirm the center point whose position order is after the target center point as the new target center point to be added. According to the position order of the center points, check whether the latest added nth center point in the edge point set is an edge point, until the latest confirmed target center point is the first center point.

[0189] In one embodiment, determining whether the nth center point is an edge point includes:

[0190] The directed line connecting the nth center point and the mth center point newly added to the edge point set is taken as the first line segment; the direction of the first line segment is from the nth center point to the mth center point;

[0191] Determine the positional relationship between the target center point and the first line segment;

[0192] If the target center point is located in the clockwise direction of the first line segment or on the first line segment, then the nth center point is confirmed as an edge point; if the target center point is located in the counterclockwise direction of the first line segment, then the nth center point is confirmed as not an edge point.

[0193] In one embodiment, determining the positional relationship between the target center point and the first line segment includes:

[0194] The directed line connecting the nth center point and the target center point is taken as the target line segment; the direction of the target line segment is from the nth center point to the target center point;

[0195] Perform a cross product operation on the first line segment and the target line segment to obtain the result;

[0196] Based on the calculation results, determine the positional relationship between the target center point and the first line segment; if the calculation result is less than zero, the target center point is determined to be located in the clockwise direction of the first line segment; if the calculation result is equal to zero, the target center point is determined to be located on the first line segment; if the calculation result is greater than zero, the target center point is determined to be located in the counterclockwise direction of the first line segment.

[0197] In one embodiment, the second determining module 1040 includes:

[0198] A partitioning unit is used to divide the bounding box into multiple edge regions according to a preset partitioning method; each edge region includes an intersection point.

[0199] The scanning unit is used to scan each edge region to obtain scan coordinate information; perform curve fitting on the scan coordinate information to obtain two fitted curves; and determine the coordinate information of the intersection point of the two fitted curves.

[0200] The first determining unit is used to determine the corner points corresponding to the image to be corrected based on the coordinate information of the intersection points in multiple edge regions.

[0201] In one embodiment, the tagging processing module 1010 includes:

[0202] The second determining unit is used to determine the area of ​​each connected domain;

[0203] The third determining unit is used to determine the average area of ​​all connected components based on the region area of ​​all connected components in the image to be corrected.

[0204] The elimination processing unit is used to eliminate connected components whose area meets the preset elimination conditions based on the average area, and to use the remaining connected components as the connected components of the image to be corrected; the preset elimination conditions include at least one of the following: the area of ​​the region is greater than the average area by a first preset multiple, the first preset multiple being a multiple greater than 1; the area of ​​the region is less than the average area by a second preset multiple, the second preset multiple being a multiple greater than 0 and less than 1.

[0205] In one embodiment, the image correction device further includes:

[0206] The establishment and determination module is used to establish the pixel coordinate system of the image to be corrected and determine the coordinate information of each center point before adding the first center point (ranked first) and the second center point (ranked second) to the pre-created edge point set according to the position order of each center point; the point matrix is ​​located in the target quadrant of the pixel coordinate system.

[0207] The third determining module is used to determine the center point closest to the origin of the pixel coordinate system as the first center point based on the coordinate information of multiple center points;

[0208] The scanning module is used to scan the dot matrix point by point with the first center point as the endpoint and according to the preset scanning direction;

[0209] The fourth determination module is used to determine the position order of each center point based on the scanning order of each center point; the position order is positively correlated with the scanning order.

[0210] Specifically, when the preset scanning direction is from the horizontal axis to the vertical axis, the scanning order of each center point is positively correlated with the angle between it and the horizontal axis; when the preset scanning direction is from the vertical axis to the horizontal axis, the scanning order of each center point is positively correlated with the angle between it and the vertical axis; for each center point, the angle between the center point and the horizontal axis is the angle between the line connecting the center point and the endpoint and the horizontal axis; the angle between the center point and the vertical axis is the angle between the line connecting the center point and the endpoint and the vertical axis.

[0211] In one embodiment, the first determining module 1020 includes:

[0212] The fourth determining unit is used to determine the center position of the connected component based on the pixel values ​​of the pixels within the connected component; or,

[0213] The fifth determining unit is used to determine the geometric center as the center position of the connected domain based on the geometry of the connected domain.

[0214] In one embodiment, the image correction device further includes:

[0215] The mapping module is used to map the edge points of the dot matrix onto the binary image before determining the corner points of the image to be corrected based on the bounding boxes generated from the connected edge points, so as to generate bounding boxes on the binary image.

[0216] The apparatus of this application identifies multiple connected components of the image to be corrected by marking connected components. For each connected component, the center position is determined. Edge points are located within the point matrix formed by the center positions of each connected component, and the edge points of the point matrix are determined. Based on the bounding box generated by connecting the edge points, the corner points of the image to be corrected are determined, and then the image is corrected according to these corner points. Each connected component indicates the region where the light-emitting unit is located in the image to be corrected, and the center position indicates the location of the light-emitting unit within the connected component. Compared to related technologies that determine corner points by forming closed regions through dilation and closing operations, this apparatus determines corner points by identifying edge points from the center positions of each connected component, thus determining corner points on the bounding box formed by these edge points. This eliminates the need to set different dilation values ​​for different images to be corrected, making the apparatus more applicable to different images. Furthermore, it eliminates the need for data padding in the image to be corrected, significantly saving processor computing resources and improving the efficiency of corner point location in the image to be corrected, thereby enhancing image correction efficiency. Furthermore, compared to the method of determining corner points by using the bounding rectangle of connected components in related technologies, this device determines the corner points of the image to be corrected based on the bounding box generated by connecting edge points. Since each edge point is a real point on the image to be corrected, rather than a point on the bounding box, it can still ensure accurate corner point positioning of the image to be corrected even if there is distortion in the image to be corrected, making the positioning result more accurate and thus helping to improve the accuracy of image correction.

[0217] Figure 11 This is a schematic diagram of the structure of an LED display screen image correction device according to an embodiment of this application. Please refer to... Figure 11 The image correction device for the LED display screen may include:

[0218] Acquisition module 1110 is used to acquire an image of the LED display screen to be calibrated;

[0219] The second correction processing module 1120 is used to utilize, for example, Figure 10 The image correction device shown performs correction processing on the LED display screen image to be corrected.

[0220] The apparatus according to this application identifies multiple connected components of an LED display image by marking connected components. For each connected component, a center point is determined. Edge points are located within the point matrix formed by the center points of each connected component, and the edge points of the point matrix are determined. Based on the edge frame generated by connecting the edge points, the corner points of the LED display image are determined, and the LED display image is then corrected based on these corner points. Each connected component indicates the area where the light-emitting unit is located in the LED display image, and the center point indicates the location of the light-emitting unit within the connected component. Compared to related technologies that determine corner points by using dilation and closing operations to form closed regions, this apparatus determines corner points by identifying edge points from the center points of each connected component, thus determining corner points on the edge frame formed by these edge points. This eliminates the need to set different dilation values ​​for different LED display images, making the apparatus more adaptable to various LED display images. Furthermore, it eliminates the need for data padding in the LED display image, significantly saving processor computing resources and improving the efficiency of corner point location for LED display images, thereby enhancing image correction efficiency. Furthermore, compared to the method of determining corner points by using the bounding rectangle of the connected domain in related technologies, this device determines the corner points of the LED display image based on the bounding box generated by the connected edge points. Since each edge point is a real point on the LED display image, rather than a point on the bounding box, it can still ensure accurate corner point positioning of the LED display image even when there is distortion in the LED display image, making the positioning result more accurate and thus helping to improve the accuracy of image correction.

[0221] Those skilled in the art will understand that Figure 10 The image correction device in the document can be used to implement the image correction method described above. Figure 11 The LED display image correction device described above can be used to implement the LED display image correction method described above. The details of the correction are similar to those described in the method section above. To avoid being too complicated, they will not be repeated here.

[0222] Based on the same idea, embodiments of this application also provide an image correction device, such as... Figure 12As shown. Image correction devices can vary considerably depending on configuration or performance, and may include one or more processors 1201 and memory 1202. Memory 1202 may store one or more application programs or data. Memory 1202 may be temporary or persistent storage. The application programs stored in memory 1202 may include one or more modules (not shown), each module may include a series of computer-executable instructions for the image correction device. Furthermore, processor 1201 may be configured to communicate with memory 1202 and execute the series of computer-executable instructions in memory 1202 on the image correction device. Image correction devices may also include one or more power supplies 1203, one or more wired or wireless network interfaces 1204, one or more input / output interfaces 1205, and one or more keyboards 1206.

[0223] In one embodiment, the image correction device includes a memory and one or more programs, wherein the one or more programs are stored in the memory, and the one or more programs may include one or more modules, and each module may include a series of computer-executable instructions for the image correction device, and is configured to be executed by one or more processors. The one or more programs include computer-executable instructions for performing the following:

[0224] Connected component labeling is performed on the image to be corrected to determine multiple connected components of the image; each connected component is used to indicate the region where the light-emitting unit is located in the image to be corrected.

[0225] For each connected component, determine the center position of the connected component; the center position is used to indicate the location of the light-emitting unit in the connected component;

[0226] For the lattice formed by the center positions of each connected domain, edge point localization is performed to determine the edge points of the lattice;

[0227] Based on the bounding box generated by connecting the edge points, determine the corner points of the image to be corrected;

[0228] The image to be corrected is processed based on the corner points.

[0229] The device employing this embodiment identifies multiple connected components of the image to be corrected by marking connected components. For each connected component, the center position is determined. Edge points are located within the point matrix formed by the center positions of each connected component, and the edge points of the point matrix are determined. Based on the bounding box generated by connecting the edge points, the corner points of the image to be corrected are determined, and then the image is corrected according to these corner points. Each connected component indicates the region where the light-emitting unit is located in the image to be corrected, and the center position indicates the location of the light-emitting unit within the connected component. Compared to related technologies that determine corner points by using dilation and closing operations to form closed regions, this device determines corner points by identifying edge points from the center positions of each connected component, thus determining corner points on the bounding box formed by these edge points. This eliminates the need to set different dilation values ​​for different images to be corrected, making the device more applicable to different images. Furthermore, it eliminates the need for data padding in the image to be corrected, significantly saving processor computing resources and improving the efficiency of corner point location in the image to be corrected, thereby enhancing image correction efficiency. Furthermore, compared to the method of determining corner points by using the bounding rectangle of connected components in related technologies, this device determines the corner points of the image to be corrected based on the bounding box generated by the connected edge points. Since each edge point is a real point on the image to be corrected, rather than a point on the bounding box, it can still ensure accurate corner point positioning of the image to be corrected even if there is distortion in the image to be corrected, making the positioning result more accurate and thus helping to improve the accuracy of image correction.

[0230] In one embodiment, the image correction device includes a memory and one or more programs, wherein the one or more programs are stored in the memory, and the one or more programs may include one or more modules, and each module may include a series of computer-executable instructions for the image correction device, and is configured to be executed by one or more processors. The one or more programs include computer-executable instructions for performing the following:

[0231] Acquire an image of the LED display screen to be calibrated;

[0232] The above image correction method is used to correct the image of the LED display screen to be corrected.

[0233] The device employing this embodiment marks connected components in an LED display image to determine multiple connected components. For each connected component, its center point is determined. Edge points are located within the dot matrix formed by the center points of each connected component, and the edge points of the dot matrix are determined. Based on the bounding box generated by the connected edge points, the corner points of the LED display image are determined, and the image is then corrected according to these corner points. Each connected component indicates the area where the light-emitting unit is located in the LED display image, and the center point indicates the location of the light-emitting unit within the connected component. Compared to related technologies that determine corner points by forming closed regions through dilation and closing operations, this device determines corner points by identifying edge points from the center points of each connected component, thus determining corner points on the bounding box formed by these edge points. This eliminates the need to set different dilation values ​​for different LED display images, making the device more adaptable to various LED display images. Furthermore, it eliminates the need for data padding in the LED display image, significantly saving processor computing resources and improving the efficiency of corner point location for LED display images, thereby enhancing image correction efficiency. Furthermore, compared to the method of determining corner points by using the bounding rectangle of connected components in related technologies, this device determines the corner points of the LED display image based on the bounding box generated by the connected edge points. Since each edge point is a real point on the LED display image, rather than a point on the bounding box, it can still ensure accurate corner point positioning of the LED display image even when there is distortion in the LED display image, making the positioning result more accurate and thus helping to improve the accuracy of image correction.

[0234] This application also proposes a storage medium that stores one or more computer programs, the computer programs including instructions that, when executed by an electronic device including multiple applications, enable the electronic device to perform various processes of the above-described image correction method embodiments, specifically for executing:

[0235] Connected component labeling is performed on the image to be corrected to determine multiple connected components of the image; each connected component is used to indicate the region where the light-emitting unit is located in the image to be corrected.

[0236] For each connected component, determine the center position of the connected component; the center position is used to indicate the location of the light-emitting unit in the connected component;

[0237] For the lattice formed by the center positions of each connected domain, edge point localization is performed to determine the edge points of the lattice;

[0238] Based on the bounding box generated by connecting the edge points, determine the corner points of the image to be corrected;

[0239] The image to be corrected is processed based on the corner points.

[0240] The storage medium of this application identifies multiple connected components of the image to be corrected by marking connected components. For each connected component, its center position is determined. Edge points are located within the point matrix formed by the center positions of each connected component, and the edge points of the point matrix are determined. Based on the bounding box generated by connecting the edge points, the corner points of the image to be corrected are determined, and then the image is corrected according to these corner points. Each connected component indicates the region where the light-emitting unit is located in the image to be corrected, and the center position indicates the location of the light-emitting unit within the connected component. Compared to related technologies that determine corner points by forming closed regions through dilation and closing operations, this storage medium determines corner points by identifying edge points from the center positions of each connected component, thus determining corner points on the bounding box formed by these edge points. This eliminates the need to set different dilation values ​​for different images to be corrected, making the storage medium more adaptable to different images. Furthermore, it eliminates the need for data padding in the image to be corrected, significantly saving processor computing resources and improving the efficiency of corner point location in the image to be corrected, thereby enhancing image correction efficiency. Furthermore, compared to the method of determining corner points by using the bounding rectangle of connected components in related technologies, this storage medium determines the corner points of the image to be corrected based on the bounding box generated by the connected edge points. Since each edge point is a real point on the image to be corrected, rather than a point on the bounding box, it can still ensure accurate corner point positioning of the image to be corrected even if there is distortion in the image to be corrected, making the positioning result more accurate and thus helping to improve the accuracy of image correction.

[0241] This application also proposes a storage medium that stores one or more computer programs, the computer programs including instructions that, when executed by an electronic device including multiple applications, enable the electronic device to perform various processes of the above-described image correction method embodiments, specifically for executing:

[0242] Acquire an image of the LED display screen to be calibrated;

[0243] The above image correction method is used to correct the image of the LED display screen to be corrected.

[0244] The storage medium of this application identifies multiple connected components of an LED display image by marking them. For each connected component, a center point is determined. Edge points are located within the point matrix formed by the center points of each connected component, and the edge points of the point matrix are determined. Based on the edge frame generated by connecting the edge points, the corner points of the LED display image are determined, and the LED display image is then corrected based on these corner points. Each connected component indicates the area where the light-emitting unit is located in the LED display image, and the center point indicates the location of the light-emitting unit within the connected component. Compared to related technologies that determine corner points by using dilation and closing operations to form closed regions, this storage medium determines corner points by identifying edge points from the center points of each connected component, thus eliminating the need to set different dilation values ​​for different LED display images. This makes the storage medium more adaptable to different LED display images and eliminates the need for data padding in the LED display image, significantly saving processor computing resources and improving the efficiency of corner point location for LED display images, thereby enhancing image correction efficiency. Furthermore, compared to the method of determining corner points by using the bounding rectangle of connected components in related technologies, this storage medium determines the corner points of the LED display image based on the bounding box generated by the connected edge points. Since each edge point is a real point on the LED display image, rather than a point on the bounding shape, it can still ensure accurate corner point positioning of the LED display image even when there is distortion in the LED display image, making the positioning result more accurate and thus helping to improve the accuracy of image correction.

[0245] The systems, devices, modules, or units described in the above embodiments can be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, a computer can be, for example, a personal computer, laptop computer, cellular phone, camera phone, smartphone, personal digital assistant, media player, navigation device, email device, game console, tablet computer, wearable device, or any combination of these devices.

[0246] For ease of description, the above devices are described separately by function as various units. Of course, in implementing this application, the functions of each unit can be implemented in one or more software and / or hardware.

[0247] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0248] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0249] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0250] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0251] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0252] Memory may include non-persistent storage in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.

[0253] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.

[0254] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0255] This application can be described in the general context of computer-executable instructions, such as program modules, that are executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc., that perform a specific task or implement a specific abstract data type. This application can also be practiced in distributed computing environments where tasks are performed by remote processing devices connected via a communication network. In distributed computing environments, program modules can reside in local and remote computer storage media, including storage devices.

[0256] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the system embodiments are basically similar to the method embodiments, so the description is relatively simple; relevant parts can be referred to the descriptions in the method embodiments.

[0257] The above description is merely an embodiment of this application and is not intended to limit this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principle of this application should be included within the scope of the claims of this application.

Claims

1. An image correction method characterized by, The method comprises the following steps: labeling a connected domain of the image to be corrected to determine a plurality of connected domains of the image to be corrected; each connected domain is used to indicate a region of the image to be corrected where a light emitting unit is located; determining a center position of each connected domain; the center position is used to indicate a position of the light emitting unit in the connected domain; performing edge point positioning on a dot matrix formed by the center positions of the connected domains to determine edge points of the dot matrix; determining a corner point corresponding to the image to be corrected according to an edge frame generated by connecting the edge points; performing correction processing on the image to be corrected according to the corner point.

2. The method of claim 1, wherein, The center position of the connected domain is a center point of the connected domain; the edge point positioning on the dot matrix formed by the center positions of the connected domains comprises the following steps: adding a first center point ranked first and a second center point ranked second to a pre-created edge point set according to the point order of the center points; the first center point is a pre-determined edge point; adding new center points from the dot matrix to the edge point set in sequence in the following manner: selecting an nth center point and an mth center point added last from the edge point set to determine a target center point to be added from the dot matrix; wherein the point order of the target center point to be added is after the nth center point, n is an integer greater than or equal to 2, and m is an integer greater than or equal to 1, and n is greater than m; confirming whether the nth center point is an edge point according to the nth center point, the mth center point and the target center point; if not, the nth center point in the edge point set is removed; adding the target center point to the edge point set, and confirming a center point after the target center point in the point order as a new target center point to be added, and judging whether the nth center point added last in the edge point set is an edge point according to the point order of the center points until the target center point confirmed last is the first center point.

3. The method of claim 2, wherein, The confirmation of whether the nth center point is an edge point comprises the following steps: taking a directed line between the nth center point and the mth center point added last to the edge point set as a first line segment; the direction of the first line segment is from the nth center point to the mth center point; judging a positional relationship between the target center point and the first line segment; if the target center point is located in a clockwise direction of the first line segment or on the first line segment, it is confirmed that the nth center point is an edge point; if the target center point is located in an anticlockwise direction of the first line segment, it is confirmed that the nth center point is not an edge point.

4. The method of claim 3, wherein, The judgment of the positional relationship between the target center point and the first line segment comprises the following steps: taking a directed line between the nth center point and the target center point as a target line segment; the direction of the target line segment is from the nth center point to the target center point; performing a cross product operation on the first line segment and the target line segment to obtain an operation result; According to the operation result, a position relationship between the target center point and the first line segment is determined; if the operation result is less than zero, it is determined that the target center point is located in a clockwise direction of the first line segment; if the operation result is equal to zero, it is determined that the target center point is located on the first line segment; and if the operation result is greater than zero, it is determined that the target center point is located in an anticlockwise direction of the first line segment.

5. The method of claim 1, wherein, The method further comprises: According to a preset division manner, the edge frame is divided into a plurality of edge regions; each of the edge regions includes one intersection point; For each of the edge regions, scanning processing is performed on the edge region to obtain scanning coordinate information; curve fitting processing is performed on the scanning coordinate information to obtain two fitting curves; and intersection coordinate information of the two fitting curves is determined. According to the intersection coordinate information in the plurality of edge regions, the corner point corresponding to the image to be corrected is determined.

6. The method of claim 1, wherein, The method further comprises: Respective region areas of the connected domains are determined. Based on the region areas of all the connected domains in the image to be corrected, an average area of all the connected domains is determined. According to the average area, a connected domain with a region area meeting a preset elimination condition is eliminated, and the remaining connected domains are taken as the connected domains of the image to be corrected; the preset elimination condition includes at least one of the following: the region area is greater than a first preset multiple of the average area, the first preset multiple is a multiple greater than 1; and the region area is less than a second preset multiple of the average area, the second preset multiple is a multiple greater than 0 and less than 1.

7. The method of claim 2, wherein, Before the first center point ranked first and the second center point ranked second are added to the edge point set created in advance according to the point order of the center points, the method further comprises: A pixel coordinate system of the image to be corrected is established, and coordinate information of each of the center points is determined; the dot array is located in a target quadrant of the pixel coordinate system; According to the coordinate information of the plurality of center points, a center point closest to a coordinate origin of the pixel coordinate system is determined as a first center point; The dot array is scanned point by point in a preset scanning direction with the first center point as an end point; According to the scanning order of each of the center points, a point order of each of the center points is determined; the point order is positively correlated with the scanning order. In a case where the preset scanning direction is a scanning direction from a coordinate horizontal axis to a coordinate vertical axis, the scanning order of each of the center points is positively correlated with an included angle between the center point and the coordinate horizontal axis; in a case where the preset scanning direction is a scanning direction from the coordinate vertical axis to the coordinate horizontal axis, the scanning order of each of the center points is positively correlated with an included angle between the center point and the coordinate vertical axis; for each of the center points, the included angle between the center point and the coordinate horizontal axis is an included angle between a line connecting the center point and the end point and the coordinate horizontal axis; and the included angle between the center point and the coordinate vertical axis is an included angle between the line connecting the center point and the end point and the coordinate vertical axis.

8. The method of claim 1, wherein, The determining the center position of the connected domain comprises: determining, based on pixel values of the pixel points in the connected domain, a pixel point with the highest pixel value as the center position of the connected domain; or determining, according to a geometric shape of the connected domain, a geometric center as the center position of the connected domain.

9. The method of claim 1, wherein, Before the determining the corner point corresponding to the image to be corrected according to the edge frame generated by connecting the edge points, the method further comprises: mapping the edge points of the dot matrix to a binary image to generate the edge frame on the binary image.

10. A method of correcting an image of an LED display screen, characterized by, comprises: obtaining an LED display screen image to be corrected; correcting the LED display screen image to be corrected by using the image correction method according to any one of claims 1 to 9.

11. An image correction apparatus characterized by comprising: comprises: a marking processing module, configured to perform connected domain marking on an image to be corrected, and determine a plurality of connected domains of the image to be corrected; each of the connected domains is used to indicate a region where a light emitting unit is located in the image to be corrected; a first determining module, configured to determine, for each of the connected domains, a center position of the connected domain; the center position is used to indicate a position where a light emitting unit is located in the connected domain; an edge point positioning module, configured to perform edge point positioning on a dot matrix formed by the center positions of the connected domains, and determine edge points of the dot matrix; a second determining module, configured to determine, according to an edge frame generated by connecting the edge points, a corner point corresponding to the image to be corrected; a first correction processing module, configured to perform correction processing on the image to be corrected according to the corner point; wherein the edge point positioning module comprises: a first processing unit, configured to add a first center point ranked first and a second center point ranked second to a pre-created edge point set according to the point position order of each of the center points; the first center point is a pre-determined edge point; The second processing unit is configured to sequentially select a new center point from the dot matrix to add to the edge point set in the following manner: selecting an nth center point and an mth center point that are newly added from the edge point set, and determining a target center point to be added from the dot matrix; wherein the target center point to be added is sequentially located after the nth center point, n is an integer greater than or equal to 2, m is an integer greater than or equal to 1, and n is greater than m; determining whether the nth center point is an edge point according to the nth center point, the mth center point, and the target center point; if not, removing the nth center point from the edge point set; adding the target center point to the edge point set, and determining a center point sequentially located after the target center point as a new target center point to be added; and sequentially determining whether the nth center point that is newly added to the edge point set is an edge point according to the sequential order of the center points until the newly determined target center point is the first center point. Alternatively, the second determination module comprises: The division unit is configured to divide the edge frame into a plurality of edge regions according to a preset division manner; wherein each edge region includes one intersection point. The scanning unit is configured to: for each edge region, perform scanning processing on the edge region to obtain scanning coordinate information; perform curve fitting processing on the scanning coordinate information to obtain two fitting curves; and determine intersection coordinate information of the two fitting curves. The first determination unit is configured to determine the corner point corresponding to the image to be corrected according to the intersection coordinate information in the plurality of edge regions. Alternatively, the marking processing module comprises: The second determination unit is configured to determine the area of each connected domain. The third determination unit is configured to determine an average area of all connected domains in the image to be corrected based on the area of each connected domain. The removal processing unit is configured to remove a connected domain whose area meets a preset removal condition according to the average area, and take the remaining connected domain as the connected domain of the image to be corrected; the preset removal condition comprises at least one of the following: the area is greater than a first preset multiple of the average area, the first preset multiple is a multiple greater than 1; and the area is less than a second preset multiple of the average area, the second preset multiple is a multiple greater than 0 and less than 1.

12. An image correction apparatus characterized by comprising: The device comprises: a processor; and a memory arranged to store computer executable instructions configured to be executed by the processor, the executable instructions comprising instructions for performing the image correction method according to any one of claims 1-9, or instructions for performing the image correction method of the LED display screen according to claim 10.

13. A storage medium, characterized by The storage medium is configured to store computer executable instructions, which cause a computer to perform the image correction method according to any one of claims 1-9, or the image correction method of the LED display screen according to claim 10.

Citation Information

Patent Citations

  • Correction method for warped document image

    CN108921804A

  • Structured light corner detection method based on center of mass

    CN113409334A