A method for line segment anti-aliasing parameter optimization based on objective image quality evaluation in an airborne display scenario
By dividing the line segment region in the airborne display system and using PSNR quantization evaluation, the anti-aliasing parameters are automatically optimized and determined, solving the real-time and consistency problems of high-precision line segment rendering in the airborne display system, and achieving efficient and stable anti-aliasing effect.
Patent Information
- Application Number
- CN202610754023.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-05-28
- Publication Date
- 2026-08-25
AI Technical Summary
In existing technologies, airborne display systems suffer from high computational load and poor real-time performance when rendering high-precision line segments. The reliance on manual adjustment of anti-aliasing parameters leads to low efficiency and poor consistency, making them unable to meet the rendering requirements of multiple line widths, multiple resolutions, and arbitrary rotation angles.
It employs a method that divides line segment regions based on projection and offset coefficients, combines 16×16 high-precision SSAA oversampling to generate an Alpha reference matrix, and uses peak signal-to-noise ratio (PSNR) quantization evaluation to automatically optimize and determine the optimal anti-aliasing parameters, making it suitable for rendering any type of line segment.
It achieves efficient and automated anti-aliasing parameter optimization, applicable to arbitrary rotation angles and multi-linewidth segments, improving the consistency of rendering effects and system robustness, and meeting the real-time and high-precision requirements of airborne displays.
Smart Images

Figure CN122636760A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of graphics display technology, and more specifically to a method for optimizing line segment anti-aliasing parameters based on objective image quality evaluation in airborne display scenarios. Background Technology
[0002] In airborne display scenarios such as head-up displays (HUDs) and helmet-mounted displays (HMDs), it is necessary to render a large number of high-precision vector line segments in real time. These segments need to be adapted to multiple line widths (up to 20 pixels), various display resolutions, and arbitrary rotation angles to display critical information such as flight parameters, aiming lines, and alarm messages. Such scenarios place extremely high demands on the rendering quality of lines: line edges must be smooth and free of jagged edges, line endpoints must remain rounded, and the rendering effect must be consistent across different line widths. Otherwise, it will affect the pilot's visual interpretation and may even pose flight safety hazards. However, airborne display systems are constrained by limited computing power and stringent real-time requirements, making it impossible to use high-overhead anti-aliasing algorithms.
[0003] While existing anti-aliasing techniques such as Supersampling Anti-aliasing (SSAA) and Multisampling Anti-aliasing (MSAA) can achieve good smoothing effects (for example, SSAA with oversampling of 16 times or more can achieve near-ideal anti-aliasing results), their computational and storage costs are enormous, making them unsuitable for systems with high real-time requirements and computational constraints, such as airborne head-up displays. Post-processing methods like Morphological Anti-aliasing (MLAA) also have high computational demands and are not suitable for airborne real-time scenarios. Furthermore, in current mainstream algorithms, anti-aliasing parameters are manually set, making them unable to adapt to different scenes. The transition width (FW) is typically set to a fixed value by developers through visual tuning, which is time-consuming and inconsistent.
[0004] Related technologies have proposed image processing methods based on line segment edge pixels and coverage. These methods acquire multiple line segments representing the edge contour of the target object, draw the line segments on the original image, extract edge pixels, and smooth the contour according to the coverage of the edge pixels, thus reducing computational load to some extent. However, these methods still have significant drawbacks: First, they are not designed for the characteristics of vector line segments in airborne display scenarios, failing to meet the high-precision line segment rendering requirements of arbitrary angles, small line widths, and rounded endpoints in airborne displays. Second, the anti-aliasing edge transition width parameter relies on manual adjustment, resulting in poor consistency, low adjustment efficiency, and an inability to achieve automatic parameter optimization. Third, they lack objective quantitative evaluation indicators, relying solely on coverage for pixel mixing, making it difficult to achieve the high precision and stability required for airborne displays in terms of anti-aliasing effects.
[0005] Therefore, given the special constraints and high-precision line segment rendering requirements of airborne display scenarios, there is an urgent need for a line segment anti-aliasing parameter optimization method that requires minimal computation, can be automatically optimized, and has quantifiable and controllable effects, in order to meet the stringent requirements of airborne display systems for real-time performance, rendering accuracy, and display consistency. Summary of the Invention
[0006] To address the problems in existing technologies where the transition width parameter (FW) for line segment anti-aliasing is typically set to a fixed value manually by R&D personnel through visual adjustments, resulting in time-consuming, inefficient, highly subjective, and inconsistent performance, and where fixed parameters cannot meet the rendering requirements of line segments with multiple line widths, resolutions, and arbitrary rotation angles in airborne scenarios, this invention provides a method for optimizing line segment anti-aliasing parameters based on objective image quality evaluation in airborne display scenarios. This method automatically optimizes the FW parameters, eliminating the need for manual adjustments and offering high consistency and efficiency. Furthermore, this invention employs a segmented distance calculation method based on projection coefficients, applicable to any type of line segment, with simple algorithm logic, low computational load, and easy implementation in airborne display hardware.
[0007] To achieve the above-mentioned technical objectives, the technical solution adopted by the present invention is as follows:
[0008] A method for optimizing line segment antialiasing parameters based on objective image quality evaluation in airborne display scenarios, the method comprising the following steps:
[0009] S1. Construct a line segment anti-aliasing model suitable for airborne real-time rendering. Define the two vertices of the line segment to be drawn as point A and point B, and set the line width as width. Based on the projection coefficient k of the pixel in the line segment direction and the offset coefficient t in the vertical direction of the line segment, divide the line segment into a side anti-aliasing region and an end anti-aliasing region. Calculate the distance dis from each sampling point to the side edge or the rounded end edge according to the divided region.
[0010] S2 renders the standard test line segment of the airborne display system, using the coverage of the sub-pixel by the line segment as the reference Alpha value of the corresponding pixel, and generates a 16×16 high-precision SSAA supersampling Alpha reference matrix, denoted as GT_Alpha matrix, as the evaluation benchmark for anti-aliasing effect in airborne scenes.
[0011] S3, set the linear scan space for the anti-aliasing edge transition width parameter FW, set the scan range and scan step size, and based on the line segment anti-aliasing model, traverse each set of test parameters FW in the linear scan space. Combined with the distance dis, calculate the test value of each pixel of the line segment to be drawn using the following formula. value:
[0012]
[0013] To generate the corresponding test Alpha matrix Test_Alpha;
[0014] S4. Calculate the Peak Signal-to-Noise Ratio (PSNR), an objective image quality evaluation index, between the Test_Alpha matrix and the GT_Alpha matrix. Complete the quantification score of the anti-aliasing effect for each set of test parameters FW. Select the FW value with the highest PSNR quantification score as the optimal anti-aliasing parameter in the target scene. Solidify the optimal parameter into the airborne display system for subsequent real-time line segment rendering.
[0015] Further, in step S1, the projection coefficient k and the offset coefficient t are respectively:
[0016]
[0017] In the formula, These are the coordinates of point A. These are the coordinates of point B, and width is the line segment width. These are the coordinates of the sampled pixel.
[0018] Furthermore, in step S1, the process of dividing the line segment into an anti-aliasing region on the side of the line segment and an anti-aliasing region at the endpoint of the line segment includes:
[0019] If the linear coefficient corresponding to the pixel position The following conditions must be met: If the pixel belongs to the side anti-aliasing area, it corresponds to the top and bottom sides of the line segment.
[0020] If the linear coefficient corresponding to the pixel position The following conditions must be met: If the pixel belongs to the left starting anti-aliasing region, then the corresponding left endpoint of the line segment;
[0021] If the linear coefficient corresponding to the pixel position The following conditions must be met: If the pixel belongs to the right endpoint anti-aliasing region, it corresponds to the right endpoint of the line segment.
[0022] Further, in step S1, when pixel P is located in the side region of the line segment, the distance dis from the sampling point to the side edge is calculated using the following formula:
[0023] .
[0024] Further, in step S1, when pixel P is located at the left endpoint of the line segment, the distance dis from the sampling point to the edge of the left rounded end is calculated using the following formula:
[0025]
[0026]
[0027] In the formula It is the distance from the sampling point to the left endpoint of the line segment.
[0028] Further, in step S1, when pixel P is located at the right endpoint of the line segment, the distance dis from the sampling point to the edge of the right rounded end is calculated using the following formula:
[0029]
[0030]
[0031] In the formula It is the distance from the sampling point to the right endpoint of the line segment.
[0032] Step S2 further includes:
[0033] For each pixel Divide it into 16×16 sub-pixels, totaling 256 sub-pixels, and use the following formula to locate the center coordinates of the sub-pixels:
[0034]
[0035]
[0036] In the formula, and These are the indices of the sub-pixels in the x and y directions. and These are the corrected x-axis and y-axis coordinates of the sub-pixel;
[0037] The projection parameter s of the sub-pixel on the line segment is calculated using the following formula:
[0038]
[0039] In the formula, and These are the directional components of the line segment along the x-axis and y-axis, respectively. Represents the square of the length of the line segment;
[0040] Iterate through 256 sub-pixels and combine each sub-pixel. The projection parameter s determines the squared distance from the sub-pixel to the nearest point on the line segment:
[0041] when When the distance between a sub-pixel and the nearest point on the line segment is calculated, the following formula is used:
[0042] ;
[0043] When s < 0, the shortest distance from the sub-pixel to the line segment is calculated using the following formula:
[0044] ;
[0045] When s < 0, the shortest distance from the sub-pixel to the line segment is calculated using the following formula:
[0046] ;
[0047] If the square of the distance from the sub-pixel to the nearest point of the line segment is less than If a sub-pixel falls within the coverage area of a line segment, it is marked as a hit; the hit count parameters of all sub-pixels are calculated. ,Will It serves as the coverage of the current pixel and the final reference alpha value.
[0048] Step S3 further includes:
[0049] The error value MSE of the reference matrix GT_Alpha and the test matrix Test_Alpha is calculated pixel by pixel:
[0050]
[0051] In the formula, m and n are the number of rows and columns of the Alpha matrix. It is the Alpha value in the i-th row and j-th column of the reference matrix GT_Alpha. It is the Alpha value in the i-th row and j-th column of the matrix Test_Alpha to be tested;
[0052] The PSNR value is calculated using the following formula:
[0053] .
[0054] Furthermore, in step S4, the scanning step size is 0.05.
[0055] Compared with the prior art, the beneficial effects of the present invention are as follows:
[0056] First, the line segment anti-aliasing parameter optimization method based on objective image quality evaluation in airborne display scenarios of the present invention can achieve anti-aliasing processing of line segments with arbitrary slope and arbitrary rotation angle. The line segment edges are smooth and natural, the endpoints are rounded and regular, the display effect is excellent, the application range is wide, and the practicality is strong.
[0057] Secondly, the line segment anti-aliasing parameter optimization method based on objective image quality evaluation in airborne display scenarios of the present invention effectively solves the technical problems of existing technologies where anti-aliasing transition width (FW) relies on manual parameter adjustment, is time-consuming and labor-intensive, and has poor effect consistency by replacing traditional manual visual adjustment with automated parameter optimization, thus significantly improving the efficiency of parameter determination and rendering stability.
[0058] Third, the line segment anti-aliasing parameter optimization method based on objective image quality evaluation in the airborne display scenario of the present invention introduces the PSNR objective quantitative evaluation index to achieve measurable, reproducible and comparable anti-aliasing effect. It is especially suitable for scenarios with stringent requirements for display reliability and consistency, such as airborne head-up displays and helmet displays. The system is more robust and safer. Attached Figure Description
[0059] Figure 1 This is a schematic diagram illustrating the distribution principle of the anti-aliasing drawing area for line segments according to an embodiment of the present invention.
[0060] Figure 2 This is a flowchart of the line segment anti-aliasing parameter optimization based on objective image quality evaluation, according to an embodiment of the present invention.
[0061] Figure 3 This is a diagram illustrating the anti-aliasing effect of line segments in an embodiment of the present invention.
[0062] Figure 4 This is a graph showing the optimization process of anti-aliasing parameters for line segments with different slopes in the objective image quality evaluation of this invention.
[0063] Figure 5 This is a diagram illustrating the anti-aliasing effect of the line segment with the optimal transition width using an embodiment of the present invention.
[0064] Figure 6 The anti-aliasing effect diagrams for manually setting the transition width are shown, where (a) corresponds to a line segment diagram with obvious jagged edges, and (b) corresponds to a line segment diagram with a blurred effect. Detailed Implementation
[0065] The embodiments of the present invention will be described in further detail below with reference to the accompanying drawings.
[0066] This invention discloses a method for optimizing line segment anti-aliasing parameters based on objective image quality evaluation in airborne display scenarios. A vector method is used to perform anti-aliasing operations on line segments by region, setting the anti-aliasing edge transition width parameter FW. Through the supersampling SSAA algorithm, a high-precision Alpha reference matrix is generated for the target line segment. A scanning space is constructed using the anti-aliasing core edge transition width parameter FW, and a traversal scan is performed to achieve PSNR objective image quality scoring, closed-loop selection of the optimal parameters is obtained. This invention solves the defect in existing technologies where the anti-aliasing effect of line segments is not obvious to the naked eye, provides reliable quantitative indicators, approximates physically realistic line segment drawing, can achieve fully automatic optimization to find suitable anti-aliasing parameters, and provides good anti-aliasing display effect. The method for optimizing line segment anti-aliasing parameters based on objective image quality evaluation in airborne display scenarios includes the following steps:
[0067] S1. Construct a line segment anti-aliasing model suitable for airborne real-time rendering. Define the two vertices of the line segment to be drawn as point A and point B, and set the line width as width. Based on the projection coefficient k of the pixel in the line segment direction and the offset coefficient t in the vertical direction of the line segment, divide the line segment into a side anti-aliasing region and an end anti-aliasing region. Calculate the distance dis from each sampling point to the side edge or the rounded end edge according to the divided region.
[0068] S2 renders the standard test line segment of the airborne display system, using the coverage of the sub-pixel by the line segment as the reference Alpha value of the corresponding pixel, and generates a 16×16 high-precision SSAA supersampling Alpha reference matrix, denoted as GT_Alpha matrix, as the evaluation benchmark for anti-aliasing effect in airborne scenes.
[0069] S3, set the linear scan space for the anti-aliasing edge transition width parameter FW, set the scan range and scan step size, and based on the line segment anti-aliasing model, traverse each set of test parameters FW in the linear scan space. Combined with the distance dis, calculate the test value of each pixel of the line segment to be drawn using the following formula. value:
[0070]
[0071] To generate the corresponding test Alpha matrix Test_Alpha;
[0072] S4. Calculate the Peak Signal-to-Noise Ratio (PSNR), an objective image quality evaluation index, between the Test_Alpha matrix and the GT_Alpha matrix. Complete the quantification score of the anti-aliasing effect for each set of test parameters FW. Select the FW value with the highest PSNR quantification score as the optimal anti-aliasing parameter in the target scene. Solidify the optimal parameter into the airborne display system for subsequent real-time line segment rendering.
[0073] Figure 1 Draw a schematic diagram for the region division of the line segment. First, use the linear combination coefficients k and t corresponding to the following formula:
[0074]
[0075] In the formula, These are the coordinates of point A. These are the coordinates of point B, and width is the line segment width. These are the coordinates of the sampled pixel.
[0076] Secondly, through linear coefficients The size divides the anti-aliased portion of the line segment into three drawing areas:
[0077] If the linear coefficient corresponding to the pixel position The following conditions must be met: If the pixel belongs to the side anti-aliasing region, corresponding to the top and bottom edges of the line segment; if the linear coefficient corresponding to the pixel position... The following conditions must be met: If the pixel belongs to the left-starting anti-aliasing region, then the corresponding left endpoint of the line segment; if the linear coefficient corresponding to the pixel position... The following conditions must be met: If the pixel belongs to the right endpoint anti-aliasing region, it corresponds to the right endpoint of the line segment.
[0078] Next, when pixel P is located in the side region of the line segment, the distance value is calculated using the following formula. :
[0079] ;
[0080] When pixel P is located at the left endpoint of the line segment, the distance value is calculated using the following formula. and :
[0081] ;
[0082] ;
[0083] In the formula It is the distance from the sampling point to the left endpoint of the line segment. It is the distance from the sampling point to the edge of the round head.
[0084] When pixel P is located at the right endpoint of the line segment, the distance value is calculated using the following formula. and :
[0085] ;
[0086] ;
[0087] In the formula It is the distance from the sampling point to the right endpoint of the line segment. It is the distance from the sampling point to the edge of the round head.
[0088] Finally, the transparency Alpha is calculated based on the distance values Dis, Dis2, and Dis4.
[0089] Step S3 involves performing 16×16 SSAA oversampling on the line segment to generate a high-precision Alpha matrix, denoted as GT_Alpha matrix. This includes the following steps:
[0090] Each pixel is divided into 256 sub-pixels of 16×16. The transparency value (Alpha) of the line segment is calculated by determining whether the sub-pixel is covered by the line segment and calculating the coverage rate.
[0091] The geometric information of the line segment is pre-calculated using the following formula:
[0092]
[0093] In the formula It's the squared value, which can be pre-calculated. Calculating the alpha value for each sampled pixel requires iterating through all sub-pixels using a nested loop. and These are the pixel indices in the x and y directions, allowing you to iterate through the sampled pixels. All 256 sub-pixels.
[0094] The following formula is used to locate the center coordinates of a sub-pixel:
[0095]
[0096]
[0097] In the formula, and These are the indices of the sub-pixels in the x and y directions. and These are the corrected x-axis and y-axis coordinates of the sub-pixel.
[0098] To obtain the precise center coordinates of the pixel, the original sampled pixel points... Make corrections, and become To avoid placing the pixel at the top left corner, it should be moved to the center of the pixel. Further, the projection parameter s of the sub-pixel on the line segment is calculated using the following formula:
[0099]
[0100] Based on the range of s, the pixel point can be determined. Distance to the nearest point on the line segment, when When the closest point on a line segment is the projected point, the distance is calculated using the following formula. :
[0101]
[0102] If the shortest distance from a subpixel to a line segment Smaller than the line segment width The square of the value is used to determine if a sub-pixel falls within the line segment's coverage area; if so, a hit is determined, and a hit count parameter is set. After traversing all 256 sub-pixels, It refers to the coverage of the current pixel, which is used as the final alpha value. When When the nearest point is the end point and the starting point, the distance is calculated directly using the point-to-point distance formula, and the value of Alpha is calculated in the same way.
[0103] The GT_Alpha high-precision matrix is a 600×800 two-dimensional matrix with values ranging from 0 to 1, numerically equal to the coverage of 256 pixels occupied by the covered sub-pixels. The test matrix Test_Alpha is the Alpha channel matrix extracted using existing anti-aliasing algorithms based on the undetermined transition width FW, and is also a 600×800 two-dimensional matrix.
[0104] Define a linear scan space that includes the value of the transition width FW of the parameter to be measured.
[0105]
[0106] In the formula, FW increases from 0.5 to 2.5, with each increment being 0.05, to calculate the matrix Test_Alpha to be tested.
[0107] Based on different transition widths (FW), the mean square error (MSE) between the reference matrix GT_Alpha and the test matrix Test_Alpha is calculated pixel-by-pixel. MSE is the mean square error, representing the average of the squared differences between the alpha values of each pixel in the reference and test matrices. The MSE is calculated using the following formula:
[0108]
[0109] In the formula, m and n are the number of rows and columns of the Alpha matrix. It is the Alpha value in the i-th row and j-th column of the reference matrix GT_Alpha. It is the Alpha value in the i-th row and j-th column of the matrix Test_Alpha to be tested.
[0110] The PSNR value is then further calculated using the following formula based on MSE:
[0111]
[0112] MSE values are usually quite small. Here, we take the number and then calculate the logarithm to get an objective and clear score.
[0113] Traverse the transition width FW, construct a parameter sequence, and map and score each value in the sequence with a step size of 0.05. Select the optimal value using the following formula:
[0114]
[0115] Take Pi The optimal FW is used as the appropriate transition width.
[0116] This example sets up a set of line segments with different slopes, and uses the line segment anti-aliasing parameter optimization method to determine the optimal transition width. Figure 3 The generated line segment anti-aliasing effect is shown in the image, which shows that the effect is good and the endpoints are smooth. Figure 4 The curves for optimizing anti-aliasing parameters using line segments with different slopes show that the optimal transition parameters are 1 or 0.95. Figure 5 This is a diagram illustrating the anti-aliasing effect of the line segment with the optimal transition width using an embodiment of the present invention. Figure 6 The anti-aliasing effect diagrams for manually setting the transition width are shown, where (a) corresponds to a line segment diagram with obvious jagged edges, and (b) corresponds to a line segment diagram with a blurred effect.
[0117] Although preferred embodiments of this application have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of this application.
[0118] Obviously, those skilled in the art can make various modifications and variations to this application without departing from the spirit and scope of this application. Therefore, if such modifications and variations fall within the scope of the claims of this application and their equivalents, this application also intends to include such modifications and variations.
Claims
1. A method for optimizing line segment anti-aliasing parameters based on objective image quality evaluation in airborne display scenarios, characterized in that, The method includes the following steps: S1. Construct a line segment anti-aliasing model suitable for airborne real-time rendering. Define the two vertices of the line segment to be drawn as point A and point B, and set the line width as width. Based on the projection coefficient k of the pixel in the line segment direction and the offset coefficient t in the vertical direction of the line segment, divide the line segment into a side anti-aliasing region and an end anti-aliasing region. Calculate the distance dis from each sampling point to the side edge or the rounded end edge according to the divided region. S2 renders the standard test line segment of the airborne display system, using the coverage of the sub-pixel by the line segment as the reference Alpha value of the corresponding pixel, and generates a 16×16 high-precision SSAA supersampling Alpha reference matrix, denoted as GT_Alpha matrix, as the evaluation benchmark for anti-aliasing effect in airborne scenes. S3, set the linear scan space for the anti-aliasing edge transition width parameter FW, set the scan range and scan step size, and based on the line segment anti-aliasing model, traverse each set of test parameters FW in the linear scan space. Combined with the distance dis, calculate the test value of each pixel of the line segment to be drawn using the following formula. value: To generate the corresponding test Alpha matrix Test_Alpha; S4. Calculate the Peak Signal-to-Noise Ratio (PSNR), an objective image quality evaluation index, between the Test_Alpha matrix and the GT_Alpha matrix. Complete the quantification score of the anti-aliasing effect for each set of test parameters FW. Select the FW value with the highest PSNR quantification score as the optimal anti-aliasing parameter in the target scene. Solidify the optimal parameter into the airborne display system for subsequent real-time line segment rendering.
2. The method for optimizing line segment anti-aliasing parameters based on objective image quality evaluation in airborne display scenarios according to claim 1, characterized in that, In step S1, the projection coefficient k and the offset coefficient t are respectively: In the formula, These are the coordinates of point A. These are the coordinates of point B, and width is the line segment width. These are the coordinates of the sampled pixel.
3. The method for optimizing line segment anti-aliasing parameters based on objective image quality evaluation in airborne display scenarios according to claim 1, characterized in that, Step S1, the process of dividing the line segment into the anti-aliasing region on the side of the line segment and the anti-aliasing region at the endpoint of the line segment, includes: If the linear coefficient corresponding to the pixel position The following conditions must be met: If the pixel belongs to the side anti-aliasing area, it corresponds to the top and bottom sides of the line segment. If the linear coefficient corresponding to the pixel position The following conditions must be met: If the pixel belongs to the left starting anti-aliasing region, then the corresponding left endpoint of the line segment; If the linear coefficient corresponding to the pixel position The following conditions must be met: If the pixel belongs to the right endpoint anti-aliasing region, it corresponds to the right endpoint of the line segment.
4. The method for optimizing line segment anti-aliasing parameters based on objective image quality evaluation in airborne display scenarios according to claim 1, characterized in that, In step S1, when pixel P is located in the side region of the line segment, the distance dis from the sampling point to the side edge is calculated using the following formula: 。 5. The method for optimizing line segment anti-aliasing parameters based on objective image quality evaluation in airborne display scenarios according to claim 1, characterized in that, In step S1, when pixel P is located at the left endpoint of the line segment, the distance dis from the sampling point to the edge of the left rounded end is calculated using the following formula: In the formula It is the distance from the sampling point to the left endpoint of the line segment.
6. The method for optimizing line segment anti-aliasing parameters based on objective image quality evaluation in airborne display scenarios according to claim 1, characterized in that, In step S1, when pixel P is located at the right endpoint of the line segment, the distance dis from the sampling point to the edge of the right rounded end is calculated using the following formula: In the formula It is the distance from the sampling point to the right endpoint of the line segment.
7. The method for optimizing line segment anti-aliasing parameters based on objective image quality evaluation in airborne display scenarios according to claim 1, characterized in that, Step S2 further includes: For each pixel Divide it into 16×16 sub-pixels, totaling 256 sub-pixels, and use the following formula to locate the center coordinates of the sub-pixels: In the formula, and These are the indices of the sub-pixels in the x and y directions. and These are the corrected x-axis and y-axis coordinates of the sub-pixel; The projection parameter s of the sub-pixel on the line segment is calculated using the following formula: In the formula, and These are the directional components of the line segment along the x-axis and y-axis, respectively. Represents the square of the length of the line segment; Iterate through 256 sub-pixels and combine each sub-pixel. The projection parameter s determines the squared distance from the sub-pixel to the nearest point on the line segment: when When the distance between a sub-pixel and the nearest point on the line segment is calculated, the following formula is used: ; When s < 0, the shortest distance from the sub-pixel to the line segment is calculated using the following formula: ; When s < 0, the shortest distance from the sub-pixel to the line segment is calculated using the following formula: ; If the square of the distance from the sub-pixel to the nearest point of the line segment is less than If a sub-pixel falls within the coverage area of a line segment, it is marked as a hit; the hit count parameters of all sub-pixels are calculated. ,Will It serves as the coverage of the current pixel and the final reference alpha value.
8. The method for optimizing line segment anti-aliasing parameters based on objective image quality evaluation in airborne display scenarios according to claim 1, characterized in that, Step S3 further includes: The error value MSE of the reference matrix GT_Alpha and the test matrix Test_Alpha is calculated pixel by pixel: In the formula, m and n are the number of rows and columns of the Alpha matrix. It is the Alpha value in the i-th row and j-th column of the reference matrix GT_Alpha. It is the Alpha value in the i-th row and j-th column of the matrix Test_Alpha to be tested; The PSNR value is calculated using the following formula: 。 9. The method for optimizing line segment anti-aliasing parameters based on objective image quality evaluation in airborne display scenarios according to claim 1, characterized in that, In step S4, the scanning step size is 0.05.