A method for automatically acquiring and smoothing the edge of a special-shaped screen

By automatically acquiring and smoothing the edges of the special-shaped screen, the problem of jagged rectangular pixels in curve display is solved, achieving fast and unified processing of the edges of the special-shaped screen, and improving the display effect.

CN118351018BActive Publication Date: 2024-10-29SHENG MICROELECTRONICS (SUZHOU) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410773070.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-17
Publication Date
2024-10-29
Estimated Expiration
2044-06-17

AI Technical Summary

Technical Problem

When the special-shaped screen expresses curves, the corners of the rectangular pixels have a jagged effect, resulting in poor display effects. Different screen specifications require specific processing, resulting in a lot of duplication of work.

Method used

By inputting the binary image of PixelMap, connected domain marking, axis-aligned bounding box construction, area classification, curve extraction and curve smoothing are performed to automatically obtain and smooth the edge curve of the special-shaped screen.

Benefits of technology

It achieves fast and automatic acquisition and processing of special-shaped screen edge curves, reduces the impact of aliasing, and improves the uniformity and efficiency of the display effect.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118351018B_ABST
    Figure CN118351018B_ABST
Patent Text Reader

Abstract

The present invention discloses a method for automatically acquiring and smoothing the edge of a special-shaped screen. The input is a binary image of PixelMap, and the output is a plurality of regions containing curved edges and pixel-level fitting values ​​of the curves in the regions. The steps of the present invention are as follows: first, the input image is marked with a connected domain to find the connected domain containing the curve, then axis-aligned bounding boxes are constructed for each connected domain, and after the boundary box of each curved region is obtained, the curved regions are classified according to the area ratio and the width and height of the region, and then the edge curves are extracted from the classified regions, and finally the edge curves are smoothed and output.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of image display processing, and in particular to a method for automatically acquiring and smoothing the edge of a special-shaped screen. Background Art

[0002] The special-shaped screen is a new display technology. Its screen shape is different from the traditional rectangular screen. The traditional display screen is generally rectangular, while the special-shaped screen can be designed into various non-traditional shapes according to the needs, such as arc, circle, wave, etc. This change in the screen shape makes the display more flexible and diverse in design and application. It can not only break the limitations of the traditional rectangular screen and provide a wider field of view, but also better adapt to the needs of some special occasions. It can also be freely combined according to the space requirements to create a more outstanding visual effect. At the same time, the non-traditional shape of the special-shaped screen can also give product designers more creative space, making the product more creative and personalized.

[0003] Since the pixels that make up the display screen can be physically viewed as a series of rectangular tiles, the effect is better when representing horizontal and vertical edges, but when representing curves, the jagged effect will be unsatisfactory due to the jagged edges of the rectangles. The screen edges of handheld devices such as mobile phones and watches will introduce curved edges in the form of chamfers, bangs, and holes for reasons such as aesthetics, comfort, and camera requirements. When the rectangular pixels represent these curves, the jagged edges mentioned above will appear on the edges, affecting the display effect. In order to solve this problem, the edge display needs to be processed to reduce the jagged edges, but since the specifications of the screens vary greatly, different screens require specific processing, which results in a lot of duplication of work.

[0004] To this end, the present invention proposes a method for automatically acquiring and smoothing the edge of a special-shaped screen, so as to quickly and automatically acquire the curve contour of the edge of the screen and return the smoothed result. Summary of the invention

[0005] The present invention proposes a method for automatically acquiring and smoothing the edge of a special-shaped screen, comprising the following steps:

[0006] Step 1: Input the binary image of PixelMap;

[0007] Step 2: Mark the connected domain and construct the axis-aligned bounding box;

[0008] Step 3: Regional classification;

[0009] Step 4: Curve extraction;

[0010] Step 5: Smooth the curve;

[0011] Step 6: Output the results;

[0012] The unit of PixelMap in step 1 is pixel. When a pixel is lit, the grayscale value of the pixel is 1 or 255. Otherwise, when the pixel position is not lit, the grayscale value of the pixel is 0.

[0013] In step 2, the connected domain in the image refers to the area composed of pixels with the same pixel value and adjacent positions; the connected domain marking algorithm refers to the process of marking all connected domains in the image with different symbols; the connectivity relationship is any one of the four-neighborhood, D-neighborhood or eight-neighborhood.

[0014] Furthermore, in the step 2, the connected domain marking uses four neighborhoods to divide the pixel area, that is, a pixel is judged to be connected if it has the same value in the four positions of up, down, left and right; because the curve in the PixelMap appears at the junction of grayscale 0 value and non-zero value, all the curves are found and separated by finding all the junction areas; among them, the area with grayscale 0 value is significantly less than the area with grayscale non-zero value, so for convenience, the area with grayscale 0 value in the PixelMap is selected for connected domain marking, and each unlit area is distinguished in sequence using digital labels 1, 2, 3...t, t is a natural number; the digital label of the grayscale non-zero value area is defined as 0, and the connected domain represented by each digital label is constructed into an axis-aligned bounding box, so that a number of axis-aligned bounding boxes are obtained.

[0015] Furthermore, the specific method of the axis-aligned bounding box is to use a rectangular area with four sides that are vertical or horizontal to just wrap all the same non-zero digital labels, and in order to store it into a matrix or a multi-dimensional array, the boundary characteristics of the axis-aligned bounding box are used to quickly determine the curve properties and quickly extract the curve values, and the rectangle is the minimum envelope rectangle of the unlit area;

[0016] The axis-aligned bounding box of each label in the step three represents the shape of an edge curve, and the region is classified by the shape: first, the left and right sides of the bounding box area are judged. If there is only one curved edge on the left and right sides, it is judged as a chamfer. When there is a curved edge on each of the left and right sides, it is judged as a non-chamfer. The non-chamfer includes bangs, holes or runways, that is, it is only necessary to judge whether the leftmost column and the rightmost column contain two values. If they contain two values, the edge is a curved edge. If they only contain one value, the edge is a straight edge.

[0017] Furthermore, the matching condition for the circular hole is that the area of ​​the label region is π / 4 of the total area of ​​the bounding box, and the upper and lower parts and the left and right parts of the curve are symmetrical; the matching condition for the bangs is that the ratio of the width and height of the bounding box area is high, the left and right curves are symmetrical, and the derivative decreases first and then increases.

[0018] Furthermore, when extracting the curve in step 4, it is determined whether the left and right sides are curve edges according to the judgment rule of the curve edge in step 3. If they are curve edges, start from the number column on this side and extract them in order from top to bottom. First, the values ​​in the entire number column are counted, and the value that appears most times in the number column is called the curve edge majority value, which is used as the reference value for comparison counting. If the number of occurrences of two values ​​in the number column is equal, a non-zero value is used as the reference value. Then, each row is counted from this side to the other side. When a value that is the same as the curve edge majority value appears, the count is increased by one. When the value that appears is different from the curve edge majority value, the counting is stopped. The accumulated counting result is saved and cleared to zero, and then the next row is counted. After completing the entire counting process, a set of saved count values ​​is obtained, and this array is the extracted discrete value of the curve.

[0019] Furthermore, the step five adopts a sliding average approach to smooth the curve, which is to traverse a sliding window with a maximum length of N from the first element to the last element of the array, and the result is the average of the sum of the elements in the sliding window during the traversal.

[0020] Furthermore, in step five, selecting some points from the discrete curve for curve fitting or interpolation to smooth the curve requires first selecting a curve function for fitting or selecting multiple curves for segmented interpolation.

[0021] Furthermore, when the fitted curve passes through an area without pixels on the boundary, the brightness of the non-existent pixels cannot be adjusted to smooth the boundary. Therefore, after smoothing, it is necessary to check with PixelMap and record the maximum value of the curve from the pixel boundary in the horizontal direction. Then the entire curve is translated in the opposite direction to this value so that the entire curve is within the displayable pixel range. Although the pixels at the boundary can be lit, there may be missing sub-pixels, etc. For insurance purposes, it can be set to translate one or more pixels additionally on this basis.

[0022] Furthermore, the step 6 returns the same number of results as the connected domain, and the result content is the coordinates and width and height of the expanded region, and the processed discrete value of the curve;

[0023] The specific use of the curve discrete value can be to first locate the new boundary pixel through the integer part of the floating-point value in the curve discrete value, and the brightness of the boundary pixel is related to the decimal part of the floating-point value. For example, simply converting the brightness of the boundary pixel to the original value and multiplying it by the decimal part can obtain a better visual effect.

[0024] Using these returned results to apply to the display can get a smooth display effect. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] Figure 1 Shown is a flow chart of the method of the present invention;

[0026] Figure 2 Shown is a typical PixelMap schematic diagram of the present invention;

[0027] Figure 3 Shown is a schematic diagram of four neighborhoods of the present invention;

[0028] Figure 4 Shown is a partial schematic diagram of PixelMap of the present invention;

[0029] Figure 5 The figure shows a schematic diagram of a local example of PixelMap of the present invention after connected domain labeling processing;

[0030] Figure 6 The figure shows a schematic diagram of the digital label of the present invention after constructing an axis-aligned bounding box;

[0031] Figure 7 It is a schematic diagram showing the classification of regions into chamfers and non-chamfers according to the present invention;

[0032] Figure 8 It is a schematic diagram showing the distinction between straight line edges and curved line edges of the present invention;

[0033] Fig. 9 The figure shows a data sample schematic diagram of extracting a curve from top to bottom of the present invention;

[0034] Fig.10 It is a schematic diagram showing the comparison of data before and after the sliding average of the present invention;

[0035] Fig.11 Shown is a schematic diagram of data comparison before and after polynomial fitting of the present invention;

[0036] Fig.12 The figure shows the result of selecting four points of cubic spline interpolation of the present invention;

[0037] Fig.13 Shown is a schematic diagram of a portion of the present invention that requires additional processing;

[0038] Fig.14 Shown is a schematic diagram of the simulation diagram before and after smoothing of the present invention. DETAILED DESCRIPTION

[0039] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0040] See also Figure 1The present invention proposes a method for automatically acquiring and smoothing the edge of a special-shaped screen, comprising the following steps:

[0041] Step 1: Input the binary image of PixelMap;

[0042] Step 2: Mark the connected domain and construct the axis-aligned bounding box;

[0043] Step 3: Regional classification;

[0044] Step 4: Curve extraction;

[0045] Step 5: Smooth the curve;

[0046] Step 6: Output the results;

[0047] See also Figure 2 , enter PixelMap.

[0048] The unit of PixelMap is pixel. When a pixel can be lit, the value of the pixel is 255 or 1. Conversely, when the pixel position cannot be lit, the value of the pixel is 0. Figure 2 Here are some typical PixelMap examples.

[0049] See also Figure 3 , connected domain marking, constructing axis-aligned bounding boxes.

[0050] A connected region in an image is a region composed of pixels with the same pixel value and adjacent positions. The connected region marking algorithm refers to the process of marking all connected regions in an image with different symbols. Common connectivity relationships are generally divided into three types: four-neighborhood, D-neighborhood, and eight-neighborhood. In our scenario, we only need to use four-neighborhood to divide the pixel region. The so-called four-neighborhood means that a pixel is considered connected if it has the same value in the four positions above, below, left, and right. Figure 3 shown.

[0051] The pixel area is divided using four neighborhoods, that is, a pixel is considered connected if it has the same value in the four positions above, below, left and right. Since the curves in PixelMap appear at the junction of grayscale 0 and non-zero values, all the curves are found and separated by finding all the junction areas. Among them, the number of grayscale 0 areas is significantly less than that of grayscale non-zero areas, such as Figure 4 shown.

[0052] Therefore, for convenience, we choose to mark the connected domains in the PixelMap with grayscale values ​​of 0, and each unlit area is distinguished by digital labels 1, 2, 3, ..., t in sequence, such as Figure 5As shown: the unlit areas are separated by digital labels. This is an example that reduces the real data by many times. The actual PixelMap size will be much larger. Define the digital label of the grayscale non-zero value area as 0, and construct an axis-aligned bounding box for the connected domain represented by each digital label, so that several axis-aligned bounding boxes are obtained.

[0053] The specific method is to use a rectangular area with four vertical or horizontal sides to just wrap each identical non-zero digital label, and obtain several copies such as Figure 6 The result is shown. This step is to facilitate storage into a matrix or multi-dimensional array on the one hand, and to use the boundary characteristics of the bounding box to quickly determine the properties of the curve and quickly extract the curve value on the other hand;

[0054] See also Figure 7 , regional classification.

[0055] The bounding box area of ​​each label represents the shape of an edge curve, and classification by shape can be better processed. First, we judge the left and right sides of the bounding box area. If there is only one curved edge on the left and right sides, it is judged as a chamfer. If there is a curved edge on each side, it is judged as a non-chamfer such as a fringe, a hole, or a runway.

[0056] The specific judgment method is also relatively intuitive. It only needs to determine whether the leftmost column and the rightmost column contain two values. If they contain two values, the edge is a curved edge. If they only contain one value, the edge is a straight edge. Figure 8 An example of distinguishing between straight edges and curved edges is shown, with boxes A and D being straight edges and boxes B, C, E, and F being curved edges.

[0057] There are also some specific areas that can be found based on their features to further optimize speed and effect, such as round holes and bangs. These two are easy to identify and the effect will be better than using general curve fitting visual effects.

[0058] The matching conditions for circular holes are that the area of ​​the label region is approximately π / 4 of the total area of ​​the bounding box, and the upper and lower parts of the curve are symmetrical with the left and right parts. The matching conditions for bangs are that the ratio of the width and height of the bounding box area is high, the left and right curves are symmetrical, and the derivative decreases first and then increases.

[0059] For curves that already have fixed templates, such as circles and bangs, you can skip curve extraction and directly determine the curve based on some numerical features in the area. For example, for a circle, the radius can be determined by the size of the area and then substituted into the circle equation to get the curve. For bangs, the radius of two quarter circles can be determined by the position of the derivative change and substituted into the preset equation to get the curve. If the fixed template result can divide the 0 value and non-zero value in the area into several parts, and only one of them has a non-zero value, it means that the curve has met the requirements and no general curve extraction is needed. If it contains multiple parts with non-zero values, it means that the template matching effect is not good and general curve extraction is still needed.

[0060] See also Fig. 9 , curve extraction.

[0061] When extracting, you only need to pay attention to the curve edges on the left and right sides. Starting from the curve edge, first count the values ​​on the entire curve edge. The value that appears more times on the curve edge is called the curve edge majority value as the reference value for comparison counting (if the number of occurrences of two values ​​on the curve edge is equal, use a non-zero value as the reference value). Count each row in the horizontal opposite direction of the curve edge. When the value is the same as the curve edge majority value, the count is increased by one. When the two values ​​are different, stop counting, save the counting result and clear it to zero, and then count the next row. After completing the entire counting process, a set of saved count values ​​is obtained, and this array is the extracted discrete value of the curve.

[0062] by Fig. 9 Take the example, first determine whether the left and right sides are curved edges, because the left side is all 1 and is not a curved edge, and the right side has a 0 value and a non-zero value, which is a curved edge. Extract the right curved edge from top to bottom. First, most of the values ​​in the curved edge are 0. The first value from the right side of the top row is 1, which is different from the majority value and stops counting. The count value is 0; the second row starts from the fifth number and is different from the majority value 0. The count value is the same 4 0s as before, recorded as 4, and so on. The final curve extraction result is [0, 4, 6, 8, 9, 11, 12, 12, 13, 13, 13].

[0063] See also Fig.10 , the curve is smooth.

[0064] In one embodiment, a sliding average is used, which is similar to a convolution operation on one-dimensional data. In another embodiment, some points are selected from a discrete curve for curve fitting or interpolation. Commonly used curves include polynomials, exponential functions, cubic splines, etc., which can be selected according to actual needs.

[0065] The sliding average is done by traversing a sliding window with a maximum length of N from the first element to the last element of the array, and the result is the mean of the sum of the elements in the sliding window during the traversal.

[0066] by Fig. 9 Taking the curve data as an example, if [0, 4, 6, 8, 9, 11, 12, 12, 13, 13, 13] is used as the sliding average and the maximum sliding window length is limited to 5, the calculation is [0 / 1, (0+4+6) / 3, (0+4+6+8+9) / 5, (4+6+8+9+11) / 5, (6+8+9+11+12) / 5, (8+9+11+12+12) / 5, (9+11+12+12+13) / 5, (11+12+12+13+13) / 5, (12+12+13+13+13) / 5, (13+13+13) / 3, 13 / 1], and the final result is [0.0, 3.3, 5.4, 7.6, 9.2, 10.4, 11.4,12.2, 12.6, 13.0, 13.0]. By drawing a line graph, we can see that the result is smoother than before, see Fig.10 Comparison of data before and after sliding average.

[0067] Another way to fit or interpolate is to first select a curve function to fit or select multiple curves to interpolate in sections. The specific method is as follows: the sequence number of the curve data can be used as the x-coordinate of the curve, and the original curve data as the y-coordinate. Fig. 9 Taking the curve data as an example, [0, 4, 6, 8, 9, 11, 12, 12, 13, 13, 13] is processed into [(0,0), (1,4), (2,6), (3,8), (4,9), (5,11), (6,12), (7,12)].

[0068] If a cubic polynomial is fitted to the data, the result is y = 0.009324x 3 - 0.3042x 2 + 3.386x+ 0.3357, the fitting curve is compared with the smoothed curve. Fig.11 shown.

[0069] When interpolating, all points cannot be interpolated at the same time, because when the interval is short, these points are not smooth and the interpolation result is not good. It is necessary to interpolate every few points and make the interval larger to make the interpolation result smooth. Fig.12 The result of interpolation is obtained by selecting four points.

[0070] Whether it is sliding average, curve fitting or interpolation, there will be a possible problem in the end, that is, the fitted curve may pass through an area without pixels on the boundary. At this time, the brightness of the non-existent pixels cannot be adjusted to smooth the boundary. Therefore, after smoothing, it is necessary to check with PixelMap and record the maximum value of the curve from the pixel boundary in the horizontal direction. Then the entire curve is translated in the opposite direction to this value so that the entire curve is within the displayable pixel range. Although the pixels at the boundary can be lit, there may be missing sub-pixels. For insurance purposes, one or more pixels can be additionally translated on this basis.

[0071] In addition, the curve we obtained actually stops at the edge of the boundary, and there is a row or column of pixels close to the edge that are not processed. For details, please refer to Fig.13 , we are now dealing with the curve There is still a row or column at the edge that has not been processed, that is Fig.13 superior Extension Additional processing is required. In addition, the curve is translated to ensure that it is within the display range. The actual width is the number of translation pixels plus one. At this time, the curve area needs to be expanded to ensure that all boundary pixels are processed.

[0072] Considering the effect and efficiency, the recommended processing method is to use the smoothed discrete curve value to perform derivative interpolation to supplement this area. If the smoothed discrete curve value is [V1, V2, V3…, V n ], and the horizontal translation is X pixels, then m values ​​need to be added to the discrete curve value series so that the new discrete curve value becomes [V1, V2, V3…, V n ,V n+1 ,…,V n+m ], where V n +X+1 = V n+m .

[0073] The specific derivative interpolation method is to start from V n Search forward in order for unequal values ​​up to and including V n There are 4 values ​​in total [V n-c ,V n-b ,V n-a ,V n ] Calculate the approximate values ​​of the derivatives of these four values ​​d0, d1, d2, and the approximate value of the second-order derivative and From this, V is estimated by linear interpolation. n and V n+1 The second derivative approximation between . Determine [V n+1 ,…,V n+m ] value, the discrete curve can be made at V n and V n+1 The close second-order derivative continuity makes the connection smoother.

[0074]

[0075] From this we can deduce And so on and so forth until , and when near Stop, and determine whether it is close or not. You can set a threshold, such as 0.1 pixels.

[0076] At this point, the area of ​​the curve is X pixels horizontally and m pixels vertically on the basis of the axis-aligned bounding box constructed by the digital label. The discrete value of the curve is [V1, V2, V3…, V n ,V n+1 ,…,V n+m ];

[0077] See also Fig.14 , the result is output.

[0078] Returns the same number of results as the connected domain. The results are the coordinates, width and height of the expanded region, as well as the discrete values ​​of the processed curve.

[0079] The specific use of the curve discrete value can be to first locate the new boundary pixel through the integer part of the floating-point value in the curve discrete value, and the brightness of the boundary pixel is related to the decimal part of the floating-point value. For example, simply converting the brightness of the boundary pixel to the original value and multiplying it by the decimal part can obtain a better visual effect.

[0080] Using these returned results to apply to the display can get a smooth display effect.

[0081] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device.

[0082] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is limited by the appended claims and their equivalents.

Claims

1. A method for automatically acquiring and smoothing the edge of a special-shaped screen. It is characterized in that The following steps are involved: Step 1: Input the binary image of PixelMap; Step 2: Mark the connected domain and construct the axis-aligned bounding box; Step 3: Regional classification; Step 4: Curve extraction; Step 5: Smooth the curve; Step 6: Output the results; The unit of PixelMap in step 1 is pixel. When a pixel is lit, the grayscale value of the pixel is 1 or 255. Otherwise, when the pixel position is not lit, the grayscale value of the pixel is 0. The connected domain in the image in step 2 refers to a region composed of pixels with the same pixel value and adjacent positions; In the step 2, the connected domain marking uses four neighborhoods to divide the pixel area, that is, a pixel is judged to be connected if it has the same value in the four positions of up, down, left, and right. Because the curve in the PixelMap appears at the intersection of grayscale 0 and non-zero values, all the curves are found and separated by finding all the intersection areas. Among them, the number of grayscale 0 areas is significantly less than that of grayscale non-zero areas. Therefore, for convenience, the areas with grayscale 0 in the PixelMap are selected for connected domain marking, and each unlit area is distinguished in sequence using digital labels 1, 2, 3...t. Define the digital label of the grayscale non-zero value area as 0, and construct an axis-aligned bounding box for the connected domain represented by each digital label, so as to obtain several axis-aligned bounding boxes; The specific method of the axis-aligned bounding box is to use a number of rectangular areas to just wrap the connected domain represented by each digital label, and in order to store it into a matrix or a multi-dimensional array, the boundary characteristics of the axis-aligned bounding box are used to quickly determine the properties of the curve and quickly extract the curve value. The rectangle is the minimum envelope rectangle of the connected domain represented by each digital label; The axis-aligned bounding box of the connected domain represented by each digital label in the step 3 represents the shape of an edge curve, and the region is classified by the shape: first, the left and right sides of the bounding box region are judged, if there is only one curved edge on the left and right sides, it is judged as a chamfer, and when there is a curved edge on each of the left and right sides, it is judged as a non-chamfer, and the non-chamfer includes bangs, holes or runways, that is, it is only necessary to judge whether the leftmost column and the rightmost column contain two digital values, if they contain two digital values, the edge is a curved edge, and if they contain only one digital value, the edge is a straight edge; When extracting the curve in step 4, determine whether the left and right sides are curve edges according to the judgment rules of the curve edge in step 3. If they are curve edges, start from the column on this side and extract them in order from top to bottom. First, count the values ​​in the entire column, and call the value with the most appearances in the column the curve edge majority value, which is used as the reference value for comparison counting. If the number of appearances of two values ​​in the column is equal, use a non-zero value as the reference value. Then, count each row from this side to the other side. When a value that is the same as the curve edge majority value appears, the count is increased by one. When the value that appears is different from the curve edge majority value, the counting is stopped. The accumulated counting result is saved and cleared to zero, and then the next row is counted. After completing the entire counting process, a set of saved count values ​​is obtained, and this array is the extracted discrete value of the curve.

2. According to the method of claim 1, a method for automatically acquiring and smoothing the edge of a special-shaped screen, It is characterized in that The matching condition for circular hole is that the area of ​​the label area is π / 4 of the total area of ​​the bounding box, and the upper and lower parts and the left and right parts of the curve are symmetrical; the matching condition for bangs is that the ratio of the width to the height of the bounding box area is high, the left and right curves are symmetrical, and the derivative decreases first and then increases.

3. According to the method of claim 1, It is characterized in that The step 5 adopts the sliding average method to smooth the curve: a sliding window with a maximum length of N is traversed from the first element to the last element of the array, and the result is the mean of the sum of the elements in the sliding window during the traversal.

4. According to the method for automatically acquiring and smoothing the edge of a special-shaped screen as described in claim 1, It is characterized in that The step 5 selects some points from the discrete curve for curve fitting or interpolation to smooth the curve, which first requires selecting a curve function to fit or selecting multiple curves to interpolate in sections.

5. A method for automatically acquiring and smoothing the edge of a special-shaped screen according to claim 3 or 4, It is characterized in that When the fitted curve passes through an area with no pixels on the boundary, the brightness of the non-existent pixels cannot be adjusted to smooth the boundary. Therefore, after smoothing, it is necessary to check with PixelMap and record the maximum horizontal distance of the curve from the pixel boundary. Then the entire curve is translated in the opposite direction to this value so that the entire curve is within the displayed pixel range and one or more pixels are additionally translated on this basis.

6. The method for automatically acquiring and smoothing the edge of a special-shaped screen according to claim 1, It is characterized in that The step 6 returns the same number of results as the connected domain, and the result content is the coordinates and width and height of the expanded region, and the processed discrete value of the curve; The specific use of the curve discrete value is to first locate the new boundary pixel through the integer part of the floating-point value in the curve discrete value, and the brightness of the boundary pixel is related to the decimal part of the floating-point value, so the brightness of the boundary pixel is converted to the original value multiplied by the decimal part; Use these returned results to apply to the display to get a smooth display effect.

Citation Information

Patent Citations

  • Rational interpolation zooming method based on CT image edge

    CN107330860A

  • Label identification method for fertilizer production line

    CN115578732A