Image processing method and device, terminal equipment and computer readable storage medium

By using feature analysis and filtering, flat regions in the image are identified and false contours are removed, thus solving the problem of false contours in flat regions affecting the video experience and achieving better image quality and computational efficiency.

CN121304472APending Publication Date: 2026-01-09WUHAN TCL CORP RES CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410911513.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-08
Publication Date
2026-01-09

AI Technical Summary

Technical Problem

In existing technologies, flat areas of images are prone to false contours, which affect the video viewing experience, and mainstream false contour removal algorithms are not ideal.

Method used

Through feature analysis, flat and non-flat regions in the image are identified, and methods such as median filtering, Gaussian filtering, or bilateral filtering are used to remove false contours while preserving edge information.

Benefits of technology

It effectively removes false contours from images, improves the video viewing experience, reduces computational burden, and increases image processing efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121304472A_ABST
    Figure CN121304472A_ABST
Patent Text Reader

Abstract

The invention provides an image processing method and device, terminal equipment and a computer readable storage medium. The method comprises the steps that to-be-processed image information is acquired; performing feature analysis processing on the to-be-processed image information to obtain target image feature information; and determining the target image information based on the target image feature information and the to-be-processed image information.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, specifically to an image processing method, apparatus, terminal device, and computer-readable storage medium. Background Technology

[0002] Due to video compression or shooting equipment limitations, contour-like transition zones can easily appear in flat areas of an image, which can be called pseudo-contours. These pseudo-contours can affect the viewing experience of the video.

[0003] The current mainstream algorithm for removing false contours is to achieve this through smoothing. However, this method is not ideal, so a solution is needed to remove false contours from the image to be processed. Summary of the Invention

[0004] This application provides an image processing method that can effectively remove false contours from the image to be processed.

[0005] In a first aspect, this application provides an image processing method, the method comprising:

[0006] Obtain the image information to be processed;

[0007] The image information to be processed is subjected to feature analysis to obtain the target image feature information;

[0008] Based on the target image feature information and the image information to be processed, the target image information is determined.

[0009] Secondly, this application also provides an image processing apparatus, the apparatus comprising:

[0010] The acquisition module is used to acquire information about the image to be processed.

[0011] The processing module is used to perform feature analysis processing on the image information to be processed to obtain target image feature information;

[0012] The processing module is also used to determine the target image information based on the target image feature information and the image information to be processed.

[0013] Thirdly, this application also provides a terminal device, the terminal device including a processor, a memory, and a computer program stored in the memory and executable on the processor, the processor executing the computer program to implement the steps in any of the image processing methods described above.

[0014] Fourthly, this application also provides a computer-readable storage medium storing a computer program that is executed by a processor to implement the steps of any of the image processing methods described above. Attached Figure Description

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

[0016] Figure 1 This is a scene diagram of the image processing system provided in the embodiments of this application;

[0017] Figure 2 This is a schematic flowchart of one embodiment of the image processing method in this application;

[0018] Figure 3 This is a schematic diagram of a functional module of the image processing device in an embodiment of this application;

[0019] Figure 4 This is a schematic diagram of the structure of the terminal device in the embodiments of this application. Detailed Implementation

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

[0021] In the description of this application, it should be understood that the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of this application, "multiple" means two or more, unless otherwise explicitly specified.

[0022] In this application, the term "exemplary" is used to mean "used as an example, illustration, or description." Any embodiment described as "exemplary" in this application is not necessarily to be construed as being more preferred or advantageous than other embodiments. Furthermore, it is understood that in the specific embodiments of this application, user information, user data, and other related data are involved. When the above embodiments of this application are applied to specific products or technologies, user permission or consent is required, and the collection, use, and processing of related data must comply with the relevant laws, regulations, and standards of the relevant countries and regions.

[0023] To enable any person skilled in the art to implement and use this application, the following description is provided. In this description, details are set forth for purposes of explanation. It should be understood that those skilled in the art will recognize that this application can be implemented without using these specific details. In other instances, well-known structures and processes will not be described in detail to avoid obscuring the description of this application with unnecessary detail. Therefore, this application is not intended to be limited to the embodiments shown, but is consistent with the broadest scope of the principles and features disclosed in this application.

[0024] This application provides an image processing method, apparatus, device, and storage medium, which are described in detail below.

[0025] Please see Figure 1 , Figure 1 This is a schematic diagram of a scene for an image processing system provided in an embodiment of this application. The image processing system may include a terminal device 100 and a storage device 200, and the storage device 200 may transmit data to the terminal device 100. Figure 1 The terminal device 100 can obtain the image data stored in the storage device 200 to execute the image processing method in this application.

[0026] In this embodiment of the application, the terminal device 100 may include, but is not limited to, desktop computers, portable computers, network servers, PDAs (personal digital assistants), tablet computers, wireless terminal devices, embedded devices, etc.

[0027] In the embodiments of this application, the storage device 200 can be disposed within the terminal device 100 or can be an external storage device of the terminal device 100. If the storage device 200 is an external storage medium, the terminal device 100 and the storage device 200 can communicate through any communication method, including but not limited to mobile communication based on the 3rd Generation Partnership Project (3GPP), Long Term Evolution (LTE), and Worldwide Interoperability for Microwave Access (WiMAX), or computer network communication based on the TCP / IP Protocol Suite (TCP / IP) and User Datagram Protocol (UDP).

[0028] It should be noted that, Figure 1The schematic diagram of the image processing system shown is merely an example. The image processing system and scenario described in this application are for the purpose of more clearly illustrating the technical solutions of this application and do not constitute a limitation on the technical solutions provided in this application. As those skilled in the art will know, with the evolution of image processing systems and the emergence of new business scenarios, the technical solutions provided in this application are also applicable to similar technical problems.

[0029] like Figure 2 As shown, Figure 2 This is a schematic flowchart of an embodiment of the image processing method in this application. The image processing method may include the following steps 201 to 203:

[0030] 201. Obtain the image information to be processed.

[0031] In this embodiment, the video to be processed, which requires pseudo-contour removal, can be obtained first, and each image in the video can be used as the image to be processed. The method of obtaining the video can be directly obtained from the corresponding storage medium; this embodiment does not limit the method.

[0032] 202. Perform feature analysis on the image information to be processed to obtain the target image feature information.

[0033] In this embodiment, the target image feature information can be a mask image of a flat area of ​​the image to be processed. In some application scenarios, the image to be processed usually includes different display content, such as: sky, water surface, people, people's clothing, etc. These different display contents can be roughly divided into two categories: one is display content with rich colors, and the other is display content with relatively simple colors. Usually, even if there are false outlines in display content with rich colors, these false outlines will not be noticed by the user because of the rich colors. However, if false outlines appear in display content with relatively simple colors, such as water surface, sky, etc., these solid-color contents, they will be directly observed by the user and will seriously affect the display of the video. Therefore, in this embodiment, the false outlines in these display contents with rich colors can be removed, thereby appropriately reducing the computational burden of false outlines.

[0034] 203. Based on the target image feature information and the image information to be processed, the target image information is determined.

[0035] Based on this, in this embodiment, it can be first determined which regions in the image to be processed are flat regions with relatively uniform color, and which are non-flat regions with richer colors. The method for determining which specific display areas in the image to be processed are flat regions can include: first obtaining the pixel value of each pixel in the image to be processed; when pixel values ​​are the same and adjacent, the adjacent regions with the same pixel values ​​constitute a flat region. Furthermore, a target threshold can be set when determining whether pixel values ​​are the same. When the difference between adjacent pixel values ​​is less than the target threshold, they can also be considered as the same pixel value. Therefore, through the above method, it is possible to determine which regions in the image to be processed are flat regions. At this point, a mask image can be used, where the mask value of pixels in flat regions is 1, and the mask value of pixels in non-flat regions is 0, thereby obtaining the target flat region mask information.

[0036] Once the mask information of the target flat region is obtained, the pixel values ​​with a mask value of 1 can be determined based on the mask information. Then, when filtering the image to be processed, the pixels with a mask value of 1 can be filtered. In this way, the pixels with a mask value of 0 will not be filtered, reducing the number of pixels to be processed and thus reducing the computational burden.

[0037] In this embodiment, the filtering method for the image to be processed may include median filtering: sorting the pixels surrounding each pixel by size and then selecting the pixel with the median value as the value of that pixel to eliminate false contours in the image to be processed; alternatively, Gaussian filtering can be used, which eliminates false contours in the image to be processed by weighted averaging of the pixels surrounding the pixel; or, bilateral filtering can be used, which can eliminate false contours in the image to be processed while preserving edge information. Therefore, this embodiment can use various filtering methods to process false contours in the image to be processed, and thus does not limit the specific filtering method. Furthermore, the above filtering methods can all be processed by referring to the relevant filtering steps, and will not be described in detail in this embodiment.

[0038] To better implement the embodiments of this application, in one embodiment, feature analysis processing is performed on the image information to be processed to obtain target image feature information, including:

[0039] The image information to be processed is subjected to pixel value analysis to obtain the first image feature information; the first feature image information is compared and analyzed to obtain the target image feature information.

[0040] The above embodiments provide a scheme for determining a flat mask image based on pixel values, i.e., color. Building upon this, the embodiments of this application also provide a scheme for determining target image feature information, i.e., a scheme for determining a flat mask image.

[0041] Specifically, in this embodiment, the brightness information of each pixel value in the image to be processed can also be used as the criterion for determining a flat region. For example, the RGB information of the image to be processed can be converted into YUV information through preprocessing. Then, the target flat region mask information can be determined based on the Y channel information in the YUV information of each pixel. Here, the Y channel information is the brightness information of the pixel. Therefore, adjacent pixels with the same brightness can be determined first through the brightness value of each pixel, and the region formed by adjacent pixels with the same brightness can be regarded as the initial flat region, i.e., the first image feature information.

[0042] Since the brightness information of each pixel is not necessarily exactly the same, and the region formed by pixels with approximate brightness information can also be regarded as a flat region, comparative analysis is still required. For example, pixels where the difference in brightness information between two adjacent pixels is less than the target brightness difference are regarded as flat regions, thus obtaining the final target image feature information.

[0043] To better implement the embodiments of this application, in one embodiment, pixel value analysis processing is performed on the image information to be processed to obtain first image feature information, including:

[0044] The target contrast is calculated based on the pixel values ​​of the image information to be processed to obtain the target contrast image information; the target contrast image information is subjected to a first scaling process to obtain the first scaled image information; the first scaled image information is subjected to mean blurring process to obtain the first image feature information.

[0045] The above embodiments provide a scheme for calculating a flat region mask image based on the brightness information of pixel values. In this application embodiment, a scheme for determining a flat region mask image is also provided.

[0046] Specifically, the contrast of each pixel value in the image to be processed can be compared and analyzed to determine the scheme of the mask image for the flat region. For example, the local contrast image information can be determined according to formula (1).

[0047] Formula (1) is shown below:

[0048]

[0049] In formula (1), Let I(m,n) be the average pixel value of the pixel, and M×N be the number of pixels. It should be noted that the local contrast image information of the image to be processed, i.e., the target contrast image information, can be obtained according to formula (1).

[0050] Then, after obtaining the local contrast image information according to formula (1), the local contrast image information can be reduced to half its size to obtain the first scaled image information. Then, mean filtering is performed on the first scaled image information to obtain the mean-filtered image information. After that, the regions with the same or similar contrast in the mean-filtered image information are identified as flat regions, and the regions with different or dissimilar contrast are identified as texture regions.

[0051] To better implement the embodiments of this application, in one embodiment, the first image feature information includes: first comparison image information and second comparison image information; the first scaled image information is subjected to mean blurring processing to obtain the first image feature information, including:

[0052] The first scaled image information is subjected to a first mean filtering process to obtain initial first comparison image information; the first scaled image information is subjected to a second mean filtering process to obtain initial second comparison image information; the initial first comparison image information and the initial second comparison image information are subjected to a second scaling process to obtain first comparison image information and second comparison image information.

[0053] The above embodiments provide a scheme for calculating the flat region mask image after only one filtering step. This application also provides a scheme for more accurate calculation.

[0054] Specifically, the first scaled image information can be subjected to two mean filtering operations, namely the initial first comparison image information and the initial second comparison image information. Then, the initial first comparison image information and the initial second comparison image information can be subjected to a second scaling process to obtain the first comparison image information and the second comparison image information.

[0055] Based on this, the first feature image information is compared, analyzed, and processed to obtain the target image feature information, including:

[0056] Two pixels at the same position in the first comparison image information and the second comparison image information are taken as pixel pairs to be compared. Each pixel pair to be compared is compared with the first pixel threshold and the second pixel threshold. Target pixel pairs in which both pixels in the pixel pairs to be compared are determined. The image regions corresponding to the pixels in the target pixel pairs are determined as target image feature information.

[0057] According to the embodiments of this application described above, after obtaining the first comparison image information and the second comparison image information, it is necessary to determine the flat region mask image using the two comparison image information. Therefore, the method for determining the initial flat region mask information may include the following: for the regions corresponding to adjacent pixels whose brightness values ​​and pixel values ​​of the pixels in both the first and second comparison image information are less than the corresponding brightness value thresholds, these are considered the initial flat regions; otherwise, they are considered texture regions.

[0058] To better implement the embodiments of this application, in one embodiment of this application, determining the image region corresponding to the pixel point in the target pixel pair as the target image feature information includes:

[0059] The image region corresponding to the pixel in the target pixel pair is determined as the initial target image feature information; at least one first target region with adjacent pixels and the same pixel value is determined in the initial target image feature information; a portion of the first target region is removed to obtain the target image feature information, wherein the area of ​​the portion of the first target region is smaller than the target area.

[0060] The above embodiments provide a scheme for determining a flat region mask image based on comparative image information. However, an image may, in some cases, include multiple regions of a single color. If a region of a single color is a flat region, the flat region mask information may include multiple sub-flat regions. Furthermore, in some smaller flat regions, even if false contours appear, they may be difficult for the user to detect due to their small size.

[0061] Therefore, to further reduce the computational parameters, the flat region mask information obtained according to the above embodiment is used as the initial target image feature information. Then, the flat regions with smaller areas in the initial target image feature information can be identified and filtered out, so that pseudo-contours in the smaller flat regions are not removed during subsequent pseudo-contour processing. Thus, this method can further reduce the computational parameters. Therefore, in this embodiment, the area of ​​each sub-flat region can be determined, and regions with the same pixel value in each flat region can be connected to form a connected component. Then, the sub-flat region with the smallest connected component is filtered out to obtain the target image feature information; alternatively, an area threshold can be set to filter out connected components smaller than the area threshold to obtain the target image feature information.

[0062] To better implement the embodiments of this application, in one embodiment, the target image information is determined based on the target image feature information and the image information to be processed, including:

[0063] The image information to be processed is filtered to obtain the first processed image information; the target image information is determined based on the first processed image information, the image information to be processed, and the target image feature information.

[0064] In this embodiment, when processing the pseudo-contour of an image based on the feature information of the target image, the image to be processed can be filtered first to remove some noise information, thereby obtaining the first processed image information. The filtering method can be any filtering method, and this embodiment does not limit the specific filtering method used.

[0065] After obtaining the first processed image information, the image information to be processed, the first processed image information, and the target image feature information can be superimposed. For example, the first processed image information is first superimposed with the target image feature information. Using the mask information in the target image feature information, the processing area that needs to be processed for pseudo-contours is determined. At this time, pseudo-contour processing is performed on the processing area to obtain the processed image. Then, based on the mask information of the target image feature information and the image to be processed, the non-processed areas that do not need pseudo-contour processing are determined. The non-processed areas in the image to be processed are then concatenated with the processed image to obtain the target image information with pseudo-contours removed.

[0066] To better implement the embodiments of this application, in one embodiment, the image information to be processed is filtered to obtain first processed image information, including:

[0067] The image information to be processed is filtered and then scaled to obtain second scaled image information; the region in the second scaled image information where the pixels are adjacent and have the same pixel value is determined as the second target region; the second target region is filtered to obtain the first processed image information.

[0068] The above embodiments provide a scheme for filtering an image to be processed and obtaining first processed image information. This application also provides a filtering method.

[0069] Specifically, the image to be processed can first be scaled to a resolution of 640×360 to obtain a second scaled image. Then, the region in the second scaled image where adjacent pixels have the same pixel value can be identified as the second target region. Since the second target region consists of regions with identical pixel values, the presence of false contours in this region can significantly impact the user's viewing experience. Therefore, false contour processing is required for the second target region. The filtering method for the second target region can refer to the filtering method described in the previous embodiment, and will not be elaborated here. Since the filtered image is obtained from the scaled image to be processed, the number of parameters in the filtered image is less than that in the unscaled image.

[0070] In addition, a one-dimensional vector can be input along a certain direction (horizontal, vertical, or diagonal) to distinguish different second target regions based on pixel values. This involves determining the first identical pixel values ​​in the second scaled image to be processed, similar to the method described above. At this point, the regions formed by identical and adjacent first identical pixel values ​​can be considered as initial second target regions. Subsequently, to reduce the influence of a few pixels, some initial second target regions can be merged. Pixel values ​​where the difference between two adjacent initial second target regions is less than a set second pixel threshold (e.g., threshold 2) are considered second identical pixel values. Finally, determining the second target region based on the first and second identical pixel values ​​can include merging the initial second target regions corresponding to the second identical pixel values ​​if the width of the initial second target region formed by two adjacent second identical pixel values ​​is less than a set width threshold (e.g., threshold 5), resulting in a merged second target region. This merged second target region, along with the unmerged second target regions among the first identical pixel values, can then be considered together as the target region.

[0071] It should also be noted that after filtering the second target region, morphological opening and closing operations can be performed on the filtered image to optimize it. The morphological opening and closing operations can be performed using relevant techniques, which will not be elaborated upon in this embodiment.

[0072] To better implement the embodiments of this application, in one embodiment, filtering is performed on the second target region to obtain first processed image information, including:

[0073] Each second target region is taken as the region to be processed. Pixels in the region to be processed are sampled to obtain sampled pixel information. The pixel values ​​corresponding to each sampled pixel in the sampled pixel information are weighted and averaged to obtain the average pixel value. Based on the average pixel value corresponding to each region to be processed, the sampled image information is determined. The sampled image information is then subjected to mean filtering to obtain the first processed image information.

[0074] The above embodiments provide a filtering method, while the embodiments of this application provide another filtering method.

[0075] Specifically, filtering can be performed as follows: For example, a one-dimensional sparse filter can be set. Assuming the width of the region to be processed where a certain pixel is located is w, and the pixel is s(k), then samples are taken along the direction set by the one-dimensional sparse filter at that pixel. The sampled points are s[k-2q-e], s[k-2q], s[kq], s[k], s[k+q], s[k+2q], and s[k+2q+e], a total of 7 points. Among these 7 sampling points, the parameter q is... w is the width of the region to be processed where the pixel is located, m is a preset value (usually 2), and e is... Then, based on this sampling point, the following weighted average can be performed:

[0076]

[0077] Where Th is the set threshold, and according to the above formula, the weighted average filtered pixel value s'[k] can be obtained. Finally, this average pixel value is the pixel value of the corresponding area to be processed, thus completing the filtering operation of the target area.

[0078] Furthermore, it should be noted that the weighted averaging of the above sampling can be performed multiple times. For example, seven pixels can be sampled sequentially in the horizontal, vertical, diagonal upward, and diagonal downward directions, and the weighted averaging operation can be repeated to obtain multiple average pixel values. During this process, the value of Th can be gradually decreased. After obtaining multiple average pixel values, these values ​​can be averaged again to obtain the final pixel value for the corresponding area to be processed.

[0079] To better implement the embodiments of this application, in one embodiment, the target image information is determined based on the first processed image information, the image information to be processed, and the target image feature information, including:

[0080] The first processed image information, the image information to be processed, and the target image feature information are fused to obtain fused image information. Each pixel in the fused image information is taken as the pixel to be processed, and the target distance between the pixel to be processed and the nearest target region is determined. Based on the target distance, the target probability information of the pixel to be processed is determined. Based on the target probability information and the pixel value of the pixel in the nearest target region, the pixel value of the pixel to be processed is adjusted to obtain the target image information.

[0081] The above embodiments provide a method for contrast optimization of the initial target image to be processed, thereby obtaining the target image to be processed. However, in order to achieve better removal of pseudo-contours, this application also provides an implementation method.

[0082] Specifically, the distance *d* from each pixel to the boundary of the nearest target region can be calculated; the width of the nearest target region is *w*, and the probability of perturbation is calculated as *p* = *d* / *w*. Then, based on the probability *p* and the relationship between the pixel value in the nearest target region and the pixel value, the pixel can be incremented by 1 (if the value is less than the contour band value) or decremented by 1 (if the value is greater than the contour band value). For example, if the pixel value is less than the pixel value in the target region, increment by 1; otherwise, decrement by 1; if they are the same, no action is taken. Then, the pixels are counted vertically, and the above steps are repeated to finally obtain the output target image to be processed.

[0083] To better implement the image processing method in the embodiments of this application, an image processing apparatus is also provided in the embodiments of this application, such as... Figure 3 As shown, the device 300 includes:

[0084] The acquisition module 301 is used to acquire image information to be processed;

[0085] Processing module 302 is used to perform feature analysis processing on the image information to be processed to obtain target image feature information;

[0086] The processing module 302 is also used to determine the target image information based on the target image feature information and the image information to be processed.

[0087] The image processing apparatus provided in this application can acquire the image to be processed through the acquisition module 301 and perform filtering processing on the image to be processed through the processing module 302, thereby eliminating false contours in the image to be processed.

[0088] In some embodiments of this application, the processing module 302 performs feature analysis processing on the image information to be processed to obtain target image feature information, including:

[0089] The image information to be processed is subjected to pixel value analysis to obtain the first image feature information;

[0090] The first feature image information is compared, analyzed, and processed to obtain the target image feature information.

[0091] In some embodiments of this application, the processing module 302 performs pixel value analysis processing on the image information to be processed to obtain first image feature information, including:

[0092] Target contrast is calculated based on the pixel values ​​of the image information to be processed, and target contrast image information is obtained.

[0093] The target contrast image information is subjected to a first scaling process to obtain the first scaled image information;

[0094] The first scaled image information is subjected to mean blurring to obtain the first image feature information.

[0095] In some embodiments of this application, the first image feature information includes: first comparison image information and second comparison image information;

[0096] Processing module 302 performs mean blurring on the first scaled image information to obtain first image feature information, including:

[0097] The first scaled image information is subjected to a first mean filter to obtain the initial first comparison image information;

[0098] The first scaled image information is subjected to a second mean filter to obtain the initial second comparison image information;

[0099] The initial first comparison image information and the initial second comparison image information are subjected to a second scaling process to obtain the first comparison image information and the second comparison image information.

[0100] In some embodiments of this application, the processing module 302 compares and analyzes the first feature image information to obtain target image feature information, including:

[0101] Two pixels at the same position in the first comparison image information and the second comparison image information are taken as the pixel pairs to be compared, and each pixel pair to be compared is compared with the first pixel threshold and the second pixel threshold.

[0102] Identify target pixel pairs in the pixel pairs to be compared, where both pixels are less than the first pixel threshold and the second pixel threshold.

[0103] The image region corresponding to the pixel in the target pixel pair is determined as the target image feature information.

[0104] In some embodiments of this application, the processing module 302 determines the image region corresponding to the pixel in the target pixel pair as the target image feature information, including:

[0105] The image region corresponding to the pixel in the target pixel pair is determined as the initial target image feature information;

[0106] Identify at least one first target region in the initial target image feature information where pixels are adjacent and have the same pixel value;

[0107] Remove a portion of the first target region from the first target region to obtain target image feature information. The area of ​​the portion of the first target region is smaller than the target area.

[0108] In some embodiments of this application, the processing module 302 determines the target image information based on the target image feature information and the image information to be processed, including:

[0109] The image information to be processed is filtered to obtain the first processed image information;

[0110] The target image information is determined based on the first processed image information, the image information to be processed, and the target image feature information.

[0111] In some embodiments of this application, the processing module 302 performs filtering processing on the image information to be processed to obtain first processed image information, including:

[0112] The image information to be processed is filtered and then scaled to obtain the second scaled image information.

[0113] The region in the second scaled image information where pixels are adjacent and have the same pixel value is identified as the second target region.

[0114] The second target region is filtered to obtain the first processed image information.

[0115] In some embodiments of this application, the processing module 302 performs filtering processing on the second target region to obtain first processed image information, including:

[0116] Each second target region is taken as the region to be processed, and the pixels in the region to be processed are sampled to obtain the sampled pixel information;

[0117] The average pixel value is obtained by weighting the pixel values ​​corresponding to each sampled pixel in the sampled pixel information.

[0118] The sampled image information is determined based on the average pixel value corresponding to each region to be processed;

[0119] The sampled image information is subjected to mean filtering to obtain the first processed image information.

[0120] In some embodiments of this application, the processing module 302 determines the sampled image information based on the average pixel value corresponding to each region to be processed, including:

[0121] The average pixel value is used to replace the pixel value of each pixel in the corresponding area to be processed to obtain the sampled image information.

[0122] In some embodiments of this application, the processing module 302 determines the target image information based on the first processed image information, the image information to be processed, and the target image feature information, including:

[0123] The first image information, the image information to be processed, and the feature information of the target image are fused to obtain fused image information;

[0124] Each pixel in the fused image information is taken as the pixel to be processed, and the target distance between the pixel to be processed and the nearest target region is determined.

[0125] Based on the target distance, determine the target probability information of the pixel to be processed;

[0126] The pixel values ​​of the pixels to be processed are adjusted based on the target probability information and the pixel values ​​of the nearest pixels in the target region to obtain the target image information.

[0127] This application also provides a terminal device, which includes a processor, a memory, and a computer program stored in the memory and executable on the processor. The processor executes the computer program to implement the steps of any of the image processing methods in this application. This terminal device integrates any of the image processing methods provided in this application, such as... Figure 4 As shown, it illustrates a structural schematic diagram of the terminal device involved in the embodiments of this application. Specifically:

[0128] The terminal device may include components such as a processor 401 with one or more processing cores, a memory 402 with one or more computer-readable storage media, a power supply 403, and an input unit 404. Those skilled in the art will understand that... Figure 4 The terminal device structure shown does not constitute a limitation on the terminal device and may include more or fewer components than shown, or combine certain components, or have different component arrangements. Wherein:

[0129] The processor 401 is the control center of the terminal device. It connects various parts of the terminal device via various interfaces and lines, and performs various functions and processes data by running or executing software programs and / or modules stored in the memory 402, and by calling data stored in the memory 402, thereby providing overall monitoring of the terminal device. Optionally, the processor 401 may include one or more processing cores; the processor 401 may be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor. Preferably, the processor 401 may integrate an application processor and a modem processor, wherein the application processor mainly handles the operating system, user interface, and application programs, and the modem processor mainly handles wireless communication. It is understood that the aforementioned modem processor may not be integrated into the processor 401.

[0130] The memory 402 can be used to store software programs and modules. The processor 401 executes various functional applications and data processing by running the software programs and modules stored in the memory 402. The memory 402 may mainly include a program storage area and a data storage area. The program storage area may store the operating system, application programs required for at least one function (such as sound playback function, image playback function, etc.), etc.; the data storage area may store data created according to the use of the terminal device, etc. In addition, the memory 402 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device. Accordingly, the memory 402 may also include a memory controller to provide the processor 401 with access to the memory 402.

[0131] The terminal device also includes a power supply 403 that supplies power to the various components. Preferably, the power supply 403 can be logically connected to the processor 401 through a power management system, thereby enabling functions such as charging, discharging, and power consumption management through the power management system. The power supply 403 may also include one or more DC or AC power supplies, recharging systems, power fault detection circuits, power converters or inverters, power status indicators, and other arbitrary components.

[0132] The terminal device may also include an input unit 404, which can be used to receive input digital or character information, and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control.

[0133] Although not shown, the terminal device may also include a display unit, etc., which will not be described in detail here. Specifically, in this embodiment, the processor 401 in the terminal device loads the executable files corresponding to the processes of one or more applications into the memory 402 according to the following instructions, and the processor 401 runs the applications stored in the memory 402 to realize various functions, such as:

[0134] Obtain the image information to be processed;

[0135] Feature analysis is performed on the image information to be processed to obtain the target image feature information;

[0136] Based on the target image feature information and the image information to be processed, the target image information is determined.

[0137] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be performed by instructions, or by instructions controlling related hardware. These instructions can be stored in a computer-readable storage medium and loaded and executed by a processor.

[0138] Therefore, embodiments of this application provide a computer-readable storage medium, which may include: read-only memory (ROM), random access memory (RAM), a magnetic disk, or an optical disk, etc. A computer program is stored thereon, and the computer program is loaded by a processor to execute the steps in any of the image processing methods provided in embodiments of this application. For example, the computer program loaded by the processor can execute the following steps:

[0139] Obtain the image information to be processed;

[0140] Feature analysis is performed on the image information to be processed to obtain the target image feature information;

[0141] Based on the target image feature information and the image information to be processed, the target image information is determined.

[0142] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the detailed descriptions of other embodiments above, which will not be repeated here.

[0143] In practice, each of the above units or structures can be implemented as an independent entity or can be arbitrarily combined to be implemented as the same or several entities. For the specific implementation of each of the above units or structures, please refer to the previous method embodiments, which will not be repeated here.

[0144] For details on the implementation of each of the above operations, please refer to the previous examples, which will not be repeated here.

[0145] The above provides a detailed description of an image processing method and apparatus provided in the embodiments of this application. Specific examples have been used to illustrate the principles and implementation methods of this application. The description of the above embodiments is only for the purpose of helping to understand the method and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.

Claims

1. An image processing method, characterized in that, The method includes: Obtain the image information to be processed; The image information to be processed is subjected to feature analysis to obtain the target image feature information; Based on the target image feature information and the image information to be processed, the target image information is determined.

2. The image processing method according to claim 1, characterized in that, The step of performing feature analysis on the image information to be processed to obtain target image feature information includes: The image information to be processed is subjected to pixel value analysis to obtain the first image feature information; The first feature image information is compared, analyzed, and processed to obtain the target image feature information.

3. The image processing method according to claim 2, characterized in that, The step of performing pixel value analysis on the image information to be processed to obtain first image feature information includes: Target contrast is calculated based on the pixel values ​​of the image information to be processed, and target contrast image information is obtained. The target contrast image information is subjected to a first scaling process to obtain first scaled image information; The first scaled image information is subjected to mean blurring to obtain the first image feature information.

4. The image processing method according to claim 3, characterized in that, The first image feature information includes: first comparison image information and second comparison image information; The step of performing mean blurring on the first scaled image information to obtain the first image feature information includes: The first scaled image information is subjected to a first mean filter to obtain initial first comparison image information; The first scaled image information is subjected to a second mean filtering process to obtain the initial second comparison image information; The initial first comparison image information and the initial second comparison image information are subjected to a second scaling process to obtain the first comparison image information and the second comparison image information.

5. The image processing method according to claim 4, characterized in that, The step of comparing and analyzing the first feature image information to obtain the target image feature information includes: Using two pixels at the same position in the first comparison image information and the second comparison image information as pixel pairs to be compared, each pixel pair to be compared is compared with the first pixel threshold and the second pixel threshold. Identify target pixel pairs in the pixel pairs to be compared, where both pixels are less than the first pixel threshold and the second pixel threshold. The image region corresponding to the pixel in the target pixel pair is determined as the target image feature information.

6. The image processing method according to claim 5, characterized in that, The step of determining the image region corresponding to the pixel in the target pixel pair as target image feature information includes: The image region corresponding to the pixel in the target pixel pair is determined as the initial target image feature information; Determine at least one first target region in the initial target image feature information where pixels are adjacent and have the same pixel value; By removing a portion of the first target region from the first target region, target image feature information is obtained, wherein the area of ​​the portion of the first target region is smaller than the target area.

7. The image processing method according to claim 1, characterized in that, The step of determining the target image information based on the target image feature information and the image information to be processed includes: The image information to be processed is filtered to obtain the first processed image information; The target image information is determined based on the first processed image information, the image information to be processed, and the target image feature information.

8. The image processing method according to claim 7, characterized in that, The step of filtering the image information to be processed to obtain the first processed image information includes: The image information to be processed is filtered and then scaled to obtain the second scaled image information. The region in the second scaled image information where pixels are adjacent and have the same pixel value is identified as the second target region. The second target region is filtered to obtain the first processed image information.

9. The image processing method according to claim 8, characterized in that, The filtering process on the second target region to obtain the first processed image information includes: Each of the second target regions is taken as the region to be processed, and the pixels in the region to be processed are sampled to obtain the sampled pixel information; The average pixel value is obtained by weighting the pixel values ​​corresponding to each sampled pixel in the sampled pixel information. The sampled image information is determined based on the average pixel value corresponding to each of the regions to be processed; The sampled image information is subjected to mean filtering to obtain the first processed image information.

10. The image processing method according to claim 9, characterized in that, The step of determining the sampled image information based on the average pixel value corresponding to each of the regions to be processed includes: The average pixel value is used to replace the pixel value of each pixel in the corresponding area to be processed to obtain the sampled image information.

11. The image processing method according to claim 8, characterized in that, The step of determining the target image information based on the first processed image information, the image information to be processed, and the target image feature information includes: The first processed image information, the image information to be processed, and the target image feature information are fused to obtain fused image information; Taking each pixel in the fused image information as a pixel to be processed, determine the target distance between the pixel to be processed and the nearest target region; Based on the target distance, determine the target probability information of the pixel to be processed; The pixel value of the pixel to be processed is adjusted according to the target probability information and the pixel value of the nearest pixel in the target region to obtain the target image information.

12. An image processing apparatus, characterized in that, The device includes: The acquisition module is used to acquire information about the image to be processed. The processing module is used to perform feature analysis processing on the image information to be processed to obtain target image feature information; The processing module is also used to determine the target image information based on the target image feature information and the image information to be processed; Preferably, the processing module performs feature analysis on the image information to be processed to obtain target image feature information, including: The image information to be processed is subjected to pixel value analysis to obtain the first image feature information; The first feature image information is compared, analyzed, and processed to obtain the target image feature information; Preferably, the processing module performs pixel value analysis on the image information to be processed to obtain first image feature information, including: Target contrast is calculated based on the pixel values ​​of the image information to be processed, and target contrast image information is obtained. The target contrast image information is subjected to a first scaling process to obtain first scaled image information; The first scaled image information is subjected to mean blurring to obtain the first image feature information; Preferably, the first image feature information includes: first comparison image information and second comparison image information; The processing module performs mean blurring on the first scaled image information to obtain first image feature information, including: The first scaled image information is subjected to a first mean filter to obtain initial first comparison image information; The first scaled image information is subjected to a second mean filtering process to obtain the initial second comparison image information; The initial first comparison image information and the initial second comparison image information are subjected to a second scaling process to obtain the first comparison image information and the second comparison image information; Preferably, the processing module compares and analyzes the first feature image information to obtain target image feature information, including: Using two pixels at the same position in the first comparison image information and the second comparison image information as pixel pairs to be compared, each pixel pair to be compared is compared with the first pixel threshold and the second pixel threshold. Identify target pixel pairs in the pixel pairs to be compared, where both pixels are less than the first pixel threshold and the second pixel threshold. The image region corresponding to the pixel in the target pixel pair is determined as the target image feature information; Preferably, the processing module determines the image region corresponding to the pixel in the target pixel pair as the target image feature information, including: The image region corresponding to the pixel in the target pixel pair is determined as the initial target image feature information; Determine at least one first target region in the initial target image feature information where pixels are adjacent and have the same pixel value; Remove a portion of the first target region from the first target region to obtain target image feature information, wherein the area of ​​the portion of the first target region is smaller than the target area; Preferably, the processing module determines the target image information based on the target image feature information and the image information to be processed, including: The image information to be processed is filtered to obtain the first processed image information; The target image information is determined based on the first processed image information, the image information to be processed, and the target image feature information; Preferably, the processing module performs filtering on the image information to be processed to obtain first processed image information, including: The image information to be processed is filtered and then scaled to obtain the second scaled image information. The region in the second scaled image information where pixels are adjacent and have the same pixel value is identified as the second target region. The second target region is filtered to obtain the first processed image information; Preferably, the processing module performs filtering on the second target region to obtain first processed image information, including: Each of the second target regions is taken as the region to be processed, and the pixels in the region to be processed are sampled to obtain the sampled pixel information; The average pixel value is obtained by weighting the pixel values ​​corresponding to each sampled pixel in the sampled pixel information. The sampled image information is determined based on the average pixel value corresponding to each of the regions to be processed; The sampled image information is subjected to mean filtering to obtain the first processed image information; Preferably, the processing module determines the sampled image information based on the average pixel value corresponding to each of the regions to be processed, including: The average pixel value is used to replace the pixel value of each pixel in the corresponding area to be processed to obtain the sampled image information; Preferably, the processing module determines the target image information based on the first processed image information, the image information to be processed, and the target image feature information, including: The first processed image information, the image information to be processed, and the target image feature information are fused to obtain fused image information; Taking each pixel in the fused image information as a pixel to be processed, determine the target distance between the pixel to be processed and the nearest target region; Based on the target distance, determine the target probability information of the pixel to be processed; The pixel value of the pixel to be processed is adjusted according to the target probability information and the pixel value of the nearest pixel in the target region to obtain the target image information.

13. A terminal device, characterized in that, The terminal device includes a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the image processing method according to any one of claims 1 to 11.

14. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that is executed by a processor to implement the steps of the image processing method according to any one of claims 1 to 11.