Application icon processing method and device, and non-volatile storage medium
By determining the pixel set of rounded edges, replacing and pixel filling of the application icons, generating right-angle icons, and uniformly rounding according to the target parameters, the problem of inconsistent rounding of the application icons is solved, and design standardization and visual style are achieved.
Patent Information
- Application Number
- CN202411812536.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-10
- Publication Date
- 2025-04-01
AI Technical Summary
The existing technology cannot effectively unify the degree of rounding of application icons, resulting in the fragmented and messy icon design.
By obtaining multiple application icons, the right-angle icons are obtained, the right-angle icons are determined, the rounded edge pixel set is replaced by straight line segment connection, the target outline generation and the pixel vacancy area are filled. Then, these right-angle icons are rounded uniformly according to the target rounding parameters to ensure that the rounding degree of the icon is consistent.
The rounded corner degree of application icons is uniformly processed, the fragmentation problem of icon design is solved, and the technical effect of standardization of design and unified visual style is achieved.
Smart Images

Figure CN119741400A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of terminal technology, and in particular to a method and device for processing application icons, and a non-volatile storage medium. Background Art
[0002] In the current mobile application market, the design of application icons is becoming more and more important. In order to attract users' attention, some application developers tend to design unique and personalized icons, and these icons often use different rounded corners. This leads to the fragmented and messy rounded corners of application icons.
[0003] To address the above-mentioned problems, no effective solution has been proposed yet. Summary of the invention
[0004] The present application provides a method and device for processing application icons, and a non-volatile storage medium, so as to at least solve the technical problem that the degree of rounding of application icons cannot be unified.
[0005] According to one aspect of the present application, a method for processing application icons is provided, including: obtaining multiple application icons, wherein the application icons are rounded icons and the degree of rounding of each application icon is inconsistent; filling the rounded portion of each application icon to obtain multiple first application icons, wherein the first application icon is a right-angle icon; and uniformly rounding the multiple first application icons according to target rounding parameters to obtain multiple second application icons, wherein the degree of rounding of each second application icon is consistent.
[0006] Optionally, the rounded corners of each application icon are filled to obtain multiple first application icons, including: using an edge detection algorithm to determine the rounded edge pixel set of each application icon to obtain multiple rounded edge pixel sets; determining a rounded arc based on each rounded edge pixel set to obtain multiple rounded arcs; using the starting point and the ending point of each rounded arc as key nodes, replacing each rounded arc with a straight line segment to generate a target contour to obtain multiple target contours; filling the pixel vacant area in each target contour to obtain multiple first application icons.
[0007] Optionally, an edge detection algorithm is used to determine a set of rounded edge pixels for each application icon, including: obtaining a first image corresponding to the application icon; when the first image is a non-grayscale image, converting the first image into a second image, wherein the second image is a grayscale image; using a preset threshold value range to filter edge pixels in the second image, displaying the edge pixels in the second image with a first pixel value, and displaying the non-edge pixels in the second image with a second pixel value, to obtain a third image; using an n*n square structure element to erode the third image to remove edge noise interference points, to obtain a fourth image, wherein n is a positive integer; using a square structure element to dilate the fourth image to bridge the edge fracture gaps in the fourth image, to obtain a fifth image; looping through the pixel points in the fifth image, adding the target pixels whose pixel values are the first pixel values to a preset list, to obtain a set of rounded edge pixels.
[0008] Optionally, the pixel vacant areas in each target contour are filled, including: for any pixel point to be filled in the pixel vacant area in each target contour, locating the position of the pixel point to be filled in the pixel coordinate system; determining a plurality of pixel points with determined pixel values adjacent to the pixel to be filled according to the position of the pixel point to be filled in the pixel coordinate system; and using a bilinear interpolation method to fill the pixel point to be filled with the plurality of pixel points with determined pixel values adjacent to the pixel to be filled.
[0009] Optionally, after filling the rounded corners of each application icon to obtain multiple first application icons, the method also includes: when the application icon is gray, using histogram equalization technology to stretch the grayscale distribution in the first application icon so that its color matches the application icon; when the application icon is color, using the grayscale-color mapping relationship to restore the first application icon image to color.
[0010] Optionally, the rounded corners of each application icon are filled, including: using a convolutional neural network to fill the rounded corners of each application icon, wherein the convolutional neural network is obtained by iterative training using target data and target labels, the target data is image data including different types of application icons, the target label is obtained by marking the rounded corners in the image data, and the target label includes: center information, radius information and boundary information of the rounded corners.
[0011] Optionally, after rounding multiple first application icons in a unified manner according to target rounding parameters to obtain multiple second application icons, the method also includes: storing and displaying multiple application icons, multiple first application icons, and multiple second application icons; after receiving confirmation messages for the multiple second application icons, sending the multiple second application icons to the target device.
[0012] According to another aspect of the present application, there is also provided a device for processing application icons, including: an acquisition module, used to acquire multiple application icons, wherein the application icons are rounded icons and the degree of rounding of each application icon is inconsistent; a first processing module, used to fill the rounded portion of each application icon to obtain multiple first application icons, wherein the first application icons are right-angle icons; a second processing module, used to uniformly round the multiple first application icons according to target rounding parameters to obtain multiple second application icons, wherein the degree of rounding of each second application icon is consistent.
[0013] According to another aspect of the present application, a non-volatile storage medium is provided, the storage medium including a stored program, wherein when the program is running, the device where the storage medium is located is controlled to execute the above method for processing application icons.
[0014] According to another aspect of the present application, an electronic device is provided, including: a memory and a processor, the processor being used to run a program stored in the memory, wherein the above method for processing application icons is executed when the program is run.
[0015] According to yet another aspect of the present application, a computer program is provided, wherein when the computer program is executed by a processor, the above method for processing application icons is implemented.
[0016] According to another aspect of the present application, a computer program product is provided, which includes a non-volatile computer-readable storage medium, wherein the non-volatile computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the above method for processing application icons is implemented.
[0017] In the present application, a plurality of application icons are obtained, wherein the application icons are rounded icons, and the degree of rounding of each application icon is inconsistent; the rounded portion of each application icon is filled to obtain a plurality of first application icons, wherein the first application icon is a right-angle icon; and the plurality of first application icons are uniformly rounded according to target rounding parameters to obtain a plurality of second application icons, wherein the degree of rounding of each second application icon is consistent, thereby achieving the purpose of unifying the degree of rounding of application icons, thereby realizing the technical effect of standardized application icon design and unified visual style, and further solving the technical problem of being unable to unify the degree of rounding of application icons. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0019] Figure 1 is a flowchart of a method for processing an application icon according to an embodiment of the present application;
[0020] Figure 2 is a flowchart of another method for processing application icons according to an embodiment of the present application;
[0021] Figure 3 is a structural diagram of a device for processing application icons according to an embodiment of the present application;
[0022] Figure 4 It is a hardware structure block diagram of a computer terminal according to a method for processing application icons in an embodiment of the present application. DETAILED DESCRIPTION
[0023] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.
[0024] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0025] In the related art, icon rounding processing relies on fixed algorithms and parameters, which are often manually completed by developers during the design phase or adjusted through some graphic editing software. Therefore, there are problems such as inconsistent rounding effects in different environments, low efficiency during adjustment, poor adaptability to dynamic icons and complex backgrounds, etc. In order to solve this problem, the embodiments of the present application provide relevant solutions, which are described in detail below.
[0026] According to an embodiment of the present application, a method embodiment of a method for processing an application icon is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0027] Figure 1 is a flowchart of a method for processing an application icon according to an embodiment of the present application, such as Figure 1 As shown, the method comprises the following steps:
[0028] Step S102, obtaining a plurality of application icons, wherein the application icons are rounded corner icons, and the rounded corners of the application icons are different in degree.
[0029] It is understandable that different application developers will choose different degrees of rounded corners to design icons based on their own brand image, design preferences or application themes. Each mobile operating system platform has its own requirements and recommended specifications for the design of application icons. When users use third-party desktop applications or themes, the degree of rounded corners of application icons will be inconsistent when displayed in different occasions.
[0030] Step S102 can be specifically implemented in the following manner: through an interface with the mobile device operating system or a third-party image capture tool, the rounded corner icons of the target application are obtained. These icons can come from the application's installation package resources, image files uploaded by developers, or system cached icons. It is ensured that the obtained icon formats cover common formats such as PNG, JPEG, GIF, etc., and pre-processed after acquisition, and the obtained icons are stored in a local or remote database. At the same time, information such as the source, format, size, and original rounded corner radius of each icon is recorded for subsequent processing and tracking.
[0031] Step S104, filling the rounded corners of each application icon to obtain a plurality of first application icons, wherein the first application icon is a right-angle icon.
[0032] In step S104, each application icon is firstly subjected to edge detection and rounded corner positioning. The Canny edge detection algorithm is used, combined with a low threshold of 20-50 and a high threshold of 50-100, to perform preliminary edge detection on the grayscale image and highlight the edge pixels of the icon. Through morphological operations, such as corrosion and expansion of 3×3 square structural elements, edge noise is removed and the rounded corner boundary is refined to locate the rounded corner part. Then, the anti-rounded corner target contour is constructed, and the Hough transform circle detection algorithm is applied, wherein the radius interval is set in the range of 3-15 pixels, and the circle center search accuracy is controlled at 1-3 pixels, the rounded corner parameters are accurately detected, and the rounded corner area is delineated. According to the rounded corner detection results, a polygonal polyline contour is designed to replace the rounded corner shape, and the polyline angle is maintained at 90 degrees or an allowable approximate right angle (±10 degrees), and is recorded in the form of a mathematical geometric coordinate array to generate a right-angled icon contour. Finally, pixel filling and repair are performed. For the vacant area generated after the rounded corners are removed, the bilinear interpolation algorithm is used to fill the pixels to ensure that the color transition of the filled area is natural. Then, block-based image restoration and matching technology is used to find the pixel blocks that are most similar to the visual features of the repaired area for matching and adjustment, and the pixel values in the filled blocks are fine-tuned to enhance the integration of the filled area and the overall image and eliminate the splicing marks. The color level of the filled and repaired image is adjusted using histogram equalization technology, and color restoration and enhancement operations are performed to make it consistent with the color style of the original icon. If the icon is in color, the color is restored in reverse; if it is a black and white icon, the original grayscale distribution is maintained. The rounded corners of each application icon are filled and converted into a right-angle icon, so that multiple first application icons are obtained.
[0033] Step S106 , rounding the corners of the plurality of first application icons in a unified manner according to the target rounding parameter, to obtain a plurality of second application icons, wherein the rounding degrees of the second application icons are consistent.
[0034] Specifically, the first application icon obtained is used as input, and the edge detection algorithm is used to identify the boundaries in the image. Based on the edge detection, a Bezier curve or a spline curve is used to fit the arc, or based on image processing technology, such as using Gaussian blur, dilation and erosion operations to smooth the right-angle boundaries so that they appear as rounded edges, the right-angle edges are converted into rounded corners. Based on the current platform settings or developer customization, select unified rounding parameters, including the radius of the rounded corners, the center of the circle, and the range of the rounded corner area to ensure that all icons have the same visual style after rounding. After generating the rounded corners, use image completion technology, such as neighboring pixel filling, bilinear interpolation, or deep learning-based pixel prediction, to fill the original right-angle area and leave blank pixels. You can also perform optimization operations such as color correction and contrast adjustment to smooth the rounded corner boundaries, eliminate jagged edges and burrs, and ensure the integrity and visual effect of the image.
[0035] Furthermore, the processed icons can be subjected to image recognition again to confirm that the degree of rounded corners between the icons is consistent and meets the design specifications. The confirmed icons can be stored in the original format or target format to form multiple second application icons. At this time, all icons have the same degree of rounded corners.
[0036] According to the above steps, in the present application, a plurality of application icons are obtained, wherein the application icons are rounded icons, and the degree of rounding of each application icon is inconsistent; the rounded portion of each application icon is filled to obtain a plurality of first application icons, wherein the first application icon is a right-angle icon; according to the target rounding parameters, the plurality of first application icons are uniformly rounded to obtain a plurality of second application icons, wherein the degree of rounding of each second application icon is consistent, thereby achieving the purpose of unifying the degree of rounding of the application icons, thereby realizing the technical effect of standardized application icon design and unified visual style.
[0037] The following Figure 1 The steps shown are exemplary and explanatory.
[0038] According to some optional embodiments of the present application, the rounded corners of each application icon are filled to obtain multiple first application icons. This can be achieved by the following method: using an edge detection algorithm to determine the rounded edge pixel set of each application icon to obtain multiple rounded edge pixel sets; determining a rounded arc based on each rounded edge pixel set to obtain multiple rounded arcs; using the starting point and the ending point of each rounded arc as key nodes, replacing each rounded arc with a straight line segment to generate a target contour and obtain multiple target contours; filling the pixel vacant area in each target contour to obtain multiple first application icons.
[0039] In this embodiment, each application icon is first obtained. These images can be in common formats such as PNG, JPEG, GIF, etc. The icons are converted into grayscale images, and the brightness weighted average method is used to reduce color complexity and simplify subsequent edge detection operations.
[0040] Secondly, the Canny edge detection algorithm is used for preliminary edge detection, and the low threshold is set to 20-50 and the high threshold is set to 50-100 to highlight the edge features of the icon. The 3×3 square structure element is applied to the Canny edge detection result for 1-2 corrosion operations, and then an expansion operation is performed to remove edge noise and connect the edges to obtain a clear set of rounded edge pixels. The Hough transform circle detection algorithm is used to set the search radius interval to 3-15 pixels and the circle center search accuracy to 1-3 pixels. The geometric parameters of the rounded corners, such as the coordinates of the center of the circle and the length of the radius, are detected to form an accurate rounded edge pixel coordinate chain. According to the detection results of the Hough transform and the pixel chain of the Canny edge detection, the specific parameters of each rounded arc are calculated, including the center of the circle, the starting point, the ending point and the rounded radius. The starting point and the ending point of the rounded arc are used as the turning points of the polygon boundary. Each rounded arc in the original rounded area is replaced with a straight line segment to replace the original rounded shape, and a regular right-angle icon outline is constructed to obtain multiple target outlines.
[0041] For the pixel vacancy area in each target contour caused by eliminating rounded corners, a bilinear interpolation algorithm is used to refer to the four nearest neighboring pixels around the vacant area to calculate the reasonable value of each vacant pixel to fill the vacant area. Then, an image restoration technique based on 5×5 or 8×8 pixel blocks is used to search for the image block that best matches the boundary of the vacant area, and the pixel values in the filled pixel block are fine-tuned to enhance the visual fusion of the filled area with the original image and eliminate the splicing traces. In addition, the histogram equalization technique can be used to adjust the color level of the restored image to keep it consistent with the color style of the original icon, and the Gaussian blur algorithm is used to smooth the edges, setting the Gaussian kernel size to 3×3 or 5×5, and the standard deviation to be in the range of 0.8-1.2 to eliminate jagged edges and burrs and improve the image texture. Check whether the filled icon meets the design specifications, including size, aspect ratio, and corner blanking requirements. Output the processed right-angle icon in the original format or in a specified format adapted to the target application scenario, and obtain multiple first application icons.
[0042] Through the above specific implementation steps, the rounded corners in the application icon can be intelligently identified and eliminated, and a first application icon with a regular shape (such as a square) is generated, laying a solid foundation for subsequent unified rounded corner processing.
[0043] According to some other optional embodiments of the present application, determining the rounded edge pixel set of each application icon can be achieved by the following method: obtaining a first image corresponding to the application icon; when the first image is a non-grayscale image, converting the first image into a second image, wherein the second image is a grayscale image; using a preset threshold value range, filtering edge pixels in the second image, displaying the edge pixels in the second image with a first pixel value, and displaying the non-edge pixels in the second image with a second pixel value, to obtain a third image; using an n*n square structure element to corrode the third image to remove edge noise interference points, to obtain a fourth image, wherein n is a positive integer; using a square structure element to dilate the fourth image to bridge the edge fracture gaps in the fourth image, to obtain a fifth image; looping through the pixel points in the fifth image, adding the target pixels whose pixel value is the first pixel value to the preset list, to obtain a rounded edge pixel set.
[0044] In this embodiment, the application icon may first be extracted from an application store, developer uploads, or application installation package resources, and the format of the application icon may be PNG, JPEG, GIF, etc. The obtained icon is preprocessed to obtain a first image.
[0045] If the first image is in color, it is converted into a grayscale image using the brightness weighted average method. Weights are assigned to the red (R), green (G), and blue (B) channels respectively (for example, R weight 0.299, G weight 0.587, B weight 0.114), and the grayscale value of each pixel is calculated using the formula Gray = 0.299R + 0.587G + 0.114B, thereby obtaining the second image, i.e., the grayscale image.
[0046] Secondly, the second image (grayscale image) is processed using the Canny edge detection algorithm, with a preset low threshold value range of 20-50 and a high threshold value range of 50-100. The Canny algorithm is used to filter out pixels in the second image that are considered to be edges based on these thresholds, that is, edge pixels in the third image will be displayed with a first pixel value, and non-edge pixels will be displayed with a second pixel value. After processing by the Canny algorithm, the detected edge pixel values are adjusted to the first pixel value (e.g., 255, representing white), and the non-edge pixel values are adjusted to the second pixel value (e.g., 0, representing black), to obtain the third image, that is, a binary image with highlighted edges.
[0047] Finally, by using a square structure element of n*n (n is a positive integer, which can be 3 or 5), the third image is corroded to remove edge noise interference points, that is, scattered points or thin lines that may appear in edge detection, to obtain the fourth image. Continue to use the square structure element of the same size to dilate the fourth image to bridge the edge fracture gaps in the fourth image and ensure the continuity of the edge to obtain the fifth image. Traverse all the pixels in the fifth image, add the target pixel points with the first pixel value (representing the detected edge pixels) to the preset list to form a rounded edge pixel set, which will be used for subsequent rounded arc extraction and anti-rounding processing.
[0048] Through the above steps, the rounded corners in the application icon can be accurately identified and located, providing key edge information for subsequent de-rounding and re-rounding processing, ensuring the accuracy and efficiency of the processing process.
[0049] In some optional embodiments of the present application, filling the pixel vacant areas in each target contour can be achieved by the following method: for any pixel point to be filled in the pixel vacant area in each target contour, locate the position of the pixel point to be filled in the pixel coordinate system; determine a plurality of pixel points with determined pixel values adjacent to the pixel to be filled based on the position of the pixel point to be filled in the pixel coordinate system; and use a bilinear interpolation method to fill the pixel point to be filled with the plurality of pixel points with determined pixel values adjacent to the pixel to be filled.
[0050] Specifically, in the target outline (i.e., the icon area after the rounded corners are turned into right angles), the pixels to be filled in each vacant area are determined. The position information of these pixels is represented as (x, y) coordinate pairs in the pixel coordinate system, where x represents the horizontal position and y represents the vertical position. With the pixel point P (x, y) to be filled as the center, select the four pixels around it as references, for example, the pixels A (x1, y1), B (x1, y2), C (x2, y1), and D (x2, y2) at the upper left, lower left, upper right, and lower right can be selected. Ensure that the coordinates and pixel values of these four pixels are known, and they are adjacent to the pixel point P to be filled in the horizontal and vertical directions. Use the bilinear interpolation formula to calculate the pixel value of point P based on the coordinates and pixel values of the pixel point P to be filled and the surrounding reference pixels A, B, C, and D. Assign the calculated pixel value to the pixel point P to be filled to achieve the filling of the pixel vacancy area. Traverse all the pixels to be filled in the target contour, and use the above-mentioned bilinear interpolation method to calculate and fill the empty areas one by one to ensure the integrity and visual continuity of the icon image.
[0051] By using the bilinear interpolation method to fill in the pixel vacant areas, the image vacancies caused by the de-rounding process can be effectively eliminated, ensuring that the icon image can still maintain high image quality and visual consistency after removing the rounded corners.
[0052] As some optional embodiments of the present application, filling the rounded corners of each application icon can be achieved by the following method: when the application icon is gray, use histogram equalization technology to stretch the grayscale distribution in the first application icon so that its color matches the application icon; when the application icon is color, use the grayscale-color mapping relationship to restore the first application icon image to color.
[0053] Specifically, when the application icon is gray, the grayscale histogram of the first application icon (i.e., the rectangular icon after the rounded corners are removed) is calculated to count the frequency of occurrence of each grayscale level in the image. Based on the grayscale histogram, the cumulative distribution function (CDF) is calculated to reflect the cumulative probability distribution of grayscale levels in the image. The mapping function generated by the CDF is used to remap the grayscale value of each pixel in the first application icon. The smaller grayscale values are stretched to a larger range to enhance the contrast of the image, making the grayscale distribution more uniform and the overall visual effect better. The remapped grayscale values are assigned to the corresponding pixels to complete the histogram equalization process, thereby obtaining a second application icon with enhanced grayscale contrast and color matching the original icon.
[0054] On the other hand, when the application icon is in color, the grayscale-color mapping relationship is used to restore the first application icon to color. If the first application icon (i.e., the rectangular icon after the rounded corners are removed) is a grayscale image, it is first converted to the HSV (hue, saturation, value) color space, wherein the hue (Hue) is independent of the saturation (Saturation) and the value (Value) in the HSV space, which is convenient for subsequent color restoration. The mapping relationship between the grayscale value and the HSV value is established using the HSV value of the original application icon (color) and the grayscale value of the first application icon (grayscale). The mapping relationship can be obtained through statistical analysis or pre-learning, and the grayscale value of the grayscale image can be mapped back to the corresponding HSV value. The grayscale-color mapping relationship is applied to convert the grayscale value of each pixel in the first application icon into the corresponding HSV value, and then the HSV image is inversely converted back to RGB (red, green, blue) or the original format of the color image to restore the color information. After restoring the color information, color correction can also be performed to ensure that the color style of the second application icon is consistent with the original icon to avoid color distortion and deviation. Output in the original format or in a specified format adapted to the target application scenario to ensure that the icon is consistent with the original color icon in visual effect, while removing the original rounded corner processing to obtain the second application icon after color restoration.
[0055] Through the above steps, when the application icon is gray, the grayscale contrast can be enhanced by using the histogram equalization technology, making the color richer and closer to the original icon effect; when the icon is in color, the icon is restored to color through the grayscale-color mapping relationship to ensure that the icon after image restoration and rounding is consistent with the original icon in color. This method not only improves the visual quality of the icon image, but also retains the color characteristics of the original design.
[0056] In some optional embodiments of the present application, filling the rounded corners of each application icon can be achieved by the following method: using a convolutional neural network to fill the rounded corners of each application icon, wherein the convolutional neural network is obtained by iterative training using target data and target labels, the target data is image data including different types of application icons, the target label is obtained by marking the rounded corners in the image data, and the target label includes: center information, radius information and boundary information of the rounded corners.
[0057] In this embodiment, a large amount of target data needs to be collected first. The target data includes different types of application icons to ensure that the icons cover various styles, sizes, complex backgrounds and different rounded corner processing methods. At the same time, a target tag is created for each icon image. The target tag contains information for accurately marking the rounded corners in the image data, including the center coordinates, radius length and boundary pixel coordinates of the rounded corners.
[0058] Next, a deep convolutional neural network model is constructed, which usually includes convolutional layers, pooling layers, activation layers, and fully connected layers. The convolutional layer is used to extract image features, such as edge, texture, and color information; the pooling layer is used to reduce the spatial size of the feature map to reduce computational complexity; the activation layer is a nonlinear activation function (such as ReLU) to increase the complexity and learning ability of the model; and the fully connected layer is used to output the final prediction results.
[0059] The target data is then input into the CNN model for iterative training, and the target label is used to supervise the model's prediction results. It should be noted that the goal of the model is to learn how to predict the center, radius and boundary information of the rounded part in the image based on the input icon image, and how to intelligently fill the rounded part based on this information. During the training process, a loss function is defined to evaluate the difference between the model prediction value and the target label. The loss functions defined in this embodiment, such as mean square error (MSE) and cross-entropy loss (Cross-Entropy Loss), are used to guide the optimization direction of the model so that the model can more accurately predict the properties of the rounded part and fill it. Through the back propagation algorithm, the weights and biases of the model are adjusted according to the calculation results of the loss function to minimize the difference between the model prediction results and the target label. The training process continues to iterate until the prediction accuracy of the model reaches the expected standard.
[0060] Finally, the convolutional neural network is used to fill the rounded corners of each application icon. Specifically, the following steps are included: obtain the application icon to be processed, and convert it into the CNN model input format as needed, such as adjusting the image size, normalizing the pixel value, etc. Input the preprocessed icon image into the trained CNN model, and the model outputs information such as the center coordinates, radius length, and boundary pixel coordinates of each rounded corner part. Based on the rounded corner properties predicted by the CNN model, the image filling algorithm is used to fill the rounded corner area determined in the icon, and the rounded corner area is converted into a right angle or polygonal area to ensure that the filled icon remains visually consistent and natural. The color and edge of the filled icon are smoothed to ensure the visual integration of the new filled area with the original icon background and theme. The histogram equalization technology is used to adjust the grayscale distribution, or the color is restored according to the grayscale-color mapping relationship to maintain the overall visual style of the icon. The filled icon is output in the original icon format or in a specified format adapted to the target application scenario to obtain a second application icon without the influence of rounded corners. The icon has a regular appearance, which is convenient for subsequent unified rounded corner processing.
[0061] Through the above steps, the intelligent filling processing of the convolutional neural network can effectively identify and process the rounded corners in the application icon and generate a right-angle or polygonal icon that meets the design specifications. This method not only improves the visual consistency and standardization of the icon, but also reduces the need for manual intervention and improves processing efficiency.
[0062] As other optional embodiments of the present application, after rounding multiple first application icons in a unified manner according to target rounding parameters to obtain multiple second application icons, the following method can be used to: store and display multiple application icons, multiple first application icons, and multiple second application icons; after receiving confirmation messages for the multiple second application icons, send the multiple second application icons to the target device.
[0063] Specifically, the originally uploaded application icon, the first application icon obtained after the de-rounding process (i.e., the squared icon), and the second application icon uniformly processed according to the target rounding parameters (i.e., the icon that meets the specified rounding parameters) are collected and stored on the server side or processing platform. An icon preview and confirmation interface is provided to developers on the platform to show the comparison of the above three groups of icons. The originally uploaded application icon is used for reference. The first application icon shows the effect after the de-rounding process, and the second application icon shows the final effect after processing according to the unified rounding parameters. On the display interface, intuitive comparison tools are provided, such as side-by-side display, difference highlighting, etc., to facilitate developers to quickly identify the changes in icons before and after processing, and ensure the consistency of image quality and design style.
[0064] After receiving the confirmation message for the plurality of second application icons, the plurality of second application icons are sent to the target device. In the icon preview interface, the developer can view the comparison effect of each application icon before and after the rounded corner processing, and confirm the second application icon through the provided confirmation button or option, indicating that the processing result meets the requirements.
[0065] The platform or server receives a message from the developer confirming each second application icon. The message can be a batch confirmation operation, which is used to confirm the processing results of multiple icons at one time. After receiving the confirmation message, the system packages the multiple second application icons or generates them on demand, and then sends these icons to the target device, such as a mobile device, desktop system, application store server, etc., through the network for use and display by these devices or platforms. Preferably, in order to improve efficiency, a cache mechanism can be set on the target device or platform side to store the processed second application icons to avoid repeated processing when the user accesses or updates the application, thereby reducing resource consumption and network delays.
[0066] Through the above steps, it is possible to ensure that the application icons still maintain their original design features and visual effects after the unified rounded corners are processed, while meeting the requirements of different platforms and systems. Developers can intuitively compare and confirm the processing results to ensure the consistency and standardization of the icons displayed on multiple devices. In addition, through the caching mechanism and efficient distribution, this embodiment also improves the efficiency of icon processing and application integration and reduces unnecessary resource consumption.
[0067] Figure 2 is a flowchart of another method for processing an application icon according to an embodiment of the present application. Figure 2 As shown, the method comprises the following steps:
[0068] Step S202: Use image recognition technology to preliminarily determine the actual situation of the APP rounded corner icon, including but not limited to: whether it has a preliminary rounded corner appearance; whether it has a background and blank space that meet the icon design specifications (the corner part has only a single-color background); whether it has a recognizable complex background (such as a pattern or gradient); and whether the boundary between the subject and the background is clear.
[0069] Image recognition includes the following key steps: 1. Image acquisition and preprocessing: The first step is to obtain image data from various sources. The image is then preprocessed, including denoising, contrast enhancement, resizing, and other operations to prepare the image data for subsequent analysis. 2. Feature extraction: The computer extracts useful feature information from the image. These features can be the edges of the APP icon, color histograms, texture information, etc. The purpose of feature extraction is to convert image data into a form that the computer can understand and process. 3. Pattern recognition and classification: Using machine learning or deep learning algorithms, computers use feature information extracted from images to learn to recognize different categories of objects, scenes, or patterns. This includes classification tasks (classifying images into different categories), detection tasks (finding the location of specific objects in the image), and segmentation tasks (dividing images into different areas or objects).
[0070] Step S204, determining the original content of the icon, splitting and obtaining the original subject and the original background, and determining the area affected by the existing rounded corner processing.
[0071] Step S206, anti-rounding technology, restores or expands the original background to a regular shape. This step can be understood as the texture synthesis process in AI image restoration technology, which uses common icon backgrounds to train models and understand the rules of background colors and background textures; but it is necessary to reduce or prohibit the filling of external image information into the image to be restored, and only use the information clearly contained in the image to be restored (mainly the background obtained in step S204; supplemented by the theme obtained in step S204) and its derived results. It aims to ensure that the completed part is seamlessly integrated with the original image and maintain the consistency and continuity of the background pattern.
[0072] For example, the texture synthesis process can be achieved through the following steps: First, the algorithm needs to extract useful texture information from the original image, including features such as color, pattern, and structure; analyze the extracted texture to identify its basic features and patterns, including frequency analysis, texture direction recognition, or other feature extraction methods. Secondly, use the extracted feature information to generate a new texture through a preset algorithm (such as Markov random field, convolutional neural network, etc.). This process needs to ensure that the newly generated texture is visually similar to the original texture. Finally, the generated new texture is fused with the undamaged part of the original image to ensure the consistency and natural transition of the overall image. The synthesized texture needs to be optimized and iterated multiple times to achieve the best visual effect; the synthesized image needs to undergo some post-processing steps, such as color correction, contrast adjustment, etc., to further improve the quality of the restoration.
[0073] The target rounded APP icon image is obtained through an image extraction program adapted to the mobile device operating system or a third-party image grabber tool. The image format includes but is not limited to common formats such as PNG, JPEG, and GIF. After the image is obtained, it is immediately converted into a grayscale image for easy processing. The conversion process adopts a brightness weighted average method, that is, for the red (R), green (G), and blue (B) channels of the color image, weights are assigned according to the color sensitivity of the human eye (for example, R weight 0.299, G weight 0.587, B weight 0.114), and the grayscale value of each pixel is calculated according to the formula Gray = 0.299*R+0.587*G+0.114*B to complete the conversion from color to grayscale. The converted grayscale image completely retains the original icon pixel position and contour structure information.
[0074] The Canny edge detection algorithm is used to perform the first round of processing on the grayscale image. The low threshold value range is set to 20-50, and the high threshold value range is set to 50-100, so as to highlight the edge pixels of the image and preliminarily outline the overall outline of the icon and the edge of the suspected rounded area; then, with the help of morphological processing methods, a 3×3 square structure element is used to perform an erosion operation 1-2 times to remove edge noise interference points, and then a dilation operation is performed using the same structure element to bridge the edge cracks and gaps, refine and accurately locate the rounded boundary pixels, and form a coherent and orderly rounded edge pixel chain. The pixel chain is stored in the form of a coordinate sequence for subsequent calls.
[0075] The Hough transform circle detection algorithm is introduced to assist in confirming the geometric features of rounded corners. The Hough transform search radius interval is set in the range of 3-15 pixels according to the common APP icon size, and the center search accuracy is controlled at 1-3 pixels. By detecting the circle parameters (center coordinates, radius length) and coordinating the calculations with the Canny edge detection results, the rounded corner area can be accurately delineated, and the pixels of the rounded corner part and the rest of the icon body can be distinguished.
[0076] Based on the precisely positioned rounded area, an inverse rounded target contour is designed. The starting point and ending point of the rounded arc are used as key nodes. The original rounded arc is replaced with a straight line segment to form a polygonal broken line contour to replace the rounded shape. The broken line angle is a 90-degree right angle or an approximate right angle allowed based on design aesthetics (the angle deviation is within plus or minus 10 degrees). The target contour is recorded in detail in the form of a mathematical geometric coordinate array, which corresponds to the original icon image pixel coordinate system, clearly defining the coordinate values of each turning point and line segment endpoint.
[0077] For the vacant pixel area generated after the rounded corners are removed, the bilinear interpolation algorithm is enabled to fill the pixels. For any pixel point P(x, y) in the vacancy, the four nearest neighboring pixel points A(x1, y1), B(x1, y2), C(x2, y1), and D(x2, y2) are referred to, and the reasonable value of the filling pixel is calculated according to the bilinear interpolation formula to ensure that the color transition of the filled area is natural and visually coherent.
[0078] Block-based image restoration and matching technology is used to optimize the filling effect. Taking 5×5 pixel blocks or 8×8 pixel blocks as the basic units, search and match are carried out between the boundary of the filled area and the surrounding unprocessed area. Blocks with the most similar visual features are found for comparison and adjustment. The pixel values in the filled pixel blocks are fine-tuned according to the matching results to enhance the integration of the filled area with the overall image and eliminate the splicing marks and inharmonious look and feel caused by restoration.
[0079] Perform color restoration and enhancement operations on the filled and repaired image, and use histogram equalization technology to stretch the image grayscale distribution to make its color hierarchy match the original APP icon. If the icon was originally in color, reversely restore the color based on the grayscale-color mapping relationship; or use a color correction template based on the color statistical characteristics of similar APP icons, and adjust the color style according to the category of the icon (such as social, game, tool) to ensure visual consistency.
[0080] Edge smoothing is performed by using a Gaussian blur algorithm with a 3×3 or 5×5 Gaussian kernel and setting the standard deviation in the range of 0.8-1.2. Blurring is performed on the new edges and surrounding pixels after the rounded corners are removed to eliminate jagged edges, burrs and other unevenness and improve the overall texture of the image. Finally, the processed and rounded APP icon image is output in the original format or in a specified format adapted to the target application scenario, so as to replace the original rounded icon for use.
[0081] Step S208, confirm the effect. Overlay the original theme onto the repaired background. Re-perform image recognition detection to ensure that no additional background information is presented and that the theme presentation effect is not affected. This step obtains an icon with a regular shape (such as a square) that has an ideal size and aspect ratio and meets the requirements of the icon design specifications for leaving white space at the corners. There is no need to worry about the theme content being cropped during the subsequent rounding process.
[0082] Step S210, based on the current platform settings, select a unified rounding parameter, and re-round the "standard icon" obtained in step S208. This step does not limit the specific rounding algorithm or parameters. Any existing algorithm selected by the icon user can take effect.
[0083] Step S212: The processed ideal rounded corner icon, the standard icon obtained in the process, and the original icon uploaded by the user are stored together. A preview is provided to the developer (uploader). After confirmation, the ideal rounded corner icon can be distributed to the user.
[0084] Through the above steps, the intelligent de-rounding and standardized rounding of application icons can be achieved, which not only improves the design quality of the icons, but also optimizes the display effects of the icons on different platforms and systems, ensuring the consistency, standardization and aesthetics of the icons, thereby enhancing the visual experience of the entire user interface and the consistency of the brand image.
[0085] Figure 3 is a structural diagram of a device for processing application icons according to an embodiment of the present application, such as Figure 3 As shown, the device comprises:
[0086] The acquisition module 30 is used to acquire a plurality of application icons, wherein the application icons are rounded corner icons, and the rounded corners of the application icons are different in degree.
[0087] The first processing module 32 is used to fill the rounded corners of each application icon to obtain a plurality of first application icons, wherein the first application icons are right-angle icons.
[0088] The second processing module 34 is used to uniformly perform rounding processing on the plurality of first application icons according to the target rounding parameter to obtain a plurality of second application icons, wherein the rounding degrees of the second application icons are consistent.
[0089] Optionally, the first processing module 32 is also used to perform the following steps: using an edge detection algorithm to determine the rounded edge pixel set of each application icon to obtain multiple rounded edge pixel sets; determining a rounded arc based on each rounded edge pixel set to obtain multiple rounded arcs; using the starting point and the ending point of each rounded arc as key nodes, replacing each rounded arc with a straight line segment to generate a target contour and obtain multiple target contours; filling the pixel vacant area in each target contour to obtain multiple first application icons.
[0090] Optionally, the first processing module 32 is also used to perform the following steps: obtain a first image corresponding to the application icon; when the first image is a non-grayscale image, convert the first image into a second image, wherein the second image is a grayscale image; use a preset threshold value range to filter edge pixels in the second image, display the edge pixels in the second image with a first pixel value, and display the non-edge pixels in the second image with a second pixel value, to obtain a third image; use an n*n square structure element to corrode the third image to remove edge noise interference points, to obtain a fourth image, wherein n is a positive integer; use a square structure element to dilate the fourth image to bridge the edge fracture gaps in the fourth image, to obtain a fifth image; loop through the pixel points in the fifth image, add the target pixels whose pixel values are the first pixel values to the preset list, to obtain a rounded edge pixel set.
[0091] Optionally, the first processing module 32 is also used to perform the following steps: for any pixel point to be filled in the pixel vacancy area in each target contour, locate the position of the pixel point to be filled in the pixel coordinate system; determine a plurality of pixel points with determined pixel values adjacent to the pixel to be filled according to the position of the pixel point to be filled in the pixel coordinate system; and use a bilinear interpolation method to fill the pixel point to be filled with the plurality of pixel points with determined pixel values adjacent to the pixel to be filled.
[0092] Optionally, the first processing module 32 is also used to perform the following steps: when the application icon is gray, using a histogram equalization technique to stretch the grayscale distribution in the first application icon so that its color matches the application icon; when the application icon is color, using a grayscale-color mapping relationship to restore the first application icon image to color.
[0093] Optionally, the first processing module 32 is also used to perform the following steps: filling the rounded corners of each application icon, including: using a convolutional neural network to fill the rounded corners of each application icon, wherein the convolutional neural network is obtained by iterative training using target data and target labels, the target data is image data including different types of application icons, the target label is obtained by marking the rounded corners in the image data, and the target label includes: center information, radius information and boundary information of the rounded corners.
[0094] Optionally, after rounding multiple first application icons in a unified manner according to target rounding parameters to obtain multiple second application icons, the application icon processing device can also be used to: store and display multiple application icons, multiple first application icons, and multiple second application icons; after receiving confirmation messages for multiple second application icons, send the multiple second application icons to the target device.
[0095] It should be noted that the above Figure 3 The modules in the embodiment may be program modules (e.g., a set of program instructions for implementing a specific function) or hardware modules. For the latter, they may be expressed in the following forms, but are not limited thereto: the expression form of the above modules is a processor, or the functions of the above modules are implemented by a processor.
[0096] It should be noted that Figure 3 The preferred implementation of the illustrated embodiment can be found in Figure 1 The relevant description of the illustrated embodiment will not be repeated here.
[0097] Figure 4 FIG. 1 shows a hardware structure block diagram of a computer terminal for implementing a method for processing application icons. Figure 4 As shown, the computer terminal 40 may include one or more (402a, 402b, ..., 402n are used to illustrate) processors 402 (the processor 402 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA), a memory 404 for storing data, and a transmission module 406 for communication functions. In addition, it may also include: a display, an input / output interface (I / O interface), a universal serial bus (USB) port (which may be included as one of the ports of the BUS bus), a network interface, a power supply and / or a camera. It can be understood by those skilled in the art that Figure 4 The structure shown is only for illustration and does not limit the structure of the above electronic device. Figure 4 More or fewer components as shown, or with Figure 4 Different configurations are shown.
[0098] It should be noted that the one or more processors 402 and / or other data processing circuits described above may generally be referred to herein as "data processing circuits". The data processing circuits may be embodied in whole or in part as software, hardware, firmware, or any other combination thereof. In addition, the data processing circuit may be a single independent processing module, or may be incorporated in whole or in part into any of the other components in the computer terminal 40. As involved in the embodiments of the present application, the data processing circuit acts as a processor control (e.g., selection of a variable resistor terminal path connected to an interface).
[0099] The memory 404 can be used to store software programs and modules of application software, such as the program instructions / data storage device corresponding to the processing method of the application icon in the embodiment of the present application. The processor 402 executes various functional applications and data processing by running the software programs and modules stored in the memory 404, that is, the processing method of the application icon described above is realized. The memory 404 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 404 may further include a memory remotely arranged relative to the processor 402, and these remote memories may be connected to the computer terminal 40 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0100] The transmission module 406 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of the computer terminal 40. In one example, the transmission module 406 includes a network adapter (Network Interface Controller, NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission module 406 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0101] The display may be, for example, a touch screen liquid crystal display (LCD) that enables a user to interact with a user interface of the computer terminal 40 .
[0102] It should be noted that, in some optional embodiments, the above Figure 4 The computer terminal shown may include hardware elements (including circuits), software elements (including computer code stored on a computer-readable medium), or a combination of hardware elements and software elements. It should be noted that Figure 4 This is merely one example of a particular embodiment and is intended to illustrate the types of components that may be present in the computer terminal described above.
[0103] It should be noted that Figure 4 The computer terminal shown is used to execute Figure 1 The processing method of the application icon shown in the figure, therefore the relevant explanations and instructions in the execution method of the above command are also applicable to the electronic device and will not be repeated here.
[0104] An embodiment of the present application further provides a non-volatile storage medium, which includes a stored program, wherein when the program is running, the device where the storage medium is located is controlled to execute the above method for processing application icons.
[0105] A program for executing the following functions on a non-volatile storage medium: obtaining a plurality of application icons, wherein the application icons are rounded icons and the degree of rounding of the application icons is inconsistent; filling the rounded portion of each application icon to obtain a plurality of first application icons, wherein the first application icons are right-angle icons; and uniformly rounding the plurality of first application icons according to target rounding parameters to obtain a plurality of second application icons, wherein the degree of rounding of the second application icons is consistent.
[0106] An embodiment of the present application further provides an electronic device, including: a memory and a processor, wherein the processor is used to run a program stored in the memory, wherein the above method for processing application icons is executed when the program is running.
[0107] The processor is used to run a program that performs the following functions: obtaining multiple application icons, wherein the application icons are rounded icons and the degree of rounding of the application icons is inconsistent; filling the rounded portion of each application icon to obtain multiple first application icons, wherein the first application icons are right-angle icons; and uniformly rounding the multiple first application icons according to target rounding parameters to obtain multiple second application icons, wherein the degree of rounding of the second application icons is consistent.
[0108] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0109] In the above embodiments of the present application, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments.
[0110] In the above-mentioned embodiments of the present application, the collected information is information and data authorized by the user or fully authorized by all parties, and the collection, storage, use, processing, transmission, provision, disclosure and application of the relevant data comply with relevant laws, regulations and standards, take necessary protection measures, do not violate public order and good morals, and provide corresponding operation entrances for users to choose to authorize or refuse.
[0111] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units can be a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0112] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0113] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0114] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the relevant technology or all or part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, disk or optical disk, etc. Various media that can store program codes.
[0115] The above is only a preferred implementation of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.
Claims
1. A method for processing an application icon, characterized in that: include: Acquire multiple application icons, wherein the application icons are rounded icons, and the rounded degrees of the application icons are different; Filling the rounded corners of each of the application icons to obtain a plurality of first application icons, wherein the first application icons are rectangular icons; According to the target rounding parameter, the multiple first application icons are uniformly rounded to obtain multiple second application icons, wherein the rounding degrees of the second application icons are consistent.
2. The method according to claim 1, characterized in that Filling the rounded corners of each of the application icons to obtain a plurality of first application icons, including: Using an edge detection algorithm, determine a rounded edge pixel set of each of the application icons to obtain a plurality of rounded edge pixel sets; Determine a rounded arc according to each of the rounded edge pixel sets to obtain a plurality of rounded arcs; Taking the starting point and the ending point of each of the rounded arcs as key nodes, each of the rounded arcs is replaced with a straight line segment to connect, generate a target contour, and obtain multiple target contours; Fill the pixel vacant areas in each of the target contours to obtain a plurality of first application icons.
3. The method according to claim 2, characterized in that Using an edge detection algorithm, determining a set of rounded edge pixels of each application icon, including: Acquire a first image corresponding to the application icon; When the first image is a non-grayscale image, converting the first image into a second image, wherein the second image is a grayscale image; Using a preset threshold value range, screening edge pixels in the second image, displaying the edge pixels in the second image with a first pixel value, and displaying non-edge pixels in the second image with a second pixel value, to obtain a third image; Performing an erosion operation on the third image using an n*n square structure element to remove edge noise interference points, thereby obtaining a fourth image, wherein n is a positive integer; Performing a dilation operation on the fourth image using the square structure element to close edge fracture gaps in the fourth image, thereby obtaining a fifth image; The pixel points in the fifth image are traversed in a loop, and the target pixels whose pixel values are the first pixel values are added to a preset list to obtain a rounded edge pixel set.
4. The method according to claim 2, characterized in that: Filling the pixel vacant area in each target contour includes: For any pixel point to be filled in the pixel vacancy area in each of the target contours, locate the position of the pixel point to be filled in the pixel coordinate system; Determine, according to the position of the pixel point to be filled in the pixel coordinate system, a plurality of pixel points with determined pixel values adjacent to the pixel to be filled; A bilinear interpolation method is used to fill the pixel point to be filled with a plurality of pixel points with determined pixel values adjacent to the pixel to be filled.
5. The method according to claim 1, characterized in that After filling the rounded corners of each of the application icons to obtain a plurality of first application icons, the method further includes: When the application icon is gray, using a histogram equalization technique to stretch the grayscale distribution of the first application icon so that its color matches that of the application icon; When the application icon is in color, the first application icon image is restored to color using a grayscale-color mapping relationship.
6. The method according to claim 1, characterized in that Filling the rounded corners of each of the application icons includes: A convolutional neural network is used to fill the rounded corners of each application icon, wherein the convolutional neural network is obtained by iterative training using target data and target labels, the target data is image data including different types of application icons, the target label is obtained by marking the rounded corners in the image data, and the target label includes: center information, radius information and boundary information of the rounded corners.
7. The method according to claim 1, characterized in that After uniformly performing rounded corner processing on the plurality of first application icons according to the target rounded corner parameter to obtain a plurality of second application icons, the method further includes: storing and displaying a plurality of the application icons, a plurality of the first application icons, and a plurality of the second application icons; After receiving confirmation messages for the plurality of second application icons, the plurality of second application icons are sent to a target device.
8. A device for processing an application icon, characterized in that: include: An acquisition module, used for acquiring a plurality of application icons, wherein the application icons are rounded icons, and the rounded degrees of the application icons are inconsistent; A first processing module, configured to fill the rounded corners of each of the application icons to obtain a plurality of first application icons, wherein the first application icons are rectangular icons; The second processing module is used to uniformly perform rounding processing on the plurality of the first application icons according to the target rounding parameter to obtain a plurality of second application icons, wherein the rounding degree of each of the second application icons is consistent.
9. A non-volatile storage medium, characterized in that: The non-volatile storage medium includes a stored program, wherein when the program is running, the device where the non-volatile storage medium is located is controlled to execute the method for processing application icons according to any one of claims 1 to 7.
10. An electronic device, characterized in that: include: A memory and a processor, wherein the processor is used to run a program stored in the memory, wherein the program executes the method for processing an application icon as described in any one of claims 1 to 7 when running.
11. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the method for processing an application icon according to any one of claims 1 to 7 is implemented.